Skip to content

Commit

Permalink
network editor: split "Select" menu qLab#1143
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyquest committed Oct 31, 2020
1 parent fd58e88 commit f9f7f4e
Showing 1 changed file with 86 additions and 76 deletions.
162 changes: 86 additions & 76 deletions NetworkViewMenu.xml
Expand Up @@ -46,38 +46,6 @@ qlibutils.set_netview_selection(kwargs, lambda n: not n.isSelected(), allItems=T

<separatorItem />

<scriptItem id="pane.wsheet.select_all_of_same_type_ql">
<label>All of Same Type</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedItems()
same = qlibutils.find_same_nodes(sel)
qlibutils.add_to_selection(same, kwargs)
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_all_of_same_color_ql">
<label>All of Same Color</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedItems()
same = qlibutils.find_same_colored(sel)
qlibutils.add_to_selection(same, kwargs)
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_all_of_same_shape_ql">
<label>All of Same Shape</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedItems()
same = qlibutils.find_same_shape(sel)
qlibutils.add_to_selection(same, kwargs)
]]></scriptCode>
</scriptItem>

<separatorItem />

<scriptItem id="pane.wsheet.select_with_keyframed_parms_ql">
<label>Animated (Keyframed)</label>
<scriptCode><![CDATA[
Expand Down Expand Up @@ -176,50 +144,6 @@ qlibutils.select_netview_nodes(kwargs, lambda n: hasattr(n, "isRenderFlagSet") a

<separatorItem />

<scriptItem id="pane.wsheet.select_dependencies_same_network_ql">
<label>Dependencies (Same Network)</label>
<scriptCode><![CDATA[
import qlibutils
qlibutils.select_dependencies_same_network(kwargs)
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_ropnet_inputs_ql">
<label>ROP Input Dependencies</label>
<scriptCode><![CDATA[
import qlibutils
qlibutils.select_ropnet_input_depdendents(kwargs)
]]></scriptCode>
</scriptItem>

<separatorItem />

<scriptItem id="pane.wsheet.select_same_author_ql">
<label>By Same Author</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedNodes()
authors = qlibutils.get_node_authors(sel)
if len(authors)>0:
qlibutils.statmsg("Selecting nodes by author(s): %s" % ", ".join(authors))
qlibutils.select_netview_nodes(kwargs, lambda n: qlibutils.has_author(n, authors))
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_same_author_name_only_ql">
<label>By Same Author (Username Only)</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedNodes()
authors = qlibutils.get_node_authors(sel, username_only=True)
if len(authors)>0:
qlibutils.statmsg("Selecting nodes by author(s): %s" % ", ".join(authors))
qlibutils.select_netview_nodes(kwargs, lambda n: qlibutils.has_author(n, authors, username_only=True))
]]></scriptCode>
</scriptItem>

<separatorItem />

<scriptItem id="pane.wsheet.select_embedded_ql">
<label>Embedded HDAs</label>
<scriptCode><![CDATA[
Expand Down Expand Up @@ -277,6 +201,92 @@ hou.ui.displayMessage(str(kwargs))
-->
</subMenu>


<subMenu id = "select_related_submenu_ql">
<label>Select Related</label>

<scriptItem id="pane.wsheet.select_all_of_same_type_ql">
<label>All of Same Type</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedItems()
same = qlibutils.find_same_nodes(sel)
qlibutils.add_to_selection(same, kwargs)
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_all_of_same_color_ql">
<label>All of Same Color</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedItems()
same = qlibutils.find_same_colored(sel)
qlibutils.add_to_selection(same, kwargs)
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_all_of_same_shape_ql">
<label>All of Same Shape</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedItems()
same = qlibutils.find_same_shape(sel)
qlibutils.add_to_selection(same, kwargs)
]]></scriptCode>
</scriptItem>

<separatorItem />

<scriptItem id="pane.wsheet.select_dependencies_same_network_ql">
<label>Dependencies (Same Network)</label>
<scriptCode><![CDATA[
import qlibutils
qlibutils.select_dependencies_same_network(kwargs)
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_ropnet_inputs_ql">
<label>ROP Input Dependencies</label>
<scriptCode><![CDATA[
import qlibutils
qlibutils.select_ropnet_input_depdendents(kwargs)
]]></scriptCode>
</scriptItem>

<separatorItem />

<scriptItem id="pane.wsheet.select_same_author_ql">
<label>By Same Author</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedNodes()
authors = qlibutils.get_node_authors(sel)
if len(authors)>0:
qlibutils.statmsg("Selecting nodes by author(s): %s" % ", ".join(authors))
qlibutils.select_netview_nodes(kwargs, lambda n: qlibutils.has_author(n, authors))
]]></scriptCode>
</scriptItem>

<scriptItem id="pane.wsheet.select_same_author_name_only_ql">
<label>By Same Author (Username Only)</label>
<scriptCode><![CDATA[
import qlibutils
sel = hou.selectedNodes()
authors = qlibutils.get_node_authors(sel, username_only=True)
if len(authors)>0:
qlibutils.statmsg("Selecting nodes by author(s): %s" % ", ".join(authors))
qlibutils.select_netview_nodes(kwargs, lambda n: qlibutils.has_author(n, authors, username_only=True))
]]></scriptCode>
</scriptItem>

<separatorItem />

</subMenu>


<separatorItem />


<subMenu id = "display_submenu_ql">
<label>Display</label>

Expand Down

0 comments on commit f9f7f4e

Please sign in to comment.