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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893

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-includes/rest-api/class-wp-rest-server.php on line 1893
{"id":2265,"date":"2018-01-31T16:55:33","date_gmt":"2018-01-31T15:55:33","guid":{"rendered":"http:\/\/boris-mc.com\/?p=2265"},"modified":"2018-08-14T17:28:22","modified_gmt":"2018-08-14T16:28:22","slug":"fastdrop-my-friend","status":"publish","type":"post","link":"https:\/\/boris-mc.com\/?p=2265","title":{"rendered":"FASTDROP, MY FRIEND"},"content":{"rendered":"
<\/div>\n
\n

tl;dr:\u00a0\u00a0<\/strong>save some of your precious time when using the Backdrop Node.<\/p>\n<\/div><\/div>\n

<\/div><\/div>\n
<\/div>\n

Typically, when you use a Backdrop node to group a bunch of nodes, you want to set up a nice, descriptive label, a font size, and probably also a cool, elegant color.<\/strong> The problem is that usually, those tasks are done after the Backdrop node is created, one after the other, and that gets somewhat repetitive, boring and time-consuming in the long run.<\/strong><\/p>\n

If you want to save the burden and get those three things done at the same time, here I share with you a little Python snippet that will let you deal with your backdrops the easy way, and just at once.<\/p>\n

1 - How to use it<\/strong><\/p>\n

So first things first, let\u00b4s place the code where it can be reached, create a new Nuke Menu and set up a Hotkey. Let\u00b4s see how this works.<\/p>\n

Distribute the code<\/strong><\/p>\n

Copy the script and save it as a Python file called \"b_custom_bckdrp<\/span>.py\"\u00a0<\/span>where Nuke can find it. In other words, place it within the nuke.pluginPath() file structure. For more info, read my previous posts.<\/p>\n

Edit the menu.py file<\/strong><\/p>\n

Now we have the Python module where Nuke can find it, we\u00b4re gonna add the following lines to our fantastic menu.py so that we can effectively use it:<\/p>\n

n_menu = nuke.menu('Nuke') <\/span>
\nb_menu = n_menu.addMenu('MenuName')<\/span>
\nb_menu.addCommand('b_custom_bckdrp', 'b_custom_bckdrp.main_function()', 'ctrl+a')<\/span><\/p>\n

Save the menu.py and restart Nuke.<\/p>\n

2 - Try it<\/strong><\/p>\n

You'll notice that there is a new menu in your upper menu bar, listing the new 'b_custom_bckdrp' <\/span>command and its Hotkey. Just select a bunch of nodes and press 'alt+a '(it\u00b4s the hotkey we set up earlier, obviously you can change this to any other of your convenience). A Nuke Panel like this one should appear:
\n

<\/div>\n

\"\"<\/a><\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

<\/div>\n

Set the \"note size\" and \"label\" and click ok.<\/p>\n

<\/div>
\n\"\"<\/a><\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

<\/div>\n

Now select a nice, elegant color (or leave it as is).<\/p>\n

<\/div>\n

\"\"<\/a><\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

Finally, you should end up with something like this :D<\/p>\n

<\/div>\n
<\/div>\n
<\/div>\n
code<\/strong><\/h6>\n
import nuke\r\nimport nukescripts\r\n\r\n\r\n######################################################################################\r\n\r\n__author__ = "Boris Martinez Castillo"\r\n__version__ = "1.0.1"\r\n__maintainer__ = "Boris Martinez Castillo"\r\n__email__ = "boris.vfx@outlook.com"\r\n\r\n######################################################################################\r\n\r\n\r\ndef custom_backdrop(txt,fontsize):\r\n\r\n    node = nukescripts.autoBackdrop()\r\n    node['label'].setValue('<center><u><b>' + txt)\r\n    #node['bdwidth'].setValue(525)\r\n    prev_sel = nuke.selectedNodes()\r\n    for i in prev_sel:\r\n        i['selected'].setValue(False) \r\n    node['selected'].setValue(True)\r\n    \r\n    node['note_font_size'].setValue(fontsize)\r\n    nukescripts.color_nodes()\r\n\r\n\r\nclass modalPanel(nukescripts.PythonPanel):\r\n\r\n    def __init__(self):\r\n        nukescripts.PythonPanel.__init__(self,"customize_backdrop")\r\n\r\n\r\n    #CREATE KNOBS\r\n\r\n        self.note_size = nuke.Int_Knob("Note Size:")\r\n        self.note_size.clearFlag(nuke.STARTLINE)\r\n        self.frame_display = nuke.String_Knob("Label:")\r\n        self.frame_display.clearFlag(nuke.STARTLINE)\r\n        self.set_note_size_default_value()\r\n        self.author = nuke.Text_Knob("written by Boris Martinez")\r\n\r\n    #ADD KNOBS\r\n\r\n        for i in (self.note_size , self.frame_display):\r\n            self.addKnob(i)\r\n\r\n    #SET KNOB DEFAULT VALUES\r\n\r\n    def set_note_size_default_value(self):\r\n        self.note_size.setValue(100)\r\n\r\n \r\ndef main_function():\r\n    \r\n    panel = modalPanel()\r\n    if not panel.showModalDialog():\r\n        print "script aborted"\r\n        return\r\n    else:\r\n        fontsize = panel.note_size.getValue()\r\n        note = panel.frame_display.getValue()\r\n\r\n\r\n    custom_backdrop(note,fontsize)    \r\n\r\n\r\nif __name__ == "__main__":\r\n    main_function()<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"

Typically, when you use a Backdrop node to group a bunch of nodes, you want to set up a nice, descriptive label, a font size, and probably also a cool, elegant color. The problem is that usually, those tasks are done after the Backdrop node is created, one after the other, and that gets somewhat […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,47,48,49],"tags":[],"class_list":["post-2265","post","type-post","status-publish","format-standard","hentry","category-begginer","category-nuke","category-python","category-scripting"],"_links":{"self":[{"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts\/2265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2265"}],"version-history":[{"count":25,"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts\/2265\/revisions"}],"predecessor-version":[{"id":2497,"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts\/2265\/revisions\/2497"}],"wp:attachment":[{"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}