Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: cc8boy on March 13, 2016, 08:43:43 PM

Title: How to batch replace the objects in the geometry list of a forest object via MAX
Post by: cc8boy on March 13, 2016, 08:43:43 PM
Hello everyone.
     There're several forest objects in my scenes. There are almost 20 geometries in the geometry list of each forest object. Somebody send me a set of new tree models.
I want to batch replace these almost 20 geometries in the geometry list of each forest object via MAXSCRIPT. It's so boring and painful to select all the forest objects one by one and replace the geometries of each forest object one by one .
For example, select 10 trees to replace the first 10 trees in the list of all the forest objects.
Could you write a sample MAXSCRIPT about batch replacing the geometries in a forest objects in one click for me ,please?
Many thanks.
Best wishes.
Title: Re: How to batch replace the objects in the geometry list of a forest object via MAX
Post by: Michal Karmazín on March 14, 2016, 10:44:06 AM
Hi,

That should be something feasible with help of Maxscript (all values needed are accessible by Maxscript). When changing the Custom Object, following values are be redefined:

$.cobjlist
$.namelist
$.matList

Where is the item's position in the Geometry list (starting from 1). Optionally, you can use Custom Object's material and set the $.matList = undefined.

A possible approach would be to create a list of objects (for example from selection) and perform re-assignation of those in a loop operation. As that's something very similar to the existing "ObjectsToForest (http://forum.itoosoft.com/index.php?topic=2929.msg12480#msg12480)", please feel free to get inspired by it.

We are too busy working on the Forest Pack 5 these days as there are still few things we want to tweak and writing "custom scripts" now would require some additional time (it'll delay other pending tasks). Thanks for your comprehension and hope you'll find it useful.

Best regards,
Title: Re: How to batch replace the objects in the geometry list of a forest object via MAX
Post by: cc8boy on March 14, 2016, 12:27:07 PM
That's enough for me. I can write a script now. Thanks for your reply. I can't wait to see FP 5.0.

An other question is,
Why did this error happen in MAX2011(64bit) with FP 4.4.1? How to fix it? See my pictures.
Title: Re: How to batch replace the objects in the geometry list of a forest object via MAX
Post by: Michal Karmazín on March 15, 2016, 12:41:09 PM
Hi,

It looks like the Maxscript Selector isn't working well on your configuration (it might be a language pack related issue). I would suggest you to try copying the forestpack.ms file into C:\Users\<username>\AppData\Local\Autodesk\3dsMax\2011 - 64bit\CHS\scripts\startup folder. Hope that helps.

Best regards,