PDA

View Full Version : How to connect a plug of type doubleArray to a Per Particule Attribute?


nicogalan
06-23-2006, 10:37 AM
Hello,

I need to connect a doubleArray plug from a custom emitter node to a per particule attribute of a particleShape. But I have some trouble to do it.

I wrote a small MEL script to illustrate my problem (to be launched from an empty scene because of the names):


polyCube;
addAttr -longName src -dataType doubleArray pCube1;

polyCone;
addAttr -longName dest -dataType doubleArray pCone1;

connectAttr pCube1.src pCone1.dest; //this works, no problem to connect here

particle;
addAttr -longName dest -dataType doubleArray particleShape1;

connectAttr pCube1.src particleShape1.dest;

//this doesn't work because particleShape.dest seems not to be managed as a classical doubleArray because is created in a particleshape



The error message I get is :
// Warning: Connection from pCube1.src ---> particleShape1.dest was not allowed. You can only connect to a per-particle attribute from another per-particle attribute on the same shape or from an arrayMapper or particleAgeMapper node. This may cause subsequent connections to fail during duplication with the "-ic" flag. //
// Error: Connection not made: 'pCube1.src' -> 'particleShape1.dest'. Destination node will not allow the connection. //
// Error: The attribute 'particleShape1.dest' cannot be connected to 'pCube1.src'. //

And I tried to create an array mapper to create the connection. But I have to choose another PP attribute as source of the array mapper so I don't know how to get my infos from pCube1.src to particuleShape.dest?

I'm new in Maya so don't hesitate to tell me if I did anything wrong, and of course any suggestion would be really appreciated.

Thank you,
Nicolas.

CGTalk Moderation
06-23-2006, 10:37 AM
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.