View Full Version : two mel questions...

02 February 2008, 03:27 PM
So i've been working on a mel project, and am wondering if two things are possible.

1. Is there are mel command to query a position in space, to find out if anything exists at that point?

2. If i query an object, is there a way to find out via mel, if any constraints are attached to an object? listAttr doesn't seem to help.


02 February 2008, 03:54 PM

xform is for XYZ positions in space. Although I'm not entirley sure if you can just type in a location to see if anything is there...
What you will be able to do is get everything in the scene and stick it's XYZ into an array using xform, then you can query that.
So if you're wanting to stick an object in space, but don't want it to overlap, using the rand function to generate XYZ, then query it against already existing objects, you'll be able to see if something is already there, then generate a new rand if there is...

listConnections is what you are looking for to see if constraints are connected...

Look both up in the help>Commands

Hope this helps..
Let us know how your project goes!

CGTalk Moderation
02 February 2008, 03:54 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.