From 419bec681e40f2d8e152ca0dd04fa5aec46f3606 Mon Sep 17 00:00:00 2001 From: seaniedan Date: Thu, 10 Nov 2022 14:47:24 +0000 Subject: [PATCH] fixed imports --- groups/Merge/Compare_sd.gizmo | 2 +- python/arrange_by_sd.py | 4 ++-- python/autosave_sd.py | 2 +- python/backdrop_sd.py | 4 ++-- python/copy_frame_list_to_clipboard_sd.py | 2 +- python/copy_instead_of_render_sd.py | 4 ++-- python/move_nodes_sd.py | 12 ++++++------ python/multiple_node_info_sd.py | 2 +- python/script_clean_sd.py | 6 +++--- python/tidyness_sd.py | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/groups/Merge/Compare_sd.gizmo b/groups/Merge/Compare_sd.gizmo index bef1160..57823f0 100644 --- a/groups/Merge/Compare_sd.gizmo +++ b/groups/Merge/Compare_sd.gizmo @@ -16,7 +16,7 @@ Group { addUserKnob {41 gamma T GradeGamma.gamma} addUserKnob {41 white l gain T GradeExposure.white} addUserKnob {20 endGroup_1 l endGroup n -1} - addUserKnob {22 comparesequence l "Analyse Input Sequences" t "compares a sequence" T "try:\n import seanscripts.arrange_by_sd\n nodes=\[nuke.thisNode().input(0), nuke.thisNode().input(1)]\n seanscripts.arrange_by_sd.compare_seqs(nodes=nodes)\nexcept NameError:\n nuke.alert(\"Nothing to compare! Please attach a Read Node directly to each input and try again.\")\nexcept TypeError:\n nuke.alert(\"Nothing to compare! Please attach a Read Node directly to each input and try again.\") \n\n" +STARTLINE} + addUserKnob {22 comparesequence l "Analyse Input Sequences" t "compares a sequence" T "try:\n import arrange_by_sd\n nodes=\[nuke.thisNode().input(0), nuke.thisNode().input(1)]\n arrange_by_sd.compare_seqs(nodes=nodes)\nexcept NameError:\n nuke.alert(\"Nothing to compare! Please attach a Read Node directly to each input and try again.\")\nexcept TypeError:\n nuke.alert(\"Nothing to compare! Please attach a Read Node directly to each input and try again.\") \n\n" +STARTLINE} addUserKnob {26 metadatalabel l metadata} addUserKnob {41 metadata l "" -STARTLINE T CompareMetaData1.metadata} } diff --git a/python/arrange_by_sd.py b/python/arrange_by_sd.py index 0732795..04440b4 100755 --- a/python/arrange_by_sd.py +++ b/python/arrange_by_sd.py @@ -507,8 +507,8 @@ def get_sortKey(ask= True): #add backdrop node def m_Backdrop(selNodes= nuke.selectedNodes(), label= None): original_selection= nuke.selectedNodes() - import seanscripts.backdrop_sd - seanscripts.backdrop_sd.make_backdrop(selNodes= group, label= sortDiscrete(group[0])) + import backdrop_sd + backdrop_sd.make_backdrop(selNodes= group, label= sortDiscrete(group[0])) [i.setSelected(1) for i in original_selection] diff --git a/python/autosave_sd.py b/python/autosave_sd.py index 607c6b5..9860112 100755 --- a/python/autosave_sd.py +++ b/python/autosave_sd.py @@ -72,7 +72,7 @@ def autosave_sd(): #ADD AUTOSAVE #for some reason this must be done in menu.py -#nuke.addOnScriptSave(seanscripts.autosave_sd) +#nuke.addOnScriptSave(autosave_sd) #unhash next line to test #m_autosave() diff --git a/python/backdrop_sd.py b/python/backdrop_sd.py index dfc7ff2..64a0020 100755 --- a/python/backdrop_sd.py +++ b/python/backdrop_sd.py @@ -16,7 +16,7 @@ #http://www.colorjack.com # #Another way to get a collection is to select some nodes in a script and run -#'seanscripts.scan_nodes_for_collection()' in Nuke's Script Editor. +#'scan_nodes_for_collection()' in Nuke's Script Editor. #This will create backdrop nodes from this collection and print the #text you need. @@ -378,7 +378,7 @@ def make_backdrop(selNodes, label= None): def show_collection_as_backdrops(collection= collection): #create a palette of backdrop nodes using the current collection #or give a collection of RGBInt numbers as a list, e.g. - #seanscripts.show_collection_as_backdrops([538588160, 1652190464, 1194403328, 2878348800]) + #show_collection_as_backdrops([538588160, 1652190464, 1194403328, 2878348800]) print(('collection=', collection)) xlen= int(math.sqrt(len(collection))) size= 100 diff --git a/python/copy_frame_list_to_clipboard_sd.py b/python/copy_frame_list_to_clipboard_sd.py index 9db3ba2..0144343 100755 --- a/python/copy_frame_list_to_clipboard_sd.py +++ b/python/copy_frame_list_to_clipboard_sd.py @@ -1,5 +1,5 @@ import nuke -#nuke.menu( 'Animation' ).addMenu( 'seanscripts' ).addCommand( 'Copy keyframes to frame list', "import seanscripts.copy_framelist_to_clipoard;seanscripts.copy_framelist_to_clipoard.copy_framelist()" ) +#nuke.menu( 'Animation' ).addMenu( 'seanscripts' ).addCommand( 'Copy keyframes to frame list', "import copy_framelist_to_clipoard;copy_framelist_to_clipoard.copy_framelist()" ) def copy_framelist(): #convert keys (which pass a certain test) to a framelist and copy to clipboard diff --git a/python/copy_instead_of_render_sd.py b/python/copy_instead_of_render_sd.py index 3100f89..ea273b7 100755 --- a/python/copy_instead_of_render_sd.py +++ b/python/copy_instead_of_render_sd.py @@ -202,8 +202,8 @@ def copy_instead_of_render(destNodes, style= None, renderRange= None): #print destWrite.name() #was going to hash this - - #import seanscripts.make_write_directories_sd - #seanscripts.make_write_directories_sd.write_mkdir(node= destNode)#, askUser= True) + #import make_write_directories_sd + #make_write_directories_sd.write_mkdir(node= destNode)#, askUser= True) #replaced because it didn't work with TK_Write #but still get error 'file knob doesn't exist' diff --git a/python/move_nodes_sd.py b/python/move_nodes_sd.py index a404e4c..e0d16a2 100755 --- a/python/move_nodes_sd.py +++ b/python/move_nodes_sd.py @@ -98,11 +98,11 @@ def medianXY(listxy): #SCALE def scale_nodes(nodes, scaleX= False, scaleY= False, centerX= None, centerY= None, minmove= 20): - import seanscripts.backdrop_sd + import backdrop_sd if nodes: #move backdrop nodes from list to a dict {backdrop node: nodes on backdrop} - #backdrops= {node: seanscripts.backdrop_sd.nodes_in_backdrop(node) for node in nodes if node.Class() == 'BackdropNode'} + #backdrops= {node: backdrop_sd.nodes_in_backdrop(node) for node in nodes if node.Class() == 'BackdropNode'} #separate nodes into 2 lists: nodes and backdrops backdrops= [node for node in nodes if node.Class() == 'BackdropNode'] [nodes.remove(node) for node in backdrops] @@ -185,7 +185,7 @@ def scale_nodes(nodes, scaleX= False, scaleY= False, centerX= None, centerY= Non #print backdrop.name(), nodes if nodes: #scale backdrops to still cover nodes (which have already been scaled) - seanscripts.backdrop_sd.resize_bd(backdrop, selNodes= nodes) + backdrop_sd.resize_bd(backdrop, selNodes= nodes) else: #SCALE EMPTY BACKDROPS if scaleX != 1: @@ -206,10 +206,10 @@ def scale_nodes(nodes, scaleX= False, scaleY= False, centerX= None, centerY= Non #TRANSLATE # to do - keep on backdrops '''def translate_nodes_up(nodes= nuke.selectedNodes()): - import seanscripts.backdrop_sd + import backdrop_sd if nodes: #make dir of all backdrops and nodes on each - backdrops= {backdrop: seanscripts.backdrop_sd.nodes_in_backdrop(backdrop) for backdrop in nuke.allNodes('BackdropNode')} + backdrops= {backdrop: backdrop_sd.nodes_in_backdrop(backdrop) for backdrop in nuke.allNodes('BackdropNode')} #print 'backdrops', backdrops #remove backdrops from selection [nodes.remove(backdrop) for backdrop in backdrops.keys() if backdrop in nodes] @@ -225,7 +225,7 @@ def scale_nodes(nodes, scaleX= False, scaleY= False, centerX= None, centerY= Non #if if nodes_on_backdrop: #scale backdrops to still cover nodes (which have already been moved) - seanscripts.backdrop_sd.resize_bd(backdrop, selNodes= nodes) + backdrop_sd.resize_bd(backdrop, selNodes= nodes) else: #MOVE EMPTY BACKDROPS backdrop.setYpos(int(backdrop.ypos()- nuke.toNode("preferences")["GridHeight"].value())) ''' diff --git a/python/multiple_node_info_sd.py b/python/multiple_node_info_sd.py index 113dda8..f3e8fb2 100755 --- a/python/multiple_node_info_sd.py +++ b/python/multiple_node_info_sd.py @@ -31,7 +31,7 @@ def occurDict(items): #runs when testing: nuke.display("get_all_node_info()", nodes[0]) else: - nuke.display("seanscripts.multiple_node_info_sd.get_all_node_info()", nodes[0]) + nuke.display("multiple_node_info_sd.get_all_node_info()", nodes[0]) else: if not nodes: diff --git a/python/script_clean_sd.py b/python/script_clean_sd.py index 3edc2b6..4605f6f 100755 --- a/python/script_clean_sd.py +++ b/python/script_clean_sd.py @@ -379,7 +379,7 @@ def tidy(nodes): #tidy nodes and backdrops. #to do: align b lines etc. - import seanscripts.tidyness_sd + import tidyness_sd if not nodes: nodes= nuke.allNodes() @@ -387,7 +387,7 @@ def tidy(nodes): #set up a panel to show options and current tidyness level #show tidyness - nodes, uniquePos, up, tangled= seanscripts.tidyness_sd.calculate_tidyness(nodes) + nodes, uniquePos, up, tangled= tidyness_sd.calculate_tidyness(nodes) #set weightings uniquePosweighting= .333 upweighting= .333 @@ -458,7 +458,7 @@ def tidy(nodes): clear_transform_expressions(nodes) #set cards to 1x1 (unless they have distortion) set_cards_to_one_row_one_column(nodes)''' - seanscripts.tidyness_sd.show_tidyness(nodes) + tidyness_sd.show_tidyness(nodes) def cleanupScript(nodes): diff --git a/python/tidyness_sd.py b/python/tidyness_sd.py index f7d0d44..21b4932 100755 --- a/python/tidyness_sd.py +++ b/python/tidyness_sd.py @@ -95,7 +95,7 @@ def intersect(xxx_todo_changeme, xxx_todo_changeme1): return [i for i in intersections if i] #store original nodes, do I can restore at end: otherwise, for example, - #nodes, uniquePos, up, tangled= seanscripts.tidyness_sd.calculate_tidyness(nodes) + #nodes, uniquePos, up, tangled= tidyness_sd.calculate_tidyness(nodes) #will overwrite my original selection. original_nodes= nodes