[Closed] Get Base Object type ?
we can know the current selection is or not a box like this:
if classof selection[j]== Box
alse for sphere:
if classof selection[j]== Sphere,
but if they are all turned to Editable Mesh,
how can we know it’s base object ? i mean how can we know is it derived from box or sphere or
others ?
If the top of the stack returns Editable_Mesh because of, say, a Mesh_Select modifier on top of a sphere, you can ask for the class of the base object as mentioned before:
if classof $.baseobject == Sphere do…
But if the sphere was COLLAPSED to Editable_Mesh, then the base object IS Editable_Mesh and you cannot know what it used to be before the collapsing.
Do something like this
classOf($.baseObject)==Editable_Poly
classOf($.baseObject)==Editable_Mesh
/Andreas
Maybe I’m not understanding the situation correctly, but if you convert a box or sphere to an editable poly or editable mesh, any connection to the original parametric object is lost… it’s now just a collection of verts and polygons, so to speak.
thank you all
i knowed that there is no way to get origin object when it is turned to editmesh.