View Full Version : MaxScript, float script controllers, and custom attributes
Malkalypse 12-02-2008, 11:13 PM I have an object with an attribute holder containing a custom attribute slider. Pretty standard, but for the sake of clarity:
http://www.versatileartist.com/temp/slider_track.jpg
Nothing tricky so far.
Now, I need a script that will take that slider and use it as an "assign track" variable for a script controller. Basically, taking the following script and figuring out what to put at ????:
p = point size:.05
c = path_Constraint()
p.pos.controller = c
c.path = $theObject
fs = float_Script()
c.percent.controller = fs
fs.addTarget "theSlider" $theObject.modifiers[1].????
|
|
davestewart
12-02-2008, 11:20 PM
Turn on the MacroRecorder in the listener, move the slider and check the listener's pink pane :)
ZeBoxx2
12-02-2008, 11:27 PM
Turn on the MacroRecorder in the listener, move the slider and check the listener's pink pane :)
Is... that supposed to show something? Or are you pointing out that it shows nothing? :o ( 3ds Max 2009x32 )
The way I figure it.. the custom attribute parameter doesn't have a track, so you have to feed the script an object - i.e. controller, which means the custom attribute needs to have a controller first... then add that as a target... and then play with its value?
$.modifiers[1].theSlider.controller = bezier_float()
fs.addTarget "theSlider" $.modifiers[1].theSlider.controller
fs.script = "theSlider.value"
davestewart
12-03-2008, 12:00 AM
Sorry - in my head I typed "Add a controller and..."
It's late. I'm tired. And wondering why I'm still getting BOM issues...
ZeBoxx2
12-03-2008, 12:30 AM
It's late.
Whatchutalkin'bout Willis? It's only 2.30am ;)
And wondering why I'm still getting BOM issues...
What's a ... BOM issue?
davestewart
12-03-2008, 01:42 AM
Ah, the joys of freelancing and not having a set bedtime!
Byte Order Mark: http://en.wikipedia.org/wiki/Byte-order_mark
My issues: http://forums.cgsociety.org/showthread.php?f=98&t=703376
ZeBoxx2
12-03-2008, 03:23 AM
Ah, my time is mostly synched to PST - it's only 8.20pm there now (5.20am here)
That BOM looks like fun :\ 'll leave it to that other thread before Malkalypse slaps me with a clue-by-four, however :)
Malkalypse
12-03-2008, 03:14 PM
Thanks for the suggestion, Z, worked like a charm.
And don't worry, I don't mind a little off topic chatter, as long as it's educational! :D
CGTalk Moderation
12-03-2008, 03:14 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-2013, Jelsoft Enterprises Ltd.