[Closed] Custom Attributes and assemblies
Does anyone know why the dropdownlist will not remember its selection? (if i set it to “fizzle” deselects the assembly and selects it, the list has reset itself to “boom”)
(the script is pieced together from the mxsref)
the script is:
weaponDataCA = attributes weaponData
(parameters main rollout:params
([indent]hitPoints type:#float ui:hits default:10
cost type:#float ui:cost default:100
sound type:#string
)
rollout params "Weapon Parameters"
(
[/indent][indent]spinner hits "Hit Points" type:#float
spinner cost "Cost" type:#float
dropdownlist sound_dd "Sound" items:#("boom", "sparkle", "zap", "fizzle")
on sound_dd selected i do
([indent]sound = sound_dd.items[i]
hide $box02
)
[/indent])
[/indent])
object1 = Cylinder() --create a cylinder
object2 = Box()
object3 = OmniLight()
obj_array = #(object1, object2, object3)
new_ass = assemblyMgr.assemble obj_array name:"Test01" classDesc:Dummy
custAttributes.add $Test01 weaponDataCA
another thing that puzzels me is how i can hide / unhide parts of the assembly when having multiple assemblies in the same scene, is there a way to access assembly-subparts like
hide assemblyname.objectname?
Thanks
/Jan Fjordside
i dont know the specific answer to your question, but you might have better luck if you implement the head of the assembly as a pluginscript instead of using a CA on a dummy. I just know from my experience that getting CA’s to update and stay current as versions change is a pain, whereas plugin scripts seem to do a better job.
i built a big pipeline around assemblies so if you wanna talk PM me…