Saori Yoshimoto work notes since 2018

Saturday, July 18, 2020

[MA:MEL] Check on/off several state on render layer

string $selection[] = `ls -sl`;

for ($myNode in $selection) {
 
    editRenderLayerAdjustment ($myNode + ".castsShadows");
    $csState = `getAttr ($myNode + ".castsShadows")`;
    $csState = 0;
    setAttr ( $myNode + ".castsShadows") $csState;


    editRenderLayerAdjustment ($myNode + ".aiVisibleInDiffuseReflection");
    $visDifState = `getAttr ($myNode + ".aiVisibleInDiffuseReflection")`;
    $visDifState = 0;
    setAttr ( $myNode + ".aiVisibleInDiffuseReflection") $visDifState;
 
    editRenderLayerAdjustment ($myNode + ".aiVisibleInSpecularReflection");
    $visSpeState = `getAttr ($myNode + ".aiVisibleInSpecularReflection")`;
    $visSpeState = 0;
    setAttr ( $myNode + ".aiVisibleInSpecularReflection") $visSpeState;
 
    editRenderLayerAdjustment ($myNode + ".aiVisibleInDiffuseTransmission");
    $visDifRfaState = `getAttr ($myNode + ".aiVisibleInDiffuseTransmission")`;
    $visDifRfaState = 0;
    setAttr ( $myNode + ".aiVisibleInDiffuseTransmission") $visDifRfaState;
 
    editRenderLayerAdjustment ($myNode + ".aiVisibleInSpecularTransmission");
    $visSpeRfaState = `getAttr ($myNode + ".aiVisibleInSpecularTransmission")`;
    $visSpeRfaState = 0;
    setAttr ( $myNode + ".aiVisibleInSpecularTransmission") $visSpeRfaState;
 
    editRenderLayerAdjustment ($myNode + ".aiSelfShadows");
    $selSdwState = `getAttr ($myNode + ".aiSelfShadows")`;
    $selSdwState = 0;
    setAttr ( $myNode + ".aiSelfShadows") $selSdwState;
 
    editRenderLayerAdjustment ($myNode + ".aiMatte");
    $aimatteState = `getAttr ($myNode + ".aiMatte")`;
    if($aimatteState != 1) {
        $aimatteState = 1;
    }
    setAttr ( $myNode + ".aiMatte") $aimatteState;
}

---------------------------------------------------
    setAttr ( $myNode + ".aiMatte") $aimatteState;
//    $displaySubdCompState = `getAttr ($myNode + ".displaySubdComps")`;
//    if($displaySubdCompState != 1){
//        $displaySubdCompState = 1;
//    }
    

// setAttr ( $myNode + ".displaySubdComps") $displaySubdCompState;
}

No comments:

Post a Comment