Exemplo n.º 1
0
def add_physical_camera_attributes():
    if UI is None:
        return

    physCamDS = os.path.join(UI, "plugins", "CameraPhysical.ds")
    if not os.path.exists(physCamDS):
        sys.stderr.write("CameraPhysical.ds is not found!\n")
        return

    for node in hou.selectedNodes():
        if node.type().name() not in {"cam"}:
            continue

        folderName = "V-Ray Physical Camera"

        group = node.parmTemplateGroup()
        if group.findFolder(folderName):
            continue

        sys.stdout.write("Adding \"Physical Camera\" attributes to \"%s\"...\n" % node.name())

        folder = hou.FolderParmTemplate("VRayPhysicalCamera", folderName)
        physCamGroup = hou.ParmTemplateGroup()
        physCamGroup.setToDialogScript(open(physCamDS, 'r').read())
        for parmTmpl in physCamGroup.parmTemplates():
            folder.addParmTemplate(parmTmpl)

        group.append(folder)
        node.setParmTemplateGroup(group)
    def add_spare_parameters(self, target):
        vtuple = hou.applicationVersion()
        rfhtree = hou.getenv("RFHTREE")
        renderobjnames = ["geo"]
        rendercamnames = ["cam"]

        if target.type().name() in renderobjnames:
            path = rfhtree + "/18.5.351/soho/parameters/geoparms.ds"
        elif target.type().name() in rendercamnames:
            path = rfhtree + "/18.5.351/soho/parameters/camparms.ds"
        else:
            return None

        grp = target.parmTemplateGroup()
        spareparms = hou.ParmTemplateGroup()
        with open(path) as file:
            ds = file.read()
            spareparms.setToDialogScript(ds)
        for template in spareparms.parmTemplates():
            grp.append(template)

        try:
            target.parmsInFolder(("RenderMan",))
        except:
            target.setParmTemplateGroup(grp)

        if target.type().name() == "geo":
            hou.hscript("opproperty %s prman23geo *" % target.path())
        elif target.type().name() == "cam":
            hou.hscript("opproperty %s prman23cam *" % target.path())
Exemplo n.º 3
0
    def build(self):
        """
        Build the template hierarchy for this instance.

        :rtype: :class:`hou.ParmTemplateGroup`
        """
        import hou

        return hou.ParmTemplateGroup(self._child_templates())
Exemplo n.º 4
0
def add_physical_camera_attributes():
    if UI is None:
        return

    physCamDS = os.path.join(UI, "plugins", "CameraPhysical.ds")
    if not os.path.exists(physCamDS):
        sys.stderr.write("CameraPhysical.ds is not found!\n")
        return

    for node in hou.selectedNodes():
        if node.type().name() not in {"cam"}:
            continue

        folderName = "VfhCameraPhysical"
        folderLabel = "V-Ray Physical Camera"

        currentSettings = _getCurrectSettings(node)

        _removeCameraPhysicalAttributes(node, folderLabel)

        group = node.parmTemplateGroup()
        folder = hou.FolderParmTemplate(folderName, folderLabel)

        physCamGroup = hou.ParmTemplateGroup()
        physCamGroup.setToDialogScript(open(physCamDS, 'r').read())
        for parmTmpl in physCamGroup.parmTemplates():
            folder.addParmTemplate(parmTmpl)

        group.append(folder)
        node.setParmTemplateGroup(group)

        for parm in node.parms():
            try:
                attrName = parm.name()

                parmValue = currentSettings.get(attrName, None)
                if parmValue is not None:
                    parm.set(parmValue)
                elif attrName in {"CameraPhysical_f_number"}:
                    parm.setExpression("ch(\"./fstop\")")
                elif attrName in {"CameraPhysical_focus_distance"}:
                    parm.setExpression("ch(\"./focus\")")
                elif attrName in {"CameraPhysical_horizontal_offset"}:
                    parm.setExpression("-ch(\"./winx\")")
                elif attrName in {"CameraPhysical_vertical_offset"}:
                    parm.setExpression("-ch(\"./winy\")")
                elif attrName in {"CameraPhysical_focal_length"}:
                    parm.setExpression("ch(\"./focal\")")
                elif attrName in {"CameraPhysical_film_width"}:
                    parm.setExpression("ch(\"./aperture\")")
            except:
                pass
Exemplo n.º 5
0
def _getPluginParmTemplates(pluginName):
    pluginDs = os.path.join(UI, "plugins", "%s.ds" % pluginName)
    if not os.path.exists(pluginDs):
        return

    pluginPtg = hou.ParmTemplateGroup()

    # This will make attribute manes prefixed with plugin ID name.
    pluginPrefixDef = "#define PREFIX \"%s_\"\n\n" % (pluginName)
    dsContents = pluginPrefixDef + open(pluginDs, 'r').read()

    pluginPtg.setToDialogScript(dsContents)

    return pluginPtg.parmTemplates()
Exemplo n.º 6
0
def getParmTemplatesFromDS(fileName, prefix=None, defines=()):
    pluginDs = _getDsFilePathFromName(fileName)

    pluginPtg = hou.ParmTemplateGroup()

    # This will make attribute names prefixed with plugin ID name.
    pluginPrefixDef = "" if not prefix else "#define PREFIX \"%s_\"\n" % (
        prefix)
    for d in defines:
        pluginPrefixDef += "#define %s %s\n" % (d[0], d[1])
    if pluginPrefixDef:
        pluginPrefixDef += "\n"

    dsContents = pluginPrefixDef + open(pluginDs, 'r').read()

    pluginPtg.setToDialogScript(dsContents)

    return pluginPtg.parmTemplates()
def createMutagenSetup():

    #topnet_glob
    hou_parent = hou.node("obj/")
    hou_node = hou_parent.createNode("topnet", "topnet_glob")
    topnet_name = hou_node.name()
    topnet_path = hou_node.path()

    hou_parm = hou_node.parm("topscheduler")
    hou_parm.set("localscheduler")
    hou_parent = hou_node

    #topnet_glob/localscheduler
    hou_node = hou_parent.node(hou_parent.path() + "/localscheduler")
    hou_node.move(hou.Vector2(0, 6))

    #topnet_glob/CTRL_WEDGES
    hou_node = hou_parent.createNode("null", "CTRL_WEDGES")
    hou_node.move(hou.Vector2(0, 4))
    hou_node.setColor(hou.Color([0, 0, 0]))
    hou_node.setExpressionLanguage(hou.exprLanguage.Hscript)

    hou_parm_template_group = hou.ParmTemplateGroup()
    # Code for parameter template
    hou_parm_template = hou.StringParmTemplate(
        "wedge_expr",
        "Wedge IDX Exp.Python",
        1,
        default_value=([""]),
        naming_scheme=hou.parmNamingScheme.Base1,
        string_type=hou.stringParmType.Regular,
        menu_items=([]),
        menu_labels=([]),
        icon_names=([]),
        item_generator_script="",
        item_generator_script_language=hou.scriptLanguage.Python,
        menu_type=hou.menuType.Normal)
    hou_parm_template_group.append(hou_parm_template)
    hou_node.setParmTemplateGroup(hou_parm_template_group)

    hou_parm = hou_node.parm("wedge_expr")
    hou_parm.set("")
    hou_parm.setAutoscope(True)

    hou_keyframe = hou.StringKeyframe()
    hou_keyframe.setTime(0)
    hou_keyframe.setExpression(
        "import pdg\n\nwork_item = pdg.workItem()\nwdg_idx_l = pdg.intDataArray(work_item, \"wedgenum\")\n\nwdg_idx_s = \"\"\nfor wdg_idx in wdg_idx_l:\n    wdg_idx_s += str(wdg_idx) + \"_\"\n    \nwdg_idx_s = wdg_idx_s[0:-1]\n\n\n#print wdg_idx_s\nreturn wdg_idx_s\n    \n",
        hou.exprLanguage.Python)
    hou_parm.setKeyframe(hou_keyframe)

    hou_node.setColor(hou.Color([0, 0, 0]))
    hou_node.setExpressionLanguage(hou.exprLanguage.Hscript)

    #topnet_glob/wedge_root
    hou_node = hou_parent.createNode("wedge", "wedge_root")
    hou_node.move(hou.Vector2(0, 0.42))
    hou_parm = hou_node.parm("wedgecount")
    hou_parm.set(2)
    hou_parm = hou_node.parm("seed")
    hou_parm.set(2042)
    hou_parm = hou_node.parm("preservenum")
    hou_parm.set(1)
    hou_parm = hou_node.parm("previewselection")
    hou_parm.set(1)

    #topnet_glob/wedge_var1
    hou_node = hou_parent.createNode("wedge", "wedge_var1")
    hou_node.move(hou.Vector2(0, -1.2))
    hou_parm = hou_node.parm("wedgecount")
    hou_parm.set(2)
    hou_parm = hou_node.parm("seed")
    hou_parm.set(8215)
    hou_parm = hou_node.parm("preservenum")
    hou_parm.set(1)
    hou_parm = hou_node.parm("previewselection")
    hou_parm.set(1)

    #topnet_glob/wedge_var2
    hou_node = hou_parent.createNode("wedge", "wedge_var2")
    hou_node.move(hou.Vector2(0, -2.9))
    hou_parm = hou_node.parm("wedgecount")
    hou_parm.set(2)
    hou_parm = hou_node.parm("seed")
    hou_parm.set(8215)
    hou_parm = hou_node.parm("preservenum")
    hou_parm.set(1)
    hou_parm = hou_node.parm("previewselection")
    hou_parm.set(1)

    hou_node.setColor(hou.Color([0.306, 0.306, 0.306]))

    #topnet_glob/ropfetch_geo
    hou_node = hou_parent.createNode("ropfetch", "ropfetch_geo")
    hou_node.move(hou.Vector2(0, -6.14))
    hou_parm = hou_node.parm("roppath")
    hou_parm.set(topnet_path + "/ropnet/geometry_rop")
    hou_parm = hou_node.parm("framegeneration")
    hou_parm.set("1")

    hou_parm = hou_node.parm("batchall")
    hou_parm.set(1)
    hou_node.setColor(hou.Color([1, 0.529, 0.624]))

    #topnet_glob/ropfetch_render
    hou_node = hou_parent.createNode("ropfetch", "ropfetch_render")
    hou_node.move(hou.Vector2(0, -8.64618))
    hou_parm = hou_node.parm("roppath")
    hou_parm.set(topnet_path + "/ropnet/mantra_rop")

    hou_parm = hou_node.parm("framesperbatch")
    hou_parm.set(5)
    hou_node.setColor(hou.Color([0.624, 0.329, 0.396]))

    #topnet_glob/partitionbyframe
    hou_node = hou_parent.createNode("partitionbyframe", "partitionbyframe")
    hou_node.move(hou.Vector2(0, -11.3))

    #topnet_glob/im_montage_p0
    hou_node = hou_parent.createNode("imagemagick", "im_montage_p0")
    hou_node.move(hou.Vector2(0, -14.16))
    hou_parm = hou_node.parm("overlayexpr")
    hou_parm.setAutoscope(True)
    hou_parm = hou_node.parm("usecustomcommand")
    hou_parm.set(1)
    hou_parm = hou_node.parm("customcommand")
    hou_parm.set(
        "{imagemagick} -fill grey -label '%t' -background \"rgb(20,20,20)\" -mode concatenate {input_images} -geometry 256x256+2+2 \"{output_image}\""
    )
    hou_parm = hou_node.parm("filename")
    hou_parm.set("$HIP/img/$HIPNAME/$OS/$HIPNAME.$OS.$F4.jpg")
    hou_node.setColor(hou.Color([0.451, 0.369, 0.796]))

    #topnet_glob/waitforall
    hou_node = hou_parent.createNode("waitforall", "waitforall")
    hou_node.move(hou.Vector2(0, -17.1))

    #topnet_glob/ffmpeg_montage_p0
    hou_node = hou_parent.createNode("ffmpegencodevideo", "ffmpeg_montage_p0")
    hou_node.move(hou.Vector2(0, -20.0))
    hou_parm = hou_node.parm("fps")
    hou_keyframe = hou.Keyframe()
    hou_keyframe.setTime(0)
    hou_keyframe.setExpression("$FPS", hou.exprLanguage.Hscript)
    hou_parm.setKeyframe(hou_keyframe)
    hou_parm = hou_node.parm("outputfilename")
    hou_parm.set("$HIP/img/$HIPNAME/$OS/$HIPNAME.$OS.webm")
    hou_parm = hou_node.parm("customcommand")
    hou_parm.set(1)
    hou_parm = hou_node.parm("expr")
    hou_parm.set(
        "\"{ffmpeg}\" -y -r {frames_per_sec}/1 -f concat -safe 0 -apply_trc iec61966_2_1 -i \"{frame_list_file}\" -c:v libvpx-vp9 -crf 32 -b:v 0 -vf \"fps={frames_per_sec},format=yuv420p\" -movflags faststart \"{output_file}\""
    )
    hou_parm = hou_node.parm("topscheduler")
    hou_parm.set("../localscheduler")

    hou_node.setColor(hou.Color([0.188, 0.529, 0.459]))

    hou_node.setSelected(True, clear_all_selected=True)

    #topnet_glob/ropnet
    hou_node = hou_parent.createNode("ropnet", "ropnet")
    hou_node.move(hou.Vector2(-3.29748, -7.22574))
    hou_node.setColor(hou.Color([0.996, 0.682, 0.682]))
    # Update the parent node.
    hou_parent = hou_node

    #topnet_glob/ropnet/geometry_rop
    hou_node = hou_parent.createNode("geometry", "geometry_rop")
    hou_node.move(hou.Vector2(1.4, -8.0))
    hou_parm = hou_node.parm("trange")
    hou_parm.set("normal")
    hou_parm = hou_node.parm("sopoutput")
    hou_parm.set("$HIP/geo/$HIPNAME/$OS/wdg_`chs('" + topnet_path +
                 "/CTRL_WEDGES/wedge_expr')`/wdg_`chs('" + topnet_path +
                 "/CTRL_WEDGES/wedge_expr')`.$F4.bgeo.sc")
    hou_node.setColor(hou.Color([1, 0.529, 0.624]))

    # Restore the parent and current nodes.
    hou_parent = hou_node.parent()

    #topnet_glob/ropnet/mantra_rop
    hou_node = hou_parent.createNode("ifd", "mantra_rop")
    hou_node.move(hou.Vector2(1.4, -12.5))
    hou_parm = hou_node.parm("trange")
    hou_parm.set("normal")
    hou_parm = hou_node.parm("override_camerares")
    hou_parm.set(1)
    hou_parm = hou_node.parm("res_fraction")
    hou_parm.set("specific")
    hou_parm_tuple = hou_node.parmTuple("res_override")
    hou_parm_tuple.set((512, 512))
    hou_parm = hou_node.parm("vm_picture")
    hou_parm.set("$HIP/render/$HIPNAME/$OS/wdg_`chs('" + topnet_path +
                 "/CTRL_WEDGES/wedge_expr')`/wdg_`chs('" + topnet_path +
                 "/CTRL_WEDGES/wedge_expr')`.$F4.jpg")
    hou_node.setColor(hou.Color([0.624, 0.329, 0.396]))

    # Restore the parent and current nodes.
    hou_parent = hou_node.parent().parent()

    # Code to establish connections for /obj/topnet_glob/wedge_var1
    hou_node = hou_parent.node("wedge_var1")
    hou_node.setInput(0, hou_parent.node("wedge_root"), 0)
    # Code to establish connections for /obj/topnet_glob/wedge_var2
    hou_node = hou_parent.node("wedge_var2")
    hou_node.setInput(0, hou_parent.node("wedge_var1"), 0)
    # Code to establish connections for /obj/topnet_glob/ropfetch_geo
    hou_node = hou_parent.node("ropfetch_geo")
    hou_node.setInput(0, hou_parent.node("wedge_var2"), 0)
    # Code to establish connections for /obj/topnet_glob/ropfetch_render
    hou_node = hou_parent.node("ropfetch_render")
    hou_node.setInput(0, hou_parent.node("ropfetch_geo"), 0)
    # Code to establish connections for /obj/topnet_glob/partitionbyframe
    hou_node = hou_parent.node("partitionbyframe")
    hou_node.setInput(0, hou_parent.node("ropfetch_render"), 0)
    # Code to establish connections for /obj/topnet_glob/im_montage_p0
    hou_node = hou_parent.node("im_montage_p0")
    hou_node.setInput(0, hou_parent.node("partitionbyframe"), 0)
    # Code to establish connections for /obj/topnet_glob/waitforall
    hou_node = hou_parent.node("waitforall")
    hou_node.setInput(0, hou_parent.node("im_montage_p0"), 0)
    # Code to establish connections for /obj/topnet_glob/ffmpeg_montage_p0
    hou_node = hou_parent.node("ffmpeg_montage_p0")
    hou_node.setInput(0, hou_parent.node("waitforall"), 0)

    #sticky notes

    #topnet_glob/__stickynote1
    hou_sticky = hou_parent.createStickyNote("__stickynote1")
    hou_sticky.setText(
        "Important to set Geo Ropfetch Node to 'All Frames in One Batch' for Simulations."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(4.3129, -6.62927))
    hou_sticky.setSize(hou.Vector2(8.17024, 0.922362))
    hou_sticky.setColor(hou.Color([1, 0.529, 0.624]))

    #topnet_glob/__stickynote2
    hou_sticky = hou_parent.createStickyNote("__stickynote2")
    hou_sticky.setText(
        "The 'Preserve Wedge Numbers' option is important to be turned on.\nThis will append each @wedgenum in an array and allow for explicit mapping.\n\n'Overwrite Target Parm on Item Selection' (Push Refrences) is optional, but very convinient with the Mutagen Setup opposed to \"Pull References\".\n\nAdd as many Wedges as you like.\n\nUse the Shelf Tool 'Convert Takes to Wedge' from the 'PDG Mutagen' Shelf to convert variations you have set up in the \"classical Take style\" to a single Wedge TOP that holds all the edited parameters. The Takes will be redundant from then\nAppend additional Wedge TOPs as you like to generate further variation.\n"
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(4.31289, -3.24063))
    hou_sticky.setSize(hou.Vector2(8.17024, 3.99192))
    hou_sticky.setColor(hou.Color([0.6, 0.6, 0.6]))

    #topnet_glob/__stickynote3
    hou_sticky = hou_parent.createStickyNote("__stickynote3")
    hou_sticky.setText(
        "You can add a explicit tiling varibale like: \"-tile 8x8\" or \"-tile 12x\"\nThat would give 8x8 Tiles or 12 Tiles in X and Y calculated automatically.\nChange style variables as you like.\n\nChangeOutput  'Filename' as you like.\n\nIf you inserted a \"Split\" to split up the whole setup in 2 or more  seperate Contact Sheets, use _p0, _p1, ... nodename postfix."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(4.31289, -15.8599))
    hou_sticky.setSize(hou.Vector2(8.17024, 2.7729))
    hou_sticky.setColor(hou.Color([0.451, 0.369, 0.796]))

    #topnet_glob/__stickynote4
    hou_sticky = hou_parent.createStickyNote("__stickynote4")
    hou_sticky.setText(
        "Important to export as .webm video. Only supported format in Mutagen Viewer Panel. If you need another format, just split off another branch with another FFmpeg TOP:\n\nExplicitly set to LocalScheduler, mostly faster then on the farm.\n\nIf you inserted a \"Split\" to split up the whole setup in 2 or more  seperate Contact Sheets, use _p0, _p1, ... nodename postfix."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(4.31289, -21.0536))
    hou_sticky.setSize(hou.Vector2(8.17024, 2.34767))
    hou_sticky.setColor(hou.Color([0.145, 0.667, 0.557]))

    #topnet_glob/__stickynote5
    hou_sticky = hou_parent.createStickyNote("__stickynote5")
    hou_sticky.setText(
        "Node just grabs the current wedgenum array as string in Python Expression, should be referenced in all Output Paths in ROPs. See Example in ROPNET."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0.4, 0.4, 0.4)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(4.31289, 4.05587))
    hou_sticky.setSize(hou.Vector2(8.17024, 1.59761))
    hou_sticky.setColor(hou.Color([0, 0, 0]))

    #topnet_glob/__stickynote6
    hou_sticky = hou_parent.createStickyNote("__stickynote6")
    hou_sticky.setText(
        "Mostly more efficient to set it to render a couple Frames per Batch for very fast and small preview renders. Set to 'Single Frame', as it inherits Frame Range from Geo Ropfetch."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(4.3129, -9.58676))
    hou_sticky.setSize(hou.Vector2(8.17024, 1.39102))
    hou_sticky.setColor(hou.Color([0.624, 0.329, 0.396]))

    #topnet_glob/__stickynote7
    hou_sticky = hou_parent.createStickyNote("__stickynote7")
    hou_sticky.setText(
        "ROP Nodes just as templates for Output Filepath expressions.\nFetch ROPs from wherever you like..."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(-9.39003, -7.67198))
    hou_sticky.setSize(hou.Vector2(5.16529, 1.17925))
    hou_sticky.setColor(hou.Color([0.996, 0.682, 0.682]))

    #set hou_parent
    hou_parent = hou.node(hou_parent.path() + "/ropnet")

    #topnet_glob/ropnet/__stickynote1
    hou_sticky = hou_parent.createStickyNote("__stickynote1")
    hou_sticky.setText(
        "The expression\n`chs(\"/obj/topnet_glob/CTRL_WEDGES/wedge_expr\")`\nreferences the unique Wedge Index Array currently used in the variation.\n\nUse \"wdg_\" Prefix, which is needed in Mutagen Viewer."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(6.23358, -9.58655))
    hou_sticky.setSize(hou.Vector2(9.16572, 2.03749))
    hou_sticky.setColor(hou.Color([1, 0.529, 0.624]))

    #topnet_glob/ropnet/__stickynote2
    hou_sticky = hou_parent.createStickyNote("__stickynote2")
    hou_sticky.setText(
        "Load output from Geometry ROP with File Node to read back the disk cached results.\nJust use relative channel reference from \"Geometry ROP\" \"Output File\" Parameter."
    )
    hou_sticky.setTextSize(0)
    hou_sticky.setTextColor(hou.Color((0, 0, 0)))
    hou_sticky.setDrawBackground(True)
    hou_sticky.setPosition(hou.Vector2(6.23358, -13.2533))
    hou_sticky.setSize(hou.Vector2(9.16572, 1.68094))
    hou_sticky.setColor(hou.Color([0.624, 0.329, 0.396]))
Exemplo n.º 8
0
    def __init__(self, n):

        hou_parm_template_group = hou.ParmTemplateGroup()
        # Code for parameter template
        hou_parm_template = hou.FolderParmTemplate(
            "Redshift_SHOP_parmSwitcher3",
            "Settings",
            folder_type=hou.folderType.Tabs,
            default_value=0,
            ends_tab_group=False)
        # Code for parameter template
        hou_parm_template2 = hou.IntParmTemplate(
            "RS_matprop_ID",
            "Material ID",
            1,
            default_value=([0]),
            min=0,
            max=100,
            min_is_strict=True,
            max_is_strict=False,
            naming_scheme=hou.parmNamingScheme.Base1,
            menu_items=([]),
            menu_labels=([]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.Normal,
            menu_use_token=False)
        hou_parm_template.addParmTemplate(hou_parm_template2)
        hou_parm_template_group.append(hou_parm_template)
        # Code for parameter template
        hou_parm_template = hou.FolderParmTemplate(
            "Redshift_SHOP_parmSwitcher3_1",
            "OpenGL",
            folder_type=hou.folderType.Tabs,
            default_value=0,
            ends_tab_group=False)
        # Code for parameter template
        hou_parm_template2 = hou.ToggleParmTemplate("ogl_light",
                                                    "OGL Use Lighting",
                                                    default_value=True)
        hou_parm_template.addParmTemplate(hou_parm_template2)
        # Code for parameter template
        hou_parm_template2 = hou.FloatParmTemplate(
            "ogl_alpha",
            "OGL Alpha",
            1,
            default_value=([1]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template.addParmTemplate(hou_parm_template2)
        # Code for parameter template
        hou_parm_template2 = hou.FolderParmTemplate(
            "folder0",
            "Diffuse",
            folder_type=hou.folderType.Tabs,
            default_value=0,
            ends_tab_group=False)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_diff_intensity",
            "Diffuse Intensity",
            1,
            default_value=([1]),
            min=0,
            max=2,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setHelp(
            "The diffuse intensity multiplies the Diffuse color, allowing it to be easily adjusted without affecting the its hue or saturation."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_diff",
            "OGL Diffuse",
            3,
            default_value=([1, 1, 1]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.ColorSquare,
            naming_scheme=hou.parmNamingScheme.RGBA)
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FolderParmTemplate(
            "ogl_numtex",
            "Diffuse Texture Layers",
            folder_type=hou.folderType.MultiparmBlock,
            default_value=0,
            ends_tab_group=False)
        hou_parm_template3.setTags({"spare_category": "OpenGL"})
        # Code for parameter template
        hou_parm_template4 = hou.ToggleParmTemplate("ogl_use_tex#",
                                                    "Use Diffuse Map #",
                                                    default_value=True)
        hou_parm_template4.setHelp("None")
        hou_parm_template4.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template3.addParmTemplate(hou_parm_template4)
        # Code for parameter template
        hou_parm_template4 = hou.StringParmTemplate(
            "ogl_tex#",
            "Texture #",
            1,
            default_value=([""]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.FileReference,
            menu_items=([]),
            menu_labels=([]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.StringReplace)
        hou_parm_template4.setHelp("None")
        hou_parm_template4.setTags({
            "cook_dependent": "1",
            "filechooser_mode": "read",
            "spare_category": "OpenGL"
        })
        hou_parm_template3.addParmTemplate(hou_parm_template4)
        # Code for parameter template
        hou_parm_template4 = hou.StringParmTemplate(
            "ogl_texuvset#",
            "UV Set",
            1,
            default_value=([""]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.Regular,
            menu_items=([
                "uv", "uv2", "uv3", "uv4", "uv5", "uv6", "uv7", "uv8"
            ]),
            menu_labels=([
                "uv", "uv2", "uv3", "uv4", "uv5", "uv6", "uv7", "uv8"
            ]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.StringReplace)
        hou_parm_template4.setHelp("None")
        hou_parm_template4.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template3.addParmTemplate(hou_parm_template4)
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        hou_parm_template.addParmTemplate(hou_parm_template2)
        # Code for parameter template
        hou_parm_template2 = hou.FolderParmTemplate(
            "folder0_1",
            "Specular",
            folder_type=hou.folderType.Tabs,
            default_value=0,
            ends_tab_group=False)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate("ogl_use_spec",
                                                    "Enable Specular",
                                                    default_value=True)
        hou_parm_template3.setHelp(
            "Toggles contribution of the specular color. When off, no specular highlights will appear."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_spec_intensity",
            "Specular Intensity",
            1,
            default_value=([1]),
            min=0,
            max=2,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setHelp(
            "The specular intensity multiplies the Specular color, allowing it to be easily adjusted without affecting the its hue or saturation."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_spec",
            "OGL Specular",
            3,
            default_value=([0.2, 0.2, 0.2]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.ColorSquare,
            naming_scheme=hou.parmNamingScheme.RGBA)
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_rough",
            "OGL Roughness",
            1,
            default_value=([0.05]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_reflect",
            "Reflect",
            1,
            default_value=([0]),
            min=0,
            max=1,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setHelp(
            "The reflectiveness of the material, from 0 (not at all reflective) to 1 (completely reflective)."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_ior",
            "Index of Refraction",
            1,
            default_value=([1.33]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setHelp(
            "Index of refraction of the material, used for fresnel calculations and reflection."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_metallic",
            "Metallic",
            1,
            default_value=([0]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setHelp(
            "Metallic factor, from 0-1. The more metallic a surface is (approaching 1), the less diffuse and more reflection the material will have. A metallic factor closer to zero behaves more like a dielectric material. "
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate("ogl_use_metallicmap",
                                                    "Use Metallic Map",
                                                    default_value=True)
        hou_parm_template3.setHelp(
            "When enabled, use the map specified in ogl_metallicmap for the metallic map. If this property is not present, it is assumed to be enabled."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.StringParmTemplate(
            "ogl_metallicmap",
            "Metallic Map",
            1,
            default_value=([""]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.FileReference,
            menu_items=([]),
            menu_labels=([]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.StringReplace)
        hou_parm_template3.setHelp(
            "Texture map for Metallic. The GL Metallic parameter is multiplied by the texture map value."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "filechooser_mode": "read",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.IntParmTemplate(
            "ogl_metallicmap_comp",
            "Metallic Channel",
            1,
            default_value=([0]),
            min=0,
            max=4,
            min_is_strict=False,
            max_is_strict=False,
            naming_scheme=hou.parmNamingScheme.Base1,
            menu_items=(["0", "1", "2", "3", "4"]),
            menu_labels=(["Luminance", "Red", "Green", "Blue", "Alpha"]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.Normal,
            menu_use_token=False)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_metallicmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "Channel of the metallic texture map to sample (luminance, red, green, blue, alpha)."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate("ogl_use_roughmap",
                                                    "Use Roughness Map",
                                                    default_value=True)
        hou_parm_template3.setHelp(
            "When enabled, use the map specified in ogl_roughmap for the roughness map. If this property is not present, it is assumed to be enabled."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.StringParmTemplate(
            "ogl_roughmap",
            "Roughness Map",
            1,
            default_value=([""]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.FileReference,
            menu_items=([]),
            menu_labels=([]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.StringReplace)
        hou_parm_template3.setHelp(
            "Texture map for Roughness. Rougher surfaces have larger but dimmer specular highlights. This overrides the constant ogl_rough."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "filechooser_mode": "read",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate(
            "ogl_invertroughmap",
            "Invert Roughness Map (Glossiness)",
            default_value=False)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_roughmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "Invert the roughness map so that it is interpreted as a gloss map - zero is no gloss (dull), one is very glossy (shiny)."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.IntParmTemplate(
            "ogl_roughmap_comp",
            "Roughness Channel",
            1,
            default_value=([0]),
            min=0,
            max=4,
            min_is_strict=False,
            max_is_strict=False,
            naming_scheme=hou.parmNamingScheme.Base1,
            menu_items=(["0", "1", "2", "3", "4"]),
            menu_labels=(["Luminance", "Red", "Green", "Blue", "Alpha"]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.Normal,
            menu_use_token=False)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_roughmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "Texture component used for Roughness within the Roughness texture map, which can be the luminance of RGB, red, green, blue or alpha. This allows roughness to be sourced from packed texture maps which contain parameters in the other texture channels."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        hou_parm_template.addParmTemplate(hou_parm_template2)
        # Code for parameter template
        hou_parm_template2 = hou.FolderParmTemplate(
            "folder0_2",
            "Normal",
            folder_type=hou.folderType.Tabs,
            default_value=0,
            ends_tab_group=False)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate("ogl_use_normalmap",
                                                    "Use Normal Map",
                                                    default_value=True)
        hou_parm_template3.setHelp(
            "When enabled, use the map specified in ogl_normalmap for the normal map. If this property is not present, it is assumed to be enabled."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.StringParmTemplate(
            "ogl_normalmap",
            "Normal Map",
            1,
            default_value=([""]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.FileReference,
            menu_items=([]),
            menu_labels=([]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.StringReplace)
        hou_parm_template3.setHelp(
            "Use a normal map to specify normals instead of interpolating normals across a polygon. The RGB values are used for the normal's XYZ vector."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "filechooser_mode": "read",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.StringParmTemplate(
            "ogl_normalmap_type",
            "Normal Map Type",
            1,
            default_value=(["uvtangent"]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.Regular,
            menu_items=(["uvtangent", "world", "object"]),
            menu_labels=(["Tangent Space", "World Space", "Object Space"]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.Normal)
        hou_parm_template3.setHelp(
            "Specifies the space that the normal map operates in: UV Tangent, World, or Object space."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.IntParmTemplate(
            "ogl_normalbias",
            "Normal Map Range",
            1,
            default_value=([0]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            naming_scheme=hou.parmNamingScheme.Base1,
            menu_items=(["0", "1"]),
            menu_labels=(["0 to 1", "-1 to 1"]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.Normal,
            menu_use_token=False)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_normalmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "The range of the normal map is either 0-1 (8b map) or -1 to 1 (floating point map). This bias must match the type of normal map used."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_normalmap_scale",
            "Normal Scale",
            1,
            default_value=([1]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_normalmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "Scales the X and Y components of a tangent normal map to increase or decrease the effect the normal map has on the normals."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate("ogl_normalflipx",
                                                    "Flip Normal Map X",
                                                    default_value=False)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_normalmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "Flip the normal's X direction when applying the normal map. This may be needed for normal maps generated by other applications. "
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.ToggleParmTemplate("ogl_normalflipy",
                                                    "Flip Normal Map Y",
                                                    default_value=False)
        hou_parm_template3.setConditional(
            hou.parmCondType.DisableWhen,
            "{ ogl_normalmap == \\\"\\\\\\\"\\\\\\\"\\\" }")
        hou_parm_template3.setHelp(
            "Flip the normal's Y direction when applying the normal map. This may be needed for normal maps generated by other applications. "
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        hou_parm_template.addParmTemplate(hou_parm_template2)
        # Code for parameter template
        hou_parm_template2 = hou.FolderParmTemplate(
            "folder0_3",
            "Emission",
            folder_type=hou.folderType.Tabs,
            default_value=0,
            ends_tab_group=False)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_emit_intensity",
            "Emission Intensity",
            1,
            default_value=([1]),
            min=0,
            max=2,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.Regular,
            naming_scheme=hou.parmNamingScheme.Base1)
        hou_parm_template3.setHelp(
            "The emission intensity multiplies the Emission color, allowing it to be easily adjusted without affecting the its hue or saturation."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.StringParmTemplate(
            "ogl_emissionmap",
            "Emission Map",
            1,
            default_value=([""]),
            naming_scheme=hou.parmNamingScheme.Base1,
            string_type=hou.stringParmType.FileReference,
            menu_items=([]),
            menu_labels=([]),
            icon_names=([]),
            item_generator_script="",
            item_generator_script_language=hou.scriptLanguage.Python,
            menu_type=hou.menuType.StringReplace)
        hou_parm_template3.setHelp(
            "An image file used for emission texturing. Unlike a diffuse map, the emission map is not affected by lighting and appears constant. The RGB values of the emission map are multiplied by the ogl_emit color which defaults to (0,0,0), so this should be set to (1,1,1) if an emission map is used. The alpha of an emission map is ignored."
        )
        hou_parm_template3.setTags({
            "cook_dependent": "1",
            "filechooser_mode": "read",
            "spare_category": "OpenGL"
        })
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        # Code for parameter template
        hou_parm_template3 = hou.FloatParmTemplate(
            "ogl_emit",
            "OGL Emission",
            3,
            default_value=([0, 0, 0]),
            min=0,
            max=10,
            min_is_strict=False,
            max_is_strict=False,
            look=hou.parmLook.ColorSquare,
            naming_scheme=hou.parmNamingScheme.RGBA)
        hou_parm_template2.addParmTemplate(hou_parm_template3)
        hou_parm_template.addParmTemplate(hou_parm_template2)

        hou_parm_template_group.append(hou_parm_template)
        n.setParmTemplateGroup(hou_parm_template_group)
        # Set Default States
        n.parm("ogl_numtex").set(1)
Exemplo n.º 9
0
                                 run_init_scripts=False,
                                 load_contents=True,
                                 exact_type_name=True)
hou_node.move(hou.Vector2(-17.0728, -11.5878))
hou_node.bypass(False)
hou_node.setDisplayFlag(False)
hou_node.hide(False)
hou_node.setHighlightFlag(False)
hou_node.setHardLocked(False)
hou_node.setSoftLocked(False)
hou_node.setSelectableTemplateFlag(False)
hou_node.setSelected(True)
hou_node.setRenderFlag(False)
hou_node.setTemplateFlag(False)
hou_node.setUnloadFlag(False)
hou_parm_template_group = hou.ParmTemplateGroup()
# Code for parameter template
hou_parm_template = hou.ToggleParmTemplate(
    "copyinput",
    "Copy Input (Note: Input will be still cooked if disabled)",
    default_value=True)
hou_parm_template_group.append(hou_parm_template)
# Code for parameter template
hou_parm_template = hou.ToggleParmTemplate("cacheinput",
                                           "Cache Input",
                                           default_value=False)
hou_parm_template_group.append(hou_parm_template)
# Code for parameter template
hou_parm_template = hou.FloatParmTemplate(
    "a",
    "a",