matmap_lib = sceneMaterials

for i in  matmap_lib do
 

submatcount = getnumsubmtls  meditMaterials[1] ----有多少个贴图材质球通道。

if submatcount != 0 then
  (
  for i in 1 to submatcount do
   (
   the_submat = getSubMtl meditMaterials[1]  i ----收集材质球通道。
   the_prop = getSubMtlSlotName meditMaterials[1]   i ---收集材质对应的字符串内容。
   if the_submat != undefined then ---材质通道如果没有指定材质,就是undefined
    (
    the_type = superclassof the_submat as string
    initMatMap the_submat (appendMatMaps the_submat root the_prop the_type i)
    deleteitem temp_type temp_type.count
    deleteitem temp_subdex temp_subdex.count
    )
   )
  )
  
  
   submapcount = try(getnumsubtexmaps meditMaterials[1] )catch(0) ---有24 个通道。

相关文章:

  • 2022-12-23
  • 2021-10-04
  • 2021-12-09
  • 2022-01-25
  • 2021-05-02
  • 2021-11-14
  • 2022-02-09
  • 2022-01-06
猜你喜欢
  • 2021-08-25
  • 2021-07-06
  • 2022-12-23
  • 2021-12-23
  • 2021-12-31
相关资源
相似解决方案