Skip to content

Commit

Permalink
fixed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
coinish committed Nov 10, 2022
1 parent 22b57b5 commit 419bec6
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion groups/Merge/Compare_sd.gizmo
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down
4 changes: 2 additions & 2 deletions python/arrange_by_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]


Expand Down
2 changes: 1 addition & 1 deletion python/autosave_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions python/backdrop_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/copy_frame_list_to_clipboard_sd.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/copy_instead_of_render_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
12 changes: 6 additions & 6 deletions python/move_nodes_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand All @@ -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]
Expand All @@ -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())) '''
Expand Down
2 changes: 1 addition & 1 deletion python/multiple_node_info_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions python/script_clean_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ 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()

#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
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion python/tidyness_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 419bec6

Please sign in to comment.