View Full Version : MaxScript Spinner question..
[DTZ] 02-03-2003, 06:47 PM Hi again!
I'm having another problem with maxscript! :)
I'm trying to control the position of an object by three maxscript spinners, and i'm wanting to have,
(1) The spinner update the position of the object
(2) Have the spinner's value update if the object is moved by other means (ie.. transform gizmo etc).
The object has a position_XYZ controller.
I'm using the following syntax for the spinner, is this right? ...
spinner OBJ_XPOS "" pos:[249,224] fieldwidth:32 type:#float range:[8,24,8] controller:(???)
where ??? i've tried various... Am I right in thinking I need to split the XY & Z coords from the position_XYZ controller? Assign a new controller instead etc??
Hope this makes some sort of sense! :)
Thanks
[DTZ]
|
|
erilaz
02-03-2003, 10:14 PM
It would be best to ask this on the maxscript forum on discreets support site. Swami will get you up to speed very quickly.
LFShade
02-03-2003, 10:15 PM
You just need to supply the object's X, Y, and Z rotation controllers to the X, Y, and Z spinners. Thus,
x_controller = $object.rotation.controller.x_position.controller
spinner OBJ_XPOS "" pos:[249,224] fieldwidth:32 type:#float range:[8,24,8] controller:x_controller
will cause the spinner to update the object's X position, and vice-verse. Have fun!
Oh, and by the way - Swami is much too busy lately to be answering any Q's on the Discreet forums, but there are many other knowledgeable folks over there that are more than willing to help ;)
erilaz
02-03-2003, 10:37 PM
Yeah... that too. But I've always found swami to answer my questions in under 10 minutes! :) Maybe I've just been lucky.
I'll remember you in future LFShade! Thanks for the heads-up.:thumbsup: I didn't mean to undermine anyone on here.
LFShade
02-03-2003, 11:21 PM
You're cool, erilaz; I wasn't suggesting that you were stepping on any toes here :cool: And Swami is ordinarily tops at answering questions quickly, it's just that his current job seems to have him too busy to lend a hand more than once in a great while nowadays.
For not-too-heavy scripting questions, I might just have an answer now and again, though :thumbsup:
[DTZ]
02-03-2003, 11:37 PM
Hi!, Thanks for the replies!! appreciate it!
LFShade; Just wondering, I'm only wanting the position values, and not the rotation, so should that be...
z_controller = $object.position.controller.z_position.controller
This is almost workin... however when stepping through the animation with the time-bar slider, the objects z-position spinner is changing, but not to the same value as the object's world z position? Any ideas?
I hope i'm explaining this OK... complete script newbie here :)
thanks again
[DTZ]
EDIT: Hey Just ignore me! appears I'm a muppet! Workin now - thanks again!! :D
LFShade
02-04-2003, 12:31 AM
Sorry 'bout the little error in my code there. I think my mind must have wandered; I got x_position right, but had it as a property of a rotation controller. Oops! My fingers sometimes do different things than my brain :surprised
CGTalk Moderation
01-14-2006, 08:00 AM
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-2012, Jelsoft Enterprises Ltd.