Itoo Software Forum

Author Topic: Scripting Question  (Read 2969 times)

jona

  • Newbie
  • *
  • Posts: 32
Scripting Question
« 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.

« Last Edit: September 17, 2011, 11:44:14 PM by jona »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Scripting Question
« Reply #1 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.

Carlos Quintero
iToo Software

jona

  • Newbie
  • *
  • Posts: 32
Re: Scripting Question
« Reply #2 on: September 19, 2011, 06:23:34 PM »
Thanks! That confirms my findings. IT does work though so that's the ticket!