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
"""Store function on node | |
Usage example: | |
.. code-block:: | |
# Control node | |
ctrl_node_name = 'MY_SCRIPT_NODE' # if None, store on nuke.root() | |
# Define your functions and add them to the dictionary |
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
def root_settings_to_string(root): | |
"""Serialise the project settings. Used when writing the selected | |
nodes (otherwise things like the frame range would be lost) | |
""" | |
# Write non-default settings, in .nk script format. Also write | |
# user-knob definitons to avoid errors like NUKE-256 | |
rootstring = root.writeKnobs(nuke.TO_SCRIPT | nuke.WRITE_USER_KNOB_DEFS) | |
# TODO: Why doesn't writeKnobs write [first/last]_frame? Also |
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
set cut_paste_input [stack 0] | |
push $cut_paste_input | |
Group { | |
name PlanarProjection | |
help "<b>Planar Projection</b>\nGenerates 2D coordinates for points in 3D space. Type in 3D point coordinates, or use vertex selection in 3D viewer and click set to pick average of selected points, or set points to set all four points at once. \n\nYou can connect node output to scene together with your pointcloud or geometry and see where your points are located in 3d space. Double click any of them to move it in 3d space like any traditional nuke transform control. \n\nA matrix transform is also generated to be used with RotoPaint, SplineWarp and GridWarp nodes. If you are using matrix in GridWarp, points have to be in clockwise order, pick them one by one! \n\nCommand set points doesn't respect selection order! \n\nCheck out the demo video on my website! Kudos to Ivan Busquets for help with matrix math. \n\n-- developed by Vit Sedlacek 2012 www.vitsedlacek.com \n\n-- Modified by Jed Smith to make calculation time nearly inst |
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
// Copyright 2019 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
// Polynomial approximation in GLSL for the Turbo colormap | |
// Original LUT: https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f | |
// Authors: | |
// Colormap Design: Anton Mikhailov (mikhailov@google.com) | |
// GLSL Approximation: Ruofei Du (ruofei@google.com) |
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
#----------------------------------------------------------------------------------------- | |
# | |
# Spectral Matting | |
# | |
import time | |
import logging | |
import numpy as np | |
from scipy import ndimage, sparse | |
import scipy.sparse.linalg as sparse_linalg |
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
/**Happy Valentine's Day | |
*/ | |
*, *:before, *:after { | |
box-sizing: border-box | |
} | |
body{ | |
background-color:#E03840; | |
} |