Lee, Andrew Hickinbottom (3D)

View Full Version : MaxScript, float script controllers, and custom attributes

12-03-2008, 12:13 AM
I have an object with an attribute holder containing a custom attribute slider. Pretty standard, but for the sake of clarity:


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].????

12-03-2008, 12:20 AM
Turn on the MacroRecorder in the listener, move the slider and check the listener's pink pane :)

12-03-2008, 12:27 AM
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"

12-03-2008, 01: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...

12-03-2008, 01: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?

12-03-2008, 02: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

12-03-2008, 04: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 :)

12-03-2008, 04: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, 04: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.