Particle_Editor

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  12 December 2010
Particle_Editor

I design this tiny window,

Right now it's not working ,so help me to build cmpltly .
What i want to do is
1)Select some particle
2)put some value in X,Y & Z for Translate,After click execute it will add given value to current value of particle position.
3)And for Instance stuff =>assume particleShape1.pt[3] are having value 2 for objectIndex but i want value 5 for this particle ,so when i put value 5 in ObjectIndex & execute.Instance object will update.
 
  12 December 2010
To change the position of a specific particle in your particle system use this syntax (or the corresponding mel ).


# This changes the position of particleShape1[5] to 0,0,0
import maya.cmds as mc
mc.particle('particleShape1', edit=True, order=5, attribute='position', vectorValue=[0, 0, 0])


The order flag is being used to specify the 5th indice in the system.
Similar syntax can be used to change the object index. Use the component editor, select particle, and change an attribute. Make the change and check the script editor for the mel syntax.

Good Luck.
__________________
Ok, But Can You Do It...ON FIRE!
 
  12 December 2010
ahh Thanx for reply ..Tell me how can i use this for selected particle.
string $mySel[]=`ls -sl`;
// Result: particle1.pt[2:4] particle1.pt[8] particle1.pt[11] particle1.pt[14] //
now i want to move this above selected particle.Problem is for capturing Id of selected particle.
 
  12 December 2010
use flatten in the ls command should do the trick no?
string $sel[]=`ls -fl -sl`;

cheers
 
  12 December 2010
-fl seems very useful ,i think now i can capture particle id easily using tokenize & then for loop.Thank you for help
 
  12 December 2010
Cool, a good way to get the particles from what is selected is using filterExpand.


particles = mc.filterExpand(fullPath=True, selectionMask=47)



It seems I may have mislead you with the order flag though, you will want to use the id flag instead.

good luck.
__________________
Ok, But Can You Do It...ON FIRE!

Last edited by Pyrokinesis : 12 December 2010 at 10:28 AM.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:36 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.