View Full Version : How do I find if object exist in scene
05-25-2003, 09:12 PM
in Mel, How Would I write to identify if an object is existent or not in a scene
Here is the question I would like answered in the scene:
Does this object exist, YES or NO?
example: if in my scene I have an object named "bobo", How would I write a script (so I can have a return true or false) too see if it REALY exist in the scene?
Hope I<M making some sence
thanks later jack
not entirely sure what you mean....
objExists("myObject") returns 1 if myObject exists or 0 if it doesn't....
I don't quite get what you mean when you say:
"example: if in my scene I have an object named "bobo", How would I write a script (so I can have a return true or false) too see if it REALY exist in the scene?"
How could it exist, but not REALLY exist?
05-26-2003, 09:22 AM
Depending on what further actions you want there are many ways to check the existence of an object in the scene, but they most likely include the `objExists` command.
// This returns 1 if true 0 if false
int $obj = `objExists "bobo"`;
string $name = "bobo";
if (`objExists $name`)
print "Hello bobo!\n";
if (!`objExists $name`)
print "bobo is not here\n";
Hope this helps
05-27-2003, 03:18 AM
thanks dudes thats exactly what i wanted
01-15-2006, 05:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.