<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: need help: combining multiple selected shaders to one in Maya Shading, Lighting and Rendering Forum</title>
    <link>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11354578#M2179</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Python script should do what you want:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import maya.cmds as mc
def reassignIdenticalShaders():
    shaders = mc.ls(sl = True)
    remainingShader = shaders.pop(0)
    
    for shd in shaders:
        mc.select(cl = True)
        mc.hyperShade(o = shd)
        mc.hyperShade(a = remainingShader )
        mc.delete(shd)
    
reassignIdenticalShaders()&lt;/LI-CODE&gt;&lt;P&gt;Just select the shader you want everything to be connected to first and then all the other shaders that are identical to it and run the script from a Python tab in the scripteditor.&lt;/P&gt;&lt;P&gt;The script will then reassing all objects connected to the other shaders to the first one in the selection and delete the other shaders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it helps!&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 20:03:22 GMT</pubDate>
    <dc:creator>Kahylan</dc:creator>
    <dc:date>2022-08-11T20:03:22Z</dc:date>
    <item>
      <title>need help: combining multiple selected shaders to one</title>
      <link>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11353268#M2178</link>
      <description>&lt;P&gt;yup, can't find anywhere how to preform this simple task: I'm playing with Maya and imported models sometimes have tones of phongs etc., most are the same. many are assigned to invisible objects to the camera. How can I simply merge them to one shader ? e.g., selecting 100 phongs in the Hypershade (that are assigned to all sort of objects) and make them one shader assigned to all those objects, not searching one by one but automatically via script or something like that ? thanks !!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 09:49:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11353268#M2178</guid>
      <dc:creator>arch.yossi</dc:creator>
      <dc:date>2022-08-11T09:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: need help: combining multiple selected shaders to one</title>
      <link>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11354578#M2179</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Python script should do what you want:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import maya.cmds as mc
def reassignIdenticalShaders():
    shaders = mc.ls(sl = True)
    remainingShader = shaders.pop(0)
    
    for shd in shaders:
        mc.select(cl = True)
        mc.hyperShade(o = shd)
        mc.hyperShade(a = remainingShader )
        mc.delete(shd)
    
reassignIdenticalShaders()&lt;/LI-CODE&gt;&lt;P&gt;Just select the shader you want everything to be connected to first and then all the other shaders that are identical to it and run the script from a Python tab in the scripteditor.&lt;/P&gt;&lt;P&gt;The script will then reassing all objects connected to the other shaders to the first one in the selection and delete the other shaders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it helps!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 20:03:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11354578#M2179</guid>
      <dc:creator>Kahylan</dc:creator>
      <dc:date>2022-08-11T20:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: need help: combining multiple selected shaders to one</title>
      <link>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11358088#M2180</link>
      <description>&lt;P&gt;wow great I'm gonna try it today !!!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2022 07:10:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11358088#M2180</guid>
      <dc:creator>arch.yossi</dc:creator>
      <dc:date>2022-08-14T07:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: need help: combining multiple selected shaders to one</title>
      <link>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11392076#M2181</link>
      <description>&lt;P&gt;man thanks a lot !!!&lt;/P&gt;&lt;P&gt;that's great it solved a lot of headaches to me !!!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 05:50:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-shading-lighting-and/need-help-combining-multiple-selected-shaders-to-one/m-p/11392076#M2181</guid>
      <dc:creator>arch.yossi</dc:creator>
      <dc:date>2022-08-31T05:50:27Z</dc:date>
    </item>
  </channel>
</rss>

