Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: DN4548 on July 02, 2014, 08:04:51 PM

Title: Surface Maxscript
Post by: DN4548 on July 02, 2014, 08:04:51 PM
Hi All, I'm sure this one is really simple but I'm just not sure where to find it. I'm trying to create a forest pack then assign a surface just like you would in the manual method. So far I have this:

Forest_Pro iconSize:1 camfar:100000 cambho:10 camdensfar:1000 clusize:20 altmin:-100 altmax:100
select $Forest001

$.reserved2 = $Plane001

John
Title: Re: Surface Maxscript
Post by: DN4548 on July 02, 2014, 11:43:42 PM
This isn't working either. Ah must be so simple!!

tmp_ground=plane pos:[0,0,0] name:"Plane002"
FP4_obj=forest_pro mode:1
FP4_obj.surflist=$Plane002
Title: Re: Surface Maxscript
Post by: iToo on July 03, 2014, 09:24:07 AM
Yes, as you pointed the surfaces are defined in "surflist", but this parameter is an array. So items are added using "append":

append ($Forest001.surflist) $Plane001

Probably you also want to enable the "Surfaces Area" (if not, there are not visible items). It's done in this way (assuming there are not other areas):

$.pf_aractivelist[1] = true

I hope that helps.
Title: Re: Surface Maxscript
Post by: DN4548 on July 03, 2014, 10:31:35 AM
Cheers, That works perfectly!! I'm sure I'll be back with some questions soon.  :)
Title: Re: Surface Maxscript
Post by: DN4548 on July 04, 2014, 02:58:26 PM
Ah, told you I would be back. :) How do you had multiple items to the surface in 1 line of code for example

append ($.surflist) ($Plane, $Plane003, $Plane002)

Not

append ($.surflist) $Plane
append ($.surflist) $Plane003
append ($.surflist) $Plane002

Cheers,
John
Title: Re: Surface Maxscript
Post by: Rokas on July 04, 2014, 03:25:20 PM
it's not exactly oneliner but:

myarray = #($plane001,$plane002,$plane003,$plane004,$plane005,$plane006,$plane007)
for obj in myarray do append ($.surflist) obj