Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cycloneslider
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/wacggq0abkde/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cartel
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/wacggq0abkde/public_html/wp-includes/functions.php on line 6114
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 292
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 293
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 294
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 295
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 296
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 297
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 298
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 299
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 300
Warning: Cannot modify header information - headers already sent by (output started at /home2/wacggq0abkde/public_html/wp-includes/functions.php:6114) in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 301
#######################################################################################################################
__author__ = "Boris Martinez Castillo Based on Fernando Arbelaez's Idea"
__version__ = "1.0.1"
__maintainer__ = "Boris Martinez Castillo"
__email__ = "boris.vfx@outlook.com"
########################################################################################################################
#IMPORTS
import nuke
import nukescripts
import itertools
#DEFINITIONS
class CamPullPanelB(nukescripts.PythonPanel):
def __init__(self):
nukescripts.PythonPanel.__init__(self,"focus_puller")
#CREATE KNOBS
self.fstop = nuke.Double_Knob("fstop:")
self.fstop.clearFlag(nuke.STARTLINE)
self.frame_list = nuke.String_Knob("frame list:")
self.focus_list = nuke.String_Knob("focus plane values:")
self.cameralist = nuke.Enumeration_Knob("cameras", "choose camera",self.get_camera_nodes())
self.pull_focus = nuke.PyScript_Knob("pull focus","pull focus")
self.pull_focus.clearFlag(nuke.STARTLINE)
self.author = nuke.Text_Knob("making focus pulling \n great again")
#SET DEFAULTS
i = nuke.root()['first_frame'].value()
o = nuke.root()['last_frame'].value()
self.fstop.setValue(5.6)
self.frame_list.setValue(str(int(i)) + "," + str(int(o)))
self.focus_list.setValue("10,20")
#ADD KNOBS
for i in (self.fstop,self.frame_list,self.focus_list,self.cameralist,self.author):
self.addKnob(i)
#METHODS
def get_camera_nodes(self):
self.camera_list = []
for node in nuke.allNodes():
if node.Class() == "HubCamera2" or node.Class() == "Camera2":
self.camera_list.append(node.name())
return self.camera_list
def delete_fstop_focalpoint_anim(node_name):
node = nuke.toNode(node_name)
for knob in node.knobs():
if nuke.Knob.isAnimated(node['focal_point']):
nuke.Knob.clearAnimated(node['focal_point'])
elif nuke.Knob.isAnimated(node['fstop']):
nuke.Knob.clearAnimated(node['fstop'])
else:
print "Nothing to clean up!!"
def string_to_list(str):
lst = str.split(",")
return lst
def set_keys_focal(camera,frame_list,focal_list):
focal = camera['focal_point']
focal.setAnimated()
print frame_list, focal_list
for f,b in itertools.izip(frame_list,focal_list):
focal.setValueAt(float(b),float(f))
def pull_focus_b():
context= CamPullPanelB()
if not context.showModalDialog():
print "script aborted"
return
else:
cam_node = context.cameralist.value()
delete_fstop_focalpoint_anim(cam_node)
frame_list = string_to_list(context.frame_list.value())
focus_list = string_to_list(context.focus_list.value())
fstop = context.fstop.value()
target_cam_node = nuke.toNode(cam_node)
set_keys_focal(target_cam_node,frame_list,focus_list)
target_cam_node.knob('fstop').setValue(fstop)
if __name__ == "__main__":
pull_focus_b()
Notice: ob_flush(): failed to flush buffer. No buffer to flush in /home2/wacggq0abkde/public_html/wp-content/plugins/simple-file-downloader/simple-file-downloader.php on line 325