PDA

View Full Version : Return number of parameters in parameter block


Snape
08-20-2007, 10:19 PM
Hi,

I am trying to get the listener to return the number of parameters in my 'PEN attribute holder2' param block.

If the object with the PEN modifier is selected and the last modifier in the stack is the 'PEN attribute holder2' and the parameter block is called 'amyface' then I would think this should work:

print $.modifiers[$.modifiers.count].amyface.count

...but it doesnt

can anybody help..?

Thanks

Spencer

magicm
08-20-2007, 10:25 PM
This should do it:

print $.modifiers[$.modifiers.count].amyface.numSubs
Or, in case the attributes are added through the max interface (and thus have the default param block name "Custom Attributes"):

print $.modifiers[$.modifiers.count].custom_attributes.numSubs

Cheers,
Martijn

Snape
08-20-2007, 10:33 PM
Excellent! Your a star Martijn, thanks a million!!!

Spence

CGTalk Moderation
08-20-2007, 10:33 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.