This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env ruby | |
| # "Fork and Forget" | |
| # Don't wait if you don't have to: A mini-tutorial about concurrency | |
| # mechanisms in Ruby and basic Unix systems programming, and how you can use | |
| # them to avoid waiting. | |
| # | |
| # I have heard that people are occasionally unfamiliar with this strategy. | |
| # It's a common idiom, regardless of language, and it is also essentially built | |
| # into Erlang (and Termite Scheme, etc.). | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def path | |
| super || own_computed_path | |
| end | |
| private | |
| def own_computed_path | |
| path_components = [parent_path] | |
| if node_id && !parent_path.empty? | |
| path_components.push '[%s]' % node_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class OxMama | |
| def path | |
| end | |
| end | |
| class WyrwiGlaz < OxMama | |
| def parent_path | |
| 'junk' | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using = (context, args..., f) -> f.apply(context, args) | |
| window.app = {} | |
| window.inApp = (f) -> | |
| using window.app, f | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nuke | |
| def run(): | |
| cornerpin = nuke.selectedNode() | |
| xform = nuke.nodes.TransformMasked() | |
| xform["center"].setAnimated() | |
| f = nuke.frame() | |
| center = xform["center"] | |
| xanim = center.animations()[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| MOUNTZ = %w( | |
| some-server.company.local:/mnt/raiddisk/commercial /mnt/commercial | |
| ) | |
| SERVERS = Hash[*MOUNTZ] | |
| MAGIC_OPTS = %w( soft resvport intr rsize=8192 wsize=8192 timeo=900 retrans=3 proto=tcp ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nuke, re | |
| def slip_animations_of_node(node, by_offset): | |
| """ | |
| This function will slip all the animations of the passed node by a passed | |
| offset in frames | |
| The animations are offset in the passed TCL curve command. | |
| In this script every frame at which keys are placed is marked by x<FRAME_NUMBER>, | |
| and these are only placed at the start of a non-continuous segment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nuke, re | |
| def start_anim_at(node, frame): | |
| """ | |
| Will move all the animations of the passed node so that they start at the passed frame instead of the | |
| current ont | |
| """ | |
| slip_by = frame - first_keyframe_location(node) | |
| slip_animations_of_node(node, slip_by) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'edl' | |
| class ConsolidatedClip | |
| attr_reader :in, :out, :reel, :members | |
| def initialize(members) | |
| @in = members.map {|e| e.capture_from_tc }.sort[0] | |
| @out = members.map {|e| e.capture_to_tc }.sort[-1] | |
| @reel = members[0].reel | |
| @members = members | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //SIZZLET Flip Selected Trackers In 2D | |
| obj = Scene.activeObj | |
| shot = obj.shot | |
| frameFrom = shot.start | |
| frameTo = shot.stop | |
| for (tk in obj.trk) | |
| if (tk.isSel == 1) | |
| tk.isDone = 0 |