PDA

View Full Version : Get selected envelope/channel in GE



ernpchan
09-18-2014, 07:28 PM
Is it possible to get the selected envelopes/channels in the GE?

Ryan Roye
09-19-2014, 06:17 AM
Is it possible to get the selected envelopes/channels in the GE?

My prediction is that you'd need an indirect way of doing this; I haven't had much luck with GE functions either.

While we're at it... I'd sure like to know how to select keys in the graph editor too via python (the reason being is that the majority of GE functions are supposed to operate on selected keys)

Sensei
09-19-2014, 08:10 AM
The all possible GE commands are described in LWSDK/html/commands/common.html

ernpchan
09-19-2014, 08:22 AM
Thanks Sensei.

ernpchan
09-19-2014, 11:48 AM
The all possible GE commands are described in LWSDK/html/commands/common.html


GE_SetGroup xgroupid
Assign the selected channels to a group.

hexA
hexadecimal number. The value should be preceeded by "0x" or "0X". If it does not, some hexadecimal values may be confused with decimal values. Some data arguments can be 32bits or 64bits depending on the OS platform in use. Channel IDs and Channel Group IDs fall into this category. Although an item identifier (LWItemID) may appear to be 64bit value on some platforms, only the lower 32bits is ever used. Be mindful of how the '%p' printf type (useful for outputting 64bit hexidecimal values) functions on various platforms; some will prefix "0x" and some will not. It is essential that 64bit arguments be specified in hexidecimal format with the prefixed "0x" or "0X".

So what is GE_SetGroup expecting? I'm trying the below and it's not working:

arg = hex(500)
grp = lwsdk.command('GE_SetGroup ' + str(arg))


If I try to iterate through the channels in that grp I get an error that the LWChanGroupID couldn't be converted.

Sensei
09-19-2014, 11:56 AM
Run cmd history master, and see how command looks like for LW.

ernpchan
09-19-2014, 12:02 PM
Run cmd history master, and see how command looks like for LW.

I found:


GE_SetGroup <groupid>

That doesn't tell me how to create a <groupid>

I know I can get one via chanGroup but that's all the channels for an item. Hoping to create a group based on user selection in the GE.