ScriptSpot home

Forum topic · General Scripting

How to copy custom attribute keys from PEN Attribute Holder ?

By br0t · 2010-07-01

Description

Hey Guys,
I have two hand controls in a rig that control the curl and splay of the fingers. The rotations of the finger bones are wired to some custom attributes of the hand controls. I animated one hand and now i want to copy those keys over to the other hand. I found this script to copy custom attribute keys from one Attribute Holder modifier to another:
http://www.scriptspot.com/3ds-max/scripts/custom-attrubute-animation-cop…

But my CA's are stored in a PEN_Attribute_Holder 2, which is a scripted modifier by Paul Neale, with some nice features. So it doesnt work for me. Does anyone know how I could modify the script to make it work with the PEN_Attr_Holder? I havent found out how to access the modifier.

Greetings

Comments (4)
br0t

That is exactly what I tried to do, but I do not have any idea how to check its name ^^....

Reply to br0t
Panayot Karabakalov

Well, open the source file of the modifier plugin (if not encrypted), else you can also see its name in the Max Modifier panel, or variant 3 - via MaxScript: create a Dummy and add the mod, then (it still selected)...

-- I'll add the existing Attribute Holder modifier (as example)
$.modifiers[1].name --> result: "Attribute Holder"
-- and then you call the mod by name Replace the space " " with "_", e.g.
$.modifiers[#Attribute_Holder]
$.Attribute_Holder -- the same as above (but short)
-- and the next syntax is also valid:
$.'Attribute Holder'

I hope this help.

example

Attachments
Reply to br0t
br0t

Thanks, I can access the modifier now. I renamed the modifier and did not think of it in the first time. Anyways, the script still does not work yet. It tells me it does not find any Modifier/Custom Attributes on the Object. But maybe I will find out why, thanks again.

Panayot Karabakalov

Im not use PEN scripts but looks simple to fix this, just open the script that copy CA's keys and find and replace (Ctrl+H) all the

#Attribute_Holder

name with the scripted modifier name, e.g.

#PEN_Attribute_Holder_2

(or check its name).