I'm looking for a 3ds max script that will allow me to copy an object's material (with a hotkey - don't like new menus and tool bars) and paste it to another object all within the viewport. It would save me a lot of steps having to first open material editor then pick the material then assign to new material. I would love something that did this between instances like CopyPasteObjects.mcr (best script ever :). It would save me so much time.
Attached is an example of what I want to do...to select the object with the mat I need, copy, then switch to different max scene and paste onto new object.
Right now I'm copying and pasting objects which is adding in a lot of unnecessary steps.
Thanks in advance.
Comments (21)
Comment policy
To Barigazy: Copy of Material Instead of Instance.
Great job on this script! Just wondering if I can edit the code to paste the exact same material on the other objects instead of a copy of the material as this one does.
What's going on: When I paste the material to another object, it makes a copy of the material instead of pasting the same material. So then I would have to go in and edit each material individually instead of just the one original 1.
fn matchPropMaterial = if selection.count != 0 do
(
if not InstanceMgr.autoMtlPropagation do InstanceMgr.autoMtlPropagation = on
with redraw off with undo "copy mat" on
(
if (mat = selection[1].mat) != null do
(
for i = 2 to selection.count where canConvertTo selection[i] Editable_mesh do selection[i].mat = mat
)
)
)
matchPropMaterial()
Nice!
Thanks! Sorry, didn't quite understand how that one worked at first. Got it now though.
Just read the manual (MXS Help Document)
;)
look like life thread found....
just a another little gift....
to use : select object that have material [obj A] and then select another object [obj B,C,D......] and then run the script
;)
fn matchPropMaterial = if selection.count != 0 do
(
with redraw off with undo "" undo "copy mat" on
(
if (mat = selection[1].mat) != null do
(
for i = 2 to selection.count where canConvertTo selection[i] Editable_mesh do selection[i].mat = mat
)
)
)
matchPropMaterial()
Neither do I :)
I'm lazy to search existing solution, it's easier to write new one ... sometimes :)
.
MatTransmiter.
Similar but with my tool you can past over and over untill you copy next one :)
.
I never tested Mattransmiter. Just know that it exist. :)
Always is better to have multifunctional tool.
Copy | Paste Materials
Put this *.mcr in macroscript folder
You can find two macros in "bgaTools" category.
Attachments
Thanks
Awesome script,barigazy, thank you!
2 things:
Is it possible to have it copy from one Max instance and then paste into a different scene in a different Max Instance?
Also after I drag and drop the script into the viewport it works fine but when I restart max I get
-- Unknown property: "count" in undefined .....when I drag the script into the viewport again it works fine. I saved it in macroscripts folder and still same problem each time I start max.
Then use this tool
http://www.scriptspot.com/3ds-max/scripts/copypaste-material-to-file
tried that
I tried that but it only copies and pastes materials in the material editor from what I can tell, not something I really need. Your script is perfect if I can copy from one max to another.
Attached is an example of what I want to do...to select the object with the mat I need, copy, then switch to different max scene and paste onto new object.
Right now I'm copying and pasting objects which is adding in a lot of unnecessary steps.
Attachments
I not have time to test this but u can try it.
Also u neet to use same versions of max as different instance.
If you need to convert some material libs in earlier version of max then use this tool. http://www.scriptspot.com/3ds-max/scripts/mat-file-to-lower-version
Attachments
yes!
My Hero! This is great. Works very well. Only problem I see is that when I try to paste to multiple objects I get the message "Select Some Objects" In your previous version it pasted to multiple objects with no error message.
I told you it's not tested. Try this one
Attachments
Yes, I understand. I was testing for you :). This one works flawlessly. I really appreciate it. Thank you.
Great! Mission accomplished :)
Not only that, but I changed my material library directory to a network location so with your script I can copy a material from max on one computer and paste to an object on a different computer (I'm running 2 machines with Input Director). Absolutely superb.
Nice
Great work! Thanks!