No.

When you make an object, what happens is this.

   1. A generic node of type mesh
   <http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/Nodes/mesh.html>
   is created
   2. Another node is created capable of generating the desired object,
   e.g. polyCube
   
<http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/Nodes/polyCube.html>
   3. The mesh node, referred to as a “shape” is parented under another
   node of type transform and finally..
   4. The generator is connected to the mesh.

When you clear history, you are embedding the generated mesh into the mesh
node and deleting the generator. From there, there is no relation anymore
between the generator and the mesh. It’s just a bunch of points, edges and
polygons.

If you need to keep track of what they once where, you could create a
custom string attribute and put e.g. "polyCube" into it, or perhaps the
command you used to create it. From there, you could programatically figure
out how to recreate it.
​

On 12 October 2017 at 03:43, jettam <[email protected]> wrote:

> If I have deleted the construction history of a primitive object. Is there
> any way to find out the object type? (sphere, cube, cylinder)
>
> For example I have cylinders, spheres, cubes that make up an object. I
> want to recreate that object with code but I will need to know they
> primitive type so I can rebuild it.  Any suggestions how I can do that?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/2d2ac8a8-1f7c-4936-bcf2-
> f850bb4479c6%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/2d2ac8a8-1f7c-4936-bcf2-f850bb4479c6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCg6bhTQPktc1c9z9rx_a_BL%2BvmKb%2B2k6uGW6W1Pwm2OA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to