I’ve pieced together a way to add custom attributes to an empty modifier on an object from a separate post in the forums here. What I’m looking for is a way to collect all objects in the scene which will have these custom attributes and their values. This is independent of 3DSMax session, i.e., I should be able to access these even if I open a new scene, or restart max.
function addExportAttributes exportNode = ( ExportModifier = emptyModifier name:"Export_Attributes" addModifier exportNode ExportModifier AttribDef = attributes ExportAttributes ( parameters ExportParams rollout:assetRollout ( assetType type:#integer ui:dropdwn_assetType default:1 exportable type:#boolean ui:chk_exportable default:true ) rollout assetRollout "Root Node" ( dropdownList 'dropdwn_assetType' "Asset type" pos:[0,0] width:160 height:40 items:#("Mesh", "Rig","Animation","Vfx") checkbox 'chk_exportable' "Exportable" checked:true pos:[0,45] width:65 height:19 ) ) custAttributes.add ExportModifier AttribDef )
I add it to an object by running
I can select the object and get the value of
However, I want to collect a list of the objects in the scene which might have this empty modifier with these custom attributes added. I also would like this functionality to be global. Preferably, I don’t want to depend on modifier name or position since the animators might add extra modifiers to the stack, or worst case, rename the modifier. Would be great to get some input on this. Thanks.