Skip to content

Commit

Permalink
Merged work (#1472, #1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyquest committed Nov 27, 2024
2 parents 1704dcb + 304c25f commit 6138be1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Binary file added gallery/qLib--TOP--regex_attribs_from_string.gal
Binary file not shown.
Binary file not shown.
16 changes: 15 additions & 1 deletion toolbar/qLib-PDG.shelf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,21 @@ shift = kwargs['shiftclick']
ctrl = kwargs['ctrlclick']
alt = kwargs['altclick']
sel = [ n.getPDGNode() for n in hou.selectedNodes() if hasattr(n, "getPDGNode") ]
# try to find a top node selection first
sel = [ tp for n in hou.selectedNodes() if hasattr(n, "getPDGNode") and (tp:=n.getPDGNode()) ]
# try finding non-top nodes with a linkage to a top node
if len(sel)==0:
print("SEL 2")
sel = [ tp for n in hou.selectedNodes() \
if (p:=n.parm("targettopnetwork")) and (t:=p.evalAsNode()) and (tp:=t.getPDGNode()) ]
# try finding a topnet container node
if len(sel)==0:
print("SEL 3")
sel = [ n.outputNode().getPDGNode() for n in hou.selectedNodes() \
if hasattr(n, "getPDGGraphContext") and hasattr(n, "outputNode") ]
items = [ len(n.workItems) for n in sel if hasattr(n, "workItems") ]
if len(items)>0 or ctrl:
Expand Down

0 comments on commit 6138be1

Please sign in to comment.