Itoo Software Forum

Author Topic: store use instancing engine off in library preset  (Read 1347 times)

3D Digital Studio

  • Newbie
  • *
  • Posts: 23
  • Barry John
    • 3d digital studio
store use instancing engine off in library preset
« on: May 08, 2015, 10:23:21 AM »

I have created a presets in my library for terrace housing and using a material element to randomise the jpeg so each house is diffent.
I am using mental ray so i have "use instancing engine" off but it doesnt store this setting within the library when I use the preset.
Is there a work around?


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1760
Re: store use instancing engine off in library preset
« Reply #1 on: May 08, 2015, 01:49:01 PM »

Unfortunately the settings in the Display roll-out are not included as part of a style and therefore not loaded via the library. This is by design to prevent accidental changes to the display settings that could have a negative impact, for example if a preset was set to display full mesh mode and it is loaded onto a huge spline.

Unfortunately at this point there is not a workaround except to manually turn off the Instancing Engine or add a script to the library package that turns off instancing on import. To do this:

1 - Open the location of your user library containing the facade styles and add a new .ms file with the following function

Code: [Select]
fn turnOffInstancing = (
$.rendermode = off

2 - Name this file something like

3 - Next open index.xml, also found in the root folder for the library and add the following line before the <item></item> tags

Code: [Select]
<maxscript file="" script="turnOffInstancing();"  execute_on="item_select"/>As you can see, the file is the Maxscript file we just created and the Script is the name of the function. Execute On determines when the script is run  (it could also be set to "lib_open")

Be aware that this will turn off instancing for all objects in this library and also that RailClone remembers the last value used for this setting so any new RC objects will also have the Instancing Engine turned off.

I hope that helps, if you have any further question please let me know.

Many thanks,

« Last Edit: May 08, 2015, 01:56:07 PM by Paul Roberts »
Paul Roberts
iToo Software