Forest Pack > Forest Pro (*)
Maxscript: Get number of geometry objects
jonavark:
How do I get the number of objects in the "Geometry List" of a forest object?
Also.. is there a doc or method to show all of the parameters exposed through maxscript?
iToo:
The Geometry List is stored in several parameters (one by property) with the suffix "list". You can use any of them to see the number of elements. In this way:
$Forest01.namelist.count
The exposed parameters of any object can be listed with:
showproperties $Forest01
We also have implemented a couple of custom interfaces: "Trees", to edit the items in Custom Edit mode, and "Catalog" (for internal use):
showinterfaces $Forest01
You can find a brief description of the "Trees" interface here.
http://www.itoosoft.com/forestpack/reference/install.php
There are some Maxscript samples posted in the forum. Please, use the Search function to locate them.
jonavark:
I did look at the link but it is only a partial list?
Thanks for the quick response. You guys are the best. I will look into what you have posted. Oddly.. I think I had that info a couple of months ago when I was coding some other scripts for FP.. fell right out of my brain though!
Thanks again.
iToo:
Yes, the list is not complete because we add new parameters frequently. It is better to use showproperties to see the latest version.
jonavark:
ok.. will do
What I am attempting is to script mixAmount in blend materials for all items in the geometry list. I have setup the materials as blends with a Matte/Shadow/reflection at the 100% setting.
The FP objects are "Wheat Strip 001", 002 etc..
--- Code: ---for s in $'Wheat Strip*' do
(
print s.name
for i=1 to s.namelist.count do -- 5 tree layers in my FP object
(
s.material[i].mixAmount =100.0
)
)
--- End code ---
It works for the first four items but fails on the fifth with:
Unknown property: "mixAmount" in Color ID 0:Standard
so it seems it attempts to set the mixamount in a colorID map instead..
Navigation
[0] Message Index
[#] Next page
Go to full version