Notifications
Clear all

[Closed] merging multiple xref objs with duplicate materials

I’m working on a maxscript that allows the user to place multiple xref objects into a scene. Many of these objects share the same texture maps/materials. When I try to place more than one xref object into the scene that uses the same material I get the prompt asking whether to use the scene material, use the merged material, etc.

I would like for the script to work without prompting the user but I’m not quite sure how to approach it. Is there a way I can prevent the prompt from coming up and set the material merge method?

Thanks,
-Brian

2 Replies

From the Maxscript Help Interface: objXRefMgr:

objXRefMgr.dupMtlNameAction : enum : Read|Write
dupMtlNameAction enums: {#prompt|#useXRefed|#useScene|#autoRename}
Get/set the action to perform when duplicate materials have been detected.

-Eric

I hadn’t noticed that in the documentation, thanks for the quick reply