nParticles count

66 views
Skip to first unread message

Mathew Schwartz

unread,
Dec 4, 2015, 2:07:40 AM12/4/15
to python_in...@googlegroups.com
How can I query the number of particles in an nParticle?  I need to select one by one each particle, which I can see the feedback from mel as:
select -r nParticle1 ;
select -r nParticle1.pt[1492] ;

however, when I try to use:
cmds.nParticle('nParticle1',query=True,count=True)

I get the error:
# Error: RuntimeError: file <maya console> line 16: Transform owns more than one possible shape #

The particle was created by using Fill Object.


Marcus Ottosson

unread,
Dec 4, 2015, 2:15:07 AM12/4/15
to python_in...@googlegroups.com

Have a look at querying the shape directly instead; it’s typically called nParticle1Shape but might differ. In the Outliner you can toggle the visibility of shapes and have a look inside of the nParticle1 transform to see them both.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CADiWwnSrZxdhEiSGeUL_C9Ofm%3Dw_fQOmCTkHYmreKe8iHKbMzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Mathew Schwartz

unread,
Dec 4, 2015, 2:26:29 AM12/4/15
to python_in...@googlegroups.com
Yes, thank you.  That was the problem.

Reply all
Reply to author
Forward
0 new messages