MAYA API "Mplug"~


#1

I’m studying the maya api’s example"torusField".there are three questions:

  1. Questions on Mplug.I know Mplug is a tree structure,but i don’t know it’s use,when and where to define Mplug’s structure.I found that in the “compute()” of “torusField”,
    ////
    if( !(plug == mOutputForce) )
    return( MS::kUnknownParameter );
    ////
    I know mOutputForce is a member of the MPxFieldNode,it is a fixed structure?

  2. In “void torusField::ownerPosition()”,
    ///
    Descriptions:
    If this field has an owner…
    ///
    I can’t understand the “owner”,because of my poor English:cry: ,I use “cout<<” to print the owner’s position,it always be (0,0,0).

  3. Questions on “logicalIndex()”,the returned integer is what.If there is a tree “name_1”,
    //////
    name_1{1,2,3,{a,b,c},4,{a,b,{x,y,z}},5};
    int num=name_1.logicalIndex();
    /////////
    What the “num” is?

    You may only answer one of the questions.Thanks for any help!
    :wip: :thumbsup:


#2

I’m also interested in answers to your questions, because i thinking how to get access to custom PP attributes and especially how to put a value to them through API
I know that is possible because it’s already done in KOLEKTIV Stroyka Dynamics package.


#3

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.