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 6114cartel
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 6114tl;dr: <\/strong>Batch convert your favourite Nuke Gizmos into “Grizmos”.<\/p>\n<\/div><\/div>\n important<\/strong>: If you find this usefull, it\u00b4s always better to create a Nuke menu from where to call the function.<\/p>\n<\/div>\n snippet<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,48,49,1],"tags":[],"class_list":["post-2153","post","type-post","status-publish","format-standard","hentry","category-nuke","category-python","category-scripting","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts\/2153","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=2153"}],"version-history":[{"count":15,"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts\/2153\/revisions"}],"predecessor-version":[{"id":2547,"href":"https:\/\/boris-mc.com\/index.php?rest_route=\/wp\/v2\/posts\/2153\/revisions\/2547"}],"wp:attachment":[{"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boris-mc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}snippet<\/strong><\/h6>\n<\/div>\n
import nuke\r\nimport os\r\nimport nukescripts\r\n\r\ndef transform_line(line):\r\n """ basic character replacement function.\r\n :param line: a string to be passed to perform character replacement.\r\n :return: the line mutated with the new replaced character.\r\n """\r\n word_replacements = {'Gizmo': 'Group'}\r\n for key, value in word_replacements.iteritems():\r\n line = line.replace(key, value)\r\n return line\r\n\r\n\r\ndef gizmo_to_grizmo(i):\r\n """ this function creates a "grouped" .gizmo file.\r\n :param i: input file to open\r\n :return: None\r\n """\r\n o = str.split(i,".")[0] + "_grizmed" + "." + str.split(i,".")[-1]\r\n with open(o, "w") as output_file, open(i) as input_file:\r\n for line in input_file:\r\n output_file.write(transform_line(line))\r\n return None\r\n\r\n\r\ndef grizmo_my_folder(dir):\r\n """ this fuction parses a directory and applies the gizmo_to_grizmo to its files, if convenient.\r\n :param dir: directory to be parsed.\r\n :return: None\r\n """\r\n for subdir, dirs, files in os.walk(dir):\r\n for file in files:\r\n # print os.path.join(subdir, file)\r\n filepath = subdir + os.sep + file\r\n if "grizmed" in filepath:\r\n print "already grizmed"\r\n return\r\n elif filepath.endswith(".gizmo") and "grizmed" not in filepath:\r\n gizmo_to_grizmo(filepath)\r\n print "gizmos grizmed succesfully"\r\n else:\r\n print "no valid file found, bruh"\r\n return\r\n \r\n\r\nclass Panel(nukescripts.PythonPanel):\r\n def __init__(self, name):\r\n super(Panel, self).__init__(name)\r\n # self.setMinimumSize(500,500)\r\n self.path = nuke.File_Knob('gizmos_path', 'Gizmos Path')\r\n\r\n self.addKnob(self.path)\r\n\r\n def show_modal_dialog(self):\r\n nukescripts.PythonPanel.showModalDialog(self)\r\n\r\n\r\ndef main():\r\n """\r\n wrapper function. From here we open the Nuke Panel to find the Gizmo Directory and launch the rest of the program\r\n :return: None\r\n """\r\n p = Panel("Grizmo Maker")\r\n p.show_modal_dialog()\r\n path = p.path.getValue()\r\n grizmo_my_folder(path)\r\n\r\n if path:\r\n panel = nuke.message("Grizmification completed")\r\n print "Grizmification completed"\r\n else:\r\n panel = nuke.message("Grizmification aborted")\r\n print "Grizmification aborted"\r\n return\r\n\r\n\r\nif __name__ == '__main__':\r\n main()<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"