Search the Community
Showing results for tags 'pyqt4 python'.
-
When I create a button event in Houdini pyqt4, I want to create another event from that selected button. example . . . def btn1_clicked(self): camList = [] globj = hou.node('/obj/') for child in globj.children(): nameOrder = list(child.type().namespaceOrder()) if 'gl_Camera_' in nameOrder: camList.append(child.path()+'/fx_renderCam') elif 'cam' in nameOrder: camList.append(child.path()) camCount = len(camList) if camCount == 0: choiceCamPath = 'None' sh_render = hou.node('/out').createNode('gl_Mantra_','RENDER_shadow') sh_render.moveToGoodPosition() #sh_render.setColor(hou.color((1,2,3))) sh_mat = hou.node('/mat').createNode('shadowmatte') sh_mat.moveToGoodPosition() sh_render.parm('camera').set('None') hou.ui.displayMessage('no cam.') elif camCount > 1: camList.append('Cancel') choiceCam = hou.ui.displayMessage('choice cam.', buttons=camList , severity=hou.severityType.Message, close_choice=camCount) <- If 'cancel' is clicked, the node is not created at the out level and the message window is turned off. choiceCamPath = camList[choiceCam] # if buttons==camCount: # self.close() else: sh_render = hou.node('/out').createNode('gl_Mantra_','RENDER_shadow') sh_render.moveToGoodPosition() #sh_render.setColor(hou.color((1,2,3))) sh_mat = hou.node('/mat').createNode('shadowmatte') sh_mat.moveToGoodPosition() sh_render.parm('camera').set(choiceCamPath) This is part of the script to automatically create the shadow mat I am creating. Thank you for your help.