PDA

View Full Version : Custom Deformer Missing inputGeom Attribute


Dancel89
01-18-2013, 11:29 PM
Hey Guys,


I have been writing custom deformer node, and quite frankly everything is working fine except the simple fact that my node is missing inputGeom attribute :surprised

Correct me if I am wrong but shouldn't that attribute be inherited by default if I derive from MPxDeformerNode ??

I even went as far as creating that attribute from scratch inside initialize() and the result was that Maya failed to reigster the node :argh:

So it looks as if its there but I cant see it in Connection Editor

If anyone could shed some light on that problem I would really appreciate :buttrock:


Cheers !!

tontonsuspect
01-19-2013, 05:00 PM
The most obvious reason must be the way you try to access this attribute:

a deformer inherits attributes from weightGeometryFilter --> geometryFilter.
In the node documentation you will find that inputgeometry is a child of a compound array attribute called input.

input:
->inputGeometry
->groupId

that why you can push points of multiple meshes with one deformer

if you dont wish to use the default MItGeometry provided by the deformer you must access this attribute like a xml node( with MPlug if you want )

Dancel89
01-19-2013, 07:06 PM
Hey Cedric

I see in that case how does one connect geometry shape to the deformer node properly ??

Is groupId some set membership node ??

I was under impression that simple outMesh -> inMesh would suffice, but I guess I am wrong .


Thanks for reply, appreciated .

Cheers !

Dan

tontonsuspect
01-19-2013, 07:41 PM
Normally you setup a deformer with this command:
deformer -type "myAwsomeCustomDeformer" --> the groupId and groupPart are set up automatically with this command and the groupPart is what will tell maya what vertex to operate on( when you play with the edit membership tool to remove vertex from a deformer )

if you need other mesh input you can then plug it with the regular connectAttr command.

Dancel89
01-19-2013, 07:58 PM
You are a LEGEND my friend :thumbsup:

Silly me thought that I have to use createNode() and then connect the geo attributes manually , now I see that Maya actually has a dedicated deformer command to do it for me , amazing !!! :buttrock:


Thanks again dude :applause: everything is working smoothly now :)


Cheers,

Dan

CGTalk Moderation
01-19-2013, 07:58 PM
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.