tnunez
06-25-2007, 09:32 PM
I have a script that can create a variable number of objects. All the objects have an object name that starts with "cg_", such as:
cyl1=chamfercyl name:"cg_cyl1" radius:globalradius.value
I have a spinner ("globalangle") on my UI that can rotate any object created by this script by grouping all the objects whose names start with "cg_", and it works great - like this:
on globalangle changed true do
(
allcyls = $cg_*
for i in allcyls do
(
i.rotation.controller.Z_rotation = labelangle.value - cylangle.value
)
)
Now, for a different reason, I might want to use the same artifice, but not with object names, but with the object variable name, in my case, all variable names starting with "cyl". Using the same "$cyl*" wildcard doesn't work. Is such a thing possible? I've searched but I'm having a lot of trouble finding relevant info. Thank you!
cyl1=chamfercyl name:"cg_cyl1" radius:globalradius.value
I have a spinner ("globalangle") on my UI that can rotate any object created by this script by grouping all the objects whose names start with "cg_", and it works great - like this:
on globalangle changed true do
(
allcyls = $cg_*
for i in allcyls do
(
i.rotation.controller.Z_rotation = labelangle.value - cylangle.value
)
)
Now, for a different reason, I might want to use the same artifice, but not with object names, but with the object variable name, in my case, all variable names starting with "cyl". Using the same "$cyl*" wildcard doesn't work. Is such a thing possible? I've searched but I'm having a lot of trouble finding relevant info. Thank you!
