kaworuonline
Hey guys,

I would like to constrain / parent / connect Attr. Locator(s) to one (or all) particle(s), say pt[0], from a grid of nParticles. 

My idea is link  pyExpression with particleShape then connect OV to locator.translate just like pyExpression example

However i find no worldMesh in particleShape node connect to inMesh.
Would I do with pyExpression ,or other method to do what i want?!
 
thanks for any help
Reply 0 0
pshipkov
the version online of pyexprssion does not have array attributes support. i have that here, but it needs more work. what you can do is connect particleshape.message or other attribute to pyexpression.nodes attribute. inside pyexpression node this will be accessible through the NODE variable. you can take it from there.
Reply 0 0
kaworuonline
Sorry, I can't get the point <  pyexpression.nodes >, 

# Error: The destination attribute 'pyExpression_test.nodes' cannot be found.

# Traceback (most recent call last):

# File "<maya console>", line 1, in <module>

# RuntimeError: The destination attribute 'pyExpression_test.nodes' cannot be found. # 


and if it work, i don't understand why  particleshape.message or other any  attribute  is suitable in this work?!
thanks for any help 
Reply 0 0
pshipkov
source the pyExpression AE template.
load the node.
open the scene with the particles.
select the particleshape node then shift+select the pyExpression one
in the AE of the pyExpression node you will see area called "input node" or something like that.
inside it there is a button "add selected" - press it.
Reply 0 0
Reply