def setAttr(self, attr): #修改模型属性按钮命令 sel = pm.ls(sl=1) for i in sel: geos = i.getChildren(ad=1, type="mesh") for geo in geos: value = CRL.getObjAttr(geo, attr) if value: CRL.setObjAttr(geo, attr, 0) else: CRL.setObjAttr(geo, attr, 1)
def setAttr(self, attr): #修改模型属性按钮命令 sel = pm.ls(sl=1) for i in sel: geos = i.getChildren(ad=1, type = "mesh") for geo in geos: value = CRL.getObjAttr(geo, attr) if value : CRL.setObjAttr(geo, attr, 0) else : CRL.setObjAttr(geo, attr, 1)
def createLayerCmd(self, name): #创建渲染层按钮命令 if name == 'chr_idp1': idp_dic = CNG.makeidp1Dic() elif name == 'chr_idp2': idp_dic = CNG.makeidp2Dic() elif name == 'chr_idp3' or name == 'bg_idp3': idp_dic = CNG.makeidp3Dic() else: idp_dic = {} CRL.createRenderLayer(name) self.arnold.setRenderLayer(name) if idp_dic: for key, value in idp_dic.items(): if value: self.createShaderCmd(key, value)
def createLayerCmd(self, name): #创建渲染层按钮命令 if name == 'chr_idp1': idp_dic = CNG.makeidp1Dic() elif name == 'chr_idp2': idp_dic = CNG.makeidp2Dic() elif name == 'chr_idp3' or name == 'bg_idp3': idp_dic = CNG.makeidp3Dic() else : idp_dic = {} CRL.createRenderLayer(name) self.arnold.setRenderLayer(name) if idp_dic: for key, value in idp_dic.items(): if value: self.createShaderCmd(key, value)