Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Copy material via maxscript
show user profile  ravihara
Can anyone help me in how to do this in maxscript?
I have a multisub material.
I want to get a copy of a specific sub material of it and rename that copy with a suffix "_separated"
thanks for your time!


read 179 times
11/8/2017 12:28:32 PM (last edit: 11/8/2017 12:28:32 PM)
show user profile  3joez
There you go


mymultimat = $.material
numsubs = mymultimat.materiallist.count
format "\n \n % has % submaterials \n" mymultimat numsubs
for i=1 to numsubs do (format "current material is % \n" mymultimat[i]
local prefix = mymultimat.materiallist[i].name
local suffix = "_separated"
combined = prefix+suffix
newMat = copy mymultimat.materiallist[i]
newMat.name = combined
setMeditMaterial i newmat
)

read 113 times
11/10/2017 11:12:12 AM (last edit: 11/10/2017 3:17:02 PM)
show user profile  ravihara
Thanks a lot 3joez!


read 85 times
11/12/2017 5:24:48 AM (last edit: 11/12/2017 5:24:48 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org