copy mat+modifiers from file A to file B (object to object)
http://3d-kstudio.com/3ds-max-plugins-scripts/trackscripts/#CopyMaterial...
There's some brilliant script in the Track's pack that copies material and modifiers (with Shift+click) from one object to another within one file.
Could there be a similar tool that does the same between objects in separate files?
Thank you in advance.
Comments
May be it would help you to
May be it would help you to shorten the things..
Alex, the author of original script helped me to cook alternative version that keeps original mat name:
in TrackScripts.mcr, find the fragment
MacroScript CopyMat category:"Track" tooltip:"Copy Material and Modifiers" Icon:#("Material_Modifiers",3)(
in the function the line
for i in selobjs do i.material=obj.material
to be replaced with:
for i in selobjs do
(
local oldName = i.material.Name
i.material = obj.material
i.material.Name = oldName
)
---
It worked well, but what I didn't like in this alternative (please pay attention to this case) is the Error pop-ups when the receiver had no
material (and it's name of course) before mat switching.
Thank you, Miauu once again
.
Test the scripts. I have made some changes to the Copy_ script. The saved object will be saved with unique name, so when you use the Paste script there will be no problems when you have object with the same name in the scene(there is a built-in solution for cases like this, but they will works on max2011+).
The Paste script works as follows:
- run it and click anywhere in the viewport. The Alt and Alt+Shift keys will works as is described in the code.
Tools and Scripts for Autodesk 3dsMax
Mate, it works precisely as
Mate, it works precisely as expected! Amazing, thank you so much!
Now the routine of revisions (I import models from Sketchup) will be much more easier.
Thought about some polishing:
1. IF ADDITIONALLY , the ALT key will be used, so the object-receiver would get the mat, but preserve its original mat name (only name!)
2. IF ADDITIONALLY , the ALT+SHIFT key will be used, so the receiver object would preserve its original mat name (only name!) and receive mat+UVW.
NB: If there's no mat upon the receiver the script, the shouldn't be the Error pop-up.
Is it possible?
---
Once again, thank you!
.
Now you can't use Alt, Shift or Ctrl to achieve different results because the script is a macro and if you run it with hotkey then the keyboard kyes can't be used. Tommorow I will ty to add what you have asked and will change the way of how the script works so you can use it with a hotkey.
Tools and Scripts for Autodesk 3dsMax
@fajar: No, it's
@fajar: No, it's overcomplicated, I dreamt about something elegant, fluent and easy like eye dropper. Essentially the Track's script is ideal (the main limitation it works within one file).
@miauu My bad :( by saying modifiers I meant UVW mod. So is my humble request doable?
Thank you in advance.
.
You will have two instances of 3dsMax running at the same time or the situation is different?
Tools and Scripts for Autodesk 3dsMax
Yep, 2 (BTW are 2+ instances
Yep, 2 (BTW are 2+ instances of 3ds max problem?) Windows of Max will be open side by side.
This is how I see this tool :
1. In file A, select object-donator and hit shortcut (i.e. Cntl+C for mat copy only, Cntl+Shift+C for copying mat+UVW mod)
2. In file B,select object and hit shortcut (i.e. Cntl+V for mat paste only, Cntl+Shift+V for pasting mat+UVW mod)
3. Profit..
BTW may be it will also help:
http://www.scriptspot.com/3ds-max/scripts/copy-and-paste-objects
http://www.scriptspot.com/3ds-max/scripts/copypaste-material-to-file
Use them constantly
.
Test the scripts below. I just combined(with little modification) the Track's and Christopher Grant's scripts.
Tools and Scripts for Autodesk 3dsMax
the way to do it , may be
the way to do it , may be make little box dummy object then copy selected object material & modifier to box dummy and save node those box and then load the box dummy to another file then apply to desired object on those file [file 2]
.
There is one thing tht you should to know - you can't copy the Edit Poly modifier. The script will add is as a modifier to the new object, but it will be as new modifier. All changes to geometry that the original Edit Poly mod has made to the object will not be applied to the new object(where the copy is applyed).
Tools and Scripts for Autodesk 3dsMax