Create_Houdini_tools
:version Houdini 15.5.673
Verwenden eines für mich in Python angepassten Tools Ein 1-2 Jahre Junior Artist (eine Person wie ich), der die Arbeitseffizienz verbessern möchte Für diejenigen, die Python über Houdini lernen möchten, bevor sie den Veteranen Pythonista fragen. : Das freigegebene Skript wurde durch Test erstellt. Ändern Sie es daher nach Belieben.
** Erstellen Sie einen "leeren Geometrieknoten" **
#=== UI function ===#
getp = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor);
pos = getp.selectPosition();
#=== obj class===#
obj = hou.node("/obj");
# Create OBJ node
geo = obj.createNode("geo","FXwork",0);
#SetColor
geoCol = hou.Color((0.0,0.533,0.0));
geo.setColor(geoCol);
#Set position
geo.setPosition(pos);
: Registerkarte "Rendern" wird nicht berücksichtigt (gelöscht)
** Machen Sie .abc .bgeo_Cache Asset
**
#===== UI Function =====#
getp = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor);
pos = getp.selectPosition();
#===== OBJ Class =====#
obj = hou.node("/obj");
geo = obj.createNode("geo","Cache_Publish",0);
#Node Color
geoCol = hou.Color((0.0,0,6,0.6));
geo.setColor(geoCol);
#Set Position
geo.setPosition(pos);
#===== Sop Class =====#
#Get Sop Path
soppath =geo.path();
print soppath;
#Get Sop node
sop = hou.node(soppath);
#Create Node Object Merge
imprt= sop.createNode("object_merge","Import_Geo");
#==== Edit parameters===#
imprt_parm = imprt.parm("xformtype");
imprt_parm.set(1);
#Create Node unpack
unpack = imprt.createOutputNode("unpack");
#=== Edit parameters ===#
unpackparm = unpack.parm("transfer_attributes");
unpackparm.set("*");
#Create Node filecache
filecache = unpack.createOutputNode("filecache","customName");
#=== Edit Parameter ===#
cache_parm01 = filecache.parm("loadfromdisk");
cache_parm01.set = (1);
#Edit path
cache_parm02 = filecache.parm("file");
cache_parm02.set("$HIP/geo/$OS/$OS.$F.bgeo.sc");
#Create Node Null
null = filecache.createOutputNode("null","OUT");
** Erstelle ein SHOP Netzwerk
**
#Set UI function
setp = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor);
uiP = setp.selectPosition();
#/obj directory ffunction#
obj = hou.node("/obj");
work = obj.createNode("shopnet","SHOP",0);
work.setPosition(uiP);
#parent path is here
objpath =work.path();
#Def Color
defcol = hou.Color((1.0,0.8,0));
work.setColor(defcol);
** Erstelle Shader_Builder
**
#error function
#error picker dialog
select = hou.selectedNodes()
if len(select)!=0:
hou.ui.displayMessage('-userGuide-\n ============\
\nSimple Material Builder\n ============',title= 'dialogMessage');
node = select[0].path()
print 'nodepath=='+ node
else:
hou.ui.displayMessage('-User Support-\nSelect ShaderNetwork\n\
============\nSample...\n Shopnet = SHOP\n SHOP = ShaderNetwork\n\n\
============',title= 'dialogMessage');
#Function Select is End
userpath = node;
#Set UI function
shop = hou.node(userpath);
builder = shop.createNode("vopmaterial","ShaderBuilder");
builder.moveToGoodPosition()
#Finish Function
hou.ui.displayMessage("Sucess!!!");
Ich benutze: Popup_Window.
** Erstelle ein ROP Netzwerk
**
#Set UI function
setp = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor);
uiP = setp.selectPosition();
#/obj directory ffunction#
obj = hou.node("/obj");
work = obj.createNode("ropnet","ROP",0);
work.setPosition(uiP);
#parent path is here
objpath =work.path();
#Def Color
defcol = hou.Color((1.0,0,0.5));
work.setColor(defcol);
** Erstelle einen MantraNode **
#error function
#error picker dialog
select = hou.selectedNodes()
if len(select)!=0:
hou.ui.displayMessage('-userGuide-\n ============\
\nSimple Mantra_node\n ============',title= 'dialogMessage');
path= select[0].path()
print path
else:
hou.ui.displayMessage('-User Support-\nSelect RenderGeometry\n\
============\nSample...\n Add MantraNode\n Create SelectGeometry\n\n\
============',title= 'dialogMessage');
#Function Select is End
if len(select)!=0:
text = hou.ui.readInput(message = "-userGuide-\n==============\nMantraNode_Name\
\n==============\n-typeHere-\n",);
else:
none;
typename = text[1];
userPath =(path);
rop = hou.node(userPath);
mantra = rop.createNode("ifd");
mantra.setName(typename,0)
mantra.moveToGoodPosition();
Ich benutze: Popup_Window.
Im Vergleich zu Python-Büchern und Hilfe Lassen Sie uns Spaß daran haben, Werkzeuge zu erstellen, die für Sie einfach zu bedienen sind
Recommended Posts