PFlow by maxscript

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
Old 03 March 2012   #1
PFlow by maxscript

Hi guys, i got this problem with maxscript.
I want to authomatically generate a particle flow system with a script and i would love to generate a Standard flow but it seems to be impossible. How can i do?
Alternatively I created this little script

particleFlow.beginEdit()
pf1=pf_source logosize:10 name:"PFS1" standard_flow:true
rp1=renderParticles()
pf1.appendAction(rp1)
pf2=pf_source logosize:10 name:"PFS2"
rp2=renderParticles()
pf2.appendAction(rp2)

evt1=event()
evt1.appendAction(birth())
evt1.appendAction(position_icon())
evt1.appendAction(speed())
evt1.appendAction(rotation())
evt1.appendAction(displayparticles())
evt1.appendAction(shape_instance())
ft1=find_target()
evt1.appendAction(ft1)

evt2=event()
evt2.appendAction(birth())
evt2.appendAction(position_icon())
evt2.appendAction(speed())
evt2.appendAction(rotation())
evt2.appendAction(displayparticles())
evt2.appendAction(shape_instance())
ft2=find_target()
evt2.appendAction(ft2)

evt3=event()
evt3.appendAction(displayparticles())

ft1.setNextActionList evt3 ft1
ft2.setNextActionList evt3 ft2
particleFlow.endEdit()
ParticleFlow.openParticleView()

Well the problem is that this script doesn't work! When i see the particle view i see the pflowsystem with a render action, i see the events but i see no connection between the pflow system1 and the event001 (the same for pfs2) and I can't find a way to bind the pflow to the event! And even worst when i manually set the link between them nothing is showing! Please help me i have been searching all over the net and i found absolutely nothing about it. Therefore maxscript documentation is very badly made :(
 
Old 03 March 2012   #2
Sorry here is the right code, i posted a backup

pf2=pf_source logosize:10 name:"PFS2"
pf1=pf_source logosize:10 name:"PFS1"

particleFlow.beginEdit()
rp1=renderParticles()
pf1.appendAction(rp1)

rp2=renderParticles()
pf2.appendAction(rp2)

evt1=event()

evt1.appendAction(birth())
evt1.appendAction(position_icon())
evt1.appendAction(speed())
evt1.appendAction(rotation())
evt1.appendAction(shapeLibrary())
evt1.appendAction(displayparticles())

ft1=find_target()
evt1.appendAction(ft1)

evt2=event()
evt2.appendAction(birth())
evt2.appendAction(position_icon())
evt2.appendAction(speed())
evt2.appendAction(rotation())
evt2.appendAction(shapeLibrary())
evt2.appendAction(displayparticles())

ft2=find_target()
evt2.appendAction(ft2)


evt3=event()
evt3.appendAction(shapeLibrary())
evt3.appendAction(displayparticles())

ft1.setNextActionList evt3 ft1
ft2.setNextActionList evt3 ft2



particleFlow.endEdit()
ParticleFlow.openParticleView()
 
Old 03 March 2012   #3
pf1.appendInitialActionList evt1
pf2.appendInitialActionList evt2
 
Old 03 March 2012   #4
Originally Posted by 3ak: pf1.appendInitialActionList evt1
pf2.appendInitialActionList evt2

Tnx you made my day, i spent like 5 hours to find out....
 
Old 03 March 2012   #5
Another simple question, I made a shape instance event. How can i assign an object to it to use as shape?

Tnx
 
Old 03 March 2012   #6
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
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 09:56 PM.


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