Beispiel #1
0
def createNodeInContainer(container, nodetypecategory, nodetypename, nodename,
                          exact_node_type):
    """This function attempts to create a node of a given type category and
       type name in a given container. If the container does not allow a given 
       type category, this funciton creates a network of a correct type first,
       and then creates the required node within that network.
       If exact_node_type is true, it attempts to create a node of the exact
       nodetypename; otherwise, the nodtypename may be resolved to the
       preferred namespace or version of that typename.
       It retuns a pair of nodes, the fist being the node created in the
       container and the second being the node of a required operator type
       (which in most cases will be the same nodes).
    """
    return (hou.Node(), hou.Node())
Beispiel #2
0
def buildPaintNode(node, nextnode, parms, props):
    """ Finds a paint node at or prior to node which matches parms.
        If not found, builds one.  If the attribute does not exist,
        creates the attribute to paint.
        It will be inserted prior to nextnode if not none.
    """
    return hou.Node()
Beispiel #3
0
def genericTool(scriptargs,
                nodetypename,
                nodename=None,
                isreusable=False,
                iscapture=False,
                allow_obj_sel=True,
                custom=False,
                merge_context=False,
                orient=None,
                exact_node_type=True,
                force_filter=False):
    """ Invokes a generic SOP tool.
        If isreusable is True, then the tool will try to reuse existing
        nodes of matching type in the network before creating any new nodes.
        If iscapture is True, then the tool is considered to be a capture-type
        tool.  Capture-type tools will attempt to create new nodes before
        any deform-type SOPs in the network.
        If merge_context is True, then we create the generator in context,
        while merging it together with the current display sop.
        If orient is set, it should be an instance of OrientInfo.
        If exact_node_type is True, it creates the node of the exact type 
        specified by nodetypename.  However, if exact_node_type is False, 
        then the base type may get resolved to another namespace or 
        another version, and the created node may be of that resolved type 
        (eg 'hda' may resolve to 'mynamespace::hda::2.0').
        If force_Filter is True, we will treat as a filter even if
        it can optionally have no inputs.
    """
    return hou.Node()
Beispiel #4
0
def findAllChildNodesOfType(parentnode,
                            nodetype,
                            dorecurse=False,
                            basetypematch=False):
    """ Returns a list of all child nodes that match the given node
        type
    """
    return hou.Node()
Beispiel #5
0
def getGeometrySelections(sceneviewer,
                          selectors,
                          allow_obj_selection=True,
                          prompt=None):
    """ This function invokes a geometry selection for each
        selector in "selectors".  The selector is not started, but
        its properties are used when calling sceneviewer.selectGeometry().
    """
    return (None, [], hou.Node())
Beispiel #6
0
def findChildNodeOfType(parentnode,
                        nodetype,
                        dorecurse=False,
                        basetypematch=False):
    """ This function does a search of the node container hierarchy
        (rather than connection hierarchy) searching for a matching
        node type.
    """
    return hou.Node()
Beispiel #7
0
def findChildNodeOfTypeWithParms(parentnode,
                                 nodetype,
                                 parmlist,
                                 dorecurse=False,
                                 basetypematch=False):
    """ This function does a search of the node container hierarchy
        (rather than connection hierarchy) searching for a matching
        node type which also has the given parameter list match.
    """
    return hou.Node()
Beispiel #8
0
def createSopNodeContainer(sceneviewer,
                           newobjectname,
                           merge_context=False,
                           merge_creator=None):
    """ Creates a scene level object node to contain a new SOP node.
        This function may return an existing object node if the Model in
        Context option is turned on, or the merge_context parameter is
        set to True.
    """
    return hou.Node()
Beispiel #9
0
def createSopNodeGenerator(container,
                           nodetypename,
                           nodename,
                           merge_context=False,
                           exact_node_type=True):
    """ Creates a SOP node that doesn't require an input. If the container
        already has nodes, this new SOP may be merged with the existing SOPs.
    """
    # Look at the type of nodes that go inside the current node.
    return hou.Node()
Beispiel #10
0
def genericSopNodeGeneratorTool(scriptargs,
                                nodetypename,
                                nodename,
                                merge_context=False,
                                prompt=None,
                                exact_node_type=True):
    """ A generic tool for instantiating SOP generator nodes such as Box and
        Sphere. The user is prompted to select a location in the viewport if
        the tool was not invoked with the Ctrl key. The new SOP may be merged
        into an existing scene level object depending onthe merge_context
        parameter value.
    """
    return hou.Node()
Beispiel #11
0
def genericSopNodeFilterTool(scriptargs,
                             nodetypename,
                             nodename,
                             isreusable=False,
                             iscapture=False,
                             allow_obj_sel=True,
                             selector_indices=(),
                             exact_node_type=True):
    """ A generic tool for creating a SOP node that takes another SOP node
        as input. The user is prompted for selections based on the selector
        bindings set in the OPbindings file.
    """
    return hou.Node()
Beispiel #12
0
def genericTool(scriptargs,
                nodetypename,
                nodename=None,
                nodetypecategory=None,
                exact_node_type=True):
    """ Handles the creation of any node in a Network Editor pane. 

        This function is intended to instantiate a node of a given type from
        shelf tools, and thus, if exact_node_type argument is True, it creates 
        the node of the exact type specified by nodetypename. 
        However, if exact_node_type argument is False, then the base type may 
        get resolved to another namespace or another version, and 
        the created node may be of that resolved type (eg 'hda' may resolve to 
        'mynamespace::hda::2.0').
    """
    return hou.Node()
Beispiel #13
0
def findInputNodeOfTypeWithParms(endnode,
                                 nodetype,
                                 parmlist,
                                 includeme=False,
                                 seennodes=None,
                                 basetypematch=False):
    """Finds any nodes that are an ancestor of endnode, match
        nodetype, and have the parameters & value pairs listed in the
        parmlist dictionary.
        If basetypematch is true, only the node type's base name is checked, 
        ie, node type's namespace and version components are ignored
        when testing against the matchtype (eg, matchtype 'hda' will match
        node types 'hda', 'hda::1.5' and 'userx::hda', etc). Otherwise,
        the node type name must match exactly the matchtype string.
    """

    return hou.Node()
Beispiel #14
0
def findOutputNodeOfTypeWithParms(startnode,
                                  nodetype,
                                  parmlist,
                                  includeme=False,
                                  seennodes=None,
                                  basetypematch=False,
                                  returnall=False):
    """ Finds any nodes that are a descendent of startnode, match
        nodetype, and have the parameters & value pairs listed in the
        parmlist dictionary.
        If basetypematch is true, only the node type's base name is checked, 
        ie, node type's namespace and version components are ignored
        when testing against the matchtype (eg, matchtype 'hda' will match
        node types 'hda', 'hda::1.5' and 'userx::hda', etc). Otherwise,
        the node type name must match exactly the matchtype string.
        If returnall is true, returns a list of all matches in depth
        first order, or an empty list if no matches are found.
    """
    return hou.Node()
Beispiel #15
0
def findInputNode(endnode, searchnode, seennodes=None):
    """ This function searches the endnode's hierarchy to find if the
        given search node is connected
    """
    return hou.Node()
Beispiel #16
0
def createSopNodeFilter(container, nodetypename, nodename, exact_node_type):
    """ Creates a SOP node that takes an input. """
    # Look at the type of nodes that go inside the current node.
    return hou.Node()
Beispiel #17
0
def findAncestorOfType(startnode, category, nodetype, basetypematch=False):
    """ Return closest ancestor (or self) of 'startnode' with the specified
        category and type.
    """
    return hou.Node()
Beispiel #18
0
def chooseNode(possible_nodes, title, message):
    """ Prompts the user to select on of the given nodes. If there is only a
        single node, then that node is automatically returned. The title
        and message parameters determine what will show up in the prompt.
    """
    return hou.Node()
Beispiel #19
0
def findDeformTypeInputSop(endnode):
    """ This function does a depth first traversal of the node
        input hierarchy to find the first deform-type node.
        Returns the deform-type node.  Returns None if no such node exists.
    """
    return hou.Node()
Beispiel #20
0
def _askUserToSelectNode(nodes, title, message):
    return hou.Node()
Beispiel #21
0
def findGreatestCommonDescendent(endnode, searchnodes, seennodes=None):
    """ Starting from end node and heading up the input chain
        locate the first node that doesn't have all of searchnodes
        on the same input wire.
    """
    return hou.Node()