CGTalk > Software > Autodesk 3ds max > Particle Flow
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 01-01-2011, 11:13 PM   #1
thiesi
New Member
portfolio
Matthias Flehl
Berlin, Germany
 
Join Date: Feb 2008
Posts: 9
scripting the position object operator

I want to populate single meshes by an Position Object operator while using thousands of meshes. The problem I see: it's only possible to set all meshes at once in the flow as emitters. I tried to use a Script Operator after the Position Object operator and it really changes the Emitter Objects entry - but only when hitting the Position Object Operator in Particle View with my mouse.

So how can I update the Emitter Objects entry by scripting or alternatively: does there exist a tutorial or a script for rebuilding the Position Object Operator with MaxScript especially for using the surface of a mesh for emitting?
 
Old 01-02-2011, 09:53 PM   #2
CodyEvan
Scout
 
CodyEvan's Avatar
portfolio
Cody Evan
Phoenix, USA
 
Join Date: Mar 2005
Posts: 44
What did you use in your script operator? I was able to get this to work with a script operator above the position object operator. For the script, I used the below code. I was able to switch the emitter simply by changing the geoArray[x] and re-evaluating the script.
Code:
on Init pCont do ( -- Put all objects called myGeo* into an array geoArray = $myGeo* as array -- Remove any previous emitters $'Position Object 01'.Emitter_Objects.count = 0 -- Add a new emitter $'Position Object 01'.Emitter_Objects = #(geoArray[1]) )

Obviously you'd need to modify the code to match your specific needs, but this shows that the emitter can be changed without having to click on the position object node.
 
Old 01-08-2011, 09:00 PM   #3
thiesi
New Member
portfolio
Matthias Flehl
Berlin, Germany
 
Join Date: Feb 2008
Posts: 9
Sorry for waiting a few days but i had to work on commercial projects.

I've modified your little script to match my scene. Please take a look at attached file. It's my test scene which includes the pflow and my Script Operator. I agree: in general it's possible to change the emitter objects in a Position Object Operator. But the problem is: it doesn't update during playback the scene animation or moving the time slider. Currently my code is in the Proceed Pcont part. But you get the same behavior when it is in the Init Pcont part.
Attached Files
File Type: zip scripting.emitter_objects.v1.01.zip (34.5 KB, 7 views)
 
Old 01-08-2011, 09:00 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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 02:48 AM.


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