[Closed] Question about accessing to bezier_scale controller
Hi guys, i need to acces to individual components of a bezier_scale (x,y,z of a point3) and “wire” them to 3 different spinners, but i wonder if i can access them like their were controllers, let me put an example.
I know i can ask for these individual components by writing [i][b]$[/b][/i][b][i]myBox[/i][/b][i][b].scale.x[/b], [b]$[/b][/i][b][i]myBox[/i][/b][i][b].scale.y[/b] [/i]or[i] [b]$[/b][/i][b][i]myBox[/i][/b][i][b].scale.z[/b][/i]; but these components has not subcontrollers to wire to a spinner.
Lets suppose i have a spinner and i want to wire the x component of a position_xyz controller i could write:
spinner positionXSp “xPos” controller: $myBox.position.controller.x_position.controller
Well i want to do the same but i need to control a bezier_Scale x,y or z component that way. I see in the Motion Panel, inside Scale (Key Info Basic) the spinners "X Value", "Y Value", and "Z Value", so i think they could be accessed as they were subcontrollers of the Bezier_Scale controller, the same as we can see by clicking with the right mouse button over the Scale button in the Main Toolbar. If it could be done, it would be the best way for me to access to that values, i hope you can help me, Tanks in advance!!.
Can you not just give the scale controller a bezier_xyz(), scale_xyz etc… controller? i.e like a position_XYZ instead of a bezier_position() You do understand the controller assignment process in max right?
Hi Eek! thanks for your answer. Actually, i don´t want to change the scale controller type of the object, because i´m working in a kind of maya´s channelBox by applying a modifier to an object to see transform data in the Modify Panel so, it has to check for what kind of position, rotation and scale controller has the object and display the info, it´s just for animation purposes on my riggings. Thats why i wonder if it could be possible to relate the controller parameter of a spinner to a bezier_scale controller, that is the default scale controller in max, so up to now, i solve it this way:
ex:
function scaleExample =
(
ca = attributes myAttributes
(
parameters myParam rollout: myRollout
(
scaleX type:#float ui:(scaleXSp)
scaleY type:#float ui:(scaleYSp)
scaleZ type:#float ui:(scaleZSp)
)
rollout myRollout "Transform"
(
fn setInitialSpinnerScale =
(
scaleX = $.scale.x
scaleY = $.scale.y
scaleZ = $.scale.z
)
group "Scale Info"
(
spinner scaleXSp "Scale X %" range:[-1000,1000,100] fieldWidth:40
spinner scaleYSp "Scale Y %" range:[-1000,1000,100] fieldWidth:40
spinner scaleZSp "Scale Z %" range:[-1000,1000,100] fieldWidth:40
on scaleXSp changed val do $.scale = [scaleX,scaleY,scaleZ]
on scaleYSp changed val do $.scale = [scaleX,scaleY,scaleZ]
on scaleZSp changed val do $.scale = [scaleX,scaleY,scaleZ]
)
on myRollout open do setInitialSpinnerScale ()
)
) -- ca
addmodifier x (emptyModifier name:"scaleInfo" )
custAttributes.add x.modifiers[#scaleInfo] ca
) – scaleExample
scaleExample $
Perhaps it couldn´t be accesed the way that a scale_xyz could be ($.scale.controller.x_scale.controller), but i wanted to know if there is a better way than useing spinner event handlers. Thanks Eek, it´s good to see you!.