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 unreal | |
| import sys | |
| from functools import partial # if you want to include args with UI method calls | |
| from PySide2 import QtUiTools, QtWidgets | |
| """ | |
| Be sure to add your default python modules directory path to Unreal: | |
| Project Settings -> Python -> Additional Paths | |
| Default location of installed modules: |
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
| """ | |
| Maya/QT UI template | |
| Maya 2023 | |
| """ | |
| import maya.cmds as cmds | |
| import maya.mel as mel | |
| from maya import OpenMayaUI as omui | |
| from shiboken2 import wrapInstance | |
| from PySide2 import QtUiTools, QtCore, QtGui, QtWidgets |
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
| from maya import OpenMaya | |
| # create selection | |
| sel = OpenMaya.MSelectionList() | |
| sel.add("locator1") | |
| sel.add("camera1") | |
| # get dag paths | |
| loc_dag = OpenMaya.MDagPath() | |
| sel.getDagPath(0, loc_dag) |
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
| """ | |
| A simple script to kick off a certain ROP remotely, optionally | |
| with a given framerange. | |
| Usage: hython path/to/script/houBatch.py /path/to/hipfile /hou/path/to/rop | |
| TODO: Add options for multiple ROPs, hperf. | |
| """ | |
| import hou, sys |
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
| Group { | |
| name TonemapFilmic | |
| help "Implementing John Hable's Filmic Tonemapping algorithm as a Nuke gizmo.\n\nhttp://filmicgames.com/archives/75\nhttp://www.slideshare.net/ozlael/hable-john-uncharted2-hdr-lighting\n\n## Filmic Tonemapping\nA = Shoulder Strength\nB = Linear Strength\nC = Linear Angle\nD = Toe Strength\nE = Toe Numerator\nF = Toe Denominator\n\tNote: E/F = Toe Angle\nLinearWhite = Linear White Point Value\n\nF(x) = ((x*(A*x+C*B) + D*E) / (x*(A*x+B) + D*F)) - E/F\nFinalColor = F(LinearColor)/F(LinearWhite)\n\nA = 0.22\nB = 0.30\nC = 0.10\nD = 0.20\nE = 0.01\nF = 0.30\nLinearWhite = 11.2\nThese numbers are assuming linear source data." | |
| addUserKnob {20 Tonamap l Tonemap} | |
| addUserKnob {26 ""} | |
| addUserKnob {7 exposure t "Adjust the exposure before the tonemap in stops." R -4 4} | |
| addUserKnob {41 shStr l "Shoulder Strength" T Expression_Filmic_Tonemap.shStr} | |
| addUserKnob {41 linStr l "Linear Strength" T Expression_Filmic_Tonemap.linStr} | |
| addUserKnob {41 linAngle l "Linear Angle" T Expression_Filmic_T |
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
| """When using maya.cmds.listRelatives with allDescendents=True it will only return the first instanced child. | |
| Below are some example functions that correctly return all instanced children where they are "somewhat" optimized to rapidly return a result as opposed to slow recursive queries. | |
| """ | |
| import maya.api.OpenMaya as om | |
| from maya import cmds | |
| import time | |
| import re |
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
| from maya import cmds | |
| import pymel.core as pm | |
| sel = pm.ls(selection=True) | |
| print sel[0] | |
| blends = sel[0].getShape().inputs(type='blendShape') | |
| if len(blends) < 1: | |
| print "No blend shapes on this node!" | |
| else: | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // FIT LAYER TO CANVAS | |
| // via https://forums.adobe.com/message/5413957#5413957 | |
| var maintainAspectRatio;// set to true to keep aspect ratio | |
| if(app.documents.length>0){ | |
| app.activeDocument.suspendHistory ('Fit Layer to Canvas', 'FitLayerToCanvas('+maintainAspectRatio+')'); | |
| } | |
| function FitLayerToCanvas( keepAspect ){// keepAspect:Boolean - optional. Default to false | |
| var doc = app.activeDocument; | |
| var layer = doc.activeLayer; | |
| // do nothing if layer is background or locked |
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
| /* | |
| This script resizes every layer within the active document. | |
| How to use: | |
| - Photoshop script ( cs3+ ) | |
| - Put in {photoshop_root}/presets/scripts/Resize Each Layer.jsx | |
| - Run from: File > Scripts > Resize Each Layer | |
| - ..or save the file where ever you want and run from there with: File > Scripts > Browse... | |
NewerOlder