#Scanning Objects
6 messages in this thread
Hi everyone,
Here's another annoying little question: <g>
How does one go about scanning all the objects in the editor?
I'm trying to perform an EXP_OBJ_EXTENTS on all mesh items in the
editor and putting the relevent info in a database. Unfortunately,
the only way I've found to set the current input object is with
EXP_PICK_OBJECT. There has to be another way to set the current
input object without requiring user intervention.
PXP_GET_ITEM works great since I can just increment the index number
but it doesn't give me the center values for X, Y, & Z of the object.
Is there a way to set the current input object in OBJECTIO without
resorting to an EXP_PICK_OBJECT?
I'm not sure what you're trying to get but if it's the center of the
object, it's easily obtained by interpolating the bounding box
(ItemMesh.mins[] and ItemMesh.maxs[]).
The trouble with trying to use ItemMesh.mins[] and ItemMesh.maxs[] is
that they return the extents of the objects itself, with the origin
being the center of the object – not the world origin. In other
words, this returns the size of the object but not its position.
Using this approach always returns 0,0,0 for the X,Y,Z centers of the
object. Unless I'm doing something wrong…
ExtInfo.min, ExtInfo.max, & ExtInfo.center return the extents and
position of the object relative to the world origin. Unfortunately,
you can only perform an EXP_OBJ_EXTENTS on the current input object.
Without user intervention, the only way to change the input object
would appear to be with EXP_SELECT_INPUT_OBJ. Problem is, this
command doesn't appear to work with PXPs.
Or, to be more precise, I can't get it to work. <g>
I wish there were a direct call pxp command like PXP_GET_EXTENTS, or
PXP_GET_CENTERS. <g>
Regards,
Danny…
Does he mean the center of the object, or the pivot point?
I guess he means the center of the object.
I mean the center of the object. <g>
Danny…