CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 02-04-2013, 10:25 PM   #1
em3
day dreamer
 
em3's Avatar
portfolio
Dave Tyner
3D Artist
Polyform Media
Denver, United%2BStates
 
Join Date: Jan 2004
Posts: 984
Send a message via Yahoo to em3
setting pflow particle positions

Hi! I am trying to manually set positions for my particles with this script

Code:
fn pcreate pos =( pf = $'PF_Source 001' pf.Event002.Birth_001.amount = pos.count for i = 1 to pf.numParticles() do pf.setParticlePositionByID i pos[i] ) part = pcreate (for o in objects collect o.pos)


When I collect the position array and step through the function manually, it works great. When I call the function from inside of the script it doesn't seem to work. Or if it does work, the particles are repositioning themselves before the viewport can redraw.

I am running this from regular maxscript not a pflow script operator.

Thanks, I will update if I find a solution.
__________________
www.davetyner.com
 
Old 02-04-2013, 11:05 PM   #2
em3
day dreamer
 
em3's Avatar
portfolio
Dave Tyner
3D Artist
Polyform Media
Denver, United%2BStates
 
Join Date: Jan 2004
Posts: 984
Send a message via Yahoo to em3
Quote:
Originally Posted by em3
Hi! I am trying to manually set positions for my particles with this script

Code:
fn pcreate pos =( pf = $'PF_Source 001' pf.Event002.Birth_001.amount = pos.count for i = 1 to pf.numParticles() do pf.setParticlePositionByID i pos[i] ) part = pcreate (for o in objects collect o.pos)


When I collect the position array and step through the function manually, it works great. When I call the function from inside of the script it doesn't seem to work. Or if it does work, the particles are repositioning themselves before the viewport can redraw.

I am running this from regular maxscript not a pflow script operator.

Thanks, I will update if I find a solution.


Looks like I have to add a redrawviews() before I reposition the particles. If I scrub the animation, they will all reset. I think this is due to the fact I am not running the script from a pflow script operator.

To be honest, the whole pflow scripting inside of pflow is still a bit confusing to me. Working on it!
__________________
www.davetyner.com
 
Old 02-04-2013, 11:05 PM   #3
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:23 AM.


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