This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import nuke | |
FILE_TYPES = ['exr', 'png', 'tiff', 'dpx' 'mov', 'mp4', 'jpg'] | |
def get_path(): | |
return nuke.getClipname('Choose Folder', multiple=False) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
from collections import namedtuple | |
import video | |
import common | |
from PyQt4 import QtGui, QtCore | |
FLANN_INDEX_KDTREE = 1 | |
FLANN_INDEX_LSH = 6 | |
flann_params= dict(algorithm = FLANN_INDEX_LSH, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c++ -fpic -std=c++11 function.cpp -o function | |
#include<vector> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
auto func = [](int m, int x, vector<int> j){for (auto &c : j) cout<<"Y: "<<(m*x)+c<<"\n";}; | |
func(5, 3, {1,2,3,4,5}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "/home/shrimo/project/osl/OpenShadingLanguage-master/src/shaders/stdosl.h" | |
shader osl_triplanar( | |
string filename = "" | |
[[ string widget = "filename" ]], | |
string mapping = "world" | |
[[ string widget = "popup", | |
string options = "world|object" ]], | |
color input = color(0), | |
vector rotation = vector(0.0,0.0,0.0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selectedNode = nuke.selectedNode() | |
nodeName = selectedNode.name() | |
node = nuke.toNode(nodeName) | |
if nuke.getNodeClassName(node) != 'Read': | |
nuke.message('Please select a read Node') | |
print 'Please select a read Node' | |
metaData = node.metadata() | |
DT = metaData['input/mtime'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nuke channal ranamer | |
import os | |
import nuke | |
def renamer(old_line, new_line): | |
input_file = nuke.root().knob('name').value() # read nuke script path | |
if not os.path.isfile(input_file): # checking file availability | |
print 'no file', input_file | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PySide2.QtCore import * | |
from PySide2.QtGui import * | |
from PySide2.QtWidgets import * | |
import alembic | |
import types | |
def abc_tree(i_obj): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Texture Bombing | |
The basic idea behind texture bombing is to divide UV space into a regular grid of cells. | |
We then place an image within each cell at a random location, using a noise or pseudo-random number function. | |
The final result is the composite of these images over the background. | |
*/ | |
color blend( | |
color a, | |
color b, | |
color x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Reading multiple image files | |
import sys | |
module_path = '/home/shrimo/Desktop/course/vfx_dev/nuke' | |
if module_path not in sys.path: | |
sys.path.append(module_path) | |
import multiple_reading | |
reload(multiple_reading) |
OlderNewer