├── .gitignore ├── bin ├── 3delight ├── afstarter ├── cerebro ├── cgru_reinstall.sh ├── config_farm ├── djv_view ├── emp2geo ├── empinfo ├── geo2emp ├── global_repo ├── h ├── hbatch ├── hdrshop ├── hiero ├── hieroPlayer ├── keeper ├── kick ├── local_repo ├── m12 ├── m13 ├── makeMov ├── mari ├── n6 ├── n7 ├── n7_old ├── n8 ├── naiad ├── nstudio ├── ps2 ├── ps4 ├── q3 ├── rf ├── rv ├── rvio ├── rvopen ├── sc ├── se ├── sublime ├── winrar └── xnview ├── com ├── filesys.py └── math_function.py ├── etc └── bashrc ├── lib ├── asset_browser │ ├── asset_browser.py │ ├── asset_browser_functions.py │ ├── ui_asset_browser.py │ ├── ui_asset_browser.ui │ └── ui_compile.sh └── base │ ├── project │ ├── addProject.py │ ├── addSrc.py │ ├── dBase.py │ ├── filesystem.py │ ├── pipeObjects.py │ ├── projectUtil.py │ └── test.py │ └── shotty │ ├── shotty-api.md │ └── shotty-create-project-dirs.py └── software ├── davinci └── clips_to_timeline.py ├── houdini ├── HotkeyOverrides ├── MainMenuCommon.xml ├── MainMenuMaster.xml ├── config │ └── Hotkeys │ │ └── h ├── houdini.var ├── jump.pref ├── scripts │ └── python │ │ ├── adddoputils.py │ │ ├── asset_browser.py │ │ ├── asset_browser_functions.py │ │ ├── cache_utils.py │ │ ├── cache_utils_GUI.py │ │ ├── massive_cdl.py │ │ ├── menu │ │ └── cacheWriteMenu.py │ │ ├── pyqt_houdini.py │ │ ├── pyqt_thread_helper.py │ │ ├── quick_utils.py │ │ ├── rig_utils.py │ │ ├── serutil.py │ │ ├── ui_asset_browser.py │ │ ├── utils.py │ │ ├── utils_backup.py │ │ └── viewportutils.py ├── soho │ ├── IFDarchive_inst.py │ ├── IFDuserhooks.py │ └── parameters │ │ ├── IFDmantra.ds │ │ └── IFDmantra11.0.user.ds ├── toolbar │ ├── Animation_scripts.shelf │ ├── quickies.shelf │ ├── realflow.shelf │ ├── tools.shelf │ └── ui_add_visualization.shelf └── vex │ ├── VEXdso │ └── include │ ├── gaussian.h │ ├── roots.h │ └── utils.h ├── maya ├── maya.var └── scripts │ ├── mel │ ├── CMenu.mel │ └── userSetup.mel │ └── python │ ├── common_utils.py │ ├── common_utils_gui.py │ ├── file_utils.py │ └── fx_mdd_obj_exporter.py └── nuke └── N6 ├── SCRIPTS ├── AEpremult.gizmo ├── AutoIBK.py ├── AutoProxy.py ├── BatchRender.py ├── BlueSupress.gizmo ├── CacheD1.gizmo ├── ChangeMissingFrame.py ├── ColorPreMult.gizmo ├── CoreMatte.gizmo ├── DejaVuSansCondensed.ttf ├── Duplicator.gizmo ├── FHcheck.py ├── FakeMotionBlur.gizmo ├── FrameNumber.gizmo ├── ImportFBX.tcl ├── ImportSSF.tcl ├── ImportTXT.tcl ├── ImportTrackData.tcl ├── ImportXML.tcl ├── LABCorrect.gizmo ├── Lightwrap2.gizmo ├── LinkTo.gizmo ├── N_LookAtMasked.py ├── ParticularV2_3DScript.py ├── PosP.py ├── PythonHelp.txt ├── ReTouch.gizmo ├── Slate.gizmo ├── SliceTool.gizmo ├── SubmitToDeadline.tcl ├── SynthObj.gizmo ├── TPreview.py ├── TimeO.py ├── Tracker3Dto2D.gizmo ├── Tracker3Dto2D.txt ├── VRayElements.bak ├── VRayElements.gizmo ├── VRayElements_v2.gizmo ├── WaterDistort.gizmo ├── addconstraintab.py ├── addgeotab.py ├── addrangetab.py ├── arial.ttf ├── arialbd.ttf ├── autobackdrop.py ├── autobackdrop.py.bak ├── branchout.py ├── checkIfNotOnAServer.py ├── cnew.py ├── cspace.py ├── cvci.py ├── cvco.py ├── dailies.py ├── deniska.py ├── drop.tcl ├── exr2tif.py ├── exrUnpack.py ├── ffix.py ├── fillReads.py ├── flameConnect.py ├── flipbookRV.py ├── formats.tcl ├── framehold2.py ├── getpass.py ├── hiRes.py ├── hiResAfanasyTfx.py ├── hqsubmit.py ├── init.py ├── init.tcl ├── jobLocal.py ├── load_src.py ├── mari_bridge.py ├── mari_bridge_server.py ├── menu.py ├── mocha_autoimport.py ├── mocha_autoimport_cornerpin.py ├── mocha_open.py ├── nuke_mari.dat ├── picReader.tcl ├── pipeDailies.py ├── projectioncam.py ├── pythonhelp.py ├── renamenodes.py ├── render_panel.py ├── slate.py ├── slate2.gizmo ├── slate_tri.py ├── template_project.mocha ├── tfxGetResources.py ├── tfxSlate.py ├── tvco.tcl ├── up.tcl ├── vray.txt └── www.py └── SCRMAC ├── ._menu.py ├── AEpremult.gizmo ├── AutoIBK.py ├── AutoProxy.py ├── BatchRender.py ├── BlueSupress.gizmo ├── CacheD1.gizmo ├── ChangeMissingFrame.py ├── ColorPreMult.gizmo ├── CoreMatte.gizmo ├── DejaVuSansCondensed.ttf ├── Duplicator.gizmo ├── FHcheck.py ├── FakeMotionBlur.gizmo ├── FrameNumber.gizmo ├── ImportFBX.tcl ├── ImportSSF.tcl ├── ImportTXT.tcl ├── ImportTrackData.tcl ├── ImportXML.tcl ├── LABCorrect.gizmo ├── Lightwrap2.gizmo ├── LinkTo.gizmo ├── NFX └── N_LookAtMasked.py ├── N_LookAtMasked.py ├── ParticularV2_3DScript.py ├── PosP.py ├── PythonHelp.txt ├── ReTouch.gizmo ├── Slate.gizmo ├── SubmitToDeadline.tcl ├── SynthObj.gizmo ├── TPreview.py ├── TimeO.py ├── Tracker3Dto2D.gizmo ├── Tracker3Dto2D.txt ├── TriWrite.gizmo ├── VRayElements.bak ├── VRayElements.gizmo ├── VRayElements_v2.gizmo ├── WaterDistort.gizmo ├── addconstraintab.py ├── addgeotab.py ├── addrangetab.py ├── afanasy.gizmo ├── afrender.tcl ├── arial.ttf ├── arialbd.ttf ├── autobackdrop.py ├── autobackdrop.py.bak ├── branchout.py ├── cgru ├── __init__.py └── docs.py ├── cnew.py ├── cspace.py ├── cvci.py ├── cvco.py ├── dailies.py ├── deniska.py ├── drop.tcl ├── exr2tif.py ├── ffix.py ├── fillReads.py ├── flameConnect.py ├── flipbookRV.py ├── formats.tcl ├── framehold2.py ├── getpass.py ├── hiRes.py ├── hiResAfanasyTfx.py ├── hqsubmit.py ├── init.py ├── init.tcl ├── jobLocal.py ├── load_src.py ├── menu.py ├── pipeDailies.py ├── projectioncam.py ├── pythonhelp.py ├── renamenodes.py ├── render_panel.py ├── slate.py ├── slate2.gizmo ├── slate_tri.py ├── template_project.mocha ├── tfxGetResources.py ├── tfxSlate.py ├── trigraph ├── Anonymous Pro B.ttf ├── Anonymous Pro.ttf ├── TriSlate.tiff ├── TriSlateBG.tiff ├── __init__.py ├── init.py └── menu.py ├── tvco.tcl ├── up.tcl ├── vray.txt └── www.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | 3 | # C extensions 4 | *.so 5 | 6 | # cg 7 | *.orig 8 | *.rej 9 | *~ 10 | *.obj 11 | *.o 12 | *.os 13 | *.so 14 | *.dylib 15 | *.ER 16 | *.OU 17 | *.backup 18 | *.otl 19 | *.lic 20 | *.pdf 21 | *.ofx 22 | *.sdl 23 | *.jpg 24 | *.png 25 | *.icon 26 | *.svg 27 | *.html 28 | *.psd 29 | *.css 30 | .DS_Store 31 | 32 | #lib folders 33 | lib/openVDB/ 34 | lib/tbb41_20121003oss/ 35 | lib/shotgun/ 36 | lib/PyQt4/ 37 | 38 | #src folders 39 | src/ 40 | 41 | #houdini prefs 42 | jump.pref 43 | 44 | #houdini folders 45 | software/houdini/dso/ 46 | software/houdini/gallery/ 47 | software/houdini/icons/ 48 | software/houdini/otl/ 49 | software/houdini/presets/ 50 | software/houdini/python/ 51 | software/houdini/presets/ 52 | 53 | #nuke folders 54 | software/nuke/LIC/ 55 | software/nuke/N6/SCRIPTS/icons/ 56 | software/nuke/python/ 57 | 58 | # Packages 59 | *.egg 60 | *.egg-info 61 | dist 62 | build 63 | eggs 64 | parts 65 | var 66 | sdist 67 | develop-eggs 68 | .installed.cfg 69 | lib64 70 | 71 | # Installer logs 72 | pip-log.txt 73 | 74 | # Unit test / coverage reports 75 | .coverage 76 | .tox 77 | nosetests.xml 78 | 79 | # Translations 80 | *.mo 81 | 82 | # Mr Developer 83 | .mr.developer.cfg 84 | .project 85 | .pydevproject 86 | -------------------------------------------------------------------------------- /bin/3delight: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /mnt/opt/3delight/bin/licserver -d /mnt/opt/3delight/license.dat 3 | -------------------------------------------------------------------------------- /bin/afstarter: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python /mnt/opt/cgru/utilities/afstarter/afstarter.py & -------------------------------------------------------------------------------- /bin/cerebro: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /mnt/opt/Cerebro/cerebro64 -------------------------------------------------------------------------------- /bin/cgru_reinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd /mnt/data/dist/render_manager/fedora_15/ 3 | ./uninstall.sh 4 | cp /mnt/opt/cgru/afrender /etc/init.d/ 5 | chkconfig --add afrender 6 | /etc/init.d/afrender start -------------------------------------------------------------------------------- /bin/config_farm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ssh tcp01 '/etc/init.d/afrender restart' 4 | ssh tcp02 '/etc/init.d/afrender restart' 5 | ssh tcp03 '/etc/init.d/afrender restart' 6 | ssh tcp04 '/etc/init.d/afrender restart' 7 | ssh tcp05 '/etc/init.d/afrender restart' 8 | ssh tcp06 '/etc/init.d/afrender restart' 9 | ssh tcp07 '/etc/init.d/afrender restart' 10 | ssh tcp08 '/etc/init.d/afrender restart' 11 | ssh tcp09 '/etc/init.d/afrender restart' 12 | ssh tcp10 '/etc/init.d/afrender restart' 13 | ssh tcp11 '/etc/init.d/afrender restart' 14 | ssh tcp12 '/etc/init.d/afrender restart' 15 | ssh tcp13 '/etc/init.d/afrender restart' 16 | ssh tcp14 '/etc/init.d/afrender restart' -------------------------------------------------------------------------------- /bin/djv_view: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LD_LIBRARY_PATH={LD_LIBRARY_PATH}:/mnt/opt/djv/lib 3 | 4 | /mnt/opt/djv/bin/djv_view $* -------------------------------------------------------------------------------- /bin/emp2geo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export NAIAD_PATH=/mnt/opt/naiad-0.6.0.51-x86_64 4 | 5 | export LD_LIBRARY_PATH=${NAIAD_PATH}/server/lib:/mnt/opt/hfs11.1.201/dsolib 6 | ${NAIAD_PATH}/buddies/houdini/bin/emp2geo $* -------------------------------------------------------------------------------- /bin/empinfo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NAIADPATH=/mnt/opt/naiad-0.6.0.51-x86_64 3 | 4 | source ${NAIADPATH}/naiadvars.bash 5 | ${NAIADPATH}/server/bin/empinfo --verbose $* 6 | -------------------------------------------------------------------------------- /bin/geo2emp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export NAIAD_PATH=/mnt/opt/naiad-0.6.0.51-x86_64 4 | export LD_LIBRARY_PATH=${NAIAD_PATH}/server/lib:/mnt/opt/hfs11.1.201/dsolib 5 | 6 | ${NAIAD_PATH}/buddies/houdini/bin/geo2emp $* -------------------------------------------------------------------------------- /bin/global_repo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CPIPELINE=/usr/pipeline -------------------------------------------------------------------------------- /bin/h: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | umask 0000 3 | 4 | OSNAME=`uname` 5 | #echo $OSNAME 6 | 7 | 8 | if [ $OSNAME == "Darwin" ] 9 | then 10 | source ${CPIPELINE}/software/houdini/houdini.var 11 | /Applications/Houdini\ 12.1.125/Houdini\ FX.app/Contents/MacOS/hmaster 12 | 13 | fi 14 | 15 | 16 | 17 | if [ $OSNAME == "Linux" ] 18 | then 19 | source ${CPIPELINE}/software/houdini/houdini.var 20 | ${PROGRAM_PATH}/hfs/bin/hmaster "$@" 21 | fi -------------------------------------------------------------------------------- /bin/hbatch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ${CPIPELINE}/software/houdini/houdini.var 4 | ${PROGRAM_PATH}/hfs/bin/hbatch "$@" -------------------------------------------------------------------------------- /bin/hdrshop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd /mnt/opt/hdrshop/ 3 | wine /mnt/opt/hdrshop/HDRShop.exe -------------------------------------------------------------------------------- /bin/hiero: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | #export FOUNDRY_LICENSE_FILE= 10 | 11 | export RLM_LICENSE=/usr/pipeline/software/nuke/LIC/foundry_client.lic 12 | ${PROGRAM_PATH}/Hiero1.8v1/bin/Hiero1.8v1 $* 13 | -------------------------------------------------------------------------------- /bin/hieroPlayer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | export RLM_LICENSE=/usr/pipeline/software/nuke/LIC/foundry_client.lic 11 | ${PROGRAM_PATH}/HieroPlayer1.8v1/bin/HieroPlayer1.8v1 $* 12 | -------------------------------------------------------------------------------- /bin/keeper: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$CGRU_LOCATION" ]; then 4 | if [ -L "$0" ]; then 5 | link=`readlink "$0"` 6 | pushd `dirname "$link"` > /dev/null 7 | else 8 | pushd `dirname "$0"` > /dev/null 9 | fi 10 | source "./setup.sh" 11 | popd > /dev/null 12 | fi 13 | 14 | "$CGRU_PYTHONEXE" "$CGRU_LOCATION/utilities/keeper/keeper.py" "$@" 15 | -------------------------------------------------------------------------------- /bin/kick: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export SHADER_PATH=/mnt/opt/MtoA-0.22.0-linux64-2013/shaders 3 | export ARNOLD=/mnt/opt/MtoA-0.22.0-linux64-2013/bin/kick 4 | 5 | ${ARNOLD} -l ${SHADER_PATH} -g 2.2 "$@" 6 | -------------------------------------------------------------------------------- /bin/local_repo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CPIPELINE=$HOME/git/pipeline 3 | -------------------------------------------------------------------------------- /bin/m13: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $USER == "root" ] 4 | then 5 | echo "Maya can't run by root user!" 6 | exit 7 | fi 8 | 9 | OSNAME=`uname` 10 | 11 | 12 | if [ $OSNAME == "Linux" ] 13 | then 14 | source ${CPIPELINE}/software/maya/maya.var 15 | 16 | 17 | /usr/autodesk/maya2013-x64/bin/maya2013 18 | 19 | fi 20 | -------------------------------------------------------------------------------- /bin/makeMov: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | #convert seq to mov and put to the home user 4 | 5 | import os 6 | import sys 7 | 8 | rvio = 'rvio' 9 | imagePath = sys.argv[1] 10 | #imagePath = '/mnt/karramba/zeroTheorem/film/sequences/077/shots/077_630/data/render/explosion/stones/0000/stones.0004.exr' 11 | 12 | 13 | #dir that contain seq 14 | path = imagePath.rsplit('/', 1)[0] 15 | 16 | #full name of image file 17 | imageName = imagePath.rsplit('/', 1)[1] 18 | 19 | #finded padding of the image 20 | digitPadding = imageName.split('.')[-2] 21 | 22 | #path to the seq with padding 23 | digitPath = os.path.join(path, imageName.replace(digitPadding, '*')) 24 | 25 | layerName = imageName.rsplit('.', -1)[0] 26 | os.system(rvio + ' ' + digitPath + ' -v' + ' -filegamma 0.45' + ' -rthreads 8' + ' -o ' + os.environ['HOME'] + '/' + 'LAYER-' + layerName + '.mov' + ' -outparams jpeg_quality=50') 27 | -------------------------------------------------------------------------------- /bin/mari: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #export LD_LIBARARY_PATH= 3 | export RLM_LICENSE=/usr/pipeline/software/nuke/LIC/foundry_client.lic 4 | /mnt/opt/Mari2.5v1/mari 5 | -------------------------------------------------------------------------------- /bin/n6: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | 11 | 12 | export NUKE_CGRU_PATH="${CGRU_LOCATION}/plugins/nuke" 13 | export NUKE_AF_PATH=$AF_ROOT/plugins/nuke 14 | export NUKE_AF_RENDERTHREADS=2 15 | 16 | # Nuke render launcher: 17 | #export NUKE_AF_RENDER="nuke -i -m %(threads)s" 18 | export NUKE_AF_RENDER="n6" 19 | 20 | # Path to save 'Untitled' scene to render, if not set 'tmp' name in current folder will be used 21 | # export NUKE_AF_TMPSCENE="compositing/tmp" 22 | 23 | #NUKE_LOCATION="${PROGRAM_PATH}/Nuke6.3v4" 24 | #export NUKE_EXEC="${NUKE_LOCATION}/Nuke6.3 --nukex" 25 | 26 | 27 | export NUKE_PATH=${CPIPELINE}/software/nuke/N6/SCRIPTS:${NUKE_CGRU_PATH}:${NUKE_AF_PATH} 28 | export OFX_PLUGIN_PATH=${PROGRAM_PATH}/OFX/nuke/OFX 29 | export FOUNDRY_LICENSE_FILE=${CPIPELINE}/software/nuke/LIC 30 | export NUKE_TEMP_DIR=/var/tmp/nuke 31 | 32 | echo $NUKE_PATH 33 | 34 | ${PROGRAM_PATH}/Nuke6.3v4/Nuke6.3 --nukex $* 35 | 36 | 37 | -------------------------------------------------------------------------------- /bin/n7: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/opt/hfs12.1.185/dsolib 11 | export HOUDINI_DISABLE_IMAGE_DSO=1 12 | 13 | 14 | export PYTHONPATH=${CPIPELINE}/software/nuke/python:${PYTHONPATH} 15 | export NUKE_CGRU_PATH="${CGRU_LOCATION}/plugins/nuke" 16 | export NUKE_AF_PATH=$AF_ROOT/plugins/nuke 17 | export NUKE_AF_RENDERTHREADS=2 18 | 19 | # Nuke render launcher: 20 | #export NUKE_AF_RENDER="nuke -i -m %(threads)s" 21 | export NUKE_AF_RENDER="n7" 22 | 23 | # Path to save 'Untitled' scene to render, if not set 'tmp' name in current folder will be used 24 | # export NUKE_AF_TMPSCENE="compositing/tmp" 25 | 26 | #NUKE_LOCATION="${PROGRAM_PATH}/Nuke6.3v4" 27 | #export NUKE_EXEC="${NUKE_LOCATION}/Nuke6.3 --nukex" 28 | 29 | 30 | export NUKE_PATH=${CPIPELINE}/software/nuke/N6/SCRIPTS:${NUKE_CGRU_PATH}:${NUKE_AF_PATH} 31 | #export OFX_PLUGIN_PATH=${PROGRAM_PATH}/OFX/nuke/OFX 32 | #export FOUNDRY_LICENSE_FILE=${CPIPELINE}/software/nuke/LIC 33 | export NUKE_TEMP_DIR=/var/tmp/nuke 34 | export RLM_LICENSE=${CPIPELINE}/software/nuke/LIC/foundry_client.lic 35 | 36 | echo $NUKE_PATH 37 | 38 | ${PROGRAM_PATH}/Nuke7.0v9/Nuke7.0 --nukex $* 39 | -------------------------------------------------------------------------------- /bin/n7_old: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/opt/hfs12.1.185/dsolib 11 | export HOUDINI_DISABLE_IMAGE_DSO=1 12 | 13 | 14 | export PYTHONPATH=${CPIPELINE}/software/nuke/python:${PYTHONPATH} 15 | export NUKE_CGRU_PATH="${CGRU_LOCATION}/plugins/nuke" 16 | export NUKE_AF_PATH=$AF_ROOT/plugins/nuke 17 | export NUKE_AF_RENDERTHREADS=2 18 | 19 | # Nuke render launcher: 20 | #export NUKE_AF_RENDER="nuke -i -m %(threads)s" 21 | export NUKE_AF_RENDER="n7_old" 22 | 23 | # Path to save 'Untitled' scene to render, if not set 'tmp' name in current folder will be used 24 | # export NUKE_AF_TMPSCENE="compositing/tmp" 25 | 26 | #NUKE_LOCATION="${PROGRAM_PATH}/Nuke6.3v4" 27 | #export NUKE_EXEC="${NUKE_LOCATION}/Nuke6.3 --nukex" 28 | 29 | 30 | export NUKE_PATH=${CPIPELINE}/software/nuke/N6/SCRIPTS:${NUKE_CGRU_PATH}:${NUKE_AF_PATH} 31 | #export OFX_PLUGIN_PATH=${PROGRAM_PATH}/OFX/nuke/OFX 32 | #export FOUNDRY_LICENSE_FILE=${CPIPELINE}/software/nuke/LIC 33 | export NUKE_TEMP_DIR=/var/tmp/nuke 34 | export RLM_LICENSE=${CPIPELINE}/software/nuke/LIC/foundry_client.lic 35 | 36 | echo $NUKE_PATH 37 | 38 | ${PROGRAM_PATH}/Nuke7.0v2/Nuke7.0 --nukex $* 39 | -------------------------------------------------------------------------------- /bin/n8: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/opt/hfs12.1.185/dsolib 11 | export HOUDINI_DISABLE_IMAGE_DSO=1 12 | 13 | 14 | export PYTHONPATH=${CPIPELINE}/software/nuke/python:${PYTHONPATH} 15 | export NUKE_CGRU_PATH="${CGRU_LOCATION}/plugins/nuke" 16 | export NUKE_AF_PATH=$AF_ROOT/plugins/nuke 17 | export NUKE_AF_RENDERTHREADS=2 18 | 19 | # Nuke render launcher: 20 | export NUKE_AF_RENDER="n8" 21 | 22 | 23 | 24 | export NUKE_PATH=${CPIPELINE}/software/nuke/N6/SCRIPTS:${NUKE_CGRU_PATH}:${NUKE_AF_PATH} 25 | #export OFX_PLUGIN_PATH=${PROGRAM_PATH}/OFX/nuke/OFX 26 | #export FOUNDRY_LICENSE_FILE=${CPIPELINE}/software/nuke/LIC 27 | export NUKE_TEMP_DIR=/var/tmp/nuke 28 | export RLM_LICENSE=${CPIPELINE}/software/nuke/LIC/foundry_client.lic 29 | 30 | echo $NUKE_PATH 31 | 32 | ${PROGRAM_PATH}/Nuke8.0v1/Nuke8.0 --nukex $* 33 | -------------------------------------------------------------------------------- /bin/naiad: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NAIADPATH=/mnt/opt/naiad 3 | 4 | source ${NAIADPATH}/naiadvars.bash 5 | ${NAIADPATH}/server/bin/naiad --verbose $* 6 | 7 | -------------------------------------------------------------------------------- /bin/nstudio: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NAIADPATH=/mnt/opt/naiad 3 | 4 | source ${NAIADPATH}/naiadvars.bash 5 | ${NAIADPATH}/clients/nstudio/bin/nstudio $* & 6 | -------------------------------------------------------------------------------- /bin/ps2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -R -f /home/$USER/.wine/drive_c/users/$USER/Application\ Data/Adobe/Photoshop/9.0 4 | 5 | cd /mnt/opt/PS2 6 | wine Photoshop.exe 7 | -------------------------------------------------------------------------------- /bin/ps4: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wine /mnt/opt/ps4/PhotoshopPortable.exe 4 | -------------------------------------------------------------------------------- /bin/q3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/bin/q3 -------------------------------------------------------------------------------- /bin/rf: -------------------------------------------------------------------------------- 1 | ${PROGRAM_PATH}/realflow2013/bin/realflow -------------------------------------------------------------------------------- /bin/rv: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | ${PROGRAM_PATH}/rv-Linux-x86-64-4.0.7/bin/rv $* -------------------------------------------------------------------------------- /bin/rvio: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0000 4 | 5 | 6 | OSNAME=`uname` 7 | echo $OSNAME 8 | 9 | 10 | ${PROGRAM_PATH}/rv-Linux-x86-64-4.0.7/bin/rvio $* -------------------------------------------------------------------------------- /bin/rvopen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | #open seq from afwatch with rv player 4 | 5 | import os 6 | import sys 7 | 8 | rv = 'rv' 9 | imagePath = sys.argv[1] 10 | 11 | #dir that contain seq 12 | path = imagePath.rsplit('/', 1)[0] 13 | 14 | #full name of image file 15 | imageName = imagePath.rsplit('/', 1)[1] 16 | 17 | #finded padding of the image 18 | digitPadding = imageName.split('.')[-2] 19 | 20 | #path to the seq with padding 21 | digitPath = os.path.join(path, imageName.replace(digitPadding, '*')) 22 | os.system(rv + ' ' + digitPath) 23 | -------------------------------------------------------------------------------- /bin/sc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wine ${PROGRAM_PATH}/StarCraft/StarCraft.exe -------------------------------------------------------------------------------- /bin/se: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wine /mnt/opt/SynthEyes/SynthEyes64.exe $* -------------------------------------------------------------------------------- /bin/sublime: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/bin/sublime -------------------------------------------------------------------------------- /bin/winrar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wine /mnt/opt/WinRar/WinRar.exe & 4 | -------------------------------------------------------------------------------- /bin/xnview: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ${PROGRAM_PATH}/XnView/xnview.sh -------------------------------------------------------------------------------- /com/math_function.py: -------------------------------------------------------------------------------- 1 | def fit(val, oldmin, oldmax, newmin, newmax): 2 | return newmin + (val - oldmin) * (newmax - newmin)/(oldmax - oldmin) 3 | 4 | def fit01(val, minval, maxval): 5 | return (val - minval)/(maxval - minval) 6 | 7 | def fitfrom01(val, minval, maxval): 8 | return minval + val * (maxval - minval) 9 | 10 | def mix(val0, val1, bias): 11 | return( 1.0 - bias) * val0 + bias*val1 12 | 13 | def clamp(val, minval = 0.0, maxval = 1.0): 14 | if val > maxval: 15 | return maxval 16 | if val < minval: 17 | return minval -------------------------------------------------------------------------------- /etc/bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ########### Common 4 | 5 | export REPO=/mnt/karramba 6 | export PROGRAM_PATH=/mnt/opt 7 | export CPIPELINE=/usr/pipeline 8 | export CGRU=${PROGRAM_PATH}/cgru 9 | export CGRU_LOCATION=${CGRU} 10 | export CGRU_VERSION=1.6.5 11 | 12 | ########### Afanasy 13 | 14 | export AF_ROOT=${CGRU}/afanasy 15 | export PATH=${AF_ROOT}/bin:${CGRU}/software_setup/bin:${PATH} 16 | export AF_PYTHON=${AF_ROOT}/bin:${AF_ROOT}/python 17 | export HOUDINI_CGRU_PATH=${CGRU}/plugins/houdini 18 | export PYTHONPATH=${AF_PYTHON}:${PYTHONPATH} 19 | 20 | OSNAME=`uname` 21 | 22 | if [ "$OSNAME" == "Linux" ]; 23 | then 24 | 25 | #ALIASES 26 | alias katana="/mnt/opt/Katana1.1v6/katana" 27 | 28 | 29 | export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CPIPELINE}/lib/openVDB/lib:${CPIPELINE}/lib/Field3D/lib 30 | 31 | export PATH=${CPIPELINE}/bin:${PROGRAM_PATH}/3delight/bin:${PROGRAM_PATH}/hfs/bin:${CGRU}/bin:${CGRU}/afanasy/bin:${PATH} 32 | 33 | export PYTHONPATH=${CGRU}/lib/python:${CPIPELINE}/com:${CPIPELINE}/lib/shotgun:${PYTHONPATH} 34 | 35 | 36 | 37 | ########### HOUDINI 38 | #export HIH=${PROGRAM_PATH}/hfs/houdini 39 | export HFS=${PROGRAM_PATH}/hfs 40 | #export H=${HFS} 41 | #export HB=${H}/bin 42 | #export HDSO=${H}/dsolib 43 | # export HD=${H}/demo 44 | #export HH=${H}/houdini 45 | #export HHC=${HH}/config 46 | #export HT=${H}/toolkit 47 | #export HSB=${HH}/sbin 48 | 49 | 50 | 51 | ########### 3delight 52 | export DELIGHT=${PROGRAM_PATH}/3delight 53 | export LD_LIBRARY_PATH=${DELIGHT}/lib:${PROGRAM_PATH}/massive/bin:${LD_LIBRARY_PATH} 54 | export DL_SHADERS_PATH=${DELIGHT}/shaders 55 | export DL_SEARCH_PATH=${DELIGHT}/shaders 56 | export DL_DISPLAYS_PATH=${DELIGHT}/displays 57 | export DL_PROCEDURALS_PATH=/mnt/opt/massive/bin 58 | export SHADERDL_OPTIONS="-I ${DELIGHT}/include" 59 | 60 | ########### realflow 61 | export RF_2012_PATH=/mnt/opt/realflow64_6.0.2.0085 62 | 63 | 64 | fi 65 | 66 | if [ "$OSNAME" == "Darwin" ]; 67 | then 68 | echo $OSNAME 69 | 70 | fi 71 | -------------------------------------------------------------------------------- /lib/asset_browser/ui_compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export ui=ui_asset_browser 3 | 4 | pyuic4 -x -o ${ui}.py ${ui}.ui -------------------------------------------------------------------------------- /lib/base/project/addProject.py: -------------------------------------------------------------------------------- 1 | from shotgun_api3 import Shotgun 2 | import os 3 | 4 | def createProject(): 5 | 6 | site = 'https://chimneypot.shotgunstudio.com' 7 | scriptName = 'createProject' 8 | scriptKey = '90699580e396b61d3acfb71e0595adde7458dfd4' 9 | 10 | repo = '/mnt/karramba/' 11 | 12 | rootList = ['film', 'out', 'ref', 'src', 'temp'] 13 | filmList = ['assets', 'sequences'] 14 | assetList = ['light', 'material', 'mattepaint', 'model', 'rig', 'shader', 'textures'] 15 | shotList = ['anim', 'comp', 'data', 'fx', 'light', 'out', 'src', 'tmp'] 16 | sqList = ['anim', 'comp', 'data', 'fx', 'light', 'out', 'shots'] 17 | dataList = ['cache', 'geo', 'render', 'shadowmap', 'sim', 'track', 'photonmap'] 18 | outList = ['dailies', 'hires'] 19 | 20 | prName = raw_input('Print project name:') 21 | 22 | prPath = repo + prName 23 | 24 | if not os.path.exists(prPath): 25 | os.mkdir(prPath) 26 | for i in rootList: 27 | os.makedirs(prPath + os.sep + i) 28 | for i in filmList: 29 | os.makedirs(prPath + os.sep + 'film' + os.sep + i) 30 | for i in assetList: 31 | os.makedirs(prPath + os.sep + 'film' + os.sep + 'assets' + os.sep + i) 32 | for i in outList: 33 | os.makedirs(prPath + os.sep + 'out' + os.sep + i) 34 | 35 | sg = Shotgun(site, scriptName, scriptKey) 36 | sg.create('Project', {'name':prName}) 37 | 38 | createProject() 39 | -------------------------------------------------------------------------------- /lib/base/project/addSrc.py: -------------------------------------------------------------------------------- 1 | from shotgun_api3 import Shotgun 2 | import os 3 | import shutil 4 | 5 | def addSrc(): 6 | 7 | repo = '/mnt/karramba' 8 | 9 | shotFoldList = ['anim', 'comp', 'data', 'fx', 'light', 'out', 'src', 'tmp'] 10 | seqFoldList = ['anim', 'comp', 'data', 'fx', 'light', 'out', 'shots'] 11 | dataFoldList = ['cache', 'geo', 'render', 'shadowmap', 'sim', 'track', 'photonmap'] 12 | outFoldList = ['dailies', 'hires'] 13 | 14 | site = 'https://chimneypot.shotgunstudio.com' 15 | scriptName = 'addSrc' 16 | scriptKey = 'd7dac4e2c55faf486875dfb944ffc9d8e49a0c44' 17 | 18 | sg = Shotgun(site, scriptName, scriptKey) 19 | 20 | 21 | projList = sg.find('Project', [], ['name']) 22 | 23 | for i in projList: 24 | 25 | print 'id:' + str(i['id']) + ' ' + i['name'] 26 | 27 | prId = int(raw_input('Print project id:')) 28 | 29 | proj = sg.find_one('Project', [['id','is',prId]], ['name']) 30 | 31 | 32 | if not [x for x in os.listdir(repo) if x==proj['name']]: 33 | print "Project doesn't exist in repository" 34 | return 35 | 36 | 37 | 38 | s = os.sep 39 | 40 | prPath = repo + s + proj['name'] 41 | seqPath = prPath + s + 'film' + s + 'sequences' 42 | seqList = os.listdir(prPath + s + 'src') 43 | 44 | for i in seqList: 45 | sequenceFold = prPath + s + 'film' + s + 'sequences' 46 | os.makedirs(sequenceFold + s + i) 47 | for j in seqFoldList: 48 | os.makedirs(sequenceFold + s + i + s + j) 49 | for d in dataFoldList: 50 | os.makedirs(sequenceFold + s + i + s + 'data' + s + d) 51 | for o in outFoldList: 52 | os.makedirs(sequenceFold + s + i + s + 'out' + s + o) 53 | shList = os.listdir(prPath + s + 'src' + s + i) 54 | for sh in shList: 55 | shFold = sequenceFold + s + i + s + 'shots' 56 | os.makedirs(shFold + s + sh) 57 | for f in shotFoldList: 58 | os.makedirs(shFold + s + sh + s + f) 59 | for ds in dataFoldList: 60 | os.makedirs(shFold + s + sh + s + 'data' + s + ds) 61 | for ot in outFoldList: 62 | os.makedirs(shFold + s + sh + s + 'out' + s + ot) 63 | shutil.move(prPath + s + 'src' + s + i + s + sh, shFold + s + sh + s + 'src') 64 | os.system('ln -sf ' + shFold + s + sh + s + 'src ' + prPath + s + 'src' + s + i + s + sh) 65 | 66 | addSrc() 67 | -------------------------------------------------------------------------------- /lib/base/project/projectUtil.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | from PyQt4.QtCore import * 5 | from PyQt4.QtGui import * 6 | from functools import partial 7 | from dBase import DBase 8 | import time 9 | 10 | class Projects(QDialog): 11 | 12 | def __init__(self, parent=None): 13 | super(Projects, self).__init__(parent) 14 | 15 | #Window title 16 | self.setWindowTitle("ProjectsUtil v0.001") 17 | 18 | #dBase connection 19 | self.db = DBase() 20 | self.projectsDict = self.db.getProjects() 21 | self.sequencesDict = {} 22 | 23 | #combo boxes 24 | self.projectsBox = QComboBox() 25 | self.sequencesBox = QComboBox() 26 | self.shotsBox = QComboBox() 27 | 28 | #combo boxes items 29 | self.projectsBox.addItems(self.projectsDict.keys()) 30 | 31 | #combo boxes connections 32 | self.connect(self.projectsBox, SIGNAL("currentIndexChanged(QString)"), self.updateSequences) 33 | self.connect(self.sequencesBox, SIGNAL("currentIndexChanged(QString)"), self.updateShots) 34 | 35 | #labels 36 | projectLabel = QLabel("Project:") 37 | sequenceLabel = QLabel("Sequence:") 38 | shotLabel = QLabel("Shot:") 39 | 40 | 41 | #layout 42 | layout = QGridLayout() 43 | 44 | layout.addWidget(projectLabel, 0, 0) 45 | layout.addWidget(self.projectsBox, 0, 1) 46 | layout.addWidget(sequenceLabel, 1, 0) 47 | layout.addWidget(self.sequencesBox, 1, 1) 48 | layout.addWidget(shotLabel, 2, 0) 49 | layout.addWidget(self.shotsBox, 2, 1) 50 | 51 | self.setLayout(layout) 52 | 53 | def updateSequences(self, projString): 54 | 55 | projName = unicode(projString) 56 | projId = self.projectsDict[projName] 57 | self.sequencesDict = self.db.getSequences(projId) 58 | self.sequencesBox.clear() 59 | self.sequencesBox.addItems(self.sequencesDict.keys()) 60 | 61 | def updateShots(self, seqString): 62 | 63 | if seqString: 64 | self.shotsBox.clear() 65 | seqName = unicode(seqString) 66 | seqId = self.sequencesDict[seqName] 67 | self.shotsBox.addItems(self.db.getShots(seqId).keys()) 68 | 69 | 70 | if __name__ == '__main__': 71 | app = QApplication(sys.argv) 72 | form = Projects() 73 | form.show() 74 | app.exec_() 75 | -------------------------------------------------------------------------------- /lib/base/project/test.py: -------------------------------------------------------------------------------- 1 | #from dBase import * 2 | from shotgun_api3 import Shotgun 3 | import os 4 | 5 | 6 | site = 'https://chimneypot.shotgunstudio.com' 7 | scriptName = 'dBase' 8 | scriptKey = '729a76955455909c79f6d90262bb9fbe9186b92b' 9 | pName = 'kievPipelineTest' 10 | sg = Shotgun(site, scriptName, scriptKey) 11 | 12 | lst = sg.find('HumanUser', [['updated_at', 'not_in_last', 1, 'MONTH'],['sg_status_list', 'is', 'act']], ['name', 'updated_at', 'sg_status_list']) 13 | for i in lst: 14 | print "%s: %s, %s, %s"%(i['name'],i['updated_at'], i['sg_status_list'], i['id']) 15 | 16 | killEric = sg.update('HumanUser', 62, {'sg_status_list':'dis'}) 17 | 18 | 19 | def test(): 20 | print 'huy' 21 | return sg 22 | 23 | -------------------------------------------------------------------------------- /lib/base/shotty/shotty-api.md: -------------------------------------------------------------------------------- 1 | # API examples (create read update delete) 2 | 3 | 4 | ## Dependencies 5 | Required: 6 | * [Slumber](https://github.com/dstufft/slumber) 7 | Install it with easy_install or pip 8 | ```` 9 | easy_install slumber 10 | ```` 11 | 12 | ## Quickstart 13 | 14 | ```` 15 | url = 'http://chimney.shotty.cc/api/v1/' 16 | api = slumber.API(url, auth=('shotty', 'chimney')) 17 | ```` 18 | 19 | ### Get project by short name 20 | Currently project creation is possible only via the web interface 21 | 22 | ```` 23 | project = api.project.get(slug='TST') 24 | ```` 25 | json output 26 | ```` 27 | { 28 | meta: { 29 | limit: 1000, 30 | next: null, 31 | offset: 0, 32 | previous: null, 33 | total_count: 1 34 | }, 35 | objects: [ 36 | { 37 | description: "", 38 | director: "Anton Mitrakhov", 39 | end_date: null, 40 | id: 2, 41 | kind: "0", 42 | name: "Test", 43 | poster: "/files/posters/post-85785-1345161467_1.jpg", 44 | pub_date: "2013-01-09T18:39:22", 45 | resource_uri: "/api/v1/project/2/", 46 | slug: "TST", 47 | start_date: null 48 | } 49 | ] 50 | } 51 | ```` 52 | 53 | 54 | 55 | ### Create Sequence for project 56 | ```` 57 | data = { 58 | 'name': 'FOO', 59 | 'description': 'Foo shots', 60 | 'bid': '', 61 | 'project': str(project['objects'][0]['resource_uri']) 62 | } 63 | 64 | api.sequence.post(data) 65 | 66 | ```` 67 | 68 | ### Get Sequence object 69 | 70 | ```` 71 | sequence = api.sequence.get(project=project['objects'][0]['resource_uri'], name='FOO') 72 | or 73 | sequence = api.sequence.get(project__slug='TST', name='FOO') 74 | ```` 75 | 76 | ### Create shot 77 | 78 | ```` 79 | data = { 80 | "name": '001_003', 81 | "description": 'Remove or add something!', 82 | "project":str(project['objects'][0]['resource_uri']), 83 | "scene": str(sequence['objects'][0]['resource_uri']), 84 | } 85 | 86 | shot = api.shot.post(data) 87 | ```` 88 | and you get shot FOO_001_003 89 | 90 | **FOO** - sequence name 91 | 92 | **001_003** shot id 93 | 94 | ### Get shots 95 | 96 | ```` 97 | shots = api.shot.get(project__slug='TST', scene__name='FOO') 98 | 99 | for shot in shots['objects']: 100 | scene = shot['scene']['name'].upper() 101 | shot_name = ('%s_%s') % (scene, shot['name']) 102 | print shot_name 103 | ```` 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /lib/base/shotty/shotty-create-project-dirs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import slumber 4 | from optparse import OptionParser 5 | 6 | 7 | parser = OptionParser() 8 | 9 | parser.add_option('--project', dest = 'project', default = None, help = 'project') 10 | parser.add_option('--sequence', dest = 'sequence', default = None, help = 'sequence') 11 | 12 | (options, args) = parser.parse_args() 13 | 14 | 15 | api = slumber.API("http://chimney.shotty.cc/api/v1/", auth=("shotty", "chimney")) 16 | 17 | 18 | shots = api.shot.get(project__slug=options.project, scene__name=options.sequence) 19 | 20 | 21 | print 'Total %i shots in project' % (shots['meta']['total_count']) 22 | 23 | 24 | for shot in shots['objects']: 25 | 26 | scene = shot['scene']['name'].upper() 27 | shot_name = ('%s_%s') % (scene, shot['name']) 28 | print shot_name 29 | 30 | 31 | pwd = os.getcwd() 32 | paths = [] 33 | dirs = ['dailies', 34 | 'hires', 35 | 'animation', 36 | 'tracking/proxy', 37 | 'scripts/nk', 38 | 'images/img', 39 | 'images/render', 40 | 'images/refs', 41 | 'images/tex', 42 | '3d/houdini', 43 | '3d/maya'] 44 | for i in dirs: 45 | paths.append(os.path.join(pwd, scene, shot['name'], i)) 46 | 47 | for item in paths: 48 | if not os.path.exists(item): 49 | os.makedirs(item) 50 | 51 | -------------------------------------------------------------------------------- /software/davinci/clips_to_timeline.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import time 3 | 4 | utc_offset = time.localtime()[3] - time.gmtime()[3] 5 | 6 | 7 | fps = 25 8 | 9 | media_pool = resolve.GetProjectManager().GetCurrentProject().GetMediaPool() 10 | clip_list = media_pool.GetCurrentFolder().GetClipList() 11 | 12 | 13 | clip_dict = {} 14 | 15 | for clip in clip_list: 16 | 17 | raw_clip_name = clip.GetName() 18 | 19 | # if clip belongs to Ochi 20 | 21 | if len(raw_clip_name.rsplit('.', 2)[-2]) == 3: 22 | 23 | raw_tc = raw_clip_name.rsplit('.', 2)[0].rsplit('_', 1)[-1].split('-') 24 | 25 | clip_name = raw_clip_name.rsplit('.', 2)[0] 26 | 27 | frame_tc = ( (int(raw_tc[0]) + utc_offset) * 3600 + int(raw_tc[1]) * 60 + int(raw_tc[2]) ) * fps 28 | 29 | duration = int(clip.GetClipProperty("frames")) 30 | 31 | clip_dict[clip_name] = [clip, duration, frame_tc] 32 | 33 | # if clip belongs to Vezha 34 | 35 | if len(raw_clip_name.rsplit('.', 2)[-2]) == 22: 36 | 37 | raw_tc = raw_clip_name.rsplit('.', 2)[-2].split('-')[0].split('_')[1:] 38 | 39 | clip_name = raw_clip_name.rsplit('.', 1)[0] 40 | 41 | frame_tc = (int(raw_tc[0]) * 3600 + int(raw_tc[1]) * 60 + int(raw_tc[2])) * fps 42 | 43 | duration = int(clip.GetClipProperty("frames")) 44 | 45 | clip_dict[clip_name] = [clip, duration, frame_tc] 46 | 47 | sc_dict = sorted(clip_dict.items(), key = lambda x: x[1][2]) 48 | 49 | sq_name = sc_dict[0][0] 50 | 51 | min_frame_tc = sc_dict[0][1][2] 52 | 53 | clip_timeline = media_pool.CreateEmptyTimeline(sq_name) 54 | 55 | track_number = 1 56 | 57 | for clip in sc_dict: 58 | 59 | timeline_clip = { 60 | 61 | "mediaPoolItem" : clip[1][0], 62 | "startFrame" : 0, 63 | "endFrame" : clip[1][1], 64 | "recordFrame" : clip[1][2] - min_frame_tc, 65 | "trackIndex" : track_number 66 | 67 | } 68 | 69 | media_pool.AppendToTimeline([timeline_clip]) 70 | 71 | clip_timeline.AddTrack("video") 72 | 73 | clip_timeline.AddTrack("audio") 74 | 75 | track_number += 1 76 | 77 | 78 | clip_timeline.DeleteTrack("video", track_number) 79 | 80 | clip_timeline.DeleteTrack("audio", track_number) 81 | -------------------------------------------------------------------------------- /software/houdini/HotkeyOverrides: -------------------------------------------------------------------------------- 1 | h.update_mode_always "Update Mode 'Always'" "Update mode 'Always'" F2 2 | h.update_mode_never "Update Mode 'Never'" "Update mode 'Never'" F3 3 | h.enable_sim "Enable/Disable Simulations" "Toggle cooking of simulations" F4 4 | 5 | h.pane.wsheet.tool:NullOut NullOut "Shelf Tool: NullOut" Alt+N 6 | h.pane.wsheet.tool:RopAndRead RopAndRead "Shelf Tool: RopAndRead" Alt+R 7 | h.pane.wsheet.tool:AfAndRead AfanasyAndRead "Shelf Tool: AfanasyAndRead" Alt+Ctrl+R 8 | h.pane.gview.tool:hideSelected "Hide Selected" "Shelf Tool: Hide Selected" Ctrl+H 9 | h.pane.gview.tool:unhideSelected "Unhide Selected" "Shelf Tool: Unhide Selected" Shift+H 10 | 11 | h.increment_and_save "Increment And Save" "Custom Menu Operation: Increment And Save" Alt+S -------------------------------------------------------------------------------- /software/houdini/MainMenuCommon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | ${HPIPE}/scripts/python/menu/cacheWriteMenu.py 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /software/houdini/MainMenuMaster.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file_menu 7 | 8 | 32 | file_menu_sep_2 33 | 34 | 35 | -------------------------------------------------------------------------------- /software/houdini/jump.pref: -------------------------------------------------------------------------------- 1 | $ASSETS/ 2 | $DATA/ 3 | $HOME/job.local/ 4 | $HOUDINI_TEMP_DIR/ 5 | $PROJECT/ 6 | $SEQUENCE/ 7 | $SHOT/ 8 | /mnt/data/resources/ 9 | /mnt/karramba/ 10 | /mnt/karramba/FishermansFriend/film/sequences/SQ01/shots/cherry/ 11 | /mnt/karramba/FishermansFriend/film/sequences/SQ01/shots/mint/ 12 | /mnt/karramba/FishermansFriend/film/sequences/SQ01/shots/spearmint/ 13 | /mnt/karramba/RangeRoverLowe/film/sequences/SQ01/shots/print01/ 14 | /mnt/karramba/RnD/film/ 15 | ASSETS/ 16 | DATA/ 17 | PROJECT/ 18 | SEQ/ 19 | SHOT/ 20 | -------------------------------------------------------------------------------- /software/houdini/scripts/python/asset_browser.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from PyQt4 import QtCore, QtGui 3 | from PyQt4.QtGui import * 4 | from ui_asset_browser import Ui_AssetBrowser 5 | # huy 2 6 | class AssetBrowserMain(QMainWindow, Ui_AssetBrowser): 7 | def __init__(self): 8 | QMainWindow.__init__(self) 9 | self.setupUi(self) 10 | #self.button2.clicked.connect(self.fill) 11 | 12 | def fill(self): 13 | button=self.sender() 14 | print button.text() 15 | self = self.label.setText("text") 16 | 17 | if __name__ == "__main__": 18 | import sys 19 | from PyQt4 import QtCore, QtGui 20 | from PyQt4.QtGui import * 21 | 22 | app = QtGui.QApplication(sys.argv) 23 | window = AssetBrowserMain() 24 | window.show() 25 | sys.exit(app.exec_()) -------------------------------------------------------------------------------- /software/houdini/scripts/python/asset_browser_functions.py: -------------------------------------------------------------------------------- 1 | from shotgun_api3 import Shotgun 2 | import os 3 | def getProjects(): 4 | 5 | site = 'https://chimneypot.shotgunstudio.com' 6 | scriptName = 'AssetBrowser' 7 | scriptKey = 'c35ab5f5322d4b1e8b6488bb315c03e5f38881ea' 8 | 9 | repo = '/mnt/karramba/' 10 | 11 | rootList = ['film', 'out', 'ref', 'src', 'temp'] 12 | filmList = ['assets', 'sequences'] 13 | assetList = ['light', 'material', 'mattepaint', 'model', 'rig', 'shader', 'textures'] 14 | shotList = ['anim', 'comp', 'data', 'fx', 'light', 'out', 'src', 'tmp'] 15 | sqList = ['anim', 'comp', 'data', 'fx', 'light', 'out', 'shots'] 16 | dataList = ['cache', 'geo', 'render', 'shadowmap', 'sim', 'track', 'photonmap'] 17 | outList = ['dailies', 'hires'] 18 | 19 | prName = raw_input('Print project name:') 20 | 21 | prPath = repo + prName 22 | 23 | if not os.path.exists(prPath): 24 | os.mkdir(prPath) 25 | for i in rootList: 26 | os.makedirs(prPath + os.sep + i) 27 | for i in filmList: 28 | os.makedirs(prPath + os.sep + 'film' + os.sep + i) 29 | for i in assetList: 30 | os.makedirs(prPath + os.sep + 'film' + os.sep + 'assets' + os.sep + i) 31 | for i in outList: 32 | os.makedirs(prPath + os.sep + 'out' + os.sep + i) 33 | 34 | sg = Shotgun(site, scriptName, scriptKey) 35 | sg.create('Project', {'name':prName}) 36 | 37 | -------------------------------------------------------------------------------- /software/houdini/scripts/python/menu/cacheWriteMenu.py: -------------------------------------------------------------------------------- 1 | import cache_utils 2 | reload(cache_utils) 3 | import string 4 | 5 | 6 | formatIndex = hou.ui.selectFromList(choices = ['Alembic', 'Houdini bgeo'], default_choices = (0,), exclusive = True, title = 'Select Format') 7 | if formatIndex: format = '' 8 | 9 | if not format: 10 | if formatIndex[0] == 0: format = 'abc' 11 | if formatIndex[0] == 1: format = 'bgeo' 12 | 13 | rfstart = int(hou.playbar.playbackRange()[0]) 14 | rfend = int(hou.playbar.playbackRange()[1]) 15 | 16 | i, buff = hou.ui.readMultiInput("Input framerange and increment", ("Start","End", "Samples"),title = "Write Objects To Cache", buttons = ('Version', 'Overwrite', 'Cancel'), default_choice = 0, close_choice = 2, initial_contents = ( str(rfstart), str(rfend), '1' ) ) 17 | if i == 0: cache_utils.cacheWrite(int(buff[0]),int(buff[1]), int(buff[2]), format, 'version' ) 18 | if i == 1: cache_utils.cacheWrite(int(buff[0]),int(buff[1]), int(buff[2]), format, 'overwrite' ) 19 | -------------------------------------------------------------------------------- /software/houdini/scripts/python/pyqt_houdini.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module helps you use PyQt in Houdini's GUI by integrating PyQt's event 3 | loop into Houdini's. Replace calls to QApplication.exec_() in your 4 | code with calls to pyqt_houdini.exec_(app). 5 | """ 6 | 7 | import hou 8 | from PyQt4 import QtCore 9 | from PyQt4 import QtGui 10 | 11 | class IntegratedEventLoop(object): 12 | """This class behaves like QEventLoop except it allows PyQt to run inside 13 | Houdini's event loop on the main thread. You probably just want to 14 | call exec_() below instead of using this class directly. 15 | """ 16 | def __init__(self, application, dialogs): 17 | # We need the application to send posted events. We hold a reference 18 | # to any dialogs to ensure that they don't get garbage collected 19 | # (and thus close in the process). The reference count for this object 20 | # will go to zero when it removes itself from Houdini's event loop. 21 | self.application = application 22 | self.dialogs = dialogs 23 | self.event_loop = QtCore.QEventLoop() 24 | 25 | def exec_(self): 26 | hou.ui.addEventLoopCallback(self.processEvents) 27 | 28 | def processEvents(self): 29 | # There is no easy way to know when the event loop is done. We can't 30 | # use QEventLoop.isRunning() because it always returns False since 31 | # we're not inside QEventLoop.exec_(). We can't rely on a 32 | # lastWindowClosed signal because the window is usually made invisible 33 | # instead of closed. Instead, we need to explicitly check if any top 34 | # level widgets are still visible. 35 | if not anyQtWindowsAreOpen(): 36 | hou.ui.removeEventLoopCallback(self.processEvents) 37 | 38 | self.event_loop.processEvents() 39 | self.application.sendPostedEvents(None, 0) 40 | 41 | def anyQtWindowsAreOpen(): 42 | return any(w.isVisible() for w in QtGui.QApplication.topLevelWidgets()) 43 | 44 | def exec_(application, *args): 45 | """You cannot call QApplication.exec_, or Houdini will freeze while PyQt 46 | waits for and processes events. Instead, call this function to allow 47 | Houdini's and PyQt's event loops to coexist. Pass in any dialogs as 48 | extra arguments, if you want to ensure that something holds a reference 49 | to them while the event loop runs. 50 | 51 | This function returns right away. 52 | """ 53 | IntegratedEventLoop(application, args).exec_() 54 | 55 | def execSynchronously(application, *args): 56 | """This function is like exec_, except it will not return until all PyQt 57 | windows have closed. Houdini will remain responsive while the PyQt window 58 | is open. 59 | """ 60 | exec_(application, *args) 61 | hou.ui.waitUntil(lambda: not anyQtWindowsAreOpen()) -------------------------------------------------------------------------------- /software/houdini/scripts/python/pyqt_thread_helper.py: -------------------------------------------------------------------------------- 1 | import threading 2 | 3 | """ 4 | This module helps you use PyQt in Houdini's GUI. 5 | 6 | Rules when using multiple threads: 7 | - Don't directly run code that accesses PyQt. Instead, call queueCommand 8 | to queue a command to run on the thread dedicated to PyQt apps. 9 | - Don't import PyQt4 from any code that isn't running on the PyQt thread. 10 | - Don't create QtGui.QApplication's. Instead, call getApplication. 11 | - Don't write/print anything to stdout/stderr (at least not when there's a 12 | Python shell open in Houdini), or Houdini will hang. 13 | """ 14 | 15 | # Set this variable to False to run PyQt in the main thread. If it runs in 16 | # the main thread, the rest of Houdini will be blocked until the application 17 | # ends. 18 | use_separate_thread = True 19 | 20 | __command_queue = [] 21 | __command_queue_lock = threading.Lock() 22 | __command_queue_event = threading.Event() 23 | 24 | __pyqt_thread = None 25 | def queueCommand(callable, arguments=()): 26 | """Queue up a command to run on the PyQt thread.""" 27 | if use_separate_thread == False: 28 | callable(*arguments) 29 | return 30 | 31 | # Start up the PyQt thread if it's not already running. 32 | global __pyqt_thread 33 | if __pyqt_thread is None: 34 | __pyqt_thread = threading.Thread(target=__pyQtThreadMain) 35 | __pyqt_thread.start() 36 | 37 | __command_queue_lock.acquire() 38 | __command_queue.append((callable, arguments)) 39 | __command_queue_lock.release() 40 | 41 | # Signal the PyQt thread to run the task. 42 | __command_queue_event.set() 43 | 44 | def __pyQtThreadMain(): 45 | """This function is the starting point for the PyQt thread.""" 46 | 47 | # It's important that we import PyQt4 only from the PyQt thread, and not 48 | # from another thread. 49 | from PyQt4 import QtCore 50 | from PyQt4 import QtGui 51 | 52 | while True: 53 | # Wait for the main thread to signal us. 54 | __command_queue_event.wait() 55 | 56 | # Remove the command from the stack and reset the event. 57 | __command_queue_lock.acquire() 58 | command = __command_queue.pop() 59 | __command_queue_event.clear() 60 | __command_queue_lock.release() 61 | 62 | # Run the command. 63 | command[0].__call__(*command[1]) 64 | 65 | __pyqt_app = None 66 | def getApplication(): 67 | """Return the QtGui.QApplication. Use this function instead of creating 68 | PyQt threads manually. Do not call this function from anything other 69 | than the PyQt thread.""" 70 | # This function may only be called from the PyQt thread. 71 | from PyQt4 import QtCore 72 | from PyQt4 import QtGui 73 | 74 | # We're careful not to create more than one QApplication. 75 | global __pyqt_app 76 | if __pyqt_app is None: 77 | __pyqt_app = QtGui.QApplication(['houdini']) 78 | return __pyqt_app 79 | 80 | -------------------------------------------------------------------------------- /software/houdini/scripts/python/serutil.py: -------------------------------------------------------------------------------- 1 | import hou 2 | def keyRight(path): 3 | for node in hou.selectedNodes(): 4 | m=None 5 | m=node.parm("Master") 6 | if m!=None: 7 | if m.eval()==path: return 1 8 | return 0 9 | def trAutoShow(): 10 | if hou.node("/obj/Trajectories")!=None: 11 | hou.hscript("undoctrl off") 12 | if len(hou.selectedNodes())>0: 13 | for obj in hou.node("/obj/Trajectories").children(): 14 | #t=None 15 | t=obj.parm("Object_Trajectory") 16 | if (hou.node(t.eval()).isSelected()==1) or (keyRight(t.eval())==1): 17 | if obj.isDisplayFlagSet()==0: obj.setDisplayFlag(1) 18 | dcolor=hou.node(obj.parm("Object_Trajectory").eval()).parmTuple("dcolor").eval() 19 | if dcolor!=obj.parmTuple("Trajectory_Color").eval(): 20 | obj.setParms({"Trajectory_Colorr":dcolor[0],"Trajectory_Colorg":dcolor[1],"Trajectory_Colorb":dcolor[2]}) 21 | else: 22 | if obj.isDisplayFlagSet()==1: obj.setDisplayFlag(0) 23 | else: 24 | for obj in hou.node("/obj/Trajectories").children(): 25 | if obj.isDisplayFlagSet()==1: obj.setDisplayFlag(0) 26 | hou.hscript("undoctrl on") 27 | def autobacker(): 28 | import hou, shutil, time 29 | locTime=time.localtime() 30 | if (time.time()%60<0.6) and (hou.hipFile.hasUnsavedChanges()==True): 31 | path=hou.hipFile.path() 32 | if path[len(path)-11:len(path)]!='_backup.hip': 33 | nPath=(path[0:(len(path)-4)]+"_backup.hip") 34 | else: nPath=path 35 | hou.hipFile.save(nPath,False) 36 | endSl=nPath.rfind("/")+1 37 | min=str(locTime[4]) 38 | if len(min)==1: min="0"+min 39 | fName=nPath[endSl:len(nPath)-4]+"_"+str(locTime[7])+"_day"+"_"+str(locTime[3])+"."+min+"m.hip" 40 | shutil.copy(nPath,"C:/Users/cg15/Documents/houdini11.0/backup/"+fName) -------------------------------------------------------------------------------- /software/houdini/soho/IFDuserhooks.py: -------------------------------------------------------------------------------- 1 | ''' 2 | IFDuserhooks.py 3 | A simple example to illustrate the IFDhooks features 4 | ''' 5 | import traceback 6 | from IFDapi import * 7 | import math 8 | import os 9 | import re 10 | import hou 11 | import soho 12 | from soho import SohoParm 13 | 14 | ifdcodeParms = { 15 | 'vm_ifdcode' : SohoParm('vm_ifdcode', 'string', [''], False), 16 | } 17 | 18 | def processInclude(filename): 19 | 20 | if filename: 21 | if filename.find(' ') >= 0: 22 | ray_comment('Inline include (value has spaces)') 23 | #soho.indent() 24 | print filename 25 | ray_comment('End of Inline include') 26 | else: 27 | try: 28 | fp = open(filename, 'r') 29 | ray_comment('Include file: %s' % filename) 30 | for line in fp.readlines(): 31 | #soho.indent() 32 | sys.stdout.write(hou.expandString(line)) 33 | ray_comment('End of include file: %s' % filename) 34 | except: 35 | ray_comment('Error processing include file: %s' % filename) 36 | return True 37 | 38 | return False 39 | 40 | 41 | 42 | def pre_outputInstance(obj, now): 43 | plist = obj.evaluate(ifdcodeParms, now) 44 | ifdcode = plist['vm_ifdcode'] 45 | if ifdcode: 46 | return processInclude(ifdcode.Value[0]) 47 | 48 | return False 49 | 50 | 51 | 52 | ''' List of hooks in this file ''' 53 | _HOOKS = { 54 | 'pre_outputInstance' : pre_outputInstance, 55 | } 56 | 57 | def call(name='', *args, **kwargs): 58 | ''' Hook callback function ''' 59 | method = _HOOKS.get(name, None) 60 | if method: 61 | try: 62 | if method(*args, **kwargs): 63 | return True 64 | else: 65 | return False 66 | except Exception, err: 67 | ray_comment('Hook Error[%s]: %s %s' % (name, __file__, str(err))) 68 | ray_comment('Traceback:\n# %s\n' % 69 | '\n#'.join(traceback.format_exc().split('\n'))) 70 | return False -------------------------------------------------------------------------------- /software/houdini/soho/parameters/IFDmantra11.0.user.ds: -------------------------------------------------------------------------------- 1 | parm { 2 | name vm_ifdcode 3 | label "IFD Code" 4 | parmtag { spare_category "Geometry" } 5 | parmtag { filechooser_mode "write" } 6 | type file 7 | default { "" } 8 | help "Insert this IFD code and ignore SOP's geometry and procedural" 9 | } -------------------------------------------------------------------------------- /software/houdini/toolbar/realflow.shelf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /software/houdini/vex/VEXdso: -------------------------------------------------------------------------------- 1 | VEX_Ocean.so 2 | -------------------------------------------------------------------------------- /software/houdini/vex/include/gaussian.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | 3 | #ifndef __gaussian__ 4 | #define __gaussian__ 5 | 6 | /// Evaluates the one dimensional gaussian function defined by a,b and c 7 | /// at position x. a is the height of the peak, b is the centre of the peak 8 | /// and c controls the width of the bell. 9 | float gaussian( float a; float b; float c; float x ) 10 | { 11 | float o = x - b; 12 | return a * exp( - o * o / ( 2 * c * c ) ); 13 | } 14 | 15 | /// Computes the a, b and c parameters for a normalized gaussian pdf with the mean 16 | /// specified by mu and a variance corresponding to sigma squared. This can then be 17 | /// evaluated using the ieGaussian function above. 18 | float gaussianPDF( float mu; float sigma; float a; float b; float c ) 19 | { 20 | return a = 1 / ( sigma * sqrt( 2 * PI ) ); 21 | return b = mu; 22 | return c = sigma; 23 | } 24 | 25 | /// Computes the gaussian which is the product of the two gaussians a1,b1,c1 and a2,b2,c2. The parameters 26 | /// for the result are placed in a,b and c, and may then be evaluated using the ieGaussian method above. 27 | /// Taken from http://ccrma.stanford.edu/~jos/sasp/Gaussians_Closed_under_Multiplication.html. 28 | float gaussianProduct( float a1, b1, c1, a2, b2, c2, a, b, c ) 29 | { 30 | float C1 = -b1; 31 | float C2 = -b2; 32 | float P1 = 1 / ( 2 * c1 * c1 ); 33 | float P2 = 1 / ( 2 * c2 * c2 ); 34 | 35 | float P = P1 + P2; 36 | float C = (P1*C1 + P2*C2) / P; 37 | float CC = C1 - C2; 38 | 39 | return a = a1 * a2 * exp( -P1 * P2 * CC * CC / P ); 40 | return b = -C; 41 | return c = sqrt( 1 / ( 2 * P ) ); 42 | } 43 | 44 | /// Returns the area under the specified gaussian. 45 | float gaussianIntegral( float a, b, c ) 46 | { 47 | return a * c * sqrt( 2 * PI ); 48 | } 49 | 50 | #endif // __gaussian__ 51 | -------------------------------------------------------------------------------- /software/houdini/vex/include/utils.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | 3 | #ifndef __utils__ 4 | #define __utils__ 5 | 6 | #include "voplib.h" 7 | 8 | 9 | vector linear( vector input ){ 10 | return pow(input, 1/0.45); 11 | } 12 | 13 | /* 14 | float mod(float aa; float bb){ 15 | float rem = aa % bb; 16 | if (rem < 0) rem += bb; 17 | return rem; 18 | } 19 | */ 20 | 21 | vector hsvshift( vector input; float hueShift, satShift, valueShift){ 22 | 23 | if(abs(hueShift) + abs(satShift) + abs(valueShift) > 0 ){ 24 | vector inputHSV = rgbtohsv(input); 25 | return hsvtorgb(inputHSV.x + hueShift, inputHSV.y + satShift, inputHSV.z + valueShift); 26 | } 27 | else return input; 28 | 29 | } 30 | 31 | 32 | vector smoothnoise(vector pos; float freq, cutoff, rolloff){ 33 | vector smoothedNoise; 34 | setcomp(smoothedNoise, smooth( getcomp(noise(pos * freq), 0), cutoff, rolloff), 0); 35 | setcomp(smoothedNoise, smooth( getcomp(noise(pos * freq), 1), cutoff, rolloff), 1); 36 | setcomp(smoothedNoise, smooth( getcomp(noise(pos * freq), 2), cutoff, rolloff), 2); 37 | 38 | return fit(smoothedNoise, {0, 0, 0}, {1, 1, 1}, {-1, -1, -1}, {1, 1, 1} ); 39 | } 40 | 41 | vector fitvector(vector input; float oldMin, oldMax, newMin, newMax;){ 42 | return fit(input, set(oldMin, oldMin, oldMin), set(oldMax, oldMax, oldMax), set(newMin, newMin, newMin), set(newMax, newMax, newMax)); 43 | } 44 | #endif // __utils__ 45 | -------------------------------------------------------------------------------- /software/maya/maya.var: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | umask 0000 3 | 4 | OSNAME=`uname` 5 | echo $OSNAME 6 | 7 | 8 | if [ $OSNAME == "Linux" ] 9 | then 10 | export MPIPE=${CPIPELINE}/software/maya 11 | export PYTHONPATH=${MPIPE}/scripts/python:${PYTHONPATH} 12 | export MAYA_SCRIPT_PATH=${MPIPE}/scripts/mel:${MAYA_SCRIPT_PATH} 13 | 14 | fi 15 | -------------------------------------------------------------------------------- /software/maya/scripts/mel/CMenu.mel: -------------------------------------------------------------------------------- 1 | global proc CMenu() 2 | { 3 | global string $showCMenuCtrl; 4 | if (`menu -exists $showCMenuCtrl`) 5 | deleteUI $showCMenuCtrl; 6 | string $name = "CPipeline"; 7 | global string $gMainWindow; 8 | $showCMenuCtrl = `menu -p $gMainWindow -to true -l $name`; 9 | menuItem -l "Export Selection To Alembic ..." -ecr 0 -c "python(\"import file_utils; reload(file_utils); file_utils.exportAbcXml();\");" -ann "exportAbcXml"; 10 | menuItem -l "Export Selection To Obj" -ecr 0 -c "python(\"import file_utils; reload(file_utils); file_utils.exportSelectedToObj();\");" -ann "exportSelectedToObj"; 11 | menuItem -l "Export Selection To MDD" -ecr 0 -c "python(\"import fx_mdd_obj_exporter; reload(fx_mdd_obj_exporter); fx_mdd_obj_exporter.runUI();\");" -ann "exportSelectedToMDD"; 12 | } 13 | ; 14 | editMenuUpdate MayaWindow|mainEditMenu; 15 | CMenu; 16 | setFocus `paneLayout -query -pane1 viewPanes`; 17 | editMenuUpdate MayaWindow|mainEditMenu; -------------------------------------------------------------------------------- /software/maya/scripts/mel/userSetup.mel: -------------------------------------------------------------------------------- 1 | {CMenu;} 2 | //source CMenu.mel; 3 | 4 | if(!`pluginInfo -query -l -n AbcImport`) loadPlugin "AbcImport"; 5 | if(!`pluginInfo -query -l -n AbcExport`) loadPlugin "AbcExport"; -------------------------------------------------------------------------------- /software/maya/scripts/python/common_utils.py: -------------------------------------------------------------------------------- 1 | from pymel.core import * 2 | 3 | def bakeObjectAnimToWorld(object, startFrame, endFrame): 4 | try: 5 | object[0] 6 | except IndexError: 7 | warning('Select Object for Baking') 8 | else: 9 | 10 | camBake = duplicate(name = ''.join([object[0].name(), '_bake']))[0] 11 | if camBake.getParent() != None: 12 | parent(camBake, world = True) 13 | camBake.setTranslation( (0, 0, 0), space='world' ) 14 | camBake.setRotation( (0, 0, 0), space='world' ) 15 | pointCon = pointConstraint(object, camBake) 16 | orientCon = orientConstraint(object, camBake) 17 | bakeResults(camBake, attribute = ('translate', 'rotate'), time = (startFrame, endFrame) ) 18 | delete(pointCon, orientCon) 19 | 20 | 21 | def assignWarningShader(node): 22 | surface = createNode('lambert', name = node.name() + '_Surface') 23 | surface.color.set([1, 0, 0]) 24 | shader = sets( renderable=True, noSurfaceShader=True, empty=True, name=node.name() + '_Shader' ) 25 | connectAttr(surface.name() + '.outColor', shader.name() + '.surfaceShader') 26 | sets(shader.name(), forceElement = node.name()) 27 | 28 | def analyzeStruct(rootNode): 29 | if not rootNode.getShape() and not rootNode.getParent(): 30 | struct = rootNode.listRelatives(allDescendents = True, type = 'transform') 31 | for node in struct: 32 | nodeNameIdent = node.name().split('_') 33 | #test group node 34 | if not node.getShape() and len(nodeNameIdent) == 2: 35 | if not nodeNameIdent[0] == 'g': 36 | select(node) 37 | warning(''.join(['[', node.name(), ']', ' - ', 'Transform have wrong prefix']) ) 38 | elif len(nodeNameIdent) == 4: 39 | print 'a', node.name() 40 | sets('initialShadingGroup', forceElement = node.name()) 41 | else: 42 | assignWarningShader(node) 43 | 44 | else: 45 | warning('It not Root Node') 46 | 47 | #for x in ls( type='transform'): 48 | analyzeStruct(selected()[0]) 49 | -------------------------------------------------------------------------------- /software/maya/scripts/python/common_utils_gui.py: -------------------------------------------------------------------------------- 1 | from pymel.core import * 2 | import common_utils 3 | 4 | def bakeObjectAnimToWorldGui(): 5 | try: 6 | window(bakeObjectAnimToWorldWin, exists = True) 7 | except NameError: 8 | bakeObjectAnimToWorldWin = window(title = 'Bake Object Animation', widthHeight = (300, 100)) 9 | 10 | if window(bakeObjectAnimToWorldWin, exists = True): 11 | deleteUI(bakeObjectAnimToWorldWin) 12 | 13 | bakeObjectAnimToWorldWin = window(title = 'Bake Object Animation', widthHeight = (300, 100)) 14 | columnLayout(adjustableColumn = True) 15 | startFrameFF = floatField(ann = 'Start Frame', precision = 0, step = 1, value = playbackOptions(query = True, minTime = True), width = 20) 16 | endFrameFF = floatField(ann = 'End Frame', precision = 0, step = 1, value = playbackOptions(query = True, maxTime = True), width = 20) 17 | 18 | button(label = 'Bake',command = ('common_utils.bakeObjectAnimToWorld(selected(), startFrameFF.getValue(), endFrameFF.getValue())') ) 19 | 20 | setParent('..') 21 | showWindow(bakeObjectAnimToWorldWin) -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/AEpremult.gizmo: -------------------------------------------------------------------------------- 1 | ### AEpremult v0.1 2 | ### kostia@rukavitsin.com 3 | # 4 | # 5 | #! /opt/Nuke515_64/Nuke5 -nx 6 | version 5.1500 7 | Gizmo { 8 | tile_color 0xa55cff 9 | addUserKnob {20 bgcolor l "BG color"} 10 | addUserKnob {41 color l Color T Constant1.color} 11 | addUserKnob {41 format l Format T Constant1.format} 12 | } 13 | Input { 14 | inputs 0 15 | name Input1 16 | xpos -468 17 | ypos -151 18 | } 19 | set N1eb2e650 [stack 0] 20 | push $N1eb2e650 21 | Constant { 22 | inputs 0 23 | channels rgb 24 | color 0.5 25 | name Constant1 26 | xpos -297 27 | ypos -243 28 | } 29 | ShuffleCopy { 30 | inputs 2 31 | name ShuffleCopy1 32 | xpos -297 33 | ypos -151 34 | } 35 | Invert { 36 | channels {-rgba.red -rgba.green -rgba.blue rgba.alpha} 37 | name Invert1 38 | xpos -297 39 | ypos -122 40 | } 41 | Premult { 42 | name Premult1 43 | xpos -297 44 | ypos -79 45 | } 46 | Merge2 { 47 | inputs 2 48 | operation minus 49 | bbox B 50 | Bchannels {rgba.red rgba.green rgba.blue -rgba.alpha} 51 | name Merge1 52 | xpos -297 53 | ypos -50 54 | } 55 | Output { 56 | name Output1 57 | xpos -297 58 | ypos -3 59 | } 60 | end_group 61 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/AutoIBK.py: -------------------------------------------------------------------------------- 1 | def IBKAuto (): 2 | selNode = nuke.selectedNode() 3 | ibkCol = nuke.nodes.IBKColourV3() 4 | ibkGiz = nuke.nodes.IBKGizmoV3() 5 | ibkGiz.setInput(0,selNode) 6 | ibkGiz.setInput(1,ibkCol) 7 | ibkCol.knob('ypos').setValue(ibkCol.knob('ypos').value()) 8 | ibkCol.knob('xpos').setValue(ibkCol.knob('xpos').value() - 150) 9 | 10 | nuke.menu("Nodes").addCommand("Keyer/IBKAuto", "IBKAuto()", icon="IBKGizmo.png") -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/AutoProxy.py: -------------------------------------------------------------------------------- 1 | def AutoProxy(): 2 | input=nuke.selectedNodes("Read") 3 | n=0 4 | for node in input: 5 | 6 | 7 | #creates output path 8 | path=node.knob ("file").getValue() 9 | npicture=path.split("/")[-1].rsplit(".", 1)[0]+".jpg" 10 | ppath="/".join(path.split("/")[0:-1])+"/proxy" 11 | if not os.path.exists(ppath): 12 | os.mkdir(ppath) 13 | outpath=ppath+"/"+npicture 14 | 15 | #creates render range 16 | outfirst=node.knob ("first").getValue() 17 | outlast=node.knob ("last").getValue() 18 | 19 | #creates write output 20 | output=nuke.createNode ("Write") 21 | nname=output.knob ("name") 22 | oname="Write"+"_"+str(n) 23 | nname.setValue (oname) 24 | opath=output.knob ("file") 25 | opath.setValue (outpath) 26 | output.setInput (0, node) 27 | quality=output.knob ("_jpeg_quality") 28 | quality.setValue(1) 29 | nuke.render (oname, start=int(outfirst), end=int(outlast), incr=1) 30 | n+=1 31 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/BlueSupress.gizmo: -------------------------------------------------------------------------------- 1 | #! /opt/Nuke5/Nuke5 -nx 2 | version 5.1000 3 | Gizmo { 4 | name BlueSupress1 5 | 6 | addUserKnob {20 Suppression} 7 | # addUserKnob {41 expr2 l = T supress_blue.expr2} 8 | addUserKnob {26 "" T "Supresses blue from bluescreen footage"} 9 | 10 | } 11 | Input { 12 | inputs 0 13 | name bluescreen 14 | xpos 0 15 | ypos -50 16 | } 17 | Expression { 18 | expr0 r 19 | expr1 g 20 | expr2 g<=r?(b>g?g:b):(b>g?(g+(g-r)):b) 21 | name supress_blue 22 | xpos 0 23 | ypos 0 24 | } 25 | Output { 26 | name Output1 27 | xpos 0 28 | ypos 50 29 | } 30 | end_group 31 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/CacheD1.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke5/Nuke5.exe -nx 2 | version 5.0 3 | Gizmo { 4 | name cache_D1 5 | tile_color 0xff00ff 6 | note_font "Verdana Bold" 7 | note_font_size 14 8 | selected true 9 | addUserKnob {20 cache_controls l Controls} 10 | addUserKnob {3 pan_v l "Vertical Pan"} 11 | addUserKnob {3 cache l "Cache Size"} 12 | cache 73 13 | addUserKnob {41 color l "Cache Color" T Rectangle1.color} 14 | } 15 | Input { 16 | inputs 0 17 | name Input1 18 | xpos -552 19 | ypos 245 20 | } 21 | Reformat { 22 | type "to box" 23 | box_width 720 24 | box_height 576 25 | box_fixed true 26 | box_pixel_aspect 1.067 27 | resize none 28 | center false 29 | name Reformat01 30 | label "PAL D1" 31 | xpos -552 32 | ypos 309 33 | } 34 | set C10e75f90 [stack 0] 35 | Transform { 36 | translate {0 {pan_v i}} 37 | center {{width/2 i} {height/2 i}} 38 | name frame_shift 39 | label "vertical movement" 40 | xpos -552 41 | ypos 348 42 | } 43 | clone $C10e75f90 { 44 | xpos -552 45 | ypos 387 46 | selected false 47 | } 48 | Rectangle { 49 | output {rgba.red rgba.green rgba.blue -rgba.alpha} 50 | cliptype bbox 51 | invert true 52 | invert_mask true 53 | area {0 {cache i} 720 {height-this.y i}} 54 | color 0 55 | name Rectangle1 56 | label "color cache" 57 | xpos -552 58 | ypos 426 59 | } 60 | Shuffle { 61 | alpha white 62 | name Shuffle01 63 | label "erase alpha" 64 | xpos -552 65 | ypos 465 66 | } 67 | Output { 68 | name Output1 69 | xpos -552 70 | ypos 550 71 | } 72 | end_group 73 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/ChangeMissingFrame.py: -------------------------------------------------------------------------------- 1 | import nuke 2 | def change_Missing(): 3 | 4 | panel = nuke.Panel("Change Missing Frame Option") 5 | panel.addBooleanCheckBox("selectedNodes only", "0 1") 6 | panel.addEnumerationPulldown("missing frames", "error black checkerboard nearestframe") 7 | panel.show() 8 | m = panel.value("missing frames") 9 | n =panel.value("selectedNodes only") 10 | if n == True: 11 | for i in nuke.selectedNodes(): 12 | i.knob("on_error").setValue(m) 13 | 14 | else: 15 | for a in nuke.allNodes("Read"): 16 | a.knob("on_error").setValue(m) 17 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/ColorPreMult.gizmo: -------------------------------------------------------------------------------- 1 | #! /opt/Nuke502/Nuke5 -nx 2 | version 5.0200 3 | Gizmo { 4 | } 5 | Input { 6 | inputs 0 7 | name Input1 8 | xpos -935 9 | ypos 56 10 | } 11 | Dot { 12 | name Dot54 13 | xpos -901 14 | ypos 121 15 | } 16 | set Nc6f23c8 [stack 0] 17 | Dot { 18 | name Dot55 19 | xpos -977 20 | ypos 121 21 | } 22 | Bezier { 23 | cliptype bbox 24 | replace true 25 | maskChannel -rgba.alpha 26 | points {{ 27 | {-1769 -4111 0 2.64} 28 | {-1411.6 77428.5 0 0.48} 29 | {147560 77340 0 -0.5} 30 | {147605 -4111.6 0 -2.66} 31 | }} 32 | shape {} 33 | center {512 256} 34 | color 0.5 35 | name Bezier1 36 | xpos -1011 37 | ypos 139 38 | } 39 | set Nc6f2628 [stack 0] 40 | Viewer { 41 | fps 25 42 | name Viewer1 43 | xpos -1174 44 | ypos 139 45 | } 46 | push $Nc6f23c8 47 | Dot { 48 | name Dot48 49 | xpos -901 50 | ypos 180 51 | } 52 | set Nc940b08 [stack 0] 53 | Dot { 54 | name Dot49 55 | xpos -901 56 | ypos 288 57 | } 58 | set Ne4fdb28 [stack 0] 59 | Dot { 60 | name Dot53 61 | xpos -901 62 | ypos 324 63 | } 64 | push $Ne4fdb28 65 | push $Nc940b08 66 | push $Nc6f2628 67 | Copy { 68 | inputs 2 69 | from0 rgba.alpha 70 | to0 rgba.alpha 71 | name Copy1 72 | xpos -1011 73 | ypos 168 74 | } 75 | Invert { 76 | channels alpha 77 | name Invert1 78 | xpos -1011 79 | ypos 211 80 | } 81 | Premult { 82 | name Premult1 83 | xpos -1011 84 | ypos 254 85 | } 86 | Merge2 { 87 | inputs 2 88 | operation minus 89 | name Merge1 90 | xpos -1011 91 | ypos 283 92 | } 93 | Copy { 94 | inputs 2 95 | from0 rgba.alpha 96 | to0 rgba.alpha 97 | name Copy2 98 | xpos -1011 99 | ypos 312 100 | } 101 | Output { 102 | name Output1 103 | selected true 104 | xpos -1011 105 | ypos 389 106 | } 107 | end_group 108 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/CoreMatte.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke502/nuke5.exe -nx 2 | version 5.0200 3 | Gizmo { 4 | addUserKnob {20 corematte l "Matte controls"} 5 | addUserKnob {41 size_eode l Erode T Erode1.size} 6 | addUserKnob {41 size_blur l Blur T Blur1.size} 7 | } 8 | Input { 9 | inputs 0 10 | name Input1 11 | xpos -479 12 | ypos 161 13 | } 14 | set N11b411f8 [stack 0] 15 | Dot { 16 | name Dot3 17 | xpos -445 18 | ypos 236 19 | } 20 | set N11402cc8 [stack 0] 21 | Erode { 22 | size 1.86843 23 | name Erode1 24 | xpos -382 25 | ypos 226 26 | } 27 | Blur { 28 | channels alpha 29 | size 4 30 | name Blur1 31 | xpos -382 32 | ypos 265 33 | } 34 | Dot { 35 | name Dot4 36 | xpos -348 37 | ypos 324 38 | } 39 | push $N11402cc8 40 | Merge2 { 41 | inputs 2 42 | operation max 43 | Bchannels alpha 44 | name Max 45 | xpos -479 46 | ypos 320 47 | } 48 | Output { 49 | name Output1 50 | xpos -479 51 | ypos 413 52 | } 53 | push $N11b411f8 54 | Viewer { 55 | name Viewer1 56 | xpos -479 57 | ypos 188 58 | } 59 | end_group 60 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/DejaVuSansCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRIPTS/DejaVuSansCondensed.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/FHcheck.py: -------------------------------------------------------------------------------- 1 | def FH(): 2 | n = nuke.selectedNodes() 3 | for i in n: 4 | f = nuke.createNode('FrameHold') 5 | f.knob('first_frame').setValue(i.knob('first').getValue()) 6 | f.setInput(0, i) 7 | f.knob('ypos').setValue(i.knob('ypos').getValue() + 20) -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/FakeMotionBlur.gizmo: -------------------------------------------------------------------------------- 1 | ####################################################### 2 | # 3 | # FakeMotionBlur v0.1 4 | # kostia@rukavitsin.com 5 | # This gismo operates with EXR image contained the following VRayVelocity pass 6 | # 7 | ####################################################### 8 | #! /opt/Nuke5/Nuke5 -nx 9 | 10 | version 5.0000 11 | Gizmo { 12 | name FakeMoBlur1 13 | tile_color 0xffff 14 | label v0.1 15 | selected true 16 | xpos -185 17 | ypos -43 18 | 19 | help "This gizmo requires EXR with VRayVelocity pass" 20 | 21 | addUserKnob {20 MotionBlur} 22 | addUserKnob {41 passname l "Motion pass" T Shuffle1.in} 23 | addUserKnob {6 mblur_switch l "Enable Motion Blur" t "Also disables \"Objects\" channel" +STARTLINE} 24 | mblur_switch true 25 | addUserKnob {7 mblur_amount l "Motion Blur Size" t "0.5 is default for motion blur from a standard shutter"} 26 | mblur_amount 0.5 27 | addUserKnob {41 offset l "Frame Offset" t "Shutter starts at frame + this.\nDefault is -0.5" T VectorBlur1.offset} 28 | addUserKnob {6 mblur1 l Tweak -STARTLINE} 29 | addUserKnob {6 mblur2 l Boost -STARTLINE} 30 | } 31 | 32 | Input { 33 | inputs 0 34 | name img 35 | xpos -231 36 | ypos -154 37 | } 38 | set Nf0baaf0 [stack 0] 39 | Shuffle { 40 | in VRayVelocity 41 | alpha black 42 | out rgb 43 | name Shuffle1 44 | selected true 45 | xpos -121 46 | ypos -57 47 | } 48 | set N12594258 [stack 0] 49 | Grade { 50 | add 0.5 51 | name Grade1 52 | xpos -121 53 | ypos -30 54 | disable {{!parent.mblur1 i}} 55 | } 56 | Multiply { 57 | channels {-rgba.red rgba.green -rgba.blue} 58 | value -1 59 | name Multiply1 60 | xpos -121 61 | ypos 9 62 | } 63 | Expression { 64 | expr0 ((u-0.5)*(input.width*pixel_aspect))/2 65 | expr1 ((v-0.5)*(input.width*pixel_aspect))/2 66 | channel2 {-rgba.red -rgba.green -rgba.blue} 67 | name Expression1 68 | xpos -121 69 | ypos 48 70 | disable {{!parent.mblur2 i}} 71 | } 72 | push $Nf0baaf0 73 | ShuffleCopy { 74 | inputs 2 75 | in rgb 76 | red red 77 | green green 78 | out motion 79 | name ShuffleCopy1 80 | label "Velocity channels" 81 | xpos -231 82 | ypos 42 83 | } 84 | VectorBlur { 85 | channels rgba 86 | uv motion 87 | scale {{parent.mblur_amount i}} 88 | method forward 89 | alpha rgba.alpha 90 | name VectorBlur1 91 | xpos -231 92 | ypos 81 93 | disable {{!parent.mblur_switch i}} 94 | } 95 | Output { 96 | name Output1 97 | xpos -231 98 | ypos 155 99 | } 100 | push $N12594258 101 | Viewer { 102 | fps 25 103 | name Viewer1 104 | xpos 920 105 | ypos 228 106 | } 107 | end_group 108 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/FrameNumber.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke5/Nuke5.exe -nx 2 | version 5.0 3 | Gizmo { 4 | name Frame1 5 | selected true 6 | xpos 504 7 | ypos 34 8 | addUserKnob {20 number_ctrl l Number} 9 | addUserKnob {41 color T number1.color} 10 | addUserKnob {41 translate T number1.translate} 11 | addUserKnob {41 size T number1.size} 12 | addUserKnob {26 "" l ""} 13 | addUserKnob {41 font T number1.font} 14 | addUserKnob {41 xjustify l justify T number1.xjustify} 15 | addUserKnob {26 "" l ""} 16 | addUserKnob {41 output T number1.output} 17 | addUserKnob {41 opacity T number1.opacity} 18 | } 19 | Input { 20 | inputs 0 21 | name Input1 22 | xpos 432 23 | ypos 31 24 | } 25 | Text { 26 | message "\[format %05d \[frame]]" 27 | Font 1 28 | font //bigboy/D/tfxtools/Nuke/LiberMonoBold.ttf 29 | size 40 30 | xjustify right 31 | translate {150 10} 32 | color {1 0 0 0} 33 | name number1 34 | xpos 432 35 | ypos 105 36 | } 37 | Output { 38 | name Output1 39 | xpos 432 40 | ypos 171 41 | } 42 | Viewer { 43 | name Viewer1 44 | xpos 271 45 | ypos 79 46 | } 47 | end_group 48 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/ImportTrackData.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # ImportTrackData 2007-08 demOOn.k@gmail.com 3 | # ver 0.2 4 | # 5 | # Support PfTrackrack and SynthEyes (custom exporters needed) 6 | # Support versons 7 | # Thanx DenizZ 8 | # 9 | 10 | proc ImportTrackData {track_file} { 11 | # set fTrack [open $track_file RDONLY] 12 | if {[catch {set fTrack [open $track_file RDONLY]} err]} { 13 | puts "Error $err" 14 | return 0 15 | } 16 | set data [read $fTrack] 17 | close $fTrack 18 | set data [split $data "\n"] 19 | set last_name {} 20 | 21 | foreach i $data { 22 | #is it name of tracker? 23 | if [string first \" $i]==0 { 24 | if [info exists cur_node] { 25 | knob $cur_node.translate [list $x_values $y_values] 26 | } 27 | set x_values "curve" 28 | set y_values "curve" 29 | set i [string trim $i "\""] 30 | set _name [split [file tail $track_file] "."] 31 | set _name "[lindex $_name 0]_[lindex $_name 1]_[string trimleft $i Tracker]_v" 32 | for {set j 1} {$j<10000} {incr j} { 33 | set name ${_name}${j} 34 | if {![exists $name]} {break} 35 | } 36 | push 0 37 | Position {} 38 | set cur_node [stack 0] 39 | # replace space whith "_" 40 | set name [regsub -all " " $name "_"] 41 | knob $cur_node.name $name 42 | 43 | } 44 | # is a right string? 45 | set nums [split $i] 46 | if {[llength $nums] == 4} { 47 | set cur_frame [lindex $nums 0] 48 | set cur_x [lindex $nums 1] 49 | set cur_y [lindex $nums 2] 50 | set cur_vis [lindex $nums 3] 51 | lappend x_values "x$cur_frame" $cur_x 52 | lappend y_values "x$cur_frame" $cur_y 53 | } 54 | } 55 | # Setup for last node 56 | if [info exists cur_node] { 57 | knob $cur_node.translate [list $x_values $y_values] 58 | knob $cur_node.selected true 59 | } 60 | return 1 61 | } 62 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/LinkTo.gizmo: -------------------------------------------------------------------------------- 1 | #! /opt/Nuke5/Nuke5 -nx 2 | Gizmo { 3 | help "Links to a root directory that will automatically link all those missing files. Footage should have this in name [knob LinkTo.pathbase]" 4 | inputs 0 5 | name LinkTo 6 | addUserKnob {20 User} 7 | addUserKnob {2 pathbase l "Project's Root Directory" t "This should point to the root folder that you created for the images and scripts. "} 8 | pathbase "Read nodes like [knob LinkTo.pathbase]/src/scan_%07d.dpx" 9 | addUserKnob {1 path1 l Path1} 10 | path1 "//server/share" 11 | addUserKnob {1 path2 l Path2} 12 | path2 "/mnt/share" 13 | addUserKnob {1 path3 l Path3} 14 | path3 "/Volumes/share" 15 | addUserKnob {1 template l Template} 16 | template "[knob LinkTo.pathbase]" 17 | 18 | } 19 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/N_LookAtMasked.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 NFXPlugins. All Rights Reserved. 2 | # 3 | # SOURCE FILE: N_LookAtMasked.py 4 | # DIR: /repository/NFX/trunk/src/N_LookAtMasked 5 | # 6 | # MISC: tab-width 2 7 | # 8 | # DESCRIPTION: 9 | # Transform node that rotates the input object to look at a XY vector. This LookAt node 10 | # is contained in a NukeWrapper for a channel selection knob and mask. 11 | # 12 | 13 | nuke.load("N_LookAt") 14 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/PosP.py: -------------------------------------------------------------------------------- 1 | n = nuke.selectedNode() 2 | x = 800 3 | y = 600 4 | 5 | coord = [] 6 | sphList = [] 7 | mrgList = [] 8 | l = 0 9 | ll = 0 10 | h = [] 11 | 12 | for i in range(x): 13 | for j in range(y): 14 | alpha = nuke.sample(n, 'alpha', i, j) 15 | if alpha != 0: 16 | r = [nuke.sample(n, 'red', i, j),nuke.sample(n, 'green', i, j),nuke.sample(n, 'blue', i, j)] 17 | coord.append(r) 18 | 19 | g = nuke.createNode('Group') 20 | 21 | g.begin() 22 | 23 | for c in coord[::10]: 24 | 25 | if l == 1000 or len(coord) == ll: 26 | sphList.append(h) 27 | h = [] 28 | l = 0 29 | 30 | else: 31 | a = nuke.createNode('Sphere', 'inpanel=False') 32 | a['translate'].setValue(c) 33 | a['rows'].setValue(2) 34 | a['columns'].setValue(2) 35 | a['uniform_scale'].setExpression('Group1.SPHScale', 0) 36 | a.setInput(0, None) 37 | h.append(a) 38 | 39 | l += 1 40 | ll += 1 41 | 42 | for n in sphList: 43 | m = nuke.createNode('MergeGeo') 44 | mrgList.append(m) 45 | for s in zip(n, range(len(n))): 46 | m.setInput(s[1], s[0]) 47 | 48 | m = nuke.createNode('MergeGeo') 49 | 50 | for mrg in zip(mrgList, range(len(mrgList))): 51 | m.setInput(mrg[1], mrg[0]) 52 | 53 | o = nuke.createNode('Output') 54 | 55 | 56 | g.addKnob(nuke.Tab_Knob('SphScale', 'Scaling')) 57 | g.addKnob(nuke.Double_Knob('SPHScale', 'Scaling')) 58 | g['SPHScale'].setValue(0.5) 59 | g.end() 60 | 61 | 62 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/SubmitToDeadline.tcl: -------------------------------------------------------------------------------- 1 | ########################################################### 2 | # SubmitToDeadline.tcl 3 | # Ryan Russell (Prime Focus), 2009 4 | # 5 | # Proxy Nuke tcl script that sources the repository 6 | # submission script. 7 | ########################################################### 8 | 9 | proc SubmitToDeadline {} { 10 | global env 11 | global WIN32 12 | 13 | set tempPath "" 14 | if {$WIN32} { 15 | set tempPath $env(TEMP) 16 | } else { 17 | set tempPath "/tmp" 18 | } 19 | 20 | set outputFilename "$tempPath/output.txt" 21 | #set outputFilename "/tmp/output.txt" 22 | set exitCodeFilename "$tempPath/exitCode.txt" 23 | 24 | # Call DeadlineCommandBG to get the repository root. 25 | 26 | if {[file exists "/Applications/Deadline/Resources/bin/deadlinecommandbg"] == 1} { 27 | exec "/Applications/Deadline/Resources/bin/deadlinecommandbg" "-outputFiles" $outputFilename $exitCodeFilename "-getrepositoryroot" 28 | } else { 29 | if {[catch {exec "deadlinecommandbg" "-outputFiles" $outputFilename $exitCodeFilename "-getrepositoryroot"} results]} { 30 | 31 | } 32 | } 33 | 34 | # Read in the output file which contains the repository root. 35 | catch {set fileid [open $outputFilename r]} 36 | gets $fileid repositoryRoot 37 | close $fileid 38 | 39 | #trim if we find a non printable character at the start 40 | set firstChar [string index $repositoryRoot 0] 41 | if {![string is print $firstChar]} { 42 | set repositoryRoot [string trim $repositoryRoot $firstChar] 43 | } 44 | 45 | # Prepend the root to the submission script path and execute it. 46 | set scriptFilename [file join $repositoryRoot "Submission/Nuke/SubmitNukeToDeadlineLinux.tcl"] 47 | 48 | source $scriptFilename 49 | } -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/SynthObj.gizmo: -------------------------------------------------------------------------------- 1 | ### kostia@rukavitsin.com 2 | #! /opt/Nuke51/Nuke5 -nx 3 | version 5.100 4 | Gizmo { 5 | tile_color 0x99ffff 6 | addUserKnob {20 synthtab l SynthEyes} 7 | addUserKnob {41 file T SyntEyesObj1.file} 8 | addUserKnob {41 reload -STARTLINE T SyntEyesObj1.reload} 9 | addUserKnob {41 update_mode l "update mode" T SyntEyesObj1.update_mode} 10 | addUserKnob {41 full_geometry_frame l "primitives frame" T SyntEyesObj1.full_geometry_frame} 11 | addUserKnob {41 read_texture_w_coord l "read texture w coord" T SyntEyesObj1.read_texture_w_coord} 12 | addUserKnob {26 ""} 13 | addUserKnob {41 display T SyntEyesObj1.display} 14 | addUserKnob {41 selectable -STARTLINE T SyntEyesObj1.selectable} 15 | addUserKnob {41 render_mode l render T SyntEyesObj1.render_mode} 16 | addUserKnob {26 ""} 17 | addUserKnob {41 import_chan l "import chan file" T SyntEyesObj1.import_chan} 18 | addUserKnob {41 export_chan l "export chan file" -STARTLINE T SyntEyesObj1.export_chan} 19 | addUserKnob {41 xform_order l "transform order" T SyntEyesObj1.xform_order} 20 | addUserKnob {41 rot_order l "rotation order" T SyntEyesObj1.rot_order} 21 | addUserKnob {26 "" -STARTLINE T "Must be in XZY"} 22 | addUserKnob {13 synthpos l "Synth position"} 23 | addUserKnob {13 synthrot l "Synth rotation"} 24 | addUserKnob {41 scaling l scale T SyntEyesObj1.scaling} 25 | addUserKnob {41 uniform_scale l "uniform scale" T SyntEyesObj1.uniform_scale} 26 | addUserKnob {41 skew T SyntEyesObj1.skew} 27 | addUserKnob {41 pivot T SyntEyesObj1.pivot} 28 | } 29 | Input { 30 | inputs 0 31 | name Input1 32 | xpos 760 33 | ypos 208 34 | } 35 | ReadGeo { 36 | rot_order XZY 37 | translate {{synthpos.x i} {synthpos.z i} {synthpos.y*(-1) i}} 38 | rotate {{synthrot.y i} {synthrot.x i} {synthrot.z*(-1) i}} 39 | name SyntEyesObj1 40 | selected true 41 | xpos 760 42 | ypos 282 43 | } 44 | Output { 45 | name Output1 46 | xpos 760 47 | ypos 340 48 | } 49 | end_group 50 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/TPreview.py: -------------------------------------------------------------------------------- 1 | '''Creates preview jpegs for TCP tracker to dailies folder 2 | for TCP internal use 3 | written by Anton Mitrakhov''' 4 | 5 | def TPreview(): 6 | 7 | import os 8 | from time import strftime 9 | 10 | # gets a list of read nodes 11 | n = nuke.selectedNodes('Read') 12 | for i in n: 13 | 14 | # holds a frame 15 | f = nuke.createNode('FrameHold') 16 | f.knob('first_frame').setValue(i.knob('first').getValue()) 17 | f.setInput(0, i) 18 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 19 | f.knob('ypos').setValue(i.knob('ypos').getValue() + 100) 20 | 21 | # scales image to 0.5 22 | r = nuke.createNode('Reformat') 23 | r.setInput(0, f) 24 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 25 | r.knob('type').setValue('scale') 26 | r.knob('scale').setValue(0.5) 27 | r.knob('ypos').setValue(i.knob('ypos').getValue() + 250) 28 | 29 | # gets output path and filename 30 | fname = i.knob('file').getText().rsplit('.', 1)[0].rsplit('/', 1)[-1] + '.jpg' 31 | fpath = i.knob('file').getText().split('/_src')[0] + '/_out/_dailies/' + strftime('%y.%m.%d') 32 | 33 | # creates write node 34 | w = nuke.createNode('Write') 35 | w.knob('file').setValue(fpath + '/' + fname) 36 | 37 | # checks for path existence 38 | if not os.path.exists(fpath): 39 | os.makedirs(fpath) 40 | 41 | # renders the output 42 | nuke.render (w.knob('name').getText(), start=1, end=1, incr=1) 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/TimeO.py: -------------------------------------------------------------------------------- 1 | def TimeOff(): 2 | n = nuke.selectedNode() 3 | t = nuke.createNode('TimeOffset') 4 | t['time_offset'].setValue( -(n['first'].value() - 1)) -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/Tracker3Dto2D.txt: -------------------------------------------------------------------------------- 1 | Tracker3Dto2D 1.0.0 2 | Stabilises images based on 3D data 3 | 4 | Author: Howard Jones 5 | 6 | This Gizmo combines a tracker with 'reconcile3D' to extend the stabilise/ match move capabilities to more than one point. A use of which might be to stabilise a camera move so that an element can be roto'd easily before applying the match move back to go into the scene. 7 | 8 | Plug in the camera and the source image, copy the appropriate data points - 'create keys' - select tracker points and 'enable, t,r,s' etc, then choose stabilise/ match move/ jitter etc from the transform tab. Smoothing etc can be applied there as with a normal tracker node. 9 | 10 | Needs the camera solved thru a 3D tracker programme and the point cloud x,y,z data. For example from pfTrack export a scene to Nuke using tagged auto/user points to get the camera and the x,y,z points for the points you are interested in. Go into the point cloud group in Nuke (cant remember exact name), copy and paste the positional data from each point into the 'Tracker3Dto2D' gizmo. 11 | 12 | Many thanks to Frank and Ean for sorting out the tcl buttons. 13 | 14 | This Gizmo was made on 5.1v2 -May work on previous versions but you would need to edit the version number in the Gizmo. No guarantees. -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/WaterDistort.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke5/Nuke5.exe -nx 2 | version 5.1000 3 | Gizmo { 4 | addUserKnob {20 water l "Underwater Effect"} 5 | addUserKnob {41 uv_scale l Power T IDistort1.uv_scale} 6 | addUserKnob {41 blur_scale l "Lens blur" T IDistort1.blur_scale} 7 | addUserKnob {26 "" l Pattern} 8 | addUserKnob {6 preview l "Preview pattern" +STARTLINE} 9 | addUserKnob {41 type l Type T Noise1.type} 10 | addUserKnob {41 size l "Wave length" T Noise1.size} 11 | addUserKnob {41 zoffset l Offset T Noise1.zoffset} 12 | addUserKnob {41 octaves l Frequency T Noise1.octaves} 13 | addUserKnob {41 lacunarity l Granularity T Noise1.lacunarity} 14 | addUserKnob {41 gain l Whites T Noise1.gain} 15 | addUserKnob {41 gamma l Blacks T Noise1.gamma} 16 | } 17 | Input { 18 | inputs 0 19 | name img 20 | xpos -855 21 | ypos 210 22 | } 23 | set N103b85f0 [stack 0] 24 | Noise { 25 | replace true 26 | size 250 27 | octaves 2 28 | lacunarity 3 29 | gain 0.85 30 | center {360 288} 31 | name Noise1 32 | xpos -745 33 | ypos 317 34 | } 35 | set Nf1a0b50 [stack 0] 36 | Noise { 37 | replace true 38 | type {{parent.Noise1.type i}} 39 | size {{parent.Noise1.size i}} 40 | zoffset {{parent.Noise1.zoffset+1 i}} 41 | octaves {{parent.Noise1.octaves i}} 42 | lacunarity {{parent.Noise1.lacunarity i}} 43 | gain {{parent.Noise1.gain i}} 44 | gamma {{parent.Noise1.gamma i}} 45 | center {360 288} 46 | name Noise2 47 | xpos -745 48 | ypos 356 49 | } 50 | push $Nf1a0b50 51 | push $N103b85f0 52 | Copy { 53 | inputs 2 54 | from0 rgba.red 55 | to0 forward.u 56 | from1 -rgba.green 57 | to1 -forward.v 58 | name Copy1 59 | xpos -855 60 | ypos 311 61 | } 62 | Copy { 63 | inputs 2 64 | from0 rgba.red 65 | to0 forward.v 66 | from1 -rgba.green 67 | to1 -forward.v 68 | name Copy2 69 | selected true 70 | xpos -855 71 | ypos 350 72 | } 73 | set N10a3c0d8 [stack 0] 74 | Shuffle { 75 | in motion 76 | blue black 77 | alpha black 78 | name Shuffle1 79 | xpos -745 80 | ypos 418 81 | } 82 | Shuffle { 83 | alpha white 84 | name Shuffle2 85 | xpos -745 86 | ypos 445 87 | } 88 | Crop { 89 | box {{width/2 i} 0 {width i} {height i}} 90 | name Crop2 91 | xpos -745 92 | ypos 472 93 | } 94 | push $N10a3c0d8 95 | IDistort { 96 | uv motion 97 | uv_scale 10 98 | blur forward.u 99 | blur_scale 5 100 | name IDistort1 101 | xpos -855 102 | ypos 433 103 | } 104 | Merge2 { 105 | inputs 2 106 | name Merge1 107 | xpos -855 108 | ypos 472 109 | disable {{!preview i x10 1}} 110 | } 111 | Output { 112 | name Output1 113 | xpos -855 114 | ypos 572 115 | } 116 | end_group 117 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/addconstraintab.py: -------------------------------------------------------------------------------- 1 | # ### Adds a Look Tab where you can set a camera to always look at a object 2 | # ### Derived from a TCL original by Frank Rueter and Broesler 3 | # ### Thanks to Jack Binks for all the help and patience ;) 4 | # ### v1.0 - Last modified: 09/02/2008 5 | # ### Written by Diogo Girondi 6 | # ### diogogirondi@gmail.com 7 | 8 | import nuke 9 | import nukescripts 10 | 11 | def constrain(): 12 | 13 | """Get the selected nodes in the DAG""" 14 | selNodes = nuke.selectedNodes() 15 | 16 | """ Classes that will allow this script to run """ 17 | listNodes = ['Cube', 'Sphere', 'Axis2', 'Card2', 'Cylinder', 'ReadGeo2', 'Spotlight', 'Light2', 'DirectLight', 'Camera', 'Camera2', 'Card'] 18 | cleanList = set(listNodes) 19 | 20 | """ Run for each selected node """ 21 | for i in selNodes: 22 | 23 | """ Get the Class for each node """ 24 | _class = i.Class() 25 | 26 | """ If Class is found on the list (listNodes) add the knobs, otherwise delete vars and do nothing """ 27 | if _class in cleanList: 28 | 29 | """ Sets Knobs """ 30 | lookTab = nuke.Tab_Knob("look", "Constrain") 31 | target = nuke.EvalString_Knob("look_at", "Look at") 32 | setlookObject = nuke.PyScript_Knob("set", "Set", "selNodes = nuke.selectedNodes()\n\nif len(selNodes) == 1:\n\tthisNode = selNodes[-1]\n\tk = thisNode['look_at']\n\t\n\tif k.value() == \"\":\n\t\tlookAt = nuke.getInput(\'Type the target node name\')\n\t\tk.setValue(lookAt)\n\n\telse:\n\t\tlookAt = k.value()\n\t\tk.setValue(lookAt)\n\nelif len(selNodes) > 1:\n\tthisNode = selNodes[-1]\n\tlookAt = selNodes[-2]\n\tk = thisNode['look_at']\n\tk.setValue(lookAt.name())\n\t\nelse:\n\tpass\n\nlookObject = k.value()\n\nxX = \'degrees(atan2(\' + lookObject + \'.translate.y-translate.y,sqrt(pow(\' + lookObject + \'.translate.x-translate.x,2)+pow(\' + lookObject + \'.translate.z-translate.z,2))))\'\nyX = lookObject + \'.translate.z-this.translate.z >= 0 ? 180+degrees(atan2(\' + lookObject + \'.translate.x-translate.x,\' + lookObject + \'.translate.z-translate.z)):180+degrees(atan2(\' + lookObject + \'.translate.x-translate.x,\' + lookObject + \'.translate.z-translate.z))\'\n\nthisNode['rotate'].setExpression(xX, 0)\nthisNode['rotate'].setExpression(yX, 1)\n") 33 | 34 | """ Adds Knobs """ 35 | i.addKnob(lookTab) 36 | i.addKnob(target) 37 | i.addKnob(setlookObject) 38 | 39 | else: 40 | pass 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/addgeotab.py: -------------------------------------------------------------------------------- 1 | # ### Add GEO Tab to the selected Bezier node 2 | # ### Derived from a TCL original by frank@beingfrank.info 3 | # ### Requires Frank's "BezierGeoProc.tcl" installed in Nuke's path 4 | # ### Last modified: 08/31/2008 5 | # ### Written by Diogo Girondi 6 | # ### diogogirondi@gmail.com 7 | 8 | import nuke 9 | import nukescripts 10 | 11 | def addgeotab(): 12 | 13 | """Get the selected nodes in the DAG""" 14 | selnodes = nuke.selectedNodes() 15 | 16 | """ Run for each selected node """ 17 | for i in selnodes: 18 | 19 | """Retrives node Class""" 20 | _class = i.Class() 21 | 22 | """Check node Class and add tab and knobs if successful""" 23 | if _class == "Bezier": 24 | geoTab = nuke.Tab_Knob("geotab", "Geo") 25 | gList = nuke.Enumeration_Knob("shapelist", "Shape", ["circle", "square", "oval", "rectangle", "triangle"]) 26 | gSet = nuke.Script_Knob("set_geo", "Set Shape", "BezierGeoProc [knob this.shapelist]") 27 | 28 | i.addKnob(geoTab) 29 | i.addKnob(gList) 30 | i.addKnob(gSet) 31 | 32 | else: 33 | """If no Bezier is found, do nothing""" 34 | pass 35 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/addrangetab.py: -------------------------------------------------------------------------------- 1 | # ### Add Range Tab to selected nodes 2 | # ### Last modified: 08/31/2008 3 | # ### Written by Diogo Girondi 4 | # ### diogogirondi@gmail.com 5 | 6 | import nuke 7 | import nukescripts 8 | 9 | def addrangetab(): 10 | 11 | """Get the selected nodes in the DAG""" 12 | selnodes = nuke.selectedNodes() 13 | 14 | for i in selnodes: 15 | 16 | """Retrives node Class and the Root range""" 17 | _class = i.Class() 18 | _first = int(nuke.root().knob("first_frame").value()) 19 | _last = int(nuke.root().knob("last_frame").value()) 20 | 21 | """Set Knobs parameters""" 22 | rTab = nuke.Tab_Knob("rangetab", "Range") 23 | rIn = nuke.Int_Knob("range_in", "In") 24 | rOut = nuke.Int_Knob("range_out", "Out") 25 | rSetIn = nuke.Script_Knob("set_in", "Use Current", "knob this.range_in [frame]") 26 | rSetOut =nuke.Script_Knob("set_out", "Use Current", "knob this.range_out [frame]") 27 | rUse = nuke.Script_Knob("set_range", "Set Range", "in this.disable {set_expression {framethis.range_out}}") 28 | rTab = nuke.Tab_Knob("rangetab", "Range") 29 | 30 | """Adds Knobs to each node""" 31 | i.addKnob(rTab) 32 | i.addKnob(rIn) 33 | i.addKnob(rSetIn) 34 | i.addKnob(rOut) 35 | i.addKnob(rSetOut) 36 | i.addKnob(rUse) 37 | 38 | """Set default range values""" 39 | v = i['range_in'] 40 | v.setValue(_first) 41 | v = i['range_out'] 42 | v.setValue(_last) 43 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRIPTS/arial.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/arialbd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRIPTS/arialbd.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/branchout.py: -------------------------------------------------------------------------------- 1 | ### Branch out Layers 2 | ### v1.0 - Last modified: 11/01/2008 3 | ### Written by Diogo Girondi 4 | ### diogogirondi@gmail.com 5 | 6 | import nuke 7 | 8 | def branchout(): 9 | 10 | sn = nuke.selectedNode() 11 | ch = nuke.channels(sn) 12 | layers = [] 13 | valid_channels = ['red', 'green', 'blue', 'alpha', 'black', 'white'] 14 | 15 | for each in ch: 16 | current = each.split('.') 17 | layer = current[0] 18 | channel = current[1] 19 | tmp = [] 20 | 21 | for x in ch: 22 | if x.startswith(layer) == True: 23 | tmp.append(x) 24 | 25 | if len(tmp) < 4: 26 | for i in range(4-len(tmp)): 27 | tmp.append(layer+".black") 28 | 29 | if tmp not in layers: 30 | layers.append(tmp) 31 | 32 | for each in layers: 33 | name = each[0].split('.')[0] 34 | 35 | r = each[0].split('.')[1] 36 | if r not in valid_channels: 37 | r = valid_channels[0] 38 | 39 | g = each[1].split('.')[1] 40 | if g not in valid_channels: 41 | g = valid_channels[1] 42 | 43 | b = each[2].split('.')[1] 44 | if b not in valid_channels: 45 | b = valid_channels[2] 46 | 47 | a = each[3].split('.')[1] 48 | if a not in valid_channels: 49 | r = valid_channels[3] 50 | 51 | inLayer = "in " + name + " red " + r + " green " + g + " blue " + b + " alpha " + a 52 | shuffle = nuke.createNode('Shuffle', inLayer) 53 | shuffle.knob('label').setValue(name) 54 | shuffle.setInput(0, sn) -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/checkIfNotOnAServer.py: -------------------------------------------------------------------------------- 1 | """ Script for checking if any files in script are not on the fileserver""" 2 | 3 | def checkIfNotOnAServer(fileServer='/mnt/karramba'): 4 | 5 | nodesClassesList = ['Read', 'ReadGeo', 'ReadGeo2', 'Camera', 'Camera2'] 6 | localList = [] 7 | 8 | for nodeClass in nodesClassesList: 9 | for node in nuke.allNodes(nodeClass): 10 | path = node['file'].value() 11 | if path and path[:len(fileServer)] != fileServer: 12 | localList.append(node['name'].value()) 13 | 14 | if localList: 15 | print nuke.message('\n'.join(localList) + '\nare not on a fileserver') 16 | else: 17 | nuke.message('Everything seems to be on a fileserver') 18 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/cnew.py: -------------------------------------------------------------------------------- 1 | def cnew(): 2 | import sys,os,popen2 3 | import cdebug 4 | import subprocess 5 | from nukescripts import pyQtAppUtils, utils 6 | mdebug = cdebug.cdebug() 7 | mdebug(sys.path) 8 | sys.path.append('/usr/pipeline/lib') 9 | #import nasset 10 | import pipe, filesys 11 | proc = subprocess.Popen('nasset -m nuke', shell=True, stdout=subprocess.PIPE, ) 12 | result = proc.communicate()[0] 13 | #result = nasset.browse('nuke') 14 | if result == 'cancel': return 15 | obj = filesys.get_options(result,'m:t:d:c:') 16 | file_path = obj[1][0] 17 | proj_name = obj[1][1] 18 | tmp_path_file = os.path.join(filesys.USER_HOME,file_path) 19 | 20 | nuke.scriptSave(tmp_path_file) 21 | 22 | descr = obj[0]['-d'] 23 | tags = obj[0]['-t'] 24 | modes = obj[0]['-m'].split(',') 25 | 26 | type_name = modes[0] 27 | seq_name = modes[1] 28 | shot_name = modes[2] 29 | #print proj_name,tmp_path_file,descr,tags 30 | 31 | new_obj = pipe.Pipe().AddAsset(proj_name,tmp_path_file,descr,tags,filesys.COMP,sname=seq_name,shname=shot_name) 32 | script_path = new_obj.CheckOut('l') 33 | 34 | if len(modes) == 4: 35 | new_obj.setDependency(modes[3]) 36 | 37 | if os.path.exists(script_path): 38 | os.system('sync') 39 | nuke.scriptOpen(script_path) 40 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/cspace.py: -------------------------------------------------------------------------------- 1 | def CSpace(csp = 'sRGB'): 2 | inp = nuke.selectedNodes() 3 | for n in inp: 4 | n.knob('colorspace').setValue(csp) 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/cvci.py: -------------------------------------------------------------------------------- 1 | from cexceptions import * 2 | import sys 3 | import subprocess 4 | from nukescripts import pyQtAppUtils, utils 5 | sys.path.append('/usr/pipeline/lib') 6 | import os, filesys, app, pipe 7 | 8 | def cvci(): 9 | 10 | try: 11 | comment = 'test check in' 12 | nuke.scriptSave() 13 | proc = subprocess.Popen('comments -m maya -c good', shell=True, stdout=subprocess.PIPE, ) 14 | stdout_value = proc.communicate()[0] 15 | if stdout_value != None: 16 | comment = stdout_value #r.readlines()[0] 17 | lst_comments = comment.split('\t') 18 | isGood = False 19 | if len(lst_comments) > 1: 20 | if lst_comments[1].strip('\n') == 'g': 21 | isGood = True 22 | comment = lst_comments[0] 23 | asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 24 | asset_obj.CheckIn(comment, isGood) 25 | except: 26 | exctype, value = sys.exc_info()[:2] 27 | raise Exception("Unexpected error: %s" % value) -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/cvco.py: -------------------------------------------------------------------------------- 1 | def cvco(): 2 | import sys, cdebug 3 | from nukescripts import pyQtAppUtils, utils, pyWxAppUtils 4 | import subprocess 5 | 6 | sys.path.append('/usr/pipeline/lib') 7 | 8 | mdebug = cdebug.cdebug() 9 | import pipe 10 | import popen2 11 | 12 | name_node = '__PIPE__' 13 | 14 | nscript = nuke.scriptSaveAs('/tmp/_nktmp.nk',True) 15 | 16 | proc = subprocess.Popen('browser -m nuke', shell=True, stdout=subprocess.PIPE, ) 17 | stdout_value = proc.communicate()[0] 18 | 19 | proc2 = subprocess.Popen('vco '+stdout_value, shell=True, stdout=subprocess.PIPE, ) 20 | 21 | script_name = proc2.communicate()[0] 22 | mdebug(script_name) 23 | nuke.scriptOpen(script_name) 24 | 25 | nuke.scriptClose(nscript) 26 | nuke.fromScript() 27 | m = nuke.toNode(name_node) 28 | if not m: 29 | m = nuke.createNode('StickyNote', inpanel=False) 30 | m.setName(name_node) 31 | asset_obj = pipe.Projects().GetAssetByInfo(script_name) 32 | seq = asset_obj.GetSequence() 33 | shot = asset_obj.GetShot() 34 | 35 | label = '' 36 | if seq: label = 'Sequence: %s'%seq.name 37 | if shot: label += '\nShot: %s'%shot.name 38 | 39 | m.knob('label').setValue(label) 40 | m.knob('note_font').setValue("Helvetica Bold") 41 | m.knob('note_font_size').setValue((18,)) 42 | 43 | 44 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/dailies.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | '''Script for dailies creation. 3 | OS: Linux, for Nuke5.x 4 | uses DJV for *.mov creation 5 | Written by Anton Mitrakhov 6 | The Chimney Pot 7 | 8 | ''' 9 | 10 | import os 11 | from time import strftime 12 | 13 | def MakeMov(): 14 | 15 | # paths to djv folder 16 | pp = os.getenv('PROGRAM_PATH') 17 | djv = pp + '/djv/bin/djv_convert' 18 | djView = pp + '/djv/bin/djv_view' 19 | 20 | # path for render preview folder and filename 21 | rPath = nuke.root().name().rsplit('/', 1)[0] + '/render/preview/' 22 | fName = nuke.root().name().rsplit('/', 1)[-1].split('.nk')[0] 23 | prList = [x for x in os.listdir(rPath) if x[:len(fName)] == fName] 24 | prList.sort() 25 | sPath = prList[0].rsplit('.', 1)[0] + '-' + str(int(nuke.animationEnd())) + '.jpg' 26 | dPath = rPath.split('_compose')[0] + '_out/_dailies/' + strftime('%y.%m.%d') 27 | 28 | # creates dailies folder if necessary 29 | if not os.path.exists(dPath): 30 | os.makedirs(dPath) 31 | fPath = djv + ' ' + rPath + sPath + ' ' + dPath + '/' + fName + '.mov' 32 | 33 | # runs convertation 34 | os.system(fPath) 35 | 36 | # opens *.mov file 37 | vPath = djView+ ' ' + dPath + '/' + fName + '.mov &' 38 | os.system(vPath) 39 | 40 | def Dailies(): 41 | 42 | # path for render preview folder and filename 43 | rPath = nuke.root().name().rsplit('/', 1)[0] + '/' + 'render' + '/' + 'preview' + '/' 44 | fName = nuke.root().name().rsplit('/', 1)[-1].split('.nk')[0] 45 | 46 | # creates preview render folder if necessary 47 | if not os.path.exists(rPath): 48 | os.makedirs(rPath) 49 | 50 | # takes padding 51 | pad = len(str(int(nuke.animationEnd()))) 52 | 53 | # creates write node 54 | w = nuke.createNode('Write') 55 | w.knob('file').setValue(rPath + fName + '_' '%0' + str(pad) + 'd.jpg') 56 | w.knob("_jpeg_quality").setValue(1) 57 | w.addKnob(nuke.Tab_Knob('CMov', 'Create *.mov')) 58 | w.addKnob(nuke.PyScript_Knob('MMov', 'Make *.mov')) 59 | w.knob('MMov').setCommand('MakeMov()') 60 | 61 | # user part 62 | a = nuke.ask('Othuyachit sequence?') 63 | if a == True: 64 | nuke.render (w.knob('name').getText(), start=int(nuke.animationStart()), end=int(nuke.animationEnd()), incr=1) 65 | b = nuke.ask('Othuyachit *.mov?') 66 | if b == True: 67 | MakeMov() 68 | else: 69 | pass 70 | else: 71 | pass 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/deniska.py: -------------------------------------------------------------------------------- 1 | '''Creates preview jpegs for TCP tracker to dailies folder 2 | for TCP internal use 3 | written by Anton Mitrakhov''' 4 | 5 | def TPreview(): 6 | 7 | import os 8 | from time import strftime 9 | 10 | # gets a list of read nodes 11 | n = nuke.selectedNodes('Read') 12 | for i in n: 13 | 14 | # holds a frame 15 | f = nuke.createNode('FrameHold', inpanel=False) 16 | f.knob('first_frame').setValue(i.knob('first').getValue()) 17 | f.setInput(0, i) 18 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 19 | f.knob('ypos').setValue(i.knob('ypos').getValue() + 100) 20 | 21 | # scales image to 0.5 22 | r = nuke.createNode('Reformat', inpanel=False) 23 | r.setInput(0, f) 24 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 25 | r.knob('type').setValue('scale') 26 | r.knob('scale').setValue(0.5) 27 | r.knob('ypos').setValue(i.knob('ypos').getValue() + 250) 28 | 29 | # gets output path and filename 30 | fname = i.knob('file').getText().rsplit('.', 1)[0].rsplit('/', 1)[-1] + '.jpg' 31 | fpath = i.knob('file').getText().split('/_src')[0] + '/_out/_dailies/' + strftime('%y.%m.%d') 32 | 33 | # creates write node 34 | w = nuke.createNode('Write', inpanel=False) 35 | w.knob('file').setValue(fpath + '/' + fname) 36 | 37 | # checks for path existence 38 | if not os.path.exists(fpath): 39 | os.makedirs(fpath) 40 | 41 | # renders the output 42 | nuke.render (w.knob('name').getText(), start=1, end=1, incr=1) -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/exr2tif.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def exr2tif(): 4 | 5 | n = nuke.selectedNode() 6 | 7 | if not n.Class() == 'Read': 8 | 9 | nuke.message('Not a Read node!') 10 | 11 | return 12 | 13 | chList = list(set([x.split('.')[0] for x in n.channels()])) 14 | 15 | nList = [x.name() for x in nuke.allNodes('Shuffle')] 16 | 17 | for i in chList: 18 | 19 | sh = nuke.createNode('Shuffle', inpanel=False) 20 | 21 | sh.knob('in').setValue(i) 22 | 23 | sh.knob('name').setValue(i) 24 | 25 | sh.setInput(0, n) 26 | 27 | w = nuke.createNode('Write', inpanel=False) 28 | 29 | newPath = n.knob('file').value().rsplit('/',1)[0] + '/' + i 30 | 31 | if not os.path.exists(newPath): 32 | 33 | os.mkdir(newPath) 34 | 35 | w.knob('file').setValue(newPath + '/' + i + '.%06d.tif') 36 | 37 | w.knob('file_type').setValue('tiff') 38 | 39 | w.knob('datatype').setValue(1) 40 | 41 | nuke.execute(w.name(), n.knob('first').value(), n.knob('last').value()) 42 | 43 | nuke.delete(sh) 44 | 45 | nuke.delete(w) 46 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/exrUnpack.py: -------------------------------------------------------------------------------- 1 | def exrUnpack(): 2 | """ Creates shuffle nodes for each channel in EXR 3 | 4 | """ 5 | n = nuke.selectedNode() 6 | chList = list(set([x.split('.')[0] for x in n.channels()])) 7 | shList = [x['name'].value() for x in nuke.allNodes('Shuffle')] 8 | 9 | print 'ShotList is ', shList 10 | 11 | for i in chList: 12 | 13 | sh = nuke.createNode('Shuffle', inpanel=False) 14 | sh.knob('in').setValue(i) 15 | 16 | nmList = [x for x in shList if x.startswith(i)] 17 | 18 | if nmList: 19 | nmList.sort() 20 | lastNumb = nmList[-1].rsplit('.',1)[-1] 21 | if lastNumb.isdigit(): 22 | shName = i + '.' + str(int(lastNumb)+1) 23 | else: 24 | shName = nmList[0] + '.1' 25 | else: 26 | shName = i + '.1' 27 | 28 | sh.knob('name').setValue(shName) 29 | sh.setInput(0, n) 30 | sh.knob('hide_input').setValue(True) 31 | sh.knob('postage_stamp').setValue(True) 32 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/ffix.py: -------------------------------------------------------------------------------- 1 | """ 2 | def ffffilenameFix(s): 3 | if os.name == "posix": 4 | # print 'Applying path mapping: windows --> linux' 5 | s = s.replace('//karramba/work/', '/mnt/karramba/', 1) 6 | s = s.replace('//karramba/Work/', '/mnt/karramba/', 1) 7 | s = s.replace('//Karramba/work/', '/mnt/karramba/', 1) 8 | s = s.replace('//Karramba/Work/', '/mnt/karramba/', 1) 9 | s = s.replace('//bigboy/d/', '/mnt/bigboy/', 1) 10 | s = s.replace('//bigboy/D/', '/mnt/bigboy/', 1) 11 | s = s.replace('//Bigboy/d/', '/mnt/bigboy/', 1) 12 | s = s.replace('//Bigboy/D/', '/mnt/bigboy/', 1) 13 | s = s.replace('K:/', '/mnt/karramba/', 1) 14 | s = s.replace('k:/', '/mnt/karramba/', 1) 15 | s = s.replace('W:/Work/', '/mnt/bigboy/', 1) 16 | s = s.replace('w:/Work/', '/mnt/bigboy/', 1) 17 | s = s.replace('W:/work/', '/mnt/bigboy/', 1) 18 | s = s.replace('w:/work/', '/mnt/bigboy/', 1) 19 | s = s.replace('D:/', '/mnt/disk/', 1) 20 | s = s.replace('d:/', '/mnt/disk/', 1) 21 | 22 | else: 23 | # print 'Applying path mapping for Windows' 24 | s = s.replace('/mnt/karramba/', '//karramba/work/', 1) 25 | s = s.replace('/mnt/bigboy/', '//bigboy/D/Work/', 1) 26 | s = s.replace('K:/', '//karramba/work/', 1) 27 | s = s.replace('k:/', '//karramba/work/', 1) 28 | s = s.replace('W:/', '//bigboy/D/Work/', 1) 29 | s = s.replace('w:/', '//bigboy/D/Work/', 1) 30 | s = s.replace('/mnt/disk/', 'D:/', 1) 31 | s = s.replace('H:/', '//karramba/work/Huggies/_src/', 1) 32 | return s 33 | """ 34 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/fillReads.py: -------------------------------------------------------------------------------- 1 | from cexceptions import * 2 | 3 | 4 | class ReloadRendersPanel( nukescripts.PythonPanel ): 5 | def __init__( self, node_read, renders_vers ): 6 | nukescripts.PythonPanel.__init__( self, 'Reload Renders', 'tfx.ReloadRenders') 7 | # CREATE KNOBS 8 | self.nodesChoice = nuke.Enumeration_Knob( 'renders', 'Source render versions', renders_vers[2]) 9 | self.node = node_read 10 | self.s_dir = renders_vers[0] 11 | self.e_dir = renders_vers[1] 12 | # ADD KNOBS 13 | self.addKnob( self.nodesChoice ) 14 | 15 | def knobChanged( self, knob ): 16 | dir_files = self.s_dir+os.sep+knob.value()+os.sep+self.e_dir 17 | files = os.listdir(dir_files) 18 | files.sort() 19 | start_file = files[0].split('.') 20 | name_file = dir_files + os.sep + start_file[0] 21 | start = int(start_file[1]) 22 | end = int(files[-1].split('.')[1]) 23 | label = "%s.%%0%sd.%s %s-%s"%(name_file, len(start_file[1]), start_file[2], start,end) 24 | self.node.knob('file').fromUserText(label) 25 | 26 | def fillReads(): 27 | read_node = nuke.selectedNode() 28 | if not read_node.Class() == 'Read': raise Exception('Must select a read node!') 29 | import sys,os,popen2 30 | sys.path.append('/usr/pipeline/lib') 31 | from nukescripts import pyQtAppUtils, utils 32 | import filesys 33 | import pipe 34 | reload(filesys) 35 | reload(pipe) 36 | asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 37 | if not asset_obj: raise Exception('Script not in projects') 38 | obj_data = asset_obj.GetShot() 39 | if not obj_data: obj_data = asset_obj.GetSequence() 40 | if not obj_data: raise Exception('Data path not found') 41 | #obj_data.RefreshRenderLatest() 42 | #renders_data = obj_data.GetDataRenderLatest() 43 | meta_knob = read_node.metadata() 44 | renders_data = filesys.GetAllRenderVersions(meta_knob['input/filename']) 45 | #print renders_data 46 | ReloadRendersPanel(read_node, renders_data).showModalDialog() -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/flipbookRV.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | 4 | 5 | def flipbookToRV(): 6 | 7 | n = nuke.selectedNode() 8 | 9 | rv = '/mnt/opt/rv-3.4.22/bin/rv' 10 | 11 | renderPath = os.getenv('NUKE_TEMP_DIR') + os.sep + 'fbRV' 12 | 13 | if os.path.exists(renderPath): 14 | shutil.rmtree(renderPath) 15 | os.makedirs(renderPath) 16 | else: 17 | os.makedirs(renderPath) 18 | 19 | 20 | fRange = nuke.getInput('Frame range:', str(n.frameRange())) 21 | pad = len(fRange.split('-')[-1]) 22 | 23 | 24 | w = nuke.createNode('Write') 25 | if nuke.root()['proxy'].value()==1: 26 | w['proxy'].setValue(renderPath + os.sep + 'tmp.%0' + str(pad) + 'd.sgi') 27 | else: 28 | w['file'].setValue(renderPath + os.sep + 'tmp.%0' + str(pad) + 'd.sgi') 29 | 30 | w['datatype'].setValue(1) 31 | 32 | r = nuke.render (w.name(), start=int(fRange.split('-')[0]), end=int(fRange.split('-')[-1]), incr=1) 33 | 34 | nuke.delete(w) 35 | 36 | os.system(rv + ' ' + renderPath + os.sep + 'tmp.' + '#'*pad + '.sgi &') 37 | 38 | nuke.menu("Nuke").addCommand("Render/Flipbook to RV", "flipbookToRV()", "ctrl+shift+f") -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/formats.tcl: -------------------------------------------------------------------------------- 1 | # formats.tcl 2 | # Copyright (c) 2007 The Foundry Visionmongers Ltd. All Rights Reserved. 3 | # 4 | # Formats let Nuke assign a name, pixel aspect ratio, and possibly 5 | # a cropped image area, to any size of input image. You can make 6 | # more than one format for a given size but the user will have to 7 | # pick the other ones from the chooser in the file reader. 8 | # 9 | # W = Total image width in pixels 10 | # H = Total image height in pixels 11 | # x = left edge of active region 12 | # y = bottom edge of active region 13 | # r = right edge of active region 14 | # t = top edge of active region 15 | # pa = pixel-aspect ratio (width/height of a pixel) 16 | # name = the name displayed in the menus 17 | # 18 | # xyrt may be omitted to set them to 0 0 W H. 19 | # if xyrt are omitted, you can also omit pa and it is set to 1.0 20 | #--------------------------------------------------------------------------- 21 | 22 | # The PAL and NTSC formats were changed in Nuke 5.2 to respect the pixel aspect ratio of 23 | # the production aperture instead of the clean aperture. This provides greater compatibility 24 | # with other software, and produces images which are no longer slightly stretched. 25 | 26 | # W H x y r t pa name 27 | #--------------------------------------------------------------------------- 28 | # 4:3 video formats 29 | add_format " 640 480 1.0 PC_Video" 30 | add_format " 720 486 0.91 NTSC" 31 | add_format " 720 576 1.09 PAL" 32 | 33 | # 16:9 video formats 34 | add_format "1920 1080 1.0 HD" 35 | add_format " 720 486 1.21 NTSC_16:9" 36 | add_format " 720 576 1.46 PAL_16:9" 37 | 38 | # FILM FORMATS 39 | add_format "1024 778 1.0 1K_Super_35(full-ap)" 40 | add_format "914 778 2.0 1K_Cinemascope" 41 | 42 | add_format "2048 1556 1.0 2K_Super_35(full-ap)" 43 | add_format "1828 1556 2.0 2K_Cinemascope" 44 | 45 | add_format "4096 3112 1.0 4K_Super_35(full-ap)" 46 | add_format "3656 3112 2.0 4K_Cinemascope" 47 | 48 | #add_format "2048 1558 220 284 2048 1272 1.0 2K_Academy_aperture" 49 | 50 | #SQUARE FORMATS 51 | add_format " 256 256 1.0 square_256" 52 | add_format " 512 512 1.0 square_512" 53 | add_format "1024 1024 1.0 square_1K" 54 | add_format "2048 2048 1.0 square_2K" 55 | 56 | 57 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/framehold2.py: -------------------------------------------------------------------------------- 1 | def FrameHold(): 2 | n = nuke.createNode('FrameHold') 3 | n.knob('first_frame').setValue(nuke.frame()) 4 | # n.addKnob(nuke.PyScript_Knob("sf", "Set to current frame")) 5 | # n.knob('sf').setCommand("nuke.selectedNode().knob('RefFrame').setValue(nuke.frame())") 6 | 7 | 8 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/getpass.py: -------------------------------------------------------------------------------- 1 | '''Script for getting Vray passes from exr 2 | written by Anton Mitrakhov 3 | TCP 2009 4 | ''' 5 | 6 | 7 | def GetPass(): 8 | 9 | n = nuke.selectedNode() 10 | inp = nuke.getInput('Print "GI" to get VRayGlobalIllumination \n \ 11 | "Refl" for Reflection \n \ 12 | "Light" for Lighting \n \ 13 | "Sh" for Shadows') 14 | 15 | if inp == 'GI': 16 | rp = 'VRayGlobalIllumination' 17 | s = nuke.createNode('Shuffle', inpanel=False) 18 | s.knob('in').setValue(rp) 19 | c = nuke.createNode('Copy', inpanel=False) 20 | c.setInput(0, n) 21 | c.setInput(1, s) 22 | c.knob('to0').setValue(rp + '.red') 23 | c.knob('to1').setValue(rp + '.green') 24 | c.knob('to2').setValue(rp + '.blue') 25 | c.knob('from0').setValue('rgba.red') 26 | c.knob('from1').setValue('rgba.green') 27 | c.knob('from2').setValue('rgba.blue') 28 | nuke.autoplace(s) 29 | nuke.autoplace(c) 30 | 31 | elif inp == 'Refl': 32 | rp = 'VRayReflection' 33 | s = nuke.createNode('Shuffle', inpanel=False) 34 | s.knob('in').setValue(rp) 35 | c = nuke.createNode('Copy', inpanel=False) 36 | c.setInput(0, n) 37 | c.setInput(1, s) 38 | c.knob('to0').setValue(rp + '.red') 39 | c.knob('to1').setValue(rp + '.green') 40 | c.knob('to2').setValue(rp + '.blue') 41 | c.knob('from0').setValue('rgba.red') 42 | c.knob('from1').setValue('rgba.green') 43 | c.knob('from2').setValue('rgba.blue') 44 | nuke.autoplace(s) 45 | nuke.autoplace(c) 46 | 47 | elif inp == 'Light': 48 | rp = 'VRayLighting' 49 | s = nuke.createNode('Shuffle', inpanel=False) 50 | s.knob('in').setValue(rp) 51 | c = nuke.createNode('Copy', inpanel=False) 52 | c.setInput(0, n) 53 | c.setInput(1, s) 54 | c.knob('to0').setValue(rp + '.red') 55 | c.knob('to1').setValue(rp + '.green') 56 | c.knob('to2').setValue(rp + '.blue') 57 | c.knob('from0').setValue('rgba.red') 58 | c.knob('from1').setValue('rgba.green') 59 | c.knob('from2').setValue('rgba.blue') 60 | nuke.autoplace(s) 61 | nuke.autoplace(c) 62 | 63 | elif inp == 'Sh': 64 | rp = 'VRayShadows' 65 | s = nuke.createNode('Shuffle', inpanel=False) 66 | s.knob('in').setValue(rp) 67 | c = nuke.createNode('Copy', inpanel=False) 68 | c.setInput(0, n) 69 | c.setInput(1, s) 70 | c.knob('to0').setValue(rp + '.red') 71 | c.knob('to1').setValue(rp + '.green') 72 | c.knob('to2').setValue(rp + '.blue') 73 | c.knob('from0').setValue('rgba.red') 74 | c.knob('from1').setValue('rgba.green') 75 | c.knob('from2').setValue('rgba.blue') 76 | nuke.autoplace(s) 77 | nuke.autoplace(c) 78 | 79 | else: 80 | pass 81 | 82 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/hiResAfanasyTfx.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import pipe 4 | import os 5 | import filesys 6 | import re 7 | 8 | '''Script for creation HiRes 9 | for TCP internal use 10 | Anton Mitrakhov''' 11 | 12 | pat = re.compile('^\d{1,10}') 13 | 14 | def CreateHiresByAfanasy(): 15 | 16 | 17 | # check for all read nodes 18 | readList = [(node.knob('name').value(),node.knob('file').value()) for node in nuke.allNodes('Read')] 19 | rlen = len(filesys.REPO) 20 | suspected = [n for n in readList if n[1][:rlen] != filesys.REPO] 21 | if suspected: raise Exception('Error! Files in nodes below have to move into %s:\n%s'%(filesys.REPO,'\n'.join([str('%s - %s'%(n[0],n[1])) for n in suspected]))) 22 | 23 | # settings variables 24 | 25 | ext = 'dpx' 26 | cSpace = 'sRGB' 27 | pad = '.%06d.' 28 | 29 | # creating paths and HiRes name 30 | 31 | sObj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 32 | nPath = sObj.GetCurrentActualPath() 33 | hName = sObj.GetShot().name + pad + ext 34 | hFPath = sObj.GetShot().GetOutPath() + '/hires/' 35 | hList = os.listdir(hFPath) 36 | hFolder = '' 37 | 38 | # write node creation 39 | if nuke.toNode('HiRes'): 40 | 41 | nuke.message('Node HiRes already exists. Use that one, %username% :-)') 42 | pass 43 | 44 | else: 45 | 46 | sNode = nuke.selectedNode() 47 | hNode = nuke.createNode('Write', inpanel=False) 48 | hNode.knob('name').setValue('HiRes') 49 | hNode.knob('colorspace').setValue(cSpace) 50 | hNode.knob('channels').setValue('rgb') 51 | 52 | aNode = nuke.createNode("afanasy", inpanel=False) 53 | aNode.knob('hmask').setValue('tfxr.*') 54 | aNode.knob('jname').setValue('%s'%sObj.name) 55 | aNode.knob('first').setValue(nuke.root().firstFrame()) 56 | aNode.knob('last').setValue(nuke.root().lastFrame()) 57 | 58 | # Hires folder is empty 59 | if not hList: 60 | hFolder = hFPath + str(filesys.padding(1, 2)) 61 | os.mkdir(hFolder) 62 | hNode.knob('file').setValue(hFolder + os.sep + hName) 63 | # Hires folder is not empty 64 | else: 65 | hList = filter(lambda x: pat.search(x) , hList) 66 | hFolder = hFPath + str(filesys.padding(max([(int(f)) for f in hList]), 2)) 67 | hNode.knob('file').setValue(hFolder + os.sep + hName) 68 | 69 | #Make link into out/hires folder 70 | shotObject = sObj.GetShot() 71 | sName = shotObject.name 72 | seqObject = sObj.GetSequence() 73 | 74 | dPath = os.path.join(filesys.REPO, sObj.GetProject().name, filesys.OUT,'hires',shotObject.seq_name, sName + seqObject.GetPrefix()) 75 | if not os.path.exists(dPath): filesys.mkdirs(dPath) 76 | num_folder = hFolder.split(os.sep)[-1] 77 | 78 | os.system('cd %s && ln -sf ../../../../film/sequences/%s/shots/%s/out/hires/%s'%(dPath,shotObject.seq_name,sName, num_folder )) 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/hqsubmit.py: -------------------------------------------------------------------------------- 1 | def hqsubmit(): 2 | cmd = """afsubmitter -m nuke -o "-F %s-%s " -f "%s" -g afanasy""" 3 | path_script = nuke.root().name() 4 | os.system(cmd%(int(nuke.animationStart()),int(nuke.animationEnd()),path_script)) 5 | #print nuke.animationStart() 6 | # Result: 397.0 7 | #print nuke.animationEnd() 8 | # Result: 482.0 9 | #print nuke.root().name() 10 | # Result: /mnt/karramba/test_zzz/film/sequences/XXX/shots/X01/comp/hqtest.nk 11 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/init.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | nuke.knobDefault("fps", "25") 4 | nuke.knobDefault("format", "1920 1080 0 0 1920 1080 1 HD") 5 | nuke.knobDefault("proxy_type", "format") 6 | nuke.knobDefault("before", "black") 7 | nuke.knobDefault("after", "black") 8 | nuke.knobDefault("on_error", "checkerboard") 9 | nuke.addSequenceFileExtension("rat") 10 | nuke.addSequenceFileExtension("pic") 11 | 12 | #nuke.knobDefault("Root.monitorLut", "linear") 13 | #nuke.knobDefault("Root.viewerLut", "linear") 14 | #nuke.knobDefault("Root.int8Lut", "linear") 15 | #nuke.knobDefault("Root.int16Lut", "linear") 16 | #nuke.knobDefault("Root.logLut", "linear") 17 | #nuke.knobDefault("Root.floatLut", "linear") 18 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/init.tcl: -------------------------------------------------------------------------------- 1 | #plugin_addpath "//bigboy/d/tfxtools/Nuke/gizmo" 2 | #plugin_addpath "//bigboy/d/tfxtools/Nuke/python" 3 | #plugin_addpath "//bigboy/d/tfxtools/Nuke/tcl" 4 | 5 | #plugin_addpath "/mnt/bigboy/tfxtools/Nuke/gizmo" 6 | #plugin_addpath "/mnt/bigboy/tfxtools/Nuke/python" 7 | #plugin_addpath "/mnt/bigboy/tfxtools/Nuke/tcl" 8 | 9 | #plugin_addpath "/Volumes/d/tfxtools/Nuke/gizmo" 10 | #plugin_addpath "/Volumes/d/tfxtools/Nuke/python" 11 | #plugin_addpath "/Volumes/d/tfxtools/Nuke/tcl" 12 | 13 | add_format "4096 2304 1.0 RED 4K" 14 | #add_format "4096 2048 1.0 RED 4K 2:1" 15 | add_format "3072 1728 1.0 RED 3K" 16 | #add_format "3072 1152 1.0 RED 3K 2:1" 17 | add_format "2048 1152 1.0 RED 2K" 18 | #add_format "2048 1024 1.0 RED 2K 2:1" 19 | add_format "1024 576 1.0 RED 1K" 20 | #add_format "1024 512 1.0 RED 1K 2:1" 21 | 22 | add_format "768 576 1.0 PAL square" 23 | 24 | knob_default root.format "1920 1080 1" 25 | knob_default root.proxy_format "960 540 1" -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/mocha_autoimport.py: -------------------------------------------------------------------------------- 1 | def MochaImport(): 2 | 3 | """ Automatically creates tracker node using *.txt files from Mocha 4 | written by Anton Mitrakhov """ 5 | 6 | # gets input files 7 | # import pipe 8 | # asset_obj = None 9 | # start_path = '/mnt/karramba/' 10 | # try: 11 | # asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 12 | # except: 13 | # print "Bla" 14 | # if asset_obj: 15 | # start_path = asset_obj.GetDataPath() + os.sep + 'tracks' + os.sep 16 | input = nuke.getFilename("Select Mocha *.txt file to import", "*_Tracker?.txt") 17 | if input == None: return 18 | 19 | # parses input folder 20 | path = "/".join(input.split("/")[:-1]) 21 | fname = input.split("/")[-1].split("Tracker")[0] 22 | mask = fname + "Tracker" 23 | labelname = fname.rstrip("_") 24 | tracklist = os.listdir(path) 25 | 26 | # makes list of "yours" trackers from input folder 27 | flist = [path + "/" + x for x in tracklist if x[:len(mask)] == mask] 28 | flist.sort() 29 | if len(flist) !=4: 30 | nuke.message("Not a proper Mocha data") 31 | return 32 | 33 | # creates output tracker node 34 | tk = nuke.createNode("Tracker3") 35 | tk.knob("transform").setValue("match-move") 36 | tk.knob("label").setValue(labelname) 37 | n = 1 38 | 39 | # sets values for node knobs 40 | for file in flist: 41 | xraw = [] 42 | yraw = [] 43 | tracker = open(file, "r") 44 | for line in tracker: 45 | xraw.append(line.split(" ")[0]) 46 | yraw.append(line.split(" ")[1].rstrip("\n")) 47 | trackx = "{curve i x"+ str(nuke.animationStart()) +" "+ " ".join(xraw) +"}" 48 | tracky = "{curve i x"+ str(nuke.animationStart()) +" "+ " ".join(yraw) +"}" 49 | track = trackx + " " + tracky 50 | tk.knob("track%s"%n).fromScript(track) 51 | tk.knob("enable%s"%n).setValue(True) 52 | tk.knob("use_for%s"%n).setValue("T R") 53 | 54 | n+=1 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/mocha_autoimport_cornerpin.py: -------------------------------------------------------------------------------- 1 | def MochaImportCornerPin(): 2 | 3 | """ Automatically creates cornerpin node using *.txt files from Mocha 4 | written by Anton Mitrakhov """ 5 | 6 | # gets input files 7 | # import pipe 8 | start_path = '/mnt/karramba/' 9 | # asset_obj = None 10 | # try: 11 | # asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 12 | # except: 13 | # print "Bla" 14 | # if asset_obj: 15 | # start_path = asset_obj.GetDataPath() + os.sep + 'tracks' + os.sep 16 | input = nuke.getFilename("Select Mocha *.txt file to import", "*_Tracker?.txt") 17 | if input == None: return 18 | 19 | # parses input folder 20 | path = "/".join(input.split("/")[:-1]) 21 | fname = input.split("/")[-1].split("Tracker")[0] 22 | mask = fname + "Tracker" 23 | labelname = fname.rstrip("_") 24 | tracklist = os.listdir(path) 25 | 26 | # makes list of "yours" trackers from input folder 27 | flist = [path + "/" + x for x in tracklist if x[:len(mask)] == mask] 28 | flist.sort() 29 | if len(flist) !=4: 30 | nuke.message("Not a proper Mocha data") 31 | return 32 | 33 | # creates output tracker node 34 | cp = nuke.createNode("CornerPin2D") 35 | cp.knob("label").setValue(labelname) 36 | cp.addKnob(nuke.Tab_Knob("RefTab", 'Reference "From" frame')) 37 | cp.addKnob(nuke.Int_Knob("RefFrame", "ReferenceFrame")) 38 | cp.addKnob(nuke.PyScript_Knob("sf", "Set to current frame")) 39 | cp.knob('sf').setCommand("nuke.selectedNode().knob('RefFrame').setValue(nuke.frame())") 40 | n = 1 41 | 42 | # sets values for node knobs 43 | for file in flist: 44 | xraw = [] 45 | yraw = [] 46 | tracker = open(file, "r") 47 | for line in tracker: 48 | xraw.append(line.split(" ")[0]) 49 | yraw.append(line.split(" ")[1].rstrip("\n")) 50 | trackx = "{curve i x"+ str(nuke.animationStart()) +" "+ " ".join(xraw) +"}" 51 | tracky = "{curve i x"+ str(nuke.animationStart()) +" "+ " ".join(yraw) +"}" 52 | track = trackx + " " + tracky 53 | 54 | cp.knob("to%s"%n).fromScript(track) 55 | cp.knob("from%s"%n).fromScript("{to%s(RefFrame)} {to%s(RefFrame)}"%(n,n)) 56 | 57 | n+=1 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/nuke_mari.dat: -------------------------------------------------------------------------------- 1 | version = 1.4v4 2 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/picReader.tcl: -------------------------------------------------------------------------------- 1 | load ratReader 2 | 3 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/projectioncam.py: -------------------------------------------------------------------------------- 1 | ''' Creates ProjectionCam setup from selected camera 2 | for Nuke5.1vx 3 | written by Anton Mitrakhov ''' 4 | 5 | 6 | def ProjectionCam(): 7 | 8 | try: 9 | cam = nuke.selectedNode() 10 | 11 | # returns if nothing selected 12 | 13 | except ValueError: 14 | nuke.message('Select a camera node to project from') 15 | return 16 | 17 | # returns if selected node isn't a camera 18 | 19 | if cam.Class() not in ['Camera','Camera2']: 20 | nuke.message('Not a camera node') 21 | return 22 | 23 | # checking the script for existing ProjectionCam nodes, to put a proper name 24 | 25 | input = nuke.allNodes() 26 | y = "ProjectionCam" 27 | list = [int(x.name().split(y)[-1]) for x in input if x.name()[:len(y)] == y] 28 | 29 | n = 1 30 | 31 | if list != []: 32 | n = max(list) + 1 33 | 34 | # creates a ProjCam node 35 | 36 | cam.knob('selected').setValue(False) 37 | prcam = nuke.createNode('Camera') 38 | prcam.addKnob(nuke.Tab_Knob('RefTab', 'ProjectionFrame')) 39 | prcam.addKnob(nuke.Int_Knob('RefFrame', 'ReferenceFrame')) 40 | prcam.knob('name').setValue("ProjectionCam%s"%n) 41 | prcam.knob('label').setValue('On frame:\n[value RefFrame]') 42 | prcam.knob('RefFrame').setValue(nuke.frame()) 43 | 44 | # setting values for translate, rotation and scaling 45 | 46 | tr = (('{' + cam.knob('name').value() + '.' + 'translate' + '(RefFrame)' + '}' + ' ')*3).rstrip(' ') 47 | prcam.knob('translate').fromScript(tr) 48 | rt = (('{' + cam.knob('name').value() + '.' + 'rotate' + '(RefFrame)' + '}' + ' ')*3).rstrip(' ') 49 | prcam.knob('rotate').fromScript(rt) 50 | sc = (('{' + cam.knob('name').value() + '.' + 'scaling' + '(RefFrame)' + '}' + ' ')*3).rstrip(' ') 51 | prcam.knob('scaling').fromScript(sc) 52 | 53 | # values for focal length and apertures 54 | 55 | prcam.knob('focal').fromScript(cam.knob('name').value() + '.' + 'focal' + '(RefFrame)') 56 | prcam.knob('haperture').setValue(cam.knob('haperture').value()) 57 | prcam.knob('vaperture').setValue(cam.knob('vaperture').value()) 58 | 59 | # rot and tr orders 60 | 61 | prcam.knob('xform_order').setValue(cam.knob('xform_order').value()) 62 | prcam.knob('rot_order').setValue(cam.knob('rot_order').value()) 63 | 64 | # creates a Project3D node 65 | proj = nuke.createNode('Project3D') 66 | proj.knob('ypos').setValue(prcam.knob('ypos').value()) 67 | proj.knob('xpos').setValue(prcam.knob('xpos').value() + 120) 68 | 69 | prcam.setInput(0, None) 70 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/pythonhelp.py: -------------------------------------------------------------------------------- 1 | def PythonHelp(): 2 | import os 3 | os.system('/usr/bin/kate /usr/pipeline/software/nuke/SCRIPTS/PythonHelp.txt &') 4 | 5 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/renamenodes.py: -------------------------------------------------------------------------------- 1 | # ### Rename several nodes at once 2 | # ### renamenodes.py 3 | # ### v2.1 - Last modified: 09/12/2008 4 | # ### Written by Diogo Girondi 5 | # ### diogogirondi@gmail.com 6 | 7 | import nuke 8 | 9 | def renamenodes(): 10 | 11 | sn = nuke.selectedNodes() 12 | sn.reverse() 13 | 14 | if sn != []: 15 | newname = nuke.getInput("New name:") 16 | for index, n in enumerate(sn): 17 | n.knob('name').setValue(newname.replace(' ', '_') + str(index+1)) 18 | else: 19 | nuke.message("Rename Nodes:\nSelect at least one node") -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/render_panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2007 The Foundry Visionmongers Ltd. All Rights Reserved. 2 | 3 | # This is copied directly from execute_panel.py with the exception 4 | # of changing "execute" to "render" but is likely to evolve 5 | # over time with other rendering-specific options. 6 | 7 | import re 8 | import nuke 9 | 10 | def render_panel(_list): 11 | nuke.tcl('render this') -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/slate.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import pipe 4 | import os 5 | import socket 6 | import time 7 | 8 | 9 | def Slate(): 10 | 11 | sObj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 12 | 13 | # pInfo values 14 | 15 | pName = sObj.GetProject().name 16 | 17 | sqName = sObj.GetShot().seq_name 18 | 19 | sName = sObj.GetShot().name 20 | 21 | movPath = sObj.GetShot().GetOutPath() + '/dailies/' 22 | 23 | if os.listdir(movPath): 24 | 25 | vNum = str(max([int(x.rsplit('.', 2)[-2].split('v')[-1]) for x in os.listdir(movPath) if x[:len(sName)] == sName]) + 1) 26 | 27 | else: 28 | 29 | vNum = '1' 30 | 31 | 32 | # sInfo values 33 | 34 | sDescr = sObj.GetDescription() 35 | 36 | notes = nuke.getInput('Enter submission notes:\animation approval, rig removal approval etc', sDescr + ' approval') 37 | 38 | mName = socket.gethostname().split('.', 1)[0] 39 | 40 | uVoc = {'scooby': 'Hanna Kucherevich', 41 | 'porky': 'Anton Mitrakhov', 42 | 'vinny': 'Zhanna Fitsay', 43 | 'pluto':'Ievgen Kulieshov', 44 | 'bender':'Denis Siplenko', 45 | 'daffy':'Yevgen Skorobogatko', 46 | 'piglet':'Ilya Goncharov', 47 | 'lynx':'Alexandra Glukhova', 48 | 'casper':'Vladimir Mikheyenko', 49 | 'kermit':'Vlad Scripnik'} 50 | 51 | if not mName in uVoc.keys(): 52 | 53 | aName = nuke.getInput('Enter your name:', 'Alexander Koreshkov') 54 | 55 | else: 56 | 57 | aName = uVoc[mName] 58 | 59 | 60 | res = nuke.root().knob('format').value().name() + ' ' + str(nuke.root().knob('format').value().width()) + 'x' + str(nuke.root().knob('format').value().height()) 61 | 62 | tFC = str(int(nuke.animationEnd() - nuke.animationStart()) + 1) + ' frames' 63 | 64 | fps = str(int(nuke.root().knob('fps').value())) + ' fps' 65 | 66 | dOS = strftime('%y.%m.%d') 67 | 68 | 69 | 70 | # slate node creation 71 | 72 | s = nuke.createNode('Slate') 73 | 74 | s.knob('pInfo').setValue('Project: ' + pName + 75 | '\nSequence: ' + sqName + 76 | '\nShot: ' + sName + 77 | '\nVersion: ' + vNum) 78 | 79 | s.knob('sInfo').setValue('Shot description: ' + sDescr + 80 | '\nNotes: ' + notes + 81 | '\nArtist: ' + aName + 82 | '\nResolution: ' + res + 83 | '\nTotal frame count: ' + tFC + 84 | '\nFrame Rate: ' + fps + 85 | '\nDate of submission: ' + dOS) 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/slate_tri.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import os 4 | import socket 5 | import time 6 | 7 | 8 | def Slate(): 9 | s = nuke.createNode('TriWrite') 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/tfxGetResources.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import browser 4 | import filesys 5 | 6 | def GetResources(): 7 | asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 8 | if not asset_obj: raise Exception('Script is not belong pipeline') 9 | proj_name = asset_obj.GetProject() 10 | # getParent() 11 | # type, db_id 12 | proc = subprocess.Popen('browser -c resources -a %s'%asset_obj.db_id, shell=True, stdout=subprocess.PIPE, ) 13 | stdout_value = proc.communicate()[0].strip() 14 | if stdout_value == 'cancel': return None 15 | imseq = filesys.ImageSequence(stdout_value) 16 | 17 | range = imseq.getRange() 18 | user_text = '%s%s%s%s%%0%sd.%s %s-%s'%(imseq.getPath(),os.sep,imseq.getFileName(),imseq.getSep(),imseq.getLengthOfPadding(),imseq.getExt(),range[0],range[1]) 19 | 20 | name_node = '__%s__'%imseq.getFileName().upper().replace('.','_') 21 | 22 | n = nuke.toNode(name_node) 23 | if not n: 24 | n = nuke.createNode('Read', inpanel=False) 25 | n.setName(name_node) 26 | n.knob('file').fromUserText(user_text) 27 | 28 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/tvco.tcl: -------------------------------------------------------------------------------- 1 | proc tvco {} { 2 | global env 3 | global WIN32 4 | 5 | set tempPath "" 6 | if {$WIN32} { 7 | set tempPath $env(TEMP) 8 | } else { 9 | set tempPath "/tmp" 10 | } 11 | 12 | catch { exec "/usr/pipeline/bin/browser" "-m" "nuke" } result 13 | #set result [ string range $result 1 end ] 14 | puts $result 15 | catch { exec "/usr/pipeline/bin/vco" "/film/sequences/SQ01/shots/sh01/comp/compose/compose.nk" "-v" "1" "-p" "gala_spring" "-V" "-m" "gala_spring,469" } resultvco 16 | #catch { exec "/usr/pipeline/bin/vco" $result } resultvco 17 | puts $resultvco 18 | 19 | } -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/up.tcl: -------------------------------------------------------------------------------- 1 | proc up {} { 2 | foreach pScript [glob -nocomplain "[getenv NUKE_AF_PATH]/scripts/*.tcl"] { 3 | source $pScript 4 | puts $pScript 5 | } 6 | return 7 | } 8 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRIPTS/www.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def www(): 4 | os.system('firefox http://youporn.com &') -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/._menu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/._menu.py -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/AEpremult.gizmo: -------------------------------------------------------------------------------- 1 | ### AEpremult v0.1 2 | ### kostia@rukavitsin.com 3 | # 4 | # 5 | #! /opt/Nuke515_64/Nuke5 -nx 6 | version 5.1500 7 | Gizmo { 8 | tile_color 0xa55cff 9 | addUserKnob {20 bgcolor l "BG color"} 10 | addUserKnob {41 color l Color T Constant1.color} 11 | addUserKnob {41 format l Format T Constant1.format} 12 | } 13 | Input { 14 | inputs 0 15 | name Input1 16 | xpos -468 17 | ypos -151 18 | } 19 | set N1eb2e650 [stack 0] 20 | push $N1eb2e650 21 | Constant { 22 | inputs 0 23 | channels rgb 24 | color 0.5 25 | name Constant1 26 | xpos -297 27 | ypos -243 28 | } 29 | ShuffleCopy { 30 | inputs 2 31 | name ShuffleCopy1 32 | xpos -297 33 | ypos -151 34 | } 35 | Invert { 36 | channels {-rgba.red -rgba.green -rgba.blue rgba.alpha} 37 | name Invert1 38 | xpos -297 39 | ypos -122 40 | } 41 | Premult { 42 | name Premult1 43 | xpos -297 44 | ypos -79 45 | } 46 | Merge2 { 47 | inputs 2 48 | operation minus 49 | bbox B 50 | Bchannels {rgba.red rgba.green rgba.blue -rgba.alpha} 51 | name Merge1 52 | xpos -297 53 | ypos -50 54 | } 55 | Output { 56 | name Output1 57 | xpos -297 58 | ypos -3 59 | } 60 | end_group 61 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/AutoIBK.py: -------------------------------------------------------------------------------- 1 | def IBKAuto (): 2 | selNode = nuke.selectedNode() 3 | ibkCol = nuke.nodes.IBKColourV3() 4 | ibkGiz = nuke.nodes.IBKGizmoV3() 5 | ibkGiz.setInput(0,selNode) 6 | ibkGiz.setInput(1,ibkCol) 7 | ibkCol.knob('ypos').setValue(ibkCol.knob('ypos').value()) 8 | ibkCol.knob('xpos').setValue(ibkCol.knob('xpos').value() - 150) 9 | 10 | nuke.menu("Nodes").addCommand("Keyer/IBKAuto", "IBKAuto()", icon="IBKGizmo.png") -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/AutoProxy.py: -------------------------------------------------------------------------------- 1 | def AutoProxy(): 2 | input=nuke.selectedNodes("Read") 3 | n=0 4 | for node in input: 5 | 6 | 7 | #creates output path 8 | path=node.knob ("file").getValue() 9 | npicture=path.split("/")[-1].rsplit(".", 1)[0]+".jpg" 10 | ppath="/".join(path.split("/")[0:-1])+"/proxy" 11 | if not os.path.exists(ppath): 12 | os.mkdir(ppath) 13 | outpath=ppath+"/"+npicture 14 | 15 | #creates render range 16 | outfirst=node.knob ("first").getValue() 17 | outlast=node.knob ("last").getValue() 18 | 19 | #creates write output 20 | output=nuke.createNode ("Write") 21 | nname=output.knob ("name") 22 | oname="Write"+"_"+str(n) 23 | nname.setValue (oname) 24 | opath=output.knob ("file") 25 | opath.setValue (outpath) 26 | output.setInput (0, node) 27 | quality=output.knob ("_jpeg_quality") 28 | quality.setValue(1) 29 | nuke.render (oname, start=int(outfirst), end=int(outlast), incr=1) 30 | n+=1 31 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/BlueSupress.gizmo: -------------------------------------------------------------------------------- 1 | #! /opt/Nuke5/Nuke5 -nx 2 | version 5.1000 3 | Gizmo { 4 | name BlueSupress1 5 | 6 | addUserKnob {20 Suppression} 7 | # addUserKnob {41 expr2 l = T supress_blue.expr2} 8 | addUserKnob {26 "" T "Supresses blue from bluescreen footage"} 9 | 10 | } 11 | Input { 12 | inputs 0 13 | name bluescreen 14 | xpos 0 15 | ypos -50 16 | } 17 | Expression { 18 | expr0 r 19 | expr1 g 20 | expr2 g<=r?(b>g?g:b):(b>g?(g+(g-r)):b) 21 | name supress_blue 22 | xpos 0 23 | ypos 0 24 | } 25 | Output { 26 | name Output1 27 | xpos 0 28 | ypos 50 29 | } 30 | end_group 31 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/CacheD1.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke5/Nuke5.exe -nx 2 | version 5.0 3 | Gizmo { 4 | name cache_D1 5 | tile_color 0xff00ff 6 | note_font "Verdana Bold" 7 | note_font_size 14 8 | selected true 9 | addUserKnob {20 cache_controls l Controls} 10 | addUserKnob {3 pan_v l "Vertical Pan"} 11 | addUserKnob {3 cache l "Cache Size"} 12 | cache 73 13 | addUserKnob {41 color l "Cache Color" T Rectangle1.color} 14 | } 15 | Input { 16 | inputs 0 17 | name Input1 18 | xpos -552 19 | ypos 245 20 | } 21 | Reformat { 22 | type "to box" 23 | box_width 720 24 | box_height 576 25 | box_fixed true 26 | box_pixel_aspect 1.067 27 | resize none 28 | center false 29 | name Reformat01 30 | label "PAL D1" 31 | xpos -552 32 | ypos 309 33 | } 34 | set C10e75f90 [stack 0] 35 | Transform { 36 | translate {0 {pan_v i}} 37 | center {{width/2 i} {height/2 i}} 38 | name frame_shift 39 | label "vertical movement" 40 | xpos -552 41 | ypos 348 42 | } 43 | clone $C10e75f90 { 44 | xpos -552 45 | ypos 387 46 | selected false 47 | } 48 | Rectangle { 49 | output {rgba.red rgba.green rgba.blue -rgba.alpha} 50 | cliptype bbox 51 | invert true 52 | invert_mask true 53 | area {0 {cache i} 720 {height-this.y i}} 54 | color 0 55 | name Rectangle1 56 | label "color cache" 57 | xpos -552 58 | ypos 426 59 | } 60 | Shuffle { 61 | alpha white 62 | name Shuffle01 63 | label "erase alpha" 64 | xpos -552 65 | ypos 465 66 | } 67 | Output { 68 | name Output1 69 | xpos -552 70 | ypos 550 71 | } 72 | end_group 73 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/ChangeMissingFrame.py: -------------------------------------------------------------------------------- 1 | import nuke 2 | def change_Missing(): 3 | 4 | panel = nuke.Panel("Change Missing Frame Option") 5 | panel.addBooleanCheckBox("selectedNodes only", "0 1") 6 | panel.addEnumerationPulldown("missing frames", "error black checkerboard nearestframe") 7 | panel.show() 8 | m = panel.value("missing frames") 9 | n =panel.value("selectedNodes only") 10 | if n == True: 11 | for i in nuke.selectedNodes(): 12 | i.knob("on_error").setValue(m) 13 | 14 | else: 15 | for a in nuke.allNodes("Read"): 16 | a.knob("on_error").setValue(m) 17 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/ColorPreMult.gizmo: -------------------------------------------------------------------------------- 1 | #! /opt/Nuke502/Nuke5 -nx 2 | version 5.0200 3 | Gizmo { 4 | } 5 | Input { 6 | inputs 0 7 | name Input1 8 | xpos -935 9 | ypos 56 10 | } 11 | Dot { 12 | name Dot54 13 | xpos -901 14 | ypos 121 15 | } 16 | set Nc6f23c8 [stack 0] 17 | Dot { 18 | name Dot55 19 | xpos -977 20 | ypos 121 21 | } 22 | Bezier { 23 | cliptype bbox 24 | replace true 25 | maskChannel -rgba.alpha 26 | points {{ 27 | {-1769 -4111 0 2.64} 28 | {-1411.6 77428.5 0 0.48} 29 | {147560 77340 0 -0.5} 30 | {147605 -4111.6 0 -2.66} 31 | }} 32 | shape {} 33 | center {512 256} 34 | color 0.5 35 | name Bezier1 36 | xpos -1011 37 | ypos 139 38 | } 39 | set Nc6f2628 [stack 0] 40 | Viewer { 41 | fps 25 42 | name Viewer1 43 | xpos -1174 44 | ypos 139 45 | } 46 | push $Nc6f23c8 47 | Dot { 48 | name Dot48 49 | xpos -901 50 | ypos 180 51 | } 52 | set Nc940b08 [stack 0] 53 | Dot { 54 | name Dot49 55 | xpos -901 56 | ypos 288 57 | } 58 | set Ne4fdb28 [stack 0] 59 | Dot { 60 | name Dot53 61 | xpos -901 62 | ypos 324 63 | } 64 | push $Ne4fdb28 65 | push $Nc940b08 66 | push $Nc6f2628 67 | Copy { 68 | inputs 2 69 | from0 rgba.alpha 70 | to0 rgba.alpha 71 | name Copy1 72 | xpos -1011 73 | ypos 168 74 | } 75 | Invert { 76 | channels alpha 77 | name Invert1 78 | xpos -1011 79 | ypos 211 80 | } 81 | Premult { 82 | name Premult1 83 | xpos -1011 84 | ypos 254 85 | } 86 | Merge2 { 87 | inputs 2 88 | operation minus 89 | name Merge1 90 | xpos -1011 91 | ypos 283 92 | } 93 | Copy { 94 | inputs 2 95 | from0 rgba.alpha 96 | to0 rgba.alpha 97 | name Copy2 98 | xpos -1011 99 | ypos 312 100 | } 101 | Output { 102 | name Output1 103 | selected true 104 | xpos -1011 105 | ypos 389 106 | } 107 | end_group 108 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/CoreMatte.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke502/nuke5.exe -nx 2 | version 5.0200 3 | Gizmo { 4 | addUserKnob {20 corematte l "Matte controls"} 5 | addUserKnob {41 size_eode l Erode T Erode1.size} 6 | addUserKnob {41 size_blur l Blur T Blur1.size} 7 | } 8 | Input { 9 | inputs 0 10 | name Input1 11 | xpos -479 12 | ypos 161 13 | } 14 | set N11b411f8 [stack 0] 15 | Dot { 16 | name Dot3 17 | xpos -445 18 | ypos 236 19 | } 20 | set N11402cc8 [stack 0] 21 | Erode { 22 | size 1.86843 23 | name Erode1 24 | xpos -382 25 | ypos 226 26 | } 27 | Blur { 28 | channels alpha 29 | size 4 30 | name Blur1 31 | xpos -382 32 | ypos 265 33 | } 34 | Dot { 35 | name Dot4 36 | xpos -348 37 | ypos 324 38 | } 39 | push $N11402cc8 40 | Merge2 { 41 | inputs 2 42 | operation max 43 | Bchannels alpha 44 | name Max 45 | xpos -479 46 | ypos 320 47 | } 48 | Output { 49 | name Output1 50 | xpos -479 51 | ypos 413 52 | } 53 | push $N11b411f8 54 | Viewer { 55 | name Viewer1 56 | xpos -479 57 | ypos 188 58 | } 59 | end_group 60 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/DejaVuSansCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/DejaVuSansCondensed.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/FHcheck.py: -------------------------------------------------------------------------------- 1 | def FH(): 2 | n = nuke.selectedNodes() 3 | for i in n: 4 | f = nuke.createNode('FrameHold') 5 | f.knob('first_frame').setValue(i.knob('first').getValue()) 6 | f.setInput(0, i) 7 | f.knob('ypos').setValue(i.knob('ypos').getValue() + 20) -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/FakeMotionBlur.gizmo: -------------------------------------------------------------------------------- 1 | ####################################################### 2 | # 3 | # FakeMotionBlur v0.1 4 | # kostia@rukavitsin.com 5 | # This gismo operates with EXR image contained the following VRayVelocity pass 6 | # 7 | ####################################################### 8 | #! /opt/Nuke5/Nuke5 -nx 9 | 10 | version 5.0000 11 | Gizmo { 12 | name FakeMoBlur1 13 | tile_color 0xffff 14 | label v0.1 15 | selected true 16 | xpos -185 17 | ypos -43 18 | 19 | help "This gizmo requires EXR with VRayVelocity pass" 20 | 21 | addUserKnob {20 MotionBlur} 22 | addUserKnob {41 passname l "Motion pass" T Shuffle1.in} 23 | addUserKnob {6 mblur_switch l "Enable Motion Blur" t "Also disables \"Objects\" channel" +STARTLINE} 24 | mblur_switch true 25 | addUserKnob {7 mblur_amount l "Motion Blur Size" t "0.5 is default for motion blur from a standard shutter"} 26 | mblur_amount 0.5 27 | addUserKnob {41 offset l "Frame Offset" t "Shutter starts at frame + this.\nDefault is -0.5" T VectorBlur1.offset} 28 | addUserKnob {6 mblur1 l Tweak -STARTLINE} 29 | addUserKnob {6 mblur2 l Boost -STARTLINE} 30 | } 31 | 32 | Input { 33 | inputs 0 34 | name img 35 | xpos -231 36 | ypos -154 37 | } 38 | set Nf0baaf0 [stack 0] 39 | Shuffle { 40 | in VRayVelocity 41 | alpha black 42 | out rgb 43 | name Shuffle1 44 | selected true 45 | xpos -121 46 | ypos -57 47 | } 48 | set N12594258 [stack 0] 49 | Grade { 50 | add 0.5 51 | name Grade1 52 | xpos -121 53 | ypos -30 54 | disable {{!parent.mblur1 i}} 55 | } 56 | Multiply { 57 | channels {-rgba.red rgba.green -rgba.blue} 58 | value -1 59 | name Multiply1 60 | xpos -121 61 | ypos 9 62 | } 63 | Expression { 64 | expr0 ((u-0.5)*(input.width*pixel_aspect))/2 65 | expr1 ((v-0.5)*(input.width*pixel_aspect))/2 66 | channel2 {-rgba.red -rgba.green -rgba.blue} 67 | name Expression1 68 | xpos -121 69 | ypos 48 70 | disable {{!parent.mblur2 i}} 71 | } 72 | push $Nf0baaf0 73 | ShuffleCopy { 74 | inputs 2 75 | in rgb 76 | red red 77 | green green 78 | out motion 79 | name ShuffleCopy1 80 | label "Velocity channels" 81 | xpos -231 82 | ypos 42 83 | } 84 | VectorBlur { 85 | channels rgba 86 | uv motion 87 | scale {{parent.mblur_amount i}} 88 | method forward 89 | alpha rgba.alpha 90 | name VectorBlur1 91 | xpos -231 92 | ypos 81 93 | disable {{!parent.mblur_switch i}} 94 | } 95 | Output { 96 | name Output1 97 | xpos -231 98 | ypos 155 99 | } 100 | push $N12594258 101 | Viewer { 102 | fps 25 103 | name Viewer1 104 | xpos 920 105 | ypos 228 106 | } 107 | end_group 108 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/FrameNumber.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke5/Nuke5.exe -nx 2 | version 5.0 3 | Gizmo { 4 | name Frame1 5 | selected true 6 | xpos 504 7 | ypos 34 8 | addUserKnob {20 number_ctrl l Number} 9 | addUserKnob {41 color T number1.color} 10 | addUserKnob {41 translate T number1.translate} 11 | addUserKnob {41 size T number1.size} 12 | addUserKnob {26 "" l ""} 13 | addUserKnob {41 font T number1.font} 14 | addUserKnob {41 xjustify l justify T number1.xjustify} 15 | addUserKnob {26 "" l ""} 16 | addUserKnob {41 output T number1.output} 17 | addUserKnob {41 opacity T number1.opacity} 18 | } 19 | Input { 20 | inputs 0 21 | name Input1 22 | xpos 432 23 | ypos 31 24 | } 25 | Text { 26 | message "\[format %05d \[frame]]" 27 | Font 1 28 | font //bigboy/D/tfxtools/Nuke/LiberMonoBold.ttf 29 | size 40 30 | xjustify right 31 | translate {150 10} 32 | color {1 0 0 0} 33 | name number1 34 | xpos 432 35 | ypos 105 36 | } 37 | Output { 38 | name Output1 39 | xpos 432 40 | ypos 171 41 | } 42 | Viewer { 43 | name Viewer1 44 | xpos 271 45 | ypos 79 46 | } 47 | end_group 48 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/ImportTrackData.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # ImportTrackData 2007-08 demOOn.k@gmail.com 3 | # ver 0.2 4 | # 5 | # Support PfTrackrack and SynthEyes (custom exporters needed) 6 | # Support versons 7 | # Thanx DenizZ 8 | # 9 | 10 | proc ImportTrackData {track_file} { 11 | # set fTrack [open $track_file RDONLY] 12 | if {[catch {set fTrack [open $track_file RDONLY]} err]} { 13 | puts "Error $err" 14 | return 0 15 | } 16 | set data [read $fTrack] 17 | close $fTrack 18 | set data [split $data "\n"] 19 | set last_name {} 20 | 21 | foreach i $data { 22 | #is it name of tracker? 23 | if [string first \" $i]==0 { 24 | if [info exists cur_node] { 25 | knob $cur_node.translate [list $x_values $y_values] 26 | } 27 | set x_values "curve" 28 | set y_values "curve" 29 | set i [string trim $i "\""] 30 | set _name [split [file tail $track_file] "."] 31 | set _name "[lindex $_name 0]_[lindex $_name 1]_[string trimleft $i Tracker]_v" 32 | for {set j 1} {$j<10000} {incr j} { 33 | set name ${_name}${j} 34 | if {![exists $name]} {break} 35 | } 36 | push 0 37 | Position {} 38 | set cur_node [stack 0] 39 | # replace space whith "_" 40 | set name [regsub -all " " $name "_"] 41 | knob $cur_node.name $name 42 | 43 | } 44 | # is a right string? 45 | set nums [split $i] 46 | if {[llength $nums] == 4} { 47 | set cur_frame [lindex $nums 0] 48 | set cur_x [lindex $nums 1] 49 | set cur_y [lindex $nums 2] 50 | set cur_vis [lindex $nums 3] 51 | lappend x_values "x$cur_frame" $cur_x 52 | lappend y_values "x$cur_frame" $cur_y 53 | } 54 | } 55 | # Setup for last node 56 | if [info exists cur_node] { 57 | knob $cur_node.translate [list $x_values $y_values] 58 | knob $cur_node.selected true 59 | } 60 | return 1 61 | } 62 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/LinkTo.gizmo: -------------------------------------------------------------------------------- 1 | #! /opt/Nuke5/Nuke5 -nx 2 | Gizmo { 3 | help "Links to a root directory that will automatically link all those missing files. Footage should have this in name [knob LinkTo.pathbase]" 4 | inputs 0 5 | name LinkTo 6 | addUserKnob {20 User} 7 | addUserKnob {2 pathbase l "Project's Root Directory" t "This should point to the root folder that you created for the images and scripts. "} 8 | pathbase "Read nodes like [knob LinkTo.pathbase]/src/scan_%07d.dpx" 9 | addUserKnob {1 path1 l Path1} 10 | path1 "//server/share" 11 | addUserKnob {1 path2 l Path2} 12 | path2 "/mnt/share" 13 | addUserKnob {1 path3 l Path3} 14 | path3 "/Volumes/share" 15 | addUserKnob {1 template l Template} 16 | template "[knob LinkTo.pathbase]" 17 | 18 | } 19 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/NFX/N_LookAtMasked.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 NFXPlugins. All Rights Reserved. 2 | # 3 | # SOURCE FILE: N_LookAtMasked.py 4 | # DIR: /repository/NFX/trunk/src/N_LookAtMasked 5 | # 6 | # MISC: tab-width 2 7 | # 8 | # DESCRIPTION: 9 | # Transform node that rotates the input object to look at a XY vector. This LookAt node 10 | # is contained in a NukeWrapper for a channel selection knob and mask. 11 | # 12 | 13 | nuke.load("N_LookAt") 14 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/N_LookAtMasked.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 NFXPlugins. All Rights Reserved. 2 | # 3 | # SOURCE FILE: N_LookAtMasked.py 4 | # DIR: /repository/NFX/trunk/src/N_LookAtMasked 5 | # 6 | # MISC: tab-width 2 7 | # 8 | # DESCRIPTION: 9 | # Transform node that rotates the input object to look at a XY vector. This LookAt node 10 | # is contained in a NukeWrapper for a channel selection knob and mask. 11 | # 12 | 13 | nuke.load("N_LookAt") 14 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/PosP.py: -------------------------------------------------------------------------------- 1 | n = nuke.selectedNode() 2 | x = 800 3 | y = 600 4 | 5 | coord = [] 6 | sphList = [] 7 | mrgList = [] 8 | l = 0 9 | ll = 0 10 | h = [] 11 | 12 | for i in range(x): 13 | for j in range(y): 14 | alpha = nuke.sample(n, 'alpha', i, j) 15 | if alpha != 0: 16 | r = [nuke.sample(n, 'red', i, j),nuke.sample(n, 'green', i, j),nuke.sample(n, 'blue', i, j)] 17 | coord.append(r) 18 | 19 | g = nuke.createNode('Group') 20 | 21 | g.begin() 22 | 23 | for c in coord[::10]: 24 | 25 | if l == 1000 or len(coord) == ll: 26 | sphList.append(h) 27 | h = [] 28 | l = 0 29 | 30 | else: 31 | a = nuke.createNode('Sphere', 'inpanel=False') 32 | a['translate'].setValue(c) 33 | a['rows'].setValue(2) 34 | a['columns'].setValue(2) 35 | a['uniform_scale'].setExpression('Group1.SPHScale', 0) 36 | a.setInput(0, None) 37 | h.append(a) 38 | 39 | l += 1 40 | ll += 1 41 | 42 | for n in sphList: 43 | m = nuke.createNode('MergeGeo') 44 | mrgList.append(m) 45 | for s in zip(n, range(len(n))): 46 | m.setInput(s[1], s[0]) 47 | 48 | m = nuke.createNode('MergeGeo') 49 | 50 | for mrg in zip(mrgList, range(len(mrgList))): 51 | m.setInput(mrg[1], mrg[0]) 52 | 53 | o = nuke.createNode('Output') 54 | 55 | 56 | g.addKnob(nuke.Tab_Knob('SphScale', 'Scaling')) 57 | g.addKnob(nuke.Double_Knob('SPHScale', 'Scaling')) 58 | g['SPHScale'].setValue(0.5) 59 | g.end() 60 | 61 | 62 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/SubmitToDeadline.tcl: -------------------------------------------------------------------------------- 1 | ########################################################### 2 | # SubmitToDeadline.tcl 3 | # Ryan Russell (Prime Focus), 2009 4 | # 5 | # Proxy Nuke tcl script that sources the repository 6 | # submission script. 7 | ########################################################### 8 | 9 | proc SubmitToDeadline {} { 10 | global env 11 | global WIN32 12 | 13 | set tempPath "" 14 | if {$WIN32} { 15 | set tempPath $env(TEMP) 16 | } else { 17 | set tempPath "/tmp" 18 | } 19 | 20 | set outputFilename "$tempPath/output.txt" 21 | #set outputFilename "/tmp/output.txt" 22 | set exitCodeFilename "$tempPath/exitCode.txt" 23 | 24 | # Call DeadlineCommandBG to get the repository root. 25 | 26 | if {[file exists "/Applications/Deadline/Resources/bin/deadlinecommandbg"] == 1} { 27 | exec "/Applications/Deadline/Resources/bin/deadlinecommandbg" "-outputFiles" $outputFilename $exitCodeFilename "-getrepositoryroot" 28 | } else { 29 | if {[catch {exec "deadlinecommandbg" "-outputFiles" $outputFilename $exitCodeFilename "-getrepositoryroot"} results]} { 30 | 31 | } 32 | } 33 | 34 | # Read in the output file which contains the repository root. 35 | catch {set fileid [open $outputFilename r]} 36 | gets $fileid repositoryRoot 37 | close $fileid 38 | 39 | #trim if we find a non printable character at the start 40 | set firstChar [string index $repositoryRoot 0] 41 | if {![string is print $firstChar]} { 42 | set repositoryRoot [string trim $repositoryRoot $firstChar] 43 | } 44 | 45 | # Prepend the root to the submission script path and execute it. 46 | set scriptFilename [file join $repositoryRoot "Submission/Nuke/SubmitNukeToDeadlineLinux.tcl"] 47 | 48 | source $scriptFilename 49 | } -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/SynthObj.gizmo: -------------------------------------------------------------------------------- 1 | ### kostia@rukavitsin.com 2 | #! /opt/Nuke51/Nuke5 -nx 3 | version 5.100 4 | Gizmo { 5 | tile_color 0x99ffff 6 | addUserKnob {20 synthtab l SynthEyes} 7 | addUserKnob {41 file T SyntEyesObj1.file} 8 | addUserKnob {41 reload -STARTLINE T SyntEyesObj1.reload} 9 | addUserKnob {41 update_mode l "update mode" T SyntEyesObj1.update_mode} 10 | addUserKnob {41 full_geometry_frame l "primitives frame" T SyntEyesObj1.full_geometry_frame} 11 | addUserKnob {41 read_texture_w_coord l "read texture w coord" T SyntEyesObj1.read_texture_w_coord} 12 | addUserKnob {26 ""} 13 | addUserKnob {41 display T SyntEyesObj1.display} 14 | addUserKnob {41 selectable -STARTLINE T SyntEyesObj1.selectable} 15 | addUserKnob {41 render_mode l render T SyntEyesObj1.render_mode} 16 | addUserKnob {26 ""} 17 | addUserKnob {41 import_chan l "import chan file" T SyntEyesObj1.import_chan} 18 | addUserKnob {41 export_chan l "export chan file" -STARTLINE T SyntEyesObj1.export_chan} 19 | addUserKnob {41 xform_order l "transform order" T SyntEyesObj1.xform_order} 20 | addUserKnob {41 rot_order l "rotation order" T SyntEyesObj1.rot_order} 21 | addUserKnob {26 "" -STARTLINE T "Must be in XZY"} 22 | addUserKnob {13 synthpos l "Synth position"} 23 | addUserKnob {13 synthrot l "Synth rotation"} 24 | addUserKnob {41 scaling l scale T SyntEyesObj1.scaling} 25 | addUserKnob {41 uniform_scale l "uniform scale" T SyntEyesObj1.uniform_scale} 26 | addUserKnob {41 skew T SyntEyesObj1.skew} 27 | addUserKnob {41 pivot T SyntEyesObj1.pivot} 28 | } 29 | Input { 30 | inputs 0 31 | name Input1 32 | xpos 760 33 | ypos 208 34 | } 35 | ReadGeo { 36 | rot_order XZY 37 | translate {{synthpos.x i} {synthpos.z i} {synthpos.y*(-1) i}} 38 | rotate {{synthrot.y i} {synthrot.x i} {synthrot.z*(-1) i}} 39 | name SyntEyesObj1 40 | selected true 41 | xpos 760 42 | ypos 282 43 | } 44 | Output { 45 | name Output1 46 | xpos 760 47 | ypos 340 48 | } 49 | end_group 50 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/TPreview.py: -------------------------------------------------------------------------------- 1 | '''Creates preview jpegs for TCP tracker to dailies folder 2 | for TCP internal use 3 | written by Anton Mitrakhov''' 4 | 5 | def TPreview(): 6 | 7 | import os 8 | from time import strftime 9 | 10 | # gets a list of read nodes 11 | n = nuke.selectedNodes('Read') 12 | for i in n: 13 | 14 | # holds a frame 15 | f = nuke.createNode('FrameHold') 16 | f.knob('first_frame').setValue(i.knob('first').getValue()) 17 | f.setInput(0, i) 18 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 19 | f.knob('ypos').setValue(i.knob('ypos').getValue() + 100) 20 | 21 | # scales image to 0.5 22 | r = nuke.createNode('Reformat') 23 | r.setInput(0, f) 24 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 25 | r.knob('type').setValue('scale') 26 | r.knob('scale').setValue(0.5) 27 | r.knob('ypos').setValue(i.knob('ypos').getValue() + 250) 28 | 29 | # gets output path and filename 30 | fname = i.knob('file').getText().rsplit('.', 1)[0].rsplit('/', 1)[-1] + '.jpg' 31 | fpath = i.knob('file').getText().split('/_src')[0] + '/_out/_dailies/' + strftime('%y.%m.%d') 32 | 33 | # creates write node 34 | w = nuke.createNode('Write') 35 | w.knob('file').setValue(fpath + '/' + fname) 36 | 37 | # checks for path existence 38 | if not os.path.exists(fpath): 39 | os.makedirs(fpath) 40 | 41 | # renders the output 42 | nuke.render (w.knob('name').getText(), start=1, end=1, incr=1) 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/TimeO.py: -------------------------------------------------------------------------------- 1 | def TimeOff(): 2 | n = nuke.selectedNode() 3 | t = nuke.createNode('TimeOffset') 4 | t['time_offset'].setValue( -(n['first'].value() - 1)) -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/Tracker3Dto2D.txt: -------------------------------------------------------------------------------- 1 | Tracker3Dto2D 1.0.0 2 | Stabilises images based on 3D data 3 | 4 | Author: Howard Jones 5 | 6 | This Gizmo combines a tracker with 'reconcile3D' to extend the stabilise/ match move capabilities to more than one point. A use of which might be to stabilise a camera move so that an element can be roto'd easily before applying the match move back to go into the scene. 7 | 8 | Plug in the camera and the source image, copy the appropriate data points - 'create keys' - select tracker points and 'enable, t,r,s' etc, then choose stabilise/ match move/ jitter etc from the transform tab. Smoothing etc can be applied there as with a normal tracker node. 9 | 10 | Needs the camera solved thru a 3D tracker programme and the point cloud x,y,z data. For example from pfTrack export a scene to Nuke using tagged auto/user points to get the camera and the x,y,z points for the points you are interested in. Go into the point cloud group in Nuke (cant remember exact name), copy and paste the positional data from each point into the 'Tracker3Dto2D' gizmo. 11 | 12 | Many thanks to Frank and Ean for sorting out the tcl buttons. 13 | 14 | This Gizmo was made on 5.1v2 -May work on previous versions but you would need to edit the version number in the Gizmo. No guarantees. -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/WaterDistort.gizmo: -------------------------------------------------------------------------------- 1 | #! c:/bin/Nuke5/Nuke5.exe -nx 2 | version 5.1000 3 | Gizmo { 4 | addUserKnob {20 water l "Underwater Effect"} 5 | addUserKnob {41 uv_scale l Power T IDistort1.uv_scale} 6 | addUserKnob {41 blur_scale l "Lens blur" T IDistort1.blur_scale} 7 | addUserKnob {26 "" l Pattern} 8 | addUserKnob {6 preview l "Preview pattern" +STARTLINE} 9 | addUserKnob {41 type l Type T Noise1.type} 10 | addUserKnob {41 size l "Wave length" T Noise1.size} 11 | addUserKnob {41 zoffset l Offset T Noise1.zoffset} 12 | addUserKnob {41 octaves l Frequency T Noise1.octaves} 13 | addUserKnob {41 lacunarity l Granularity T Noise1.lacunarity} 14 | addUserKnob {41 gain l Whites T Noise1.gain} 15 | addUserKnob {41 gamma l Blacks T Noise1.gamma} 16 | } 17 | Input { 18 | inputs 0 19 | name img 20 | xpos -855 21 | ypos 210 22 | } 23 | set N103b85f0 [stack 0] 24 | Noise { 25 | replace true 26 | size 250 27 | octaves 2 28 | lacunarity 3 29 | gain 0.85 30 | center {360 288} 31 | name Noise1 32 | xpos -745 33 | ypos 317 34 | } 35 | set Nf1a0b50 [stack 0] 36 | Noise { 37 | replace true 38 | type {{parent.Noise1.type i}} 39 | size {{parent.Noise1.size i}} 40 | zoffset {{parent.Noise1.zoffset+1 i}} 41 | octaves {{parent.Noise1.octaves i}} 42 | lacunarity {{parent.Noise1.lacunarity i}} 43 | gain {{parent.Noise1.gain i}} 44 | gamma {{parent.Noise1.gamma i}} 45 | center {360 288} 46 | name Noise2 47 | xpos -745 48 | ypos 356 49 | } 50 | push $Nf1a0b50 51 | push $N103b85f0 52 | Copy { 53 | inputs 2 54 | from0 rgba.red 55 | to0 forward.u 56 | from1 -rgba.green 57 | to1 -forward.v 58 | name Copy1 59 | xpos -855 60 | ypos 311 61 | } 62 | Copy { 63 | inputs 2 64 | from0 rgba.red 65 | to0 forward.v 66 | from1 -rgba.green 67 | to1 -forward.v 68 | name Copy2 69 | selected true 70 | xpos -855 71 | ypos 350 72 | } 73 | set N10a3c0d8 [stack 0] 74 | Shuffle { 75 | in motion 76 | blue black 77 | alpha black 78 | name Shuffle1 79 | xpos -745 80 | ypos 418 81 | } 82 | Shuffle { 83 | alpha white 84 | name Shuffle2 85 | xpos -745 86 | ypos 445 87 | } 88 | Crop { 89 | box {{width/2 i} 0 {width i} {height i}} 90 | name Crop2 91 | xpos -745 92 | ypos 472 93 | } 94 | push $N10a3c0d8 95 | IDistort { 96 | uv motion 97 | uv_scale 10 98 | blur forward.u 99 | blur_scale 5 100 | name IDistort1 101 | xpos -855 102 | ypos 433 103 | } 104 | Merge2 { 105 | inputs 2 106 | name Merge1 107 | xpos -855 108 | ypos 472 109 | disable {{!preview i x10 1}} 110 | } 111 | Output { 112 | name Output1 113 | xpos -855 114 | ypos 572 115 | } 116 | end_group 117 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/addconstraintab.py: -------------------------------------------------------------------------------- 1 | # ### Adds a Look Tab where you can set a camera to always look at a object 2 | # ### Derived from a TCL original by Frank Rueter and Broesler 3 | # ### Thanks to Jack Binks for all the help and patience ;) 4 | # ### v1.0 - Last modified: 09/02/2008 5 | # ### Written by Diogo Girondi 6 | # ### diogogirondi@gmail.com 7 | 8 | import nuke 9 | import nukescripts 10 | 11 | def constrain(): 12 | 13 | """Get the selected nodes in the DAG""" 14 | selNodes = nuke.selectedNodes() 15 | 16 | """ Classes that will allow this script to run """ 17 | listNodes = ['Cube', 'Sphere', 'Axis2', 'Card2', 'Cylinder', 'ReadGeo2', 'Spotlight', 'Light2', 'DirectLight', 'Camera', 'Camera2', 'Card'] 18 | cleanList = set(listNodes) 19 | 20 | """ Run for each selected node """ 21 | for i in selNodes: 22 | 23 | """ Get the Class for each node """ 24 | _class = i.Class() 25 | 26 | """ If Class is found on the list (listNodes) add the knobs, otherwise delete vars and do nothing """ 27 | if _class in cleanList: 28 | 29 | """ Sets Knobs """ 30 | lookTab = nuke.Tab_Knob("look", "Constrain") 31 | target = nuke.EvalString_Knob("look_at", "Look at") 32 | setlookObject = nuke.PyScript_Knob("set", "Set", "selNodes = nuke.selectedNodes()\n\nif len(selNodes) == 1:\n\tthisNode = selNodes[-1]\n\tk = thisNode['look_at']\n\t\n\tif k.value() == \"\":\n\t\tlookAt = nuke.getInput(\'Type the target node name\')\n\t\tk.setValue(lookAt)\n\n\telse:\n\t\tlookAt = k.value()\n\t\tk.setValue(lookAt)\n\nelif len(selNodes) > 1:\n\tthisNode = selNodes[-1]\n\tlookAt = selNodes[-2]\n\tk = thisNode['look_at']\n\tk.setValue(lookAt.name())\n\t\nelse:\n\tpass\n\nlookObject = k.value()\n\nxX = \'degrees(atan2(\' + lookObject + \'.translate.y-translate.y,sqrt(pow(\' + lookObject + \'.translate.x-translate.x,2)+pow(\' + lookObject + \'.translate.z-translate.z,2))))\'\nyX = lookObject + \'.translate.z-this.translate.z >= 0 ? 180+degrees(atan2(\' + lookObject + \'.translate.x-translate.x,\' + lookObject + \'.translate.z-translate.z)):180+degrees(atan2(\' + lookObject + \'.translate.x-translate.x,\' + lookObject + \'.translate.z-translate.z))\'\n\nthisNode['rotate'].setExpression(xX, 0)\nthisNode['rotate'].setExpression(yX, 1)\n") 33 | 34 | """ Adds Knobs """ 35 | i.addKnob(lookTab) 36 | i.addKnob(target) 37 | i.addKnob(setlookObject) 38 | 39 | else: 40 | pass 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/addgeotab.py: -------------------------------------------------------------------------------- 1 | # ### Add GEO Tab to the selected Bezier node 2 | # ### Derived from a TCL original by frank@beingfrank.info 3 | # ### Requires Frank's "BezierGeoProc.tcl" installed in Nuke's path 4 | # ### Last modified: 08/31/2008 5 | # ### Written by Diogo Girondi 6 | # ### diogogirondi@gmail.com 7 | 8 | import nuke 9 | import nukescripts 10 | 11 | def addgeotab(): 12 | 13 | """Get the selected nodes in the DAG""" 14 | selnodes = nuke.selectedNodes() 15 | 16 | """ Run for each selected node """ 17 | for i in selnodes: 18 | 19 | """Retrives node Class""" 20 | _class = i.Class() 21 | 22 | """Check node Class and add tab and knobs if successful""" 23 | if _class == "Bezier": 24 | geoTab = nuke.Tab_Knob("geotab", "Geo") 25 | gList = nuke.Enumeration_Knob("shapelist", "Shape", ["circle", "square", "oval", "rectangle", "triangle"]) 26 | gSet = nuke.Script_Knob("set_geo", "Set Shape", "BezierGeoProc [knob this.shapelist]") 27 | 28 | i.addKnob(geoTab) 29 | i.addKnob(gList) 30 | i.addKnob(gSet) 31 | 32 | else: 33 | """If no Bezier is found, do nothing""" 34 | pass 35 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/addrangetab.py: -------------------------------------------------------------------------------- 1 | # ### Add Range Tab to selected nodes 2 | # ### Last modified: 08/31/2008 3 | # ### Written by Diogo Girondi 4 | # ### diogogirondi@gmail.com 5 | 6 | import nuke 7 | import nukescripts 8 | 9 | def addrangetab(): 10 | 11 | """Get the selected nodes in the DAG""" 12 | selnodes = nuke.selectedNodes() 13 | 14 | for i in selnodes: 15 | 16 | """Retrives node Class and the Root range""" 17 | _class = i.Class() 18 | _first = int(nuke.root().knob("first_frame").value()) 19 | _last = int(nuke.root().knob("last_frame").value()) 20 | 21 | """Set Knobs parameters""" 22 | rTab = nuke.Tab_Knob("rangetab", "Range") 23 | rIn = nuke.Int_Knob("range_in", "In") 24 | rOut = nuke.Int_Knob("range_out", "Out") 25 | rSetIn = nuke.Script_Knob("set_in", "Use Current", "knob this.range_in [frame]") 26 | rSetOut =nuke.Script_Knob("set_out", "Use Current", "knob this.range_out [frame]") 27 | rUse = nuke.Script_Knob("set_range", "Set Range", "in this.disable {set_expression {framethis.range_out}}") 28 | rTab = nuke.Tab_Knob("rangetab", "Range") 29 | 30 | """Adds Knobs to each node""" 31 | i.addKnob(rTab) 32 | i.addKnob(rIn) 33 | i.addKnob(rSetIn) 34 | i.addKnob(rOut) 35 | i.addKnob(rSetOut) 36 | i.addKnob(rUse) 37 | 38 | """Set default range values""" 39 | v = i['range_in'] 40 | v.setValue(_first) 41 | v = i['range_out'] 42 | v.setValue(_last) 43 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/afanasy.gizmo: -------------------------------------------------------------------------------- 1 | 2 | Gizmo { 3 | inputs 1 4 | 5 | addUserKnob { 20 tab1 General } 6 | addUserKnob { 1 jname "Job Name"} 7 | addUserKnob { 26 sep1 ""} 8 | 9 | addUserKnob { 32 use_time_range_button "Use time range" T { 10 | knob [node this].first [knob root.first_frame] 11 | knob [node this].last [knob root.last_frame] 12 | } 13 | } 14 | 15 | addUserKnob { 3 first "First frame"} 16 | addUserKnob { 3 last "Last frame" } 17 | addUserKnob { 3 fpr "Frames per renderer"} 18 | addUserKnob { 26 sep2 ""} 19 | 20 | addUserKnob { 32 render_button "RENDER" T { 21 | afrender [node this] \ 22 | [knob [node this].first] \ 23 | [knob [node this].last] \ 24 | [knob [node this].fpr] \ 25 | [knob [node this].pause] \ 26 | [knob [node this].pri] \ 27 | [knob [node this].hmax] \ 28 | [knob [node this].hmask] \ 29 | [knob [node this].hmaske] \ 30 | [knob [node this].dmask] \ 31 | [knob [node this].dmaskg] \ 32 | [knob [node this].jname] \ 33 | [knob [node this].capacity] \ 34 | [knob [node this].capmin] \ 35 | [knob [node this].capmax] \ 36 | } 37 | } 38 | 39 | addUserKnob { 20 tab2 Parameters } 40 | addUserKnob { 6 pause "Start Job Paused" } 41 | addUserKnob { 3 pri "Priority" } 42 | addUserKnob { 3 hmax "Maximum Hosts" } 43 | addUserKnob { 1 hmask "Hosts Mask" } 44 | addUserKnob { 1 hmaske "Exclude Hosts Mask" } 45 | addUserKnob { 1 dmask "Depend Mask" } 46 | addUserKnob { 1 dmaskg "Global Depend Mask" } 47 | addUserKnob { 3 capacity "Capacity" } 48 | addUserKnob { 3 capmin "Capacity Min Coeff" } 49 | addUserKnob { 3 capmax "Capacity Max Coeff" } 50 | 51 | name afanasy 52 | 53 | first 1 54 | last 11 55 | fpr 1 56 | 57 | pause 0 58 | hmax -1 59 | pri -1 60 | capacity -1 61 | capmin -1 62 | capmax -1 63 | } 64 | Input { 65 | inputs 0 66 | name Input1 67 | xpos 0 68 | ypos 0 69 | } 70 | Output { 71 | name Output1 72 | xpos 0 73 | ypos 0 74 | } 75 | end_group 76 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/arial.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/arialbd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/arialbd.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/branchout.py: -------------------------------------------------------------------------------- 1 | ### Branch out Layers 2 | ### v1.0 - Last modified: 11/01/2008 3 | ### Written by Diogo Girondi 4 | ### diogogirondi@gmail.com 5 | 6 | import nuke 7 | 8 | def branchout(): 9 | 10 | sn = nuke.selectedNode() 11 | ch = nuke.channels(sn) 12 | layers = [] 13 | valid_channels = ['red', 'green', 'blue', 'alpha', 'black', 'white'] 14 | 15 | for each in ch: 16 | current = each.split('.') 17 | layer = current[0] 18 | channel = current[1] 19 | tmp = [] 20 | 21 | for x in ch: 22 | if x.startswith(layer) == True: 23 | tmp.append(x) 24 | 25 | if len(tmp) < 4: 26 | for i in range(4-len(tmp)): 27 | tmp.append(layer+".black") 28 | 29 | if tmp not in layers: 30 | layers.append(tmp) 31 | 32 | for each in layers: 33 | name = each[0].split('.')[0] 34 | 35 | r = each[0].split('.')[1] 36 | if r not in valid_channels: 37 | r = valid_channels[0] 38 | 39 | g = each[1].split('.')[1] 40 | if g not in valid_channels: 41 | g = valid_channels[1] 42 | 43 | b = each[2].split('.')[1] 44 | if b not in valid_channels: 45 | b = valid_channels[2] 46 | 47 | a = each[3].split('.')[1] 48 | if a not in valid_channels: 49 | r = valid_channels[3] 50 | 51 | inLayer = "in " + name + " red " + r + " green " + g + " blue " + b + " alpha " + a 52 | shuffle = nuke.createNode('Shuffle', inLayer) 53 | shuffle.knob('label').setValue(name) 54 | shuffle.setInput(0, sn) -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/cgru/__init__.py: -------------------------------------------------------------------------------- 1 | from docs import * 2 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/cgru/docs.py: -------------------------------------------------------------------------------- 1 | import nuke 2 | 3 | import os 4 | import webbrowser 5 | 6 | #import cgrudocs 7 | 8 | def browse( path): 9 | webbrowser.open( path) 10 | 11 | def getenv( name): 12 | value = os.getenv( name) 13 | if value is None: 14 | nuke.message('Variable "%s" is not set.' % name) 15 | return None 16 | if value == '': 17 | nuke.message('Variable "%s" is empty.' % name) 18 | return None 19 | return value 20 | 21 | def docsCGRU(): 22 | cgrudocs.show() 23 | 24 | def docsNuke(): 25 | cgru = getenv('CGRU_LOCATION') 26 | if cgru is None: return 27 | path = getenv('NUKE_CGRU_PATH') 28 | if path is None: return 29 | path = path.replace( cgru, '') 30 | path = os.path.join( path, 'doc') 31 | path = os.path.join( path, 'index.html') 32 | cgrudocs.show( path) 33 | 34 | def docsAfanasy(): 35 | cgru = getenv('CGRU_LOCATION') 36 | if cgru is None: return 37 | path = getenv('NUKE_AF_PATH') 38 | if path is None: return 39 | path = os.path.dirname( path) 40 | path = path.replace( cgru, '') 41 | path = os.path.join( path, 'doc') 42 | path = os.path.join( path, 'afanasy.html') 43 | cgrudocs.show( path) 44 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/cnew.py: -------------------------------------------------------------------------------- 1 | def cnew(): 2 | import sys,os,popen2 3 | import cdebug 4 | import subprocess 5 | from nukescripts import pyQtAppUtils, utils 6 | mdebug = cdebug.cdebug() 7 | mdebug(sys.path) 8 | sys.path.append('/usr/pipeline/lib') 9 | #import nasset 10 | import pipe, filesys 11 | proc = subprocess.Popen('nasset -m nuke', shell=True, stdout=subprocess.PIPE, ) 12 | result = proc.communicate()[0] 13 | #result = nasset.browse('nuke') 14 | if result == 'cancel': return 15 | obj = filesys.get_options(result,'m:t:d:c:') 16 | file_path = obj[1][0] 17 | proj_name = obj[1][1] 18 | tmp_path_file = os.path.join(filesys.USER_HOME,file_path) 19 | 20 | nuke.scriptSave(tmp_path_file) 21 | 22 | descr = obj[0]['-d'] 23 | tags = obj[0]['-t'] 24 | modes = obj[0]['-m'].split(',') 25 | 26 | type_name = modes[0] 27 | seq_name = modes[1] 28 | shot_name = modes[2] 29 | #print proj_name,tmp_path_file,descr,tags 30 | 31 | new_obj = pipe.Pipe().AddAsset(proj_name,tmp_path_file,descr,tags,filesys.COMP,sname=seq_name,shname=shot_name) 32 | script_path = new_obj.CheckOut('l') 33 | 34 | if len(modes) == 4: 35 | new_obj.setDependency(modes[3]) 36 | 37 | if os.path.exists(script_path): 38 | os.system('sync') 39 | nuke.scriptOpen(script_path) 40 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/cspace.py: -------------------------------------------------------------------------------- 1 | def CSpace(csp = 'sRGB'): 2 | inp = nuke.selectedNodes() 3 | for n in inp: 4 | n.knob('colorspace').setValue(csp) 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/cvci.py: -------------------------------------------------------------------------------- 1 | from cexceptions import * 2 | import sys 3 | import subprocess 4 | from nukescripts import pyQtAppUtils, utils 5 | sys.path.append('/usr/pipeline/lib') 6 | import os, filesys, app, pipe 7 | 8 | def cvci(): 9 | 10 | try: 11 | comment = 'test check in' 12 | nuke.scriptSave() 13 | proc = subprocess.Popen('comments -m maya -c good', shell=True, stdout=subprocess.PIPE, ) 14 | stdout_value = proc.communicate()[0] 15 | if stdout_value != None: 16 | comment = stdout_value #r.readlines()[0] 17 | lst_comments = comment.split('\t') 18 | isGood = False 19 | if len(lst_comments) > 1: 20 | if lst_comments[1].strip('\n') == 'g': 21 | isGood = True 22 | comment = lst_comments[0] 23 | asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 24 | asset_obj.CheckIn(comment, isGood) 25 | except: 26 | exctype, value = sys.exc_info()[:2] 27 | raise Exception("Unexpected error: %s" % value) -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/cvco.py: -------------------------------------------------------------------------------- 1 | def cvco(): 2 | import sys, cdebug 3 | from nukescripts import pyQtAppUtils, utils, pyWxAppUtils 4 | import subprocess 5 | 6 | sys.path.append('/usr/pipeline/lib') 7 | 8 | mdebug = cdebug.cdebug() 9 | import pipe 10 | import popen2 11 | 12 | name_node = '__PIPE__' 13 | 14 | nscript = nuke.scriptSaveAs('/tmp/_nktmp.nk',True) 15 | 16 | proc = subprocess.Popen('browser -m nuke', shell=True, stdout=subprocess.PIPE, ) 17 | stdout_value = proc.communicate()[0] 18 | 19 | proc2 = subprocess.Popen('vco '+stdout_value, shell=True, stdout=subprocess.PIPE, ) 20 | 21 | script_name = proc2.communicate()[0] 22 | mdebug(script_name) 23 | nuke.scriptOpen(script_name) 24 | 25 | nuke.scriptClose(nscript) 26 | nuke.fromScript() 27 | m = nuke.toNode(name_node) 28 | if not m: 29 | m = nuke.createNode('StickyNote', inpanel=False) 30 | m.setName(name_node) 31 | asset_obj = pipe.Projects().GetAssetByInfo(script_name) 32 | seq = asset_obj.GetSequence() 33 | shot = asset_obj.GetShot() 34 | 35 | label = '' 36 | if seq: label = 'Sequence: %s'%seq.name 37 | if shot: label += '\nShot: %s'%shot.name 38 | 39 | m.knob('label').setValue(label) 40 | m.knob('note_font').setValue("Helvetica Bold") 41 | m.knob('note_font_size').setValue((18,)) 42 | 43 | 44 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/dailies.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | '''Script for dailies creation. 3 | OS: Linux, for Nuke5.x 4 | uses DJV for *.mov creation 5 | Written by Anton Mitrakhov 6 | The Chimney Pot''' 7 | 8 | import os 9 | from time import strftime 10 | 11 | def MakeMov(): 12 | 13 | # paths to djv folder 14 | pp = os.getenv('PROGRAM_PATH') 15 | djv = pp + '/djv/bin/djv_convert' 16 | djView = pp + '/djv/bin/djv_view' 17 | 18 | # path for render preview folder and filename 19 | rPath = nuke.root().name().rsplit('/', 1)[0] + '/render/preview/' 20 | fName = nuke.root().name().rsplit('/', 1)[-1].split('.nk')[0] 21 | prList = [x for x in os.listdir(rPath) if x[:len(fName)] == fName] 22 | prList.sort() 23 | sPath = prList[0].rsplit('.', 1)[0] + '-' + str(int(nuke.animationEnd())) + '.jpg' 24 | dPath = rPath.split('_compose')[0] + '_out/_dailies/' + strftime('%y.%m.%d') 25 | 26 | # creates dailies folder if necessary 27 | if not os.path.exists(dPath): 28 | os.makedirs(dPath) 29 | fPath = djv + ' ' + rPath + sPath + ' ' + dPath + '/' + fName + '.mov' 30 | 31 | # runs convertation 32 | os.system(fPath) 33 | 34 | # opens *.mov file 35 | vPath = djView+ ' ' + dPath + '/' + fName + '.mov &' 36 | os.system(vPath) 37 | 38 | def Dailies(): 39 | 40 | # path for render preview folder and filename 41 | rPath = nuke.root().name().rsplit('/', 1)[0] + '/' + 'render' + '/' + 'preview' + '/' 42 | fName = nuke.root().name().rsplit('/', 1)[-1].split('.nk')[0] 43 | 44 | # creates preview render folder if necessary 45 | if not os.path.exists(rPath): 46 | os.makedirs(rPath) 47 | 48 | # takes padding 49 | pad = len(str(int(nuke.animationEnd()))) 50 | 51 | # creates write node 52 | w = nuke.createNode('Write') 53 | w.knob('file').setValue(rPath + fName + '_' '%0' + str(pad) + 'd.jpg') 54 | w.knob("_jpeg_quality").setValue(1) 55 | w.addKnob(nuke.Tab_Knob('CMov', 'Create *.mov')) 56 | w.addKnob(nuke.PyScript_Knob('MMov', 'Make *.mov')) 57 | w.knob('MMov').setCommand('MakeMov()') 58 | 59 | # user part 60 | a = nuke.ask('Othuyachit sequence?') 61 | if a == True: 62 | nuke.render (w.knob('name').getText(), start=int(nuke.animationStart()), end=int(nuke.animationEnd()), incr=1) 63 | b = nuke.ask('Othuyachit *.mov?') 64 | if b == True: 65 | MakeMov() 66 | else: 67 | pass 68 | else: 69 | pass 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/deniska.py: -------------------------------------------------------------------------------- 1 | '''Creates preview jpegs for TCP tracker to dailies folder 2 | for TCP internal use 3 | written by Anton Mitrakhov''' 4 | 5 | def TPreview(): 6 | 7 | import os 8 | from time import strftime 9 | 10 | # gets a list of read nodes 11 | n = nuke.selectedNodes('Read') 12 | for i in n: 13 | 14 | # holds a frame 15 | f = nuke.createNode('FrameHold', inpanel=False) 16 | f.knob('first_frame').setValue(i.knob('first').getValue()) 17 | f.setInput(0, i) 18 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 19 | f.knob('ypos').setValue(i.knob('ypos').getValue() + 100) 20 | 21 | # scales image to 0.5 22 | r = nuke.createNode('Reformat', inpanel=False) 23 | r.setInput(0, f) 24 | f.knob('xpos').setValue(i.knob('xpos').getValue()) 25 | r.knob('type').setValue('scale') 26 | r.knob('scale').setValue(0.5) 27 | r.knob('ypos').setValue(i.knob('ypos').getValue() + 250) 28 | 29 | # gets output path and filename 30 | fname = i.knob('file').getText().rsplit('.', 1)[0].rsplit('/', 1)[-1] + '.jpg' 31 | fpath = i.knob('file').getText().split('/_src')[0] + '/_out/_dailies/' + strftime('%y.%m.%d') 32 | 33 | # creates write node 34 | w = nuke.createNode('Write', inpanel=False) 35 | w.knob('file').setValue(fpath + '/' + fname) 36 | 37 | # checks for path existence 38 | if not os.path.exists(fpath): 39 | os.makedirs(fpath) 40 | 41 | # renders the output 42 | nuke.render (w.knob('name').getText(), start=1, end=1, incr=1) -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/exr2tif.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def exr2tif(): 4 | 5 | n = nuke.selectedNode() 6 | 7 | if not n.Class() == 'Read': 8 | 9 | nuke.message('Not a Read node!') 10 | 11 | return 12 | 13 | chList = list(set([x.split('.')[0] for x in n.channels()])) 14 | 15 | nList = [x.name() for x in nuke.allNodes('Shuffle')] 16 | 17 | for i in chList: 18 | 19 | sh = nuke.createNode('Shuffle', inpanel=False) 20 | 21 | sh.knob('in').setValue(i) 22 | 23 | sh.knob('name').setValue(i) 24 | 25 | sh.setInput(0, n) 26 | 27 | w = nuke.createNode('Write', inpanel=False) 28 | 29 | newPath = n.knob('file').value().rsplit('/',1)[0] + '/' + i 30 | 31 | if not os.path.exists(newPath): 32 | 33 | os.mkdir(newPath) 34 | 35 | w.knob('file').setValue(newPath + '/' + i + '.%06d.tif') 36 | 37 | w.knob('file_type').setValue('tiff') 38 | 39 | w.knob('datatype').setValue(1) 40 | 41 | nuke.execute(w.name(), n.knob('first').value(), n.knob('last').value()) 42 | 43 | nuke.delete(sh) 44 | 45 | nuke.delete(w) 46 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/ffix.py: -------------------------------------------------------------------------------- 1 | """ 2 | def ffffilenameFix(s): 3 | if os.name == "posix": 4 | # print 'Applying path mapping: windows --> linux' 5 | s = s.replace('//karramba/work/', '/mnt/karramba/', 1) 6 | s = s.replace('//karramba/Work/', '/mnt/karramba/', 1) 7 | s = s.replace('//Karramba/work/', '/mnt/karramba/', 1) 8 | s = s.replace('//Karramba/Work/', '/mnt/karramba/', 1) 9 | s = s.replace('//bigboy/d/', '/mnt/bigboy/', 1) 10 | s = s.replace('//bigboy/D/', '/mnt/bigboy/', 1) 11 | s = s.replace('//Bigboy/d/', '/mnt/bigboy/', 1) 12 | s = s.replace('//Bigboy/D/', '/mnt/bigboy/', 1) 13 | s = s.replace('K:/', '/mnt/karramba/', 1) 14 | s = s.replace('k:/', '/mnt/karramba/', 1) 15 | s = s.replace('W:/Work/', '/mnt/bigboy/', 1) 16 | s = s.replace('w:/Work/', '/mnt/bigboy/', 1) 17 | s = s.replace('W:/work/', '/mnt/bigboy/', 1) 18 | s = s.replace('w:/work/', '/mnt/bigboy/', 1) 19 | s = s.replace('D:/', '/mnt/disk/', 1) 20 | s = s.replace('d:/', '/mnt/disk/', 1) 21 | 22 | else: 23 | # print 'Applying path mapping for Windows' 24 | s = s.replace('/mnt/karramba/', '//karramba/work/', 1) 25 | s = s.replace('/mnt/bigboy/', '//bigboy/D/Work/', 1) 26 | s = s.replace('K:/', '//karramba/work/', 1) 27 | s = s.replace('k:/', '//karramba/work/', 1) 28 | s = s.replace('W:/', '//bigboy/D/Work/', 1) 29 | s = s.replace('w:/', '//bigboy/D/Work/', 1) 30 | s = s.replace('/mnt/disk/', 'D:/', 1) 31 | s = s.replace('H:/', '//karramba/work/Huggies/_src/', 1) 32 | return s 33 | """ 34 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/fillReads.py: -------------------------------------------------------------------------------- 1 | from cexceptions import * 2 | 3 | 4 | class ReloadRendersPanel( nukescripts.PythonPanel ): 5 | def __init__( self, node_read, renders_vers ): 6 | nukescripts.PythonPanel.__init__( self, 'Reload Renders', 'tfx.ReloadRenders') 7 | # CREATE KNOBS 8 | self.nodesChoice = nuke.Enumeration_Knob( 'renders', 'Source render versions', renders_vers[2]) 9 | self.node = node_read 10 | self.s_dir = renders_vers[0] 11 | self.e_dir = renders_vers[1] 12 | # ADD KNOBS 13 | self.addKnob( self.nodesChoice ) 14 | 15 | def knobChanged( self, knob ): 16 | dir_files = self.s_dir+os.sep+knob.value()+os.sep+self.e_dir 17 | files = os.listdir(dir_files) 18 | files.sort() 19 | start_file = files[0].split('.') 20 | name_file = dir_files + os.sep + start_file[0] 21 | start = int(start_file[1]) 22 | end = int(files[-1].split('.')[1]) 23 | label = "%s.%%0%sd.%s %s-%s"%(name_file, len(start_file[1]), start_file[2], start,end) 24 | self.node.knob('file').fromUserText(label) 25 | 26 | def fillReads(): 27 | read_node = nuke.selectedNode() 28 | if not read_node.Class() == 'Read': raise Exception('Must select a read node!') 29 | import sys,os,popen2 30 | sys.path.append('/usr/pipeline/lib') 31 | from nukescripts import pyQtAppUtils, utils 32 | import filesys 33 | import pipe 34 | reload(filesys) 35 | reload(pipe) 36 | asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 37 | if not asset_obj: raise Exception('Script not in projects') 38 | obj_data = asset_obj.GetShot() 39 | if not obj_data: obj_data = asset_obj.GetSequence() 40 | if not obj_data: raise Exception('Data path not found') 41 | #obj_data.RefreshRenderLatest() 42 | #renders_data = obj_data.GetDataRenderLatest() 43 | meta_knob = read_node.metadata() 44 | renders_data = filesys.GetAllRenderVersions(meta_knob['input/filename']) 45 | #print renders_data 46 | ReloadRendersPanel(read_node, renders_data).showModalDialog() -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/flipbookRV.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | 4 | 5 | def flipbookToRV(): 6 | 7 | n = nuke.selectedNode() 8 | 9 | rv = '/mnt/opt/rv-3.4.22/bin/rv' 10 | 11 | renderPath = os.getenv('NUKE_TEMP_DIR') + os.sep + 'fbRV' 12 | 13 | if os.path.exists(renderPath): 14 | shutil.rmtree(renderPath) 15 | os.makedirs(renderPath) 16 | else: 17 | os.makedirs(renderPath) 18 | 19 | 20 | fRange = nuke.getInput('Frame range:', str(n.frameRange())) 21 | pad = len(fRange.split('-')[-1]) 22 | 23 | 24 | w = nuke.createNode('Write') 25 | if nuke.root()['proxy'].value()==1: 26 | w['proxy'].setValue(renderPath + os.sep + 'tmp.%0' + str(pad) + 'd.sgi') 27 | else: 28 | w['file'].setValue(renderPath + os.sep + 'tmp.%0' + str(pad) + 'd.sgi') 29 | 30 | w['datatype'].setValue(1) 31 | 32 | r = nuke.render (w.name(), start=int(fRange.split('-')[0]), end=int(fRange.split('-')[-1]), incr=1) 33 | 34 | nuke.delete(w) 35 | 36 | os.system(rv + ' ' + renderPath + os.sep + 'tmp.' + '#'*pad + '.sgi &') 37 | 38 | nuke.menu("Nuke").addCommand("Render/Flipbook to RV", "flipbookToRV()", "ctrl+shift+f") -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/formats.tcl: -------------------------------------------------------------------------------- 1 | # formats.tcl 2 | # Copyright (c) 2007 The Foundry Visionmongers Ltd. All Rights Reserved. 3 | # 4 | # Formats let Nuke assign a name, pixel aspect ratio, and possibly 5 | # a cropped image area, to any size of input image. You can make 6 | # more than one format for a given size but the user will have to 7 | # pick the other ones from the chooser in the file reader. 8 | # 9 | # W = Total image width in pixels 10 | # H = Total image height in pixels 11 | # x = left edge of active region 12 | # y = bottom edge of active region 13 | # r = right edge of active region 14 | # t = top edge of active region 15 | # pa = pixel-aspect ratio (width/height of a pixel) 16 | # name = the name displayed in the menus 17 | # 18 | # xyrt may be omitted to set them to 0 0 W H. 19 | # if xyrt are omitted, you can also omit pa and it is set to 1.0 20 | #--------------------------------------------------------------------------- 21 | 22 | # The PAL and NTSC formats were changed in Nuke 5.2 to respect the pixel aspect ratio of 23 | # the production aperture instead of the clean aperture. This provides greater compatibility 24 | # with other software, and produces images which are no longer slightly stretched. 25 | 26 | # W H x y r t pa name 27 | #--------------------------------------------------------------------------- 28 | # 4:3 video formats 29 | add_format " 640 480 1.0 PC_Video" 30 | add_format " 720 486 0.91 NTSC" 31 | add_format " 720 576 1.09 PAL" 32 | 33 | # 16:9 video formats 34 | add_format "1920 1080 1.0 HD" 35 | add_format " 720 486 1.21 NTSC_16:9" 36 | add_format " 720 576 1.46 PAL_16:9" 37 | 38 | # FILM FORMATS 39 | add_format "1024 778 1.0 1K_Super_35(full-ap)" 40 | add_format "914 778 2.0 1K_Cinemascope" 41 | 42 | add_format "2048 1556 1.0 2K_Super_35(full-ap)" 43 | add_format "1828 1556 2.0 2K_Cinemascope" 44 | 45 | add_format "4096 3112 1.0 4K_Super_35(full-ap)" 46 | add_format "3656 3112 2.0 4K_Cinemascope" 47 | 48 | #add_format "2048 1558 220 284 2048 1272 1.0 2K_Academy_aperture" 49 | 50 | #SQUARE FORMATS 51 | add_format " 256 256 1.0 square_256" 52 | add_format " 512 512 1.0 square_512" 53 | add_format "1024 1024 1.0 square_1K" 54 | add_format "2048 2048 1.0 square_2K" 55 | 56 | 57 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/framehold2.py: -------------------------------------------------------------------------------- 1 | def FrameHold(): 2 | n = nuke.createNode('FrameHold') 3 | n.knob('first_frame').setValue(nuke.frame()) 4 | # n.addKnob(nuke.PyScript_Knob("sf", "Set to current frame")) 5 | # n.knob('sf').setCommand("nuke.selectedNode().knob('RefFrame').setValue(nuke.frame())") 6 | 7 | 8 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/getpass.py: -------------------------------------------------------------------------------- 1 | '''Script for getting Vray passes from exr 2 | written by Anton Mitrakhov 3 | TCP 2009 4 | ''' 5 | 6 | 7 | def GetPass(): 8 | 9 | n = nuke.selectedNode() 10 | inp = nuke.getInput('Print "GI" to get VRayGlobalIllumination \n \ 11 | "Refl" for Reflection \n \ 12 | "Light" for Lighting \n \ 13 | "Sh" for Shadows') 14 | 15 | if inp == 'GI': 16 | rp = 'VRayGlobalIllumination' 17 | s = nuke.createNode('Shuffle', inpanel=False) 18 | s.knob('in').setValue(rp) 19 | c = nuke.createNode('Copy', inpanel=False) 20 | c.setInput(0, n) 21 | c.setInput(1, s) 22 | c.knob('to0').setValue(rp + '.red') 23 | c.knob('to1').setValue(rp + '.green') 24 | c.knob('to2').setValue(rp + '.blue') 25 | c.knob('from0').setValue('rgba.red') 26 | c.knob('from1').setValue('rgba.green') 27 | c.knob('from2').setValue('rgba.blue') 28 | nuke.autoplace(s) 29 | nuke.autoplace(c) 30 | 31 | elif inp == 'Refl': 32 | rp = 'VRayReflection' 33 | s = nuke.createNode('Shuffle', inpanel=False) 34 | s.knob('in').setValue(rp) 35 | c = nuke.createNode('Copy', inpanel=False) 36 | c.setInput(0, n) 37 | c.setInput(1, s) 38 | c.knob('to0').setValue(rp + '.red') 39 | c.knob('to1').setValue(rp + '.green') 40 | c.knob('to2').setValue(rp + '.blue') 41 | c.knob('from0').setValue('rgba.red') 42 | c.knob('from1').setValue('rgba.green') 43 | c.knob('from2').setValue('rgba.blue') 44 | nuke.autoplace(s) 45 | nuke.autoplace(c) 46 | 47 | elif inp == 'Light': 48 | rp = 'VRayLighting' 49 | s = nuke.createNode('Shuffle', inpanel=False) 50 | s.knob('in').setValue(rp) 51 | c = nuke.createNode('Copy', inpanel=False) 52 | c.setInput(0, n) 53 | c.setInput(1, s) 54 | c.knob('to0').setValue(rp + '.red') 55 | c.knob('to1').setValue(rp + '.green') 56 | c.knob('to2').setValue(rp + '.blue') 57 | c.knob('from0').setValue('rgba.red') 58 | c.knob('from1').setValue('rgba.green') 59 | c.knob('from2').setValue('rgba.blue') 60 | nuke.autoplace(s) 61 | nuke.autoplace(c) 62 | 63 | elif inp == 'Sh': 64 | rp = 'VRayShadows' 65 | s = nuke.createNode('Shuffle', inpanel=False) 66 | s.knob('in').setValue(rp) 67 | c = nuke.createNode('Copy', inpanel=False) 68 | c.setInput(0, n) 69 | c.setInput(1, s) 70 | c.knob('to0').setValue(rp + '.red') 71 | c.knob('to1').setValue(rp + '.green') 72 | c.knob('to2').setValue(rp + '.blue') 73 | c.knob('from0').setValue('rgba.red') 74 | c.knob('from1').setValue('rgba.green') 75 | c.knob('from2').setValue('rgba.blue') 76 | nuke.autoplace(s) 77 | nuke.autoplace(c) 78 | 79 | else: 80 | pass 81 | 82 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/hiResAfanasyTfx.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import pipe 4 | import os 5 | import filesys 6 | import re 7 | 8 | '''Script for creation HiRes 9 | for TCP internal use 10 | Anton Mitrakhov''' 11 | 12 | pat = re.compile('^\d{1,10}') 13 | 14 | def CreateHiresByAfanasy(): 15 | 16 | 17 | # check for all read nodes 18 | readList = [(node.knob('name').value(),node.knob('file').value()) for node in nuke.allNodes('Read')] 19 | rlen = len(filesys.REPO) 20 | suspected = [n for n in readList if n[1][:rlen] != filesys.REPO] 21 | if suspected: raise Exception('Error! Files in nodes below have to move into %s:\n%s'%(filesys.REPO,'\n'.join([str('%s - %s'%(n[0],n[1])) for n in suspected]))) 22 | 23 | # settings variables 24 | 25 | ext = 'dpx' 26 | cSpace = 'sRGB' 27 | pad = '.%06d.' 28 | 29 | # creating paths and HiRes name 30 | 31 | sObj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 32 | nPath = sObj.GetCurrentActualPath() 33 | hName = sObj.GetShot().name + pad + ext 34 | hFPath = sObj.GetShot().GetOutPath() + '/hires/' 35 | hList = os.listdir(hFPath) 36 | hFolder = '' 37 | 38 | # write node creation 39 | if nuke.toNode('HiRes'): 40 | 41 | nuke.message('Node HiRes already exists. Use that one, %username% :-)') 42 | pass 43 | 44 | else: 45 | 46 | sNode = nuke.selectedNode() 47 | hNode = nuke.createNode('Write', inpanel=False) 48 | hNode.knob('name').setValue('HiRes') 49 | hNode.knob('colorspace').setValue(cSpace) 50 | hNode.knob('channels').setValue('rgb') 51 | 52 | aNode = nuke.createNode("afanasy", inpanel=False) 53 | aNode.knob('hmask').setValue('tfxr.*') 54 | aNode.knob('jname').setValue('%s'%sObj.name) 55 | aNode.knob('first').setValue(nuke.root().firstFrame()) 56 | aNode.knob('last').setValue(nuke.root().lastFrame()) 57 | 58 | # Hires folder is empty 59 | if not hList: 60 | hFolder = hFPath + str(filesys.padding(1, 2)) 61 | os.mkdir(hFolder) 62 | hNode.knob('file').setValue(hFolder + os.sep + hName) 63 | # Hires folder is not empty 64 | else: 65 | hList = filter(lambda x: pat.search(x) , hList) 66 | hFolder = hFPath + str(filesys.padding(max([(int(f)) for f in hList]), 2)) 67 | hNode.knob('file').setValue(hFolder + os.sep + hName) 68 | 69 | #Make link into out/hires folder 70 | shotObject = sObj.GetShot() 71 | sName = shotObject.name 72 | seqObject = sObj.GetSequence() 73 | 74 | dPath = os.path.join(filesys.REPO, sObj.GetProject().name, filesys.OUT,'hires',shotObject.seq_name, sName + seqObject.GetPrefix()) 75 | if not os.path.exists(dPath): filesys.mkdirs(dPath) 76 | num_folder = hFolder.split(os.sep)[-1] 77 | 78 | os.system('cd %s && ln -sf ../../../../film/sequences/%s/shots/%s/out/hires/%s'%(dPath,shotObject.seq_name,sName, num_folder )) 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/hqsubmit.py: -------------------------------------------------------------------------------- 1 | def hqsubmit(): 2 | cmd = """afsubmitter -m nuke -o "-F %s-%s " -f "%s" -g afanasy""" 3 | path_script = nuke.root().name() 4 | os.system(cmd%(int(nuke.animationStart()),int(nuke.animationEnd()),path_script)) 5 | #print nuke.animationStart() 6 | # Result: 397.0 7 | #print nuke.animationEnd() 8 | # Result: 482.0 9 | #print nuke.root().name() 10 | # Result: /mnt/karramba/test_zzz/film/sequences/XXX/shots/X01/comp/hqtest.nk 11 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/init.py: -------------------------------------------------------------------------------- 1 | import cgru 2 | 3 | nuke.knobDefault("fps", "25") 4 | nuke.knobDefault("format", "720 576 0 0 720 576 1.067 PAL_1.067") 5 | #nuke.knobDefault("format", "1920 1080 0 0 1920 1080 1 HD") 6 | #nuke.knobDefault("proxy_type", "format") 7 | nuke.knobDefault("before", "black") 8 | nuke.knobDefault("after", "black") 9 | nuke.knobDefault("on_error", "checkerboard") 10 | #sys.path.append("//Bigboy/D/tfxtools/Nuke/python") 11 | #sys.path.append("/mnt/tfxtools/Nuke/python") 12 | #sys.path.append("/Volumes/d/tfxtools/Nuke/python") 13 | 14 | #nuke.knobDefault("Root.monitorLut", "linear") 15 | #nuke.knobDefault("Root.viewerLut", "linear") 16 | #nuke.knobDefault("Root.int8Lut", "linear") 17 | #nuke.knobDefault("Root.int16Lut", "linear") 18 | #nuke.knobDefault("Root.logLut", "linear") 19 | #nuke.knobDefault("Root.floatLut", "linear") 20 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/init.tcl: -------------------------------------------------------------------------------- 1 | #plugin_addpath "//bigboy/d/tfxtools/Nuke/gizmo" 2 | #plugin_addpath "//bigboy/d/tfxtools/Nuke/python" 3 | #plugin_addpath "//bigboy/d/tfxtools/Nuke/tcl" 4 | 5 | #plugin_addpath "/mnt/bigboy/tfxtools/Nuke/gizmo" 6 | #plugin_addpath "/mnt/bigboy/tfxtools/Nuke/python" 7 | #plugin_addpath "/mnt/bigboy/tfxtools/Nuke/tcl" 8 | 9 | #plugin_addpath "/Volumes/d/tfxtools/Nuke/gizmo" 10 | #plugin_addpath "/Volumes/d/tfxtools/Nuke/python" 11 | #plugin_addpath "/Volumes/d/tfxtools/Nuke/tcl" 12 | 13 | add_format "4096 2304 1.0 RED 4K" 14 | #add_format "4096 2048 1.0 RED 4K 2:1" 15 | add_format "3072 1728 1.0 RED 3K" 16 | #add_format "3072 1152 1.0 RED 3K 2:1" 17 | add_format "2048 1152 1.0 RED 2K" 18 | #add_format "2048 1024 1.0 RED 2K 2:1" 19 | add_format "1024 576 1.0 RED 1K" 20 | #add_format "1024 512 1.0 RED 1K 2:1" 21 | 22 | add_format "768 576 1.0 PAL square" 23 | 24 | knob_default root.format "1920 1080 1" 25 | knob_default root.proxy_format "960 540 1" -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/projectioncam.py: -------------------------------------------------------------------------------- 1 | ''' Creates ProjectionCam setup from selected camera 2 | for Nuke5.1vx 3 | written by Anton Mitrakhov ''' 4 | 5 | 6 | def ProjectionCam(): 7 | 8 | try: 9 | cam = nuke.selectedNode() 10 | 11 | # returns if nothing selected 12 | 13 | except ValueError: 14 | nuke.message('Select a camera node to project from') 15 | return 16 | 17 | # returns if selected node isn't a camera 18 | 19 | if cam.Class() not in ['Camera','Camera2']: 20 | nuke.message('Not a camera node') 21 | return 22 | 23 | # checking the script for existing ProjectionCam nodes, to put a proper name 24 | 25 | input = nuke.allNodes() 26 | y = "ProjectionCam" 27 | list = [int(x.name().split(y)[-1]) for x in input if x.name()[:len(y)] == y] 28 | 29 | n = 1 30 | 31 | if list != []: 32 | n = max(list) + 1 33 | 34 | # creates a ProjCam node 35 | 36 | cam.knob('selected').setValue(False) 37 | prcam = nuke.createNode('Camera') 38 | prcam.addKnob(nuke.Tab_Knob('RefTab', 'ProjectionFrame')) 39 | prcam.addKnob(nuke.Int_Knob('RefFrame', 'ReferenceFrame')) 40 | prcam.knob('name').setValue("ProjectionCam%s"%n) 41 | prcam.knob('label').setValue('On frame:\n[value RefFrame]') 42 | prcam.knob('RefFrame').setValue(nuke.frame()) 43 | 44 | # setting values for translate, rotation and scaling 45 | 46 | tr = (('{' + cam.knob('name').value() + '.' + 'translate' + '(RefFrame)' + '}' + ' ')*3).rstrip(' ') 47 | prcam.knob('translate').fromScript(tr) 48 | rt = (('{' + cam.knob('name').value() + '.' + 'rotate' + '(RefFrame)' + '}' + ' ')*3).rstrip(' ') 49 | prcam.knob('rotate').fromScript(rt) 50 | sc = (('{' + cam.knob('name').value() + '.' + 'scaling' + '(RefFrame)' + '}' + ' ')*3).rstrip(' ') 51 | prcam.knob('scaling').fromScript(sc) 52 | 53 | # values for focal length and apertures 54 | 55 | prcam.knob('focal').fromScript(cam.knob('name').value() + '.' + 'focal' + '(RefFrame)') 56 | prcam.knob('haperture').setValue(cam.knob('haperture').value()) 57 | prcam.knob('vaperture').setValue(cam.knob('vaperture').value()) 58 | 59 | # rot and tr orders 60 | 61 | prcam.knob('xform_order').setValue(cam.knob('xform_order').value()) 62 | prcam.knob('rot_order').setValue(cam.knob('rot_order').value()) 63 | 64 | # creates a Project3D node 65 | proj = nuke.createNode('Project3D') 66 | proj.knob('ypos').setValue(prcam.knob('ypos').value()) 67 | proj.knob('xpos').setValue(prcam.knob('xpos').value() + 120) 68 | 69 | prcam.setInput(0, None) 70 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/pythonhelp.py: -------------------------------------------------------------------------------- 1 | def PythonHelp(): 2 | import os 3 | os.system('/usr/bin/kate /usr/pipeline/software/nuke/SCRIPTS/PythonHelp.txt &') 4 | 5 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/renamenodes.py: -------------------------------------------------------------------------------- 1 | # ### Rename several nodes at once 2 | # ### renamenodes.py 3 | # ### v2.1 - Last modified: 09/12/2008 4 | # ### Written by Diogo Girondi 5 | # ### diogogirondi@gmail.com 6 | 7 | import nuke 8 | 9 | def renamenodes(): 10 | 11 | sn = nuke.selectedNodes() 12 | sn.reverse() 13 | 14 | if sn != []: 15 | newname = nuke.getInput("New name:") 16 | for index, n in enumerate(sn): 17 | n.knob('name').setValue(newname.replace(' ', '_') + str(index+1)) 18 | else: 19 | nuke.message("Rename Nodes:\nSelect at least one node") -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/render_panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2007 The Foundry Visionmongers Ltd. All Rights Reserved. 2 | 3 | # This is copied directly from execute_panel.py with the exception 4 | # of changing "execute" to "render" but is likely to evolve 5 | # over time with other rendering-specific options. 6 | 7 | import re 8 | import nuke 9 | 10 | def render_panel(_list): 11 | nuke.tcl('render this') -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/slate.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import pipe 4 | import os 5 | import socket 6 | import time 7 | 8 | 9 | def Slate(): 10 | 11 | sObj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 12 | 13 | # pInfo values 14 | 15 | pName = sObj.GetProject().name 16 | 17 | sqName = sObj.GetShot().seq_name 18 | 19 | sName = sObj.GetShot().name 20 | 21 | movPath = sObj.GetShot().GetOutPath() + '/dailies/' 22 | 23 | if os.listdir(movPath): 24 | 25 | vNum = str(max([int(x.rsplit('.', 2)[-2].split('v')[-1]) for x in os.listdir(movPath) if x[:len(sName)] == sName]) + 1) 26 | 27 | else: 28 | 29 | vNum = '1' 30 | 31 | 32 | # sInfo values 33 | 34 | sDescr = sObj.GetDescription() 35 | 36 | notes = nuke.getInput('Enter submission notes:\animation approval, rig removal approval etc', sDescr + ' approval') 37 | 38 | mName = socket.gethostname().split('.', 1)[0] 39 | 40 | uVoc = {'scooby': 'Hanna Kucherevich', 41 | 'porky': 'Anton Mitrakhov', 42 | 'vinny': 'Zhanna Fitsay', 43 | 'pluto':'Ievgen Kulieshov', 44 | 'bender':'Denis Siplenko', 45 | 'daffy':'Yevgen Skorobogatko', 46 | 'piglet':'Ilya Goncharov', 47 | 'lynx':'Alexandra Glukhova', 48 | 'casper':'Vladimir Mikheyenko', 49 | 'kermit':'Vlad Scripnik'} 50 | 51 | if not mName in uVoc.keys(): 52 | 53 | aName = nuke.getInput('Enter your name:', 'Alexander Koreshkov') 54 | 55 | else: 56 | 57 | aName = uVoc[mName] 58 | 59 | 60 | res = nuke.root().knob('format').value().name() + ' ' + str(nuke.root().knob('format').value().width()) + 'x' + str(nuke.root().knob('format').value().height()) 61 | 62 | tFC = str(int(nuke.animationEnd() - nuke.animationStart()) + 1) + ' frames' 63 | 64 | fps = str(int(nuke.root().knob('fps').value())) + ' fps' 65 | 66 | dOS = strftime('%y.%m.%d') 67 | 68 | 69 | 70 | # slate node creation 71 | 72 | s = nuke.createNode('Slate') 73 | 74 | s.knob('pInfo').setValue('Project: ' + pName + 75 | '\nSequence: ' + sqName + 76 | '\nShot: ' + sName + 77 | '\nVersion: ' + vNum) 78 | 79 | s.knob('sInfo').setValue('Shot description: ' + sDescr + 80 | '\nNotes: ' + notes + 81 | '\nArtist: ' + aName + 82 | '\nResolution: ' + res + 83 | '\nTotal frame count: ' + tFC + 84 | '\nFrame Rate: ' + fps + 85 | '\nDate of submission: ' + dOS) 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/slate_tri.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import os 4 | import socket 5 | import time 6 | 7 | 8 | def Slate(): 9 | s = nuke.createNode('TriWrite') 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/tfxGetResources.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.append('/usr/pipeline/lib') 3 | import browser 4 | import filesys 5 | 6 | def GetResources(): 7 | asset_obj = pipe.Projects().GetAssetByInfo(nuke.root().name()) 8 | if not asset_obj: raise Exception('Script is not belong pipeline') 9 | proj_name = asset_obj.GetProject() 10 | # getParent() 11 | # type, db_id 12 | proc = subprocess.Popen('browser -c resources -a %s'%asset_obj.db_id, shell=True, stdout=subprocess.PIPE, ) 13 | stdout_value = proc.communicate()[0].strip() 14 | if stdout_value == 'cancel': return None 15 | imseq = filesys.ImageSequence(stdout_value) 16 | 17 | range = imseq.getRange() 18 | user_text = '%s%s%s%s%%0%sd.%s %s-%s'%(imseq.getPath(),os.sep,imseq.getFileName(),imseq.getSep(),imseq.getLengthOfPadding(),imseq.getExt(),range[0],range[1]) 19 | 20 | name_node = '__%s__'%imseq.getFileName().upper().replace('.','_') 21 | 22 | n = nuke.toNode(name_node) 23 | if not n: 24 | n = nuke.createNode('Read', inpanel=False) 25 | n.setName(name_node) 26 | n.knob('file').fromUserText(user_text) 27 | 28 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/trigraph/Anonymous Pro B.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/trigraph/Anonymous Pro B.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/trigraph/Anonymous Pro.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/trigraph/Anonymous Pro.ttf -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/trigraph/TriSlate.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/trigraph/TriSlate.tiff -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/trigraph/TriSlateBG.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/trigraph/TriSlateBG.tiff -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/trigraph/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitrakhov/pipeline/f37dd05976e69bf8f04bf29d74a5851231765c90/software/nuke/N6/SCRMAC/trigraph/__init__.py -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/tvco.tcl: -------------------------------------------------------------------------------- 1 | proc tvco {} { 2 | global env 3 | global WIN32 4 | 5 | set tempPath "" 6 | if {$WIN32} { 7 | set tempPath $env(TEMP) 8 | } else { 9 | set tempPath "/tmp" 10 | } 11 | 12 | catch { exec "/usr/pipeline/bin/browser" "-m" "nuke" } result 13 | #set result [ string range $result 1 end ] 14 | puts $result 15 | catch { exec "/usr/pipeline/bin/vco" "/film/sequences/SQ01/shots/sh01/comp/compose/compose.nk" "-v" "1" "-p" "gala_spring" "-V" "-m" "gala_spring,469" } resultvco 16 | #catch { exec "/usr/pipeline/bin/vco" $result } resultvco 17 | puts $resultvco 18 | 19 | } -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/up.tcl: -------------------------------------------------------------------------------- 1 | proc up {} { 2 | foreach pScript [glob -nocomplain "[getenv NUKE_AF_PATH]/scripts/*.tcl"] { 3 | source $pScript 4 | puts $pScript 5 | } 6 | return 7 | } 8 | -------------------------------------------------------------------------------- /software/nuke/N6/SCRMAC/www.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def www(): 4 | os.system('firefox http://youporn.com &') --------------------------------------------------------------------------------