PDA

View Full Version : Custom Attributes and assemblies


fjordside
06-08-2006, 09:05 PM
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






(hitPoints type:#float ui:hits default:10


cost type:#float ui:cost default:100
sound type:#string


)


rollout params "Weapon Parameters"
(


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




(sound = sound_dd.items[i]


hide $box02


)




)




)


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

suck
06-16-2006, 01:37 PM
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...

CGTalk Moderation
06-16-2006, 01:37 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.