Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Mstp

Pages: [1]
Hi Frood. Thank you very much for taking the time to answer again.
I arrived to the same solution and I was coming here to share it!

I basically used this code to compare every property setting in my scatter and in a correctly working one
Code: [Select]
for i in 1 to (getPropNames$).count do (
print (((getPropNames($))[i]) as string + ": " + (execute ("$." + (getPropNames$)[i])) as string)


Once again, thank you for your help!


see Maxscript Class and Object Inspector Functions. In most cases, if you want to change anything by script, select an object and type "show $". It's not hard to figure out what the properties mean or do. If you cannot find what you are searching for, check for interfaces. If you issue "showinterfaces $" while having a CScatter object selected, you will see the interfaces and the methods listed in the Wiki already mentioned by Maru. For properties of objects which are not selectable (e.g. Render Elements, objects which are properties etc.), you need to use "show" on an object reference, for example "show renderers.current" to see a list of all CoronaRenderer properties (if Corona is the currently active renderer).

Hope it helps,
Good Luck

That's a huge piece of advice. Thanks a lot!
Now I'm facing a weird issue where, even when the objects appear to be assigned (they appear in the array and in the interface of the scatter),  they don't show in the viewport or they show but they don't react to changes in the min/max transform settings. This doesn't happen if I manually assign the exact same objects.

Here is the code I'm using, in case anyone wants to test it to see the issue
Basically the  append $.distributionobjects <appendedObject> form doesn't seem to be working

Code: [Select]
ScatteredObj= sphere radius: 1 position:[0,0,0] --ScatteredObj
b = plane length: 100 width:100 pos: [150,150,0] --distrib object

Cscatter isselected: on iconsize: 50 pos: ScatteredObj.pos

append $.distributionobjects b
append $.scatteredobjects ScatteredObj

max zoomext sel -- zooms scatter


These are properties of the CScatter object itself (not the interface), 'distributionObjects' and 'scatteredObjects' are the names. Both are node arrays. If you have for example a Corona scatter object named 'Corona Scatter001', then you get the scattered objects with

Code: [Select]
$'Corona Scatter001'.scatteredObjects
You would use the 'join' command to add other nodes to it.

Good Luck

Hi. May I ask where to find this kind of info? I struggled very hard for a few days until I found this post.
That is indeed the way to assign scattered objects and distribution objects. The thing is, I haven't been able to find anything on the matter anywhere on the internet but in this single post.
I also haven't been able to see it using getINterfaces, showInterfaces or showInterface.
Thanks in advance!

Pages: [1]