| Item | Quantity | Price |
|---|
| Your cart is empty. Check out our collection of 3d models! |
Prices in:
Clear Cart
>> Can I create a custom joint cluster node?
Sure*. But you would be doing all of the work.
>> what would be the attribute type for MFn::kJoint?
No such type.
>> I want to give input plug as time for animation and output as joints.
You mean position of joints? Thing is no output can output a type of a node, just inputs to a node can be made. You dont get to use MFn on much of the stuff when your doing your own nodes, most MFn classes are reserved for importers and exporters. Only some of very specific MFn types can be used ever.
See mostly no node will EVER know of the internals of another node. And the maya API is not the primary section to read when extending mayas run time capabilities, but rather the node reference is. So a joint has a number of inputs you can choose any of them, but you get NO ADDITIONAL ACCESS. You are just as far away from the nodes than a normal maya user is just your io capabilities are better.
* you can do anything you like in your end just as long as you talk to maya via the same rules as everybody else. API has no extra privileges with exception of some of the extended types of shapes. If you cant figure out how to do it without the api, the api wont help in the data messaging, just the algorithms.
Many thanks Joojaa...!!
It is a great help. It is clear to me now. I was thinking bit silly/wrong. I was trying to create node inside a node. lol
I could not explain it to the point.
But for Mesh output data we usually write
animCube:: outputMesh =typedAttr.create( "outputMesh", "out", MFnData::kMesh, &returnStatus);
For Mesh Data we wrote MFnData::kMesh
but what should be for kJoint?
What should be the data type or attribute type for kJoint?
there is nothing like MFnData::kJoint
>> What should be the data type or attribute type for kJoint?
There is no such type. No datatype of this specific sort exists. Like i said read the NODE RERFERENCE and see what a joint has as inputs ans inpute ny or all of those types.
And yes that means your node would work on thinsg that are not joints.
Can I create a custom joint cluster node?If yes than what would be the attribute type for MFn::kJoint?
I want to give input plug as time for animation and output as joints.
I wonder what would be the attribute type for MFn::kJoint as "output" of the node?
MStatus ANIM_JOINT_01node::initialize()
{
MFnUnitAttribute unitAttr; //for time attribute
MFnEnumAttribute EnumAttr;
MFnTypedAttribute typedAttr; //for MFnData::kMesh output
MFnNumericAttribute numAttr;
MStatus returnStatus;
ANIM_JOINT_01node::time=unitAttr.create(
"time","tm",MFnUnitAttribute::kTime,
0.0, &returnStatus);
ANIM_JOINT_01node::output=fn.create(
"output", "out",MFn::kJoint,&returnStatus);
/*this code is very wrong. please tell me what should be the attribute type for joint or jointcluster for a custom node where I will give input as time and animate a leg with several joints, as a node?*/
}