frame
import sys
import toolutils
outputitem = None
inputindex = -1
inputitem = None
outputindex = -1
num_args = 1
h_extra_args = ''
pane = toolutils.activePane(kwargs)
if not isinstance(pane, hou.NetworkEditor):
? ? pane = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
? ? if pane is None:
? ? ? ?hou.ui.displayMessage(
? ? ? ? ? ? ? ?'Cannot create node: cannot find any network pane')
? ? ? ?sys.exit(0)
else: # We're creating this tool from the TAB menu inside a network editor
? ? pane_node = pane.pwd()
? ? if "outputnodename" in kwargs and "inputindex" in kwargs:
? ? ? ? outputitem = pane_node.item(kwargs["outputnodename"])
? ? ? ? inputindex = kwargs["inputindex"]
? ? ? ? h_extra_args += 'set arg4 = "' + kwargs["outputnodename"] + '"\n'
? ? ? ? h_extra_args += 'set arg5 = "' + str(inputindex) + '"\n'
? ? ? ? num_args = 6
? ? if "inputnodename" in kwargs and "outputindex" in kwargs:
? ? ? ? inputitem = pane_node.item(kwargs["inputnodename"])
? ? ? ? outputindex = kwargs["outputindex"]
? ? ? ? h_extra_args += 'set arg6 = "' + kwargs["inputnodename"] + '"\n'
? ? ? ? h_extra_args += 'set arg9 = "' + str(outputindex) + '"\n'
? ? ? ? num_args = 9
? ? if "autoplace" in kwargs:
? ? ? ? autoplace = kwargs["autoplace"]
? ? else:
? ? ? ? autoplace = False
? ? # If shift-clicked we want to auto append to the current
? ? # node
? ? if "shiftclick" in kwargs and kwargs["shiftclick"]:
? ? ? ? if inputitem is None:
? ? ? ? ? ? inputitem = pane.currentNode()
? ? ? ? ? ? outputindex = 0
? ? if "nodepositionx" in kwargs and? ? ? ? ? ? ?"nodepositiony" in kwargs:
? ? ? ? try:
? ? ? ? ? ? pos = [ float( kwargs["nodepositionx"] ),
? ? ? ? ? ? ? ? ? ? float( kwargs["nodepositiony"] )]
? ? ? ? except:
? ? ? ? ? ? pos = None
? ? else:
? ? ? ? pos = None
? ? if not autoplace and not pane.listMode():
? ? ? ? if pos is not None:
? ? ? ? ? ? pass
? ? ? ? elif outputitem is None:
? ? ? ? ? ? pos = pane.selectPosition(inputitem, outputindex, None, -1)
? ? ? ? else:
? ? ? ? ? ? pos = pane.selectPosition(inputitem, outputindex,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? outputitem, inputindex)
? ? if pos is not None:
? ? ? ? if "node_bbox" in kwargs:
? ? ? ? ? ? size = kwargs["node_bbox"]
? ? ? ? ? ? pos[0] -= size[0] / 2
? ? ? ? ? ? pos[1] -= size[1] / 2
? ? ? ? else:
? ? ? ? ? ? pos[0] -= 0.573625
? ? ? ? ? ? pos[1] -= 0.220625
? ? ? ? h_extra_args += 'set arg2 = "' + str(pos[0]) + '"\n'
? ? ? ? h_extra_args += 'set arg3 = "' + str(pos[1]) + '"\n'
h_extra_args += 'set argc = "' + str(num_args) + '"\n'
pane_node = pane.pwd()
child_type = pane_node.childTypeCategory().nodeTypes()
if 'geo' not in child_type:
? ?hou.ui.displayMessage(
? ? ? ? ? ?'Cannot create node: incompatible pane network type')
? ?sys.exit(0)
# First clear the node selection
pane_node.setSelected(False, True)
h_path = pane_node.path()
h_preamble = 'set arg1 = "' + h_path + '"\n'
h_cmd = r'''
if ($argc < 2 || "$arg2" == "") then
? ?set arg2 = 0
endif
if ($argc < 3 || "$arg3" == "") then
? ?set arg3 = 0
endif
# Automatically generated script
# $arg1 - the path to add this node
# $arg2 - x position of the tile
# $arg3 - y position of the tile
# $arg4 - input node to wire to
# $arg5 - which input to wire to
# $arg6 - output node to wire to
# $arg7 - the type of this node
# $arg8 - the node is an indirect input
# $arg9 - index of output from $arg6
\set noalias = 1
set saved_path = `execute("oppwf")`
opcf $arg1
# Node $_obj_font1 (Object/geo)
set _obj_font1 = `run("opadd -e -n -v geo font1")`
oplocate -x `$arg2 + 0` -y `$arg3 + 0` $_obj_font1
opspareds '? ? group {? ? ? ? ?name? ? "stdswitcher4"? ? ? ? ?label? ?"Transform"? ? ? ? ? parm {? ? ? ? ? ? ?name? ? "xOrd"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Transform Order"? ? ? ? ? ? ?joinnext? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "rOrd"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Rotate Order"? ? ? ? ? ? ?nolabel? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "t"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Translate"? ? ? ? ? ? ?export? all? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "r"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Rotate"? ? ? ? ? ? ?export? all? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "s"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Scale"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "p"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Pivot Translate"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "pr"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Pivot Rotate"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "scale"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Uniform Scale"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "pre_xform"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Modify Pre-Transform"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "keeppos"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Keep Position When Parenting"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "childcomp"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Child Compensation"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "constraints_on"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Enable Constraints"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "constraints_path"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Constraints"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "lookatpath"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Look At"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "lookupobjpath"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Look Up Object"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "lookup"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Look At Up Vector"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "pathobjpath"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Path Object"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "roll"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Roll"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "pos"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Position"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "uparmtype"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Parameterization"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "pathorient"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Orient Along Path"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "up"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Orient Up Vector"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "bank"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Auto-Bank factor"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ?}? ? ? group {? ? ? ? ?name? ? "stdswitcher4_1"? ? ? ? ?label? ?"Render"? ? ? ? ? parm {? ? ? ? ? ? ?name? ? "shop_materialpath"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Material"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "shop_materialopts"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Options"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "tdisplay"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Display"? ? ? ? ? ? ?joinnext? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "display"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Display"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "viewportlod"? ? ? ? ? ? ?label? ?"Display As"? ? ? ? ? ? ?type? ? ordinal? ? ? ? ? ? ?default { "full" }? ? ? ? ? ? ?help? ? "Choose how the object\'s geometry should be rendered in the viewport"? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ?"full"? ? ? "Full Geometry"? ? ? ? ? ? ? ? ?"points"? ? "Point Cloud"? ? ? ? ? ? ? ? ?"box"? ? ? ?"Bounding Box"? ? ? ? ? ? ? ? ?"centroid"? "Centroid"? ? ? ? ? ? ? ? ?"hidden"? ? "Hidden"? ? ? ? ? ? ? ? ?"subd"? ? ? "Subdivision Surface / Curves"? ? ? ? ? ? ?}? ? ? ? ? ? ?parmtag { "spare_category" "Render" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_rendervisibility"? ? ? ? ? ? ?label? ?"Render Visibility"? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ?default { "*" }? ? ? ? ? ? ?menureplace {? ? ? ? ? ? ? ? ?"*"? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"Visible to all"? ? ? ? ? ? ? ? ?"primary"? ? ? ? ? ? ? ? ? ? ? ?"Visible only to primary rays"? ? ? ? ? ? ? ? ?"primary|shadow"? ? ? ? ? ? ? ? "Visible only to primary and shadow rays"? ? ? ? ? ? ? ? ?"-primary"? ? ? ? ? ? ? ? ? ? ? "Invisible to primary rays (Phantom)"? ? ? ? ? ? ? ? ?"-diffuse"? ? ? ? ? ? ? ? ? ? ? "Invisible to diffuse rays"? ? ? ? ? ? ? ? ?"-diffuse&-reflect&-refract"? ? "Invisible to secondary rays"? ? ? ? ? ? ? ? ?""? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "Invisible (Unrenderable)"? ? ? ? ? ? ?}? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "rendervisibility" }? ? ? ? ? ? ?parmtag { "spare_category" "Render" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_rendersubd"? ? ? ? ? ? ?label? ?"Render Polygons As Subdivision (Mantra)"? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "rendersubd" }? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_subdstyle"? ? ? ? ? ? ?label? ?"Subdivision Style"? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ?default { "mantra_catclark" }? ? ? ? ? ? ?hidewhen "{ vm_rendersubd == 0 }"? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ?"mantra_catclark"? ?"Mantra Catmull-Clark"? ? ? ? ? ? ? ? ?"osd_catclark"? ? ? "OpenSubdiv Catmull-Clark"? ? ? ? ? ? ?}? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "subdstyle" }? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_subdgroup"? ? ? ? ? ? ?label? ?"Subdivision Group"? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ?default { "" }? ? ? ? ? ? ?hidewhen "{ vm_rendersubd == 0 }"? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "subdgroup" }? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_osd_quality"? ? ? ? ? ? ?label? ?"Open Subdiv Quality"? ? ? ? ? ? ?type? ? float? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ?hidewhen "{ vm_rendersubd == 0 vm_subdstyle != osd_catclark }"? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "osd_quality" }? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_osd_vtxinterp"? ? ? ? ? ? ?label? ?"OSD Vtx Interp"? ? ? ? ? ? ?type? ? integer? ? ? ? ? ? ?default { "2" }? ? ? ? ? ? ?hidewhen "{ vm_rendersubd == 0 vm_subdstyle != osd_catclark }"? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ?"0" "No vertex interpolation"? ? ? ? ? ? ? ? ?"1" "Edges only"? ? ? ? ? ? ? ? ?"2" "Edges and Corners"? ? ? ? ? ? ?}? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "osd_vtxinterp" }? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vm_osd_fvarinterp"? ? ? ? ? ? ?label? ?"OSD FVar Interp"? ? ? ? ? ? ?type? ? integer? ? ? ? ? ? ?default { "4" }? ? ? ? ? ? ?hidewhen "{ vm_rendersubd == 0 vm_subdstyle != osd_catclark }"? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ?"0" "Smooth everywhere"? ? ? ? ? ? ? ? ?"1" "Sharpen corners only"? ? ? ? ? ? ? ? ?"2" "Sharpen edges and corners"? ? ? ? ? ? ? ? ?"3" "Sharpen edges and propagated corners"? ? ? ? ? ? ? ? ?"4" "Sharpen all boundaries"? ? ? ? ? ? ? ? ?"5" "Bilinear interpolation"? ? ? ? ? ? ?}? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ?parmtag { "mantra_name" "osd_fvarinterp" }? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ?}? ? ? ? ?group {? ? ? ? ? ? ?name? ? "folder0"? ? ? ? ? ? ?label? ?"Shading"? ? ? ? ? ? ? parm {? ? ? ? ? ? ? ? ?name? ? "categories"? ? ? ? ? ? ? ? ?label? ?"Categories"? ? ? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ? ? ?default { "" }? ? ? ? ? ? ? ? ?help? ? "A list of tags which can be used to select the object"? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "reflectmask"? ? ? ? ? ? ? ? ?label? ?"Reflection Mask"? ? ? ? ? ? ? ? ?type? ? oplist? ? ? ? ? ? ? ? ?default { "*" }? ? ? ? ? ? ? ? ?help? ? "Objects that will be reflected on this object."? ? ? ? ? ? ? ? ?parmtag { "opexpand" "1" }? ? ? ? ? ? ? ? ?parmtag { "opfilter" "!!OBJ/GEOMETRY!!" }? ? ? ? ? ? ? ? ?parmtag { "oprelative" "/obj" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "refractmask"? ? ? ? ? ? ? ? ?label? ?"Refraction Mask"? ? ? ? ? ? ? ? ?type? ? oplist? ? ? ? ? ? ? ? ?default { "*" }? ? ? ? ? ? ? ? ?help? ? "Objects that will be refracted on this object."? ? ? ? ? ? ? ? ?parmtag { "opexpand" "1" }? ? ? ? ? ? ? ? ?parmtag { "opfilter" "!!OBJ/GEOMETRY!!" }? ? ? ? ? ? ? ? ?parmtag { "oprelative" "/obj" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "lightmask"? ? ? ? ? ? ? ? ?label? ?"Light Mask"? ? ? ? ? ? ? ? ?type? ? oplist? ? ? ? ? ? ? ? ?default { "*" }? ? ? ? ? ? ? ? ?help? ? "Lights that illuminate this object."? ? ? ? ? ? ? ? ?parmtag { "opexpand" "1" }? ? ? ? ? ? ? ? ?parmtag { "opfilter" "!!OBJ/LIGHT!!" }? ? ? ? ? ? ? ? ?parmtag { "oprelative" "/obj" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "lightcategories"? ? ? ? ? ? ? ? ?label? ?"Light Selection"? ? ? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ? ? ?default { "*" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_lpetag"? ? ? ? ? ? ? ? ?label? ?"LPE Tag"? ? ? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ? ? ?default { "" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "lpetag" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_volumefilter"? ? ? ? ? ? ? ? ?label? ?"Volume Filter"? ? ? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ? ? ?default { "box" }? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"box"? ? ? ?"Box Filter"? ? ? ? ? ? ? ? ? ? ?"gaussian"? "Gaussian"? ? ? ? ? ? ? ? ? ? ?"bartlett"? "Bartlett (triangle)"? ? ? ? ? ? ? ? ? ? ?"catrom"? ? "Catmull-Rom"? ? ? ? ? ? ? ? ? ? ?"hanning"? ?"Hanning"? ? ? ? ? ? ? ? ? ? ?"blackman"? "Blackman"? ? ? ? ? ? ? ? ? ? ?"sinc"? ? ? "Sinc (sharpening)"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "filter" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_volumefilterwidth"? ? ? ? ? ? ? ? ?label? ?"Volume Filter Width"? ? ? ? ? ? ? ? ?type? ? float? ? ? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ? ? ?range? ?{ 0.001 5 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "filterwidth" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_matte"? ? ? ? ? ? ? ? ?label? ?"Matte shading"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "matte" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_rayshade"? ? ? ? ? ? ? ? ?label? ?"Raytrace Shading"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "rayshade" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Shading" }? ? ? ? ? ? ?}? ? ? ? ?}? ? ? ? ? group {? ? ? ? ? ? ?name? ? "folder0_1"? ? ? ? ? ? ?label? ?"Sampling"? ? ? ? ? ? ? parm {? ? ? ? ? ? ? ? ?name? ? "geo_velocityblur"? ? ? ? ? ? ? ? ?label? ?"Geometry Velocity Blur"? ? ? ? ? ? ? ? ?type? ? ordinal? ? ? ? ? ? ? ? ?default { "off" }? ? ? ? ? ? ? ? ?disablewhen "{ allowmotionblur == 0 }"? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"off"? ? ? ?"No Velocity Blur"? ? ? ? ? ? ? ? ? ? ?"on"? ? ? ? "Velocity Blur"? ? ? ? ? ? ? ? ? ? ?"accelblur" "Acceleration Blur"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "geo_accelattribute"? ? ? ? ? ? ? ? ?label? ?"Acceleration Attribute"? ? ? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ? ? ?default { "accel" }? ? ? ? ? ? ? ? ?hidewhen "{ geo_velocityblur != accelblur }"? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Sampling" }? ? ? ? ? ? ?}? ? ? ? ?}? ? ? ? ? group {? ? ? ? ? ? ?name? ? "folder0_2"? ? ? ? ? ? ?label? ?"Dicing"? ? ? ? ? ? ? parm {? ? ? ? ? ? ? ? ?name? ? "vm_shadingquality"? ? ? ? ? ? ? ? ?label? ?"Shading Quality"? ? ? ? ? ? ? ? ?type? ? float? ? ? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "shadingquality" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Dicing" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_flatness"? ? ? ? ? ? ? ? ?label? ?"Dicing Flatness"? ? ? ? ? ? ? ? ?type? ? float? ? ? ? ? ? ? ? ?default { "0.05" }? ? ? ? ? ? ? ? ?range? ?{ 0 1 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "flatness" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Dicing" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_raypredice"? ? ? ? ? ? ? ? ?label? ?"Ray Predicing"? ? ? ? ? ? ? ? ?type? ? integer? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"0" "Disable Predicing"? ? ? ? ? ? ? ? ? ? ?"1" "Full Predicing"? ? ? ? ? ? ? ? ? ? ?"2" "Precompute Bounds"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "raypredice" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Dicing" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_curvesurface"? ? ? ? ? ? ? ? ?label? ?"Shade Curves As Surfaces"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "curvesurface" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Dicing" }? ? ? ? ? ? ?}? ? ? ? ?}? ? ? ? ? group {? ? ? ? ? ? ?name? ? "folder0_3"? ? ? ? ? ? ?label? ?"Geometry"? ? ? ? ? ? ? parm {? ? ? ? ? ? ? ? ?name? ? "vm_rmbackface"? ? ? ? ? ? ? ? ?label? ?"Backface Removal"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "rmbackface" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "shop_geometrypath"? ? ? ? ? ? ? ? ?label? ?"Procedural Shader"? ? ? ? ? ? ? ? ?type? ? oppath? ? ? ? ? ? ? ? ?default { "" }? ? ? ? ? ? ? ? ?parmtag { "opfilter" "!!SHOP/GEOMETRY!!" }? ? ? ? ? ? ? ? ?parmtag { "oprelative" "." }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_forcegeometry"? ? ? ? ? ? ? ? ?label? ?"Force Procedural Geometry Output"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_rendersubdcurves"? ? ? ? ? ? ? ? ?label? ?"Render Polygon Curves As Subdivision (Mantra)"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "rendersubdcurves" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_renderpoints"? ? ? ? ? ? ? ? ?label? ?"Render As Points (Mantra)"? ? ? ? ? ? ? ? ?type? ? integer? ? ? ? ? ? ? ? ?default { "2" }? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"0" "No Point Rendering"? ? ? ? ? ? ? ? ? ? ?"1" "Render Only Points"? ? ? ? ? ? ? ? ? ? ?"2" "Render Unconnected Points"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "renderpoints" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_renderpointsas"? ? ? ? ? ? ? ? ?label? ?"Render Points As (Mantra)"? ? ? ? ? ? ? ? ?type? ? integer? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?disablewhen "{ vm_renderpoints == 0 }"? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"0" "Spheres"? ? ? ? ? ? ? ? ? ? ?"1" "Circles"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "renderpointsas" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_usenforpoints"? ? ? ? ? ? ? ? ?label? ?"Use N For Point Rendering"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?disablewhen "{ vm_renderpoints == 0 }"? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "usenforpoints" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_pointscale"? ? ? ? ? ? ? ? ?label? ?"Point Scale"? ? ? ? ? ? ? ? ?type? ? float? ? ? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ? ? ?disablewhen "{ vm_renderpoints == 0 }"? ? ? ? ? ? ? ? ?range? ?{ 0! 10 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "pointscale" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_pscalediameter"? ? ? ? ? ? ? ? ?label? ?"Treat Point Scale as Diameter Instead of Radius"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "pscalediameter" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_metavolume"? ? ? ? ? ? ? ? ?label? ?"Metaballs as Volume"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "metavolume" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_coving"? ? ? ? ? ? ? ? ?label? ?"Coving"? ? ? ? ? ? ? ? ?type? ? integer? ? ? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"0" "Disable Coving"? ? ? ? ? ? ? ? ? ? ?"1" "Coving for displacement/sub-d"? ? ? ? ? ? ? ? ? ? ?"2" "Coving for all primitives"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? ?range? ?{ 0 10 }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "coving" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_materialoverride"? ? ? ? ? ? ? ? ?label? ?"Material Override"? ? ? ? ? ? ? ? ?type? ? string? ? ? ? ? ? ? ? ?default { "compact" }? ? ? ? ? ? ? ? ?menu {? ? ? ? ? ? ? ? ? ? ?"none"? ? ? "Disabled"? ? ? ? ? ? ? ? ? ? ?"full"? ? ? "Evaluate for Each Primitve/Point"? ? ? ? ? ? ? ? ? ? ?"compact"? ?"Evaluate Once"? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_overridedetail"? ? ? ? ? ? ? ? ?label? ?"Ignore Geometry Attribute Shaders"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "0" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "overridedetail" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ? ? ?parm {? ? ? ? ? ? ? ? ?name? ? "vm_procuseroottransform"? ? ? ? ? ? ? ? ?label? ?"Proc Use Root Transform"? ? ? ? ? ? ? ? ?type? ? toggle? ? ? ? ? ? ? ? ?default { "1" }? ? ? ? ? ? ? ? ?parmtag { "mantra_class" "object" }? ? ? ? ? ? ? ? ?parmtag { "mantra_name" "procuseroottransform" }? ? ? ? ? ? ? ? ?parmtag { "spare_category" "Geometry" }? ? ? ? ? ? ?}? ? ? ? ?}? ? ? }? ? ? group {? ? ? ? ?name? ? "stdswitcher4_2"? ? ? ? ?label? ?"Misc"? ? ? ? ? parm {? ? ? ? ? ? ?name? ? "use_dcolor"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Set Wireframe Color"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "dcolor"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Wireframe Color"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "picking"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Viewport Selecting Enabled"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "pickscript"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Select Script"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "caching"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Cache Object Transform"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vport_shadeopen"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Shade Open Curves In Viewport"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vport_displayassubdiv"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Display as Subdivision in Viewport"? ? ? ? ? ? ?invisible? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ? ? ?parm {? ? ? ? ? ? ?name? ? "vport_onionskin"? ? ? ? ? ? ?baseparm? ? ? ? ? ? ?label? ?"Onion Skinning"? ? ? ? ? ? ?export? none? ? ? ? ?}? ? ?}? ' $_obj_font1
chblockbegin
chadd -t 9.9600000000000009 9.9600000000000009 $_obj_font1 tz
chkey -t 9.9600000000000009 -v -0.87576304695387641 -m 0 -a 0 -A 0 -T a? -F '-ch("../CameraShape_baked/focal")/200' $_obj_font1/tz
chblockend
opset -S on $_obj_font1
opparm -V 19.5.303 $_obj_font1 t ( -0.11561 0.055491599999999995 tz ) scale ( 0.01 ) dcolor ( 0.30000001192092896 0.075000002980232239 0.075000002980232239 )
chautoscope $_obj_font1 +tx +ty +tz +rx +ry +rz +sx +sy +sz
opset -d on -r off -h off -f off -y off -t off -l off -s off -u off -F on -c on -e on -b off -x off $_obj_font1
opexprlanguage -s hscript $_obj_font1
opuserdata -n '___Version___' -v '19.5.303' $_obj_font1
opuserdata -n '___toolcount___' -v '1' $_obj_font1
opuserdata -n '___toolid___' -v 'geo' $_obj_font1
opcf $_obj_font1
# Node $_obj_font1_font1 (Sop/font)
set _obj_font1_font1 = `run("opadd -e -n -v font font1")`
oplocate -x `$arg2 + 0` -y `$arg3 + 0` $_obj_font1_font1
opset -d off -r off -h off -f off -y off -t off -l off -s off -u off -F on -c on -e on -b off $_obj_font1_font1
opexprlanguage -s hscript $_obj_font1_font1
opuserdata -n '___Version___' -v '19.5.303' $_obj_font1_font1
opuserdata -n '___toolcount___' -v '1' $_obj_font1_font1
opuserdata -n '___toolid___' -v 'geo' $_obj_font1_font1
# Node $_obj_font1_color1 (Sop/color)
set _obj_font1_color1 = `run("opadd -e -n -v color color1")`
oplocate -x `$arg2 + 0` -y `$arg3 + -1.45882` $_obj_font1_color1
opparm $_obj_font1_color1? ramp ( 2 )
opparm $_obj_font1_color1 color ( 1 0 0 ) ramp2pos ( 1 ) ramp2c ( 1 1 1 )
opset -d on -r on -h off -f off -y off -t off -l off -s off -u off -F on -c on -e on -b off $_obj_font1_color1
opexprlanguage -s hscript $_obj_font1_color1
opuserdata -n '___Version___' -v '' $_obj_font1_color1
opuserdata -n '___toolcount___' -v '2' $_obj_font1_color1
opuserdata -n '___toolid___' -v 'sop_color' $_obj_font1_color1
oporder -e font1 color1?
opcf ..
opset -p on $_obj_font1
opcf $arg1
opwire -n $_obj_CameraShape_baked -0 $_obj_font1
opcf $_obj_font1
opwire -n $_obj_font1_font1 -0 $_obj_font1_color1
opcf ..
set oidx = 0
if ($argc >= 9 && "$arg9" != "") then
? ? set oidx = $arg9
endif
if ($argc >= 5 && "$arg4" != "") then
? ? set output = $_obj_font1
? ? opwire -n $output -$arg5 $arg4
endif
if ($argc >= 6 && "$arg6" != "") then
? ? set input = $_obj_font1
? ? if ($arg8) then
? ? ? ? opwire -n -i $arg6 -0 $input
? ? else
? ? ? ? opwire -n -o $oidx $arg6 -0 $input
? ? endif
endif
opcf $saved_path
'''
hou.hscript(h_preamble + h_extra_args + h_cmd)