쉐이더 컬러 텍스쳐를 incandescence로 일괄적으로 바꾸기







string $Shader_List[];
$Shader_List=`ls -sl`;
int $Shader_count;
int $size_obj_count=size($Shader_List);
string $Shader_Name;
string $texture_Name[];
for ($Shader_count=0;$Shader_count<$size_obj_count;$Shader_count++)
{
string $Shader_Name = $Shader_List[$Shader_count];
string $Shader_color = stringArrayToString({$Shader_Name,".color"}, "");
string $texture_Name[] = `listConnections -source true -type file $Shader_color`;
string $texture_color= stringArrayToString({$texture_Name[0],".outColor"}, "");
string $shader_inc = stringArrayToString({$Shader_Name,".incandescence"}, "");
connectAttr -force $texture_color $shader_inc;
disconnectAttr $texture_color $Shader_color;
setAttr $Shader_color -type double3 0 0 0 ;
};