View Full Version : Pen Attribute Holder presets, scripting access?
EvilGnome 09-01-2005, 12:31 AM We're trying to hook up a facial rig that uses the Pen Attribute Holder for facial poses, to Magpie.
Our main problem is finding where to access the Pen Attribute presets, as they don't show up in the Maxscript Listener(?).
Is there a way of calling the presets?(yay!)
Do we have to reapply the values to each individual attribute?(yuck!)
|
|
Well you can get the data that is stored and the function that returns an array of what ca parameters are stored on the PEN Attribute Holder.
presetName_str --String array of names of the presets that are saved.
preset_str --String array of preset values. This is a bit of a hack so that I could store any type of value without having multiple arrays. Hey I wrote this back in R4 in a big hurry and now I'm stuck with it.
getCaAttributes_fn -- The function that will get all the CA parameters stored on the attribute holder.
You can access them with something like this
$.modifiers[#PEN_Attribute_Holder_2].getCaAttributes_fn()
$.modifiers[#PEN_Attribute_Holder_2].preset_str
$.modifiers[#PEN_Attribute_Holder_2].presetName_str
All you have to do is run through the array of string and execute them to the corrisponding ca param.
Or, you can down load http://paulneale.com/scripts/PEN_Attribute_holder_2.051.zip and replace PEN_Attribute_holder_2.05.ms with this file and restart Max.
I have added a new function:
$.modifiers[#PEN_Attribute_Holder_2].setPreset_fn [index/string]
You pass it either the index of the preset that you want to set or the string value of the name of the preset. The string is case sensitive. You can get the string from presetName_str.
I hope this helps.
EvilGnome
09-02-2005, 01:33 AM
We've downloaded the update, thanks alot!(oooh, we're in the docs!)
As I mentioned in the Maxscript forum we're getting an email together with some examples of what we're dealing with.
CGTalk Moderation
09-02-2005, 01:33 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.