ice799
09-22-2006, 02:21 AM
Hey guys --
I have a custom attribute defined like this:
classCAs = attributes classAttributes
(
parameters classParams rollout:classMaster2
(
mass type:#float ui:massSpinner
price type:#float ui:priceSpinner
class type:#string
karmaType type:#integer
)
rollout classMaster2 "Class Master" width:192 height:152
(
spinner massSpinner " Object Mass" pos:[32,8] width:117 height:16 range:[0,100000,1] type:#float
spinner priceSpinner " Price" pos:[32,32] width:117 height:16
radiobuttons karma "Karma Primitive" pos:[8,56] width:64 height:62 labels:#("Box", "Sphere", "Cylender")
button allofClass "All of Class" pos:[88,56] width:61 height:64
on allOfClass pressed do
(
local targetClass
for i in selection do (targetClass = i.class)
clearselection()
for i in objects do (if i.class == targetClass do selectMore i; print "selecting")
)
)
)
and I have code to add this attribute to the selected object in the scene:
on assign pressed do
(
for i in selection do
(
custAttributes.add i classCAs
i.class = classMaster.tv.selectedItem.text
)
)
So basically what I do is, I add the custom attribute to the object then I try to change its value.
For some reason, when I use the parameter editor, this custom attribute does not show up as being added to the selected object.
Any ideas what's up?
Sidenote: My c++ plugin says there are no custom attributes when using that code above, but when I use the "Parameter Editor" instead to add the custom attribute my C++ plugin says there IS a custom attribute.....
Thanks
I have a custom attribute defined like this:
classCAs = attributes classAttributes
(
parameters classParams rollout:classMaster2
(
mass type:#float ui:massSpinner
price type:#float ui:priceSpinner
class type:#string
karmaType type:#integer
)
rollout classMaster2 "Class Master" width:192 height:152
(
spinner massSpinner " Object Mass" pos:[32,8] width:117 height:16 range:[0,100000,1] type:#float
spinner priceSpinner " Price" pos:[32,32] width:117 height:16
radiobuttons karma "Karma Primitive" pos:[8,56] width:64 height:62 labels:#("Box", "Sphere", "Cylender")
button allofClass "All of Class" pos:[88,56] width:61 height:64
on allOfClass pressed do
(
local targetClass
for i in selection do (targetClass = i.class)
clearselection()
for i in objects do (if i.class == targetClass do selectMore i; print "selecting")
)
)
)
and I have code to add this attribute to the selected object in the scene:
on assign pressed do
(
for i in selection do
(
custAttributes.add i classCAs
i.class = classMaster.tv.selectedItem.text
)
)
So basically what I do is, I add the custom attribute to the object then I try to change its value.
For some reason, when I use the parameter editor, this custom attribute does not show up as being added to the selected object.
Any ideas what's up?
Sidenote: My c++ plugin says there are no custom attributes when using that code above, but when I use the "Parameter Editor" instead to add the custom attribute my C++ plugin says there IS a custom attribute.....
Thanks
