Itoo Software Forum

Forest Pack => Forest Lite => Topic started by: jona on September 17, 2011, 10:25:14 PM

Title: Scripting Question
Post by: jona on September 17, 2011, 10:25:14 PM
I am trying to set the distribution map for multiple forest objects via Max Script.

Using this script:
for K = 1 to selection.count do
   (
      selection[K].heightlist[1] =100.0
      selection[K].widthlist[1] = 2.22
   
      selection[K].unitsx = 180   
      selection[K].applyrotation = on
      
      selection[K].zrotmin = 0
      selection[K].zrotmax = 359
      selection[K].animonlyrend = off
      print selection[K].mapname
      selection[K].mapname = "\\\\bomber\\tex\\Trees\\forestpack\\distmaps\\images\\spread1.bmp"
      
      print selection[K].mapname
   )

When I run it , the objects paths do not change. Though running it a second time shows the bitmaps are in there.. by using the first print statement. But when I click on the distribution bitmap button it shows the C:\Program Files\... path instead of the one I just scripted.

Assigning the path to a network server does seem to work manually though, as in .. it is there when I check via the Bitmap button in the Forest rollout

UPDATE: The paths do seem to get set by the script but are not reflected in the path when you click on the BITMAP button in the distribution rollout.

Title: Re: Scripting Question
Post by: iToo on September 18, 2011, 10:53:08 AM

The Forest interface uses some controls which are not directly supported by Max (as the Combo or the Listbox), so they are not updated properly when the values changes from Maxscript. 

When we rewrite some part of the plugin, we usually update and fix them, but the Distribution Map have not been upgraded yet.

Title: Re: Scripting Question
Post by: jona on September 19, 2011, 06:23:34 PM
Thanks! That confirms my findings. IT does work though so that's the ticket!