Home Technical Talk

Need 3DSMax scripting help - scattering groups

polycounter lvl 13
Offline / Send Message
xXm0RpH3usXx polycounter lvl 13
Hey folks,

i am working on a scatter script, because the ones i found wherent capable of scattering groups, which i would like to do.

I came across the green painter script by AlexY over at scriptspot and tried to modify it to recognize and scatter groups as it only works with the copy funtion, which copies the group without the meshes in it.
the problem is that i am too dumb to script that and now i'm requesting assisance...

a pflow solution wouldnt work, as i want to be able to keep the modifiers on the individual meshes in the scattered group for mass randomizing after scattering and that way i would need to bake the particles.

excerpt of the script:
the_new_obj = maxOps.cloneNodes the_master_obj <-picked and assigned via a pick button

the_new_obj returns "true"
i cant access the .pos property of a boolean
neither the .rot nor the .scale
i cant even use the move() scale() and rotate() function on it, it says something like "no rotation for "undefined" but i defined the_new_obj, its the cloned group?

i could however use the .move property while copying, but that only moves relative to the point where the master object stands, not on a random spot on the ditribution object
i havent found anything alike for rotation and scaling, though i wasnt much into that yet, first things first...

i can access the copied meshes in the group with "newNodes: &nN"
and that returns an array of the meshes in the group, but if i set all of their .pos values to the origin of the new group they would need to have their pivots in the center of the original group before the scattering because otherwise they would be all positioned in eachother.

idk, i'm stuck...
i hope its clear what i want to achieve and what my problem is, please understand that it all makes sense in my mind :)
cookies for every reply :O
Sign In or Register to comment.