Ejemplo n.º 1
0
def setup():

    nuke.addBeforeRender(CALLBACKS_BEFORE_RENDER.execute)
    nuke.addOnScriptLoad(CALLBACKS_ON_SCRIPT_LOAD.execute)
    nuke.addOnScriptSave(CALLBACKS_ON_SCRIPT_SAVE.execute)
    nuke.addOnScriptClose(CALLBACKS_ON_SCRIPT_CLOSE.execute)
    nuke.addOnCreate(CALLBACKS_ON_CREATE.execute)
    nuke.addUpdateUI(CALLBACKS_UPDATE_UI.execute)
    if nuke.GUI:
        import nukescripts
        nukescripts.addDropDataCallback(CALLBACKS_ON_DROP_DATA.execute)
Ejemplo n.º 2
0
	path = re.sub("file:\/\/", "", path)
	if nuke.ask("Create precomp? [Yes] Import nodes [No]"):
		nuke.nodes.Precomp(file=path)
		return True
	else:
		return None

def clipboardHandler(mime,data):
	if mime=='text/plain':
		if data.startswith("http") and re.search("\.\w+$",data):
			read_from_http(data)
			return True
		elif re.search("^file:\/\/.+fbx", data, re.IGNORECASE):
			read_fbx(data.strip())
			return True
		elif re.search("^file:\/\/.+nk", data, re.IGNORECASE):
			return create_precomp(data.strip())
		else:
			path = re.sub(r"\"",r"",data)
			if os.path.exists(path) and os.path.isfile(path):
				save_path = nuke.pacify(path)
				read = nuke.createNode("Read","file %s" % save_path, inpanel=False)
				read['selected'].setValue(True)
				return True
			else:
				return None
	else:
		return None

nukescripts.addDropDataCallback(clipboardHandler)
Ejemplo n.º 3
0
# -*- coding:utf-8 -*-
__date__ = '2017/4/5 13:46'
__author__ = 'liaokong'

from CommonToolkit import CommonToolkit
from nukescripts import panels
from PyDropping import PyDropping
import nukescripts

nukescripts.addDropDataCallback(PyDropping)

panels.registerWidgetAsPanel('CommonToolkit', u'预设工具', "example.test.panel",
                             True)
Ejemplo n.º 4
0
			

	if len(scaleData) != 0:
		s.setAnimated()
		for i in scaleData:
			s.setValueAt(float(i[1])/100, float(i[0]), 0)
			s.setValueAt(float(i[2])/100, float(i[0]), 1)

	if len(rotationData) != 0:
		r.setAnimated()
		if rotationData != []:
			for i in rotationData:
				r.setValueAt(float(i[1]), float(i[0]))

	c.setValue(sWidth/2, 0)
	c.setValue(sHeight/2, 1)


def AE_Drop( mimeType, text ):
    
    if 'Adobe' in text:
        AE_Text = text
        if 'Transform' in AE_Text:
	        AE_Transform(AE_Text)
        return True
    else:
        return False

nukescripts.addDropDataCallback(AE_Drop)

Ejemplo n.º 5
0
# -*- coding: utf-8 -*-
# Author: Zack Zhou
# Created on: 2016.05.16 21:25:36 

# Import
import nuke
import nukescripts
from cdd_handler import DropHandler
from custom_create_read import custom_create_read

# Function 
nukescripts.addDropDataCallback(DropHandler)

nukescripts.create_read = custom_create_read
Ejemplo n.º 6
0
import makeIcons
import LookAt
import ImageMagick
import readCompRange
import missingFrames
import RandomSelection
import updateFrameRange
import saveTheScript
import load_frame_range
from Apps.Steropes.SteropesDailies.Nuke import steropesDailies
from Apps.Steropes.SteropesPublish.ui import PublishUi
from Apps.Brontes.Hooks import nuke_brontes

import geoffroy_callbacks
geoffroy_callbacks.register_callbacks()
nukescripts.addDropDataCallback(nuke_brontes.dropper)

# nuke.Root() callback
nuke.addOnUserCreate(load_frame_range.in_nuke)

ToDoList.registerNukePanel()
nuke.addAfterRender(ImageMagick.makeThumbnail)
stores.addStoresMenu()

os.environ['GENEPATH'] = '/usr/home/ggivry/Geoff/NUKE/'
genePath = os.environ['GENEPATH']

fullHD = '2048 1152 0 0 2048 1152 1 2K_178'
nuke.addFormat(fullHD)

fullHD1K = '1024 576 0 0 1024 576 1 1K_178'