Itoo Software Forum

Author Topic: How to batch replace the objects in the geometry list of a forest object via MAX  (Read 888 times)

cc8boy

  • Sr. Member
  • ****
  • Posts: 276
  • I'll do my best.Welcome to www.c7design.cn .
    • C7design
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.
We are working hard in virtual effects in 3DSMAX. Welcome to our website in China.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1555
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", 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,

cc8boy

  • Sr. Member
  • ****
  • Posts: 276
  • I'll do my best.Welcome to www.c7design.cn .
    • C7design
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.
« Last Edit: March 14, 2016, 12:35:00 PM by cc8boy »
We are working hard in virtual effects in 3DSMAX. Welcome to our website in China.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1555
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,