Pymel / Python Coding

3delight geo attributes_

# create geo attribute
string $dga_node = DGA_create();
DGA_visibilityTransmissionCreateAttr($dga_node);
DGA_visibleToCameraCreateAttr($dga_node);
DGA_geometryCurves($dga_node);
setAttr ($dga_node + “.visibilityTransmission”) 0; //opaque
string $sl[] = `ls -sl -l`;
DL_setObjectAttrib($dga_node, “delightGeoAttribs”, $sl);

# change property of existing geo attribute
string $dga_node = “delightGeoAttribs2”;
setAttr ($dga_node + “.visibilityTransmission”) 1; //opaque

For creating mask set per selection:

import pymel.core as pm
def ADD_MASK():
    selection = pm.ls(sl = True)
    for object in selection:
        objectShape = object.getShape()
        pm.select(objectShape);  
        setName = 'Mask_' + object
        pm.createNode('3DelightMaskSet',n=setName)
        pm.sets (setName,forceElement=object) 

ADD_MASK()

Post navigation

Comments are closed.