This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dic = { | |
"root_grp": { | |
"a":{ | |
"a1":{ | |
"aa1":{}, | |
"aa2":{} | |
}, | |
"a2":{} | |
} , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hou | |
# get current path | |
current_file_path = hou.hipFile.name() | |
# copy to clipboard using PySide2 | |
from PySide2 import QtGui | |
app = QtGui.QGuiApplication.clipboard() | |
app.setText(current_file_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node = hou.pwd() | |
geo = node.geometry() | |
r = node.evalParm('colorr') | |
g = node.evalParm('colorg') | |
b = node.evalParm('colorb') | |
print(r,g,b) | |
node.setColor(hou.Color(r,g,b)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node = hou.selectedNodes()[0] | |
attributeWrangle = node.parent().createNode('attribwrangle') | |
attributeWrangle.setInput(0,node) | |
attributeWrangle.setPosition(node.position() + hou.Vector2(0,-1)) | |
#attributeWrangle.setColor(hou.Color((0.4,0.6,1.0))) | |
attributeWrangle.setDisplayFlag(True) | |
attributeWrangle.setRenderFlag(True) |