create primitive object with c++ api?

create primitive object with c++ api?

egoldid1
Advocate Advocate
826 Views
2 Replies
Message 1 of 3

create primitive object with c++ api?

egoldid1
Advocate
Advocate

hi, how i can create primitive object with c++ api, like xgen hair?

thanks

0 Likes
827 Views
2 Replies
Replies (2)
Message 2 of 3

tkaap2
Autodesk
Autodesk

The basic c++ api tool to add nodes into the scene is MDagModifier::createNode(...). You can specify the node type to add by a string name or by its MTypeId node designation.

The devkit has a few examples.  The offsetNode devkit example creates some locators.  

If you want to create a new type of primitive, like defining your own mesh or something even more complex, examples like the polyPrimitiveCmd may be a better place to start.

0 Likes
Message 3 of 3

BurkhardRammner
Collaborator
Collaborator

The maya API lets you create

1. objects with components (shapes)

2. objects without components (locators)

 

If you want your objects be renderable by a software renderer, you would have to additionally write your specific shader node.