About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
Thanks, the hasProperty()
Thanks, the hasProperty() function will fix it!
the hasproperty function
the hasproperty function should help to filter the ones out that dont have it. or isProperty dunno wich one it was for CAs
Raphael Steves
About identifying through
About identifying through handle IDs, using the appropriate method:
Thanks, trying to use custom
Thanks, trying to use custom handles rather than the handle function built into max. Allthough all objects get a unique handle if you merge objects into another scenes then the handle IDs can change. :(
selecting object via custom ID
Hi
I have used the following code to add an ID to an object:-
local DataCA = attributes data ; (parameters main;(myNewID type:#integer default:2 animatable:false;))
custAttributes.add $ DataCA
I then select the object with the following code:-
for obj in $* where obj.myNewID == 2 do select obj
If I have any objects in the scene that dont have this extra attribute I get the following error:-
-- Error occurred in obj loop
-- Frame:
-- obj: $Box01
-- Unknown property: "myNewID" in blabla
How would I get around this?
Thanks
Gram
Scripted Custom attributes
Scripted Custom attributes are what you might want to look into
Raphael Steves
Thanks Graph, Thats going to
Thanks Graph,
Thats going to help alot:)
g
same result without collecting
for obj in $* where obj.handle == 2 do select obj
my recent MAXScripts RSS (archive here)
Thanks Anubis, that makes
Thanks Anubis, that makes sense. Is it possible to add your own hidden handels to objects? such as an ID tag. The .handle works ok but if you merge it into another scene then the handle number changes.
Ta
G
User Defined properties
Better idea? - instead of using tags I can give objects a tag_code in the User Defined Properties. This way if the object gets renamed I can still select it via the tag_code.
g