Isotropix Forums

Accessing items in Slots (1-8)

Clarisse Scripting related topics

Accessing items in Slots (1-8)

Unread postby horhew » Fri Sep 14, 2018 2:30 pm

Hello,

I'm trying to figure out how to use
Code: Select all
ix.application.get_selection().get_item(group, index)

to access selected items in a particular Slot (1...8).Unfortunately I can't figure out what to pass as "group" in order to achieve that. It works with "global" and by the same logic I tried passing in "slot_1", "slot1" etc, but to no avail. Anyone knows how to do this?

Cheers,
George
horhew
 
Posts: 1
Joined: Wed Sep 12, 2018 7:05 pm

Re: Accessing items in Slots (1-8)

Unread postby desmond » Sat Sep 15, 2018 7:18 am

If you select few items in a context and paste this into the script editor, it works.
You first call the selection, which gets filled with items then you have to select an item to work over. What you think its a group its already there, so you basically call just the index from the list of the selected items.
Code: Select all
selection = ix.application.get_selection().get_item(0)
print selection

group = ix.application.get_selection()
print group.get_item(1)


pythonselection = ix.selection[0]
print pythonselection

groupselect = ix.application.get_selection()
cam = group.get_item(1)
do_move = cam.attrs.translate[0] = 10



hope this helps
desmond
 
Posts: 2
Joined: Mon Feb 05, 2018 9:46 am


Return to Scripting