This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nuke | |
| import nukescripts | |
| def get_connected_nodes(node): | |
| input_nodes = [(i, node.input(i)) for i in range(node.inputs())] | |
| output_nodes = [] | |
| for depNode in nuke.dependentNodes(nuke.INPUTS | nuke.HIDDEN_INPUTS, node): | |
| for i in range(depNode.inputs()): | |
| if depNode.input(i) == node: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Provides function to Parse dependencies files from working file.""" | |
| # Import built-in modules | |
| from functools import partial | |
| import re | |
| class Parser(object): | |
| """Parser for parsing dependencies files from work file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import watchdog.events | |
| import watchdog.observers | |
| class Handler(watchdog.events.RegexMatchingEventHandler): | |
| def __init__(self): | |
| # Set the patterns for PatternMatchingEventHandler | |
| super(Handler, self).__init__(regexes=[r"*.json"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pymel.core as pm | |
| def getBuildOrder(face): | |
| """Returns the uvs of a face in the build order """ | |
| verts = [] | |
| vtxFaces = pm.ls(pm.polyListComponentConversion(face, toVertexFace=True), flatten=True) | |
| for vtxFace in vtxFaces: | |
| uvs = pm.polyListComponentConversion(vtxFace, fromVertexFace=True, toUV=True) | |
| verts.append(uvs[0]) | |
| return verts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hou | |
| import json | |
| from pprint import pprint | |
| node = hou.selectedNodes()[0] | |
| for frame in range(810, 1510): | |
| geo = node.geometryAtFrame(frame) | |
| filename = r"c:\cgfx_rnd\point_data\{}.{}.json".format(node.name(), frame) | |
| print filename | |
| with open(filename, "w") as json_object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| module author: Long Hao <[email protected]> | |
| """ | |
| from pprint import pprint | |
| class ChRecord(object): | |
| def __init__(self, namespace, file_path, sel_sets=None): |