View Full Version : Accessing different controllers in a list controller with macsript
02-26-2009, 11:03 AM
Hi, I have a small problem where I don't know how to access each controller in a rotation list controller.
If I have different types of controllers in the list I know I can do something like this:
But if I have 2 Euler_XYZ controllers in the list controller, I don't know the syntax to access these seperately. I want to use this code inside a rotation script controller.
02-26-2009, 11:35 AM
check the Help File in SubAnims
the same using subAnim
.weight : float array
.average (Average_Weights) : boolean
.count : integer
.active : index
.Frozen_Rotation : quat
.Zero_Euler_XYZ : quat
.Available : quat
hope it helps
02-26-2009, 12:06 PM
alternatively, see the List controller's Interface;
.count : integer : Read
.active : index : Read|Write
<TSTR by value>getName <index>listIndex
<void>setName <index>listIndex <string>name
The interface would provides the fool-proof access methods; though it'd be unlikely that the subanim indices would change.
02-26-2009, 12:20 PM
Ah yes, thank you guys. Yes, I always forget about subanim. :) Lucky I have generous people like you to remind me when my brain fails me. Also thanks to Ehsan.
Sub anim indexs is not always the easiest way to do it as you can't really see what you are getting. You can use getSubAnimNames and get the named tracks and then use those to get to the tracks that you want. More typing but easier to deal with when you come back to it. Also the order cold change in some thing like a list controller and then the index will be incorrect. Problem with using names is the name could change or you could have two of the same name.
02-26-2009, 12:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.