Skip to content

Commit

Permalink
Merged work (qLab#1363, qLab#1408, qLab#1409)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyquest committed Feb 10, 2024
2 parents efdc799 + 856361c commit db13c2a
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
Binary file modified gallery/qLib--OBJ--python_xform_by_pt_matrix_attrib.gal
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions help/qlib/shelf/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
:: [Icon:COP2/invert] [Cycle Background Color|/shelf/qLib::ToggleViewportBackgroundColor] -- Cycle background color of viewports
:: [Icon:OBJ/camera] [VCamera Dolly/Zoom Tool ("Vertigo")|/shelf/qLib::camera_dolly_zoom_ql] -- A viewport perspective adjustment tool
:: [Icon:NODEFLAGS/template] [Toggle Templates|/shelf/qLib::ToggleViewportTemplates] -- Toggle Template geo display ( ((Ctrl + LMB)) to clear template flags)
:: [Icon:BUTTONS/materials_assigned] [Toggle Current Geometry|/shelf/qLib::ToggleViewportCurrentGeometry] -- Toggle Current Geometry display
:: [Icon:IMAGE/view_guides] [Toggle Guides|/shelf/qLib::ToggleViewportGuides] -- Toggle Guide geometry display

@subtopics Network Editor
Expand Down
Binary file modified otls/experimental/volume_shape_ql_SOP_2.otl
Binary file not shown.
64 changes: 64 additions & 0 deletions toolbar/qLib.shelf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<memberTool name="qLib::ToggleViewportBackgroundColor"/>
<memberTool name="qLib::camera_dolly_zoom_ql"/>
<memberTool name="qLib::ToggleViewportTemplates"/>
<memberTool name="qLib::ToggleViewportCurrentGeometry"/>
<memberTool name="qLib::ToggleViewportGuides"/>
<memberTool name="qLib::ReferenceCopy"/>
<memberTool name="qLib::ToggleTimeDependencyDisplay"/>
Expand Down Expand Up @@ -1131,6 +1132,69 @@ else:
e.flashMessage("SHOP_select", "%d selected (was %d) oldest: %s creator: %s" %
(num_sel_after, num_sel, qlibutils.date_string(oldest_date), author, ),
8.0)
]]></script>
</tool>

<tool name="qLib::ToggleViewportCurrentGeometry" label="/current geo/" icon="BUTTONS_materials_assigned">
<helpText><![CDATA[#icon: BUTTONS/materials_assigned
#context: obj
#type: tool
= Toggle Viewport Current Geometry qL =
*version 1*
"""Toggles current geometry display in the viewports.
---
LMB: Toggle current geometry display.
Shift-LMB: Enable current geometry display.
"""
Current geometry is drawing the geometry contained in the selected geometry node
(when it’s different from the display node).
@usage Usage
- ((LMB)):
Toggles current geometry display (Display Options -> Guides -> Node guides)
- ((Shift + LMB)):
Enable current geometry display
@bugs Limitations
- It might behave inconsistently between viewports (and needs to be clicked twice)
@relnotes Release Notes
_version 1_ ---
2024-02-10:
- First version.
]]></helpText>
<script scriptType="python"><![CDATA[import toolutils
shift = kwargs['shiftclick']
v = toolutils.sceneViewer()
w = "%s.%s.world" % \
(v.pane().desktop().name(), \
v.name() )
#print "view:", w
if not hasattr(hou.session, "currentgeo"):
hou.session.currentgeo = True
if shift:
hou.session.currentgeo = False
hou.session.currentgeo = not hou.session.currentgeo
hou.hscript("viewdisplay -R %s *" % ("on" if hou.session.currentgeo else "off", ))
msg = "Current geometry display %s" % ("ON" if hou.session.currentgeo else "OFF")
hou.ui.setStatusMessage(msg)
v.clearPromptMessage()
v.setPromptMessage(msg, hou.promptMessageType.Warning)
]]></script>
</tool>
</shelfDocument>

0 comments on commit db13c2a

Please sign in to comment.