Skip to content

Commit

Permalink
Merge remote-tracking branch 'greebo/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mott committed Dec 13, 2020
2 parents 16a6e5a + 8a91501 commit ef19dda
Show file tree
Hide file tree
Showing 57 changed files with 3,003 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install/menu.xml
Expand Up @@ -307,7 +307,8 @@
<menuItem name="capselection" caption="Cap Selection..." command="PatchCapDialog" icon="curve_cap.png" />
<menuSeparator />
<menuItem name="stitchTextures" caption="Stitch Patch Textures" command="StitchPatchTexture" />
<menuItem name="bulgePatch" caption="Bulge Patch..." command="BulgePatchDialog" />
<menuItem name="bulgePatch" caption="Bulge Patch..." command="BulgePatchDialog" />
<menuItem name="weldPatches" caption="Weld/Merge Patches" command="WeldSelectedPatches" />
</subMenu>

<subMenu name="curve" caption="&amp;Curve">
Expand Down
57 changes: 57 additions & 0 deletions install/scripts/test.py
Expand Up @@ -313,3 +313,60 @@ def visit(self, node):
camview = GlobalCameraManager.getActiveView()
print(camview.getCameraOrigin())
camview.setCameraOrigin(dr.Vector3(50,0,50))

# Layer Functionality
def printLayers():
class LayerPrinter(dr.LayerVisitor):
def visit(self, layerID, layerName):
print(layerID, layerName)
layerPrinter = LayerPrinter()
GlobalLayerManager.foreachLayer(layerPrinter)
print("=================")

print("Layers:")
printLayers()

print("Test create")
print(GlobalLayerManager.createLayer("One"))
print(GlobalLayerManager.createLayer("Two"))
print(GlobalLayerManager.createLayer("Forty-two", 42))
print(GlobalLayerManager.createLayer("TwoAgain", 2))
printLayers()

print("Test delete")
print(GlobalLayerManager.deleteLayer("NotALayer"))
print(GlobalLayerManager.deleteLayer("TwoAgain"))
printLayers()

print("Test get")
print(GlobalLayerManager.getLayerID("Forty-two"))
print(GlobalLayerManager.getLayerName(42))

print("Test exists")
print(GlobalLayerManager.layerExists(123))
print(GlobalLayerManager.layerExists(42))

print("Test rename")
print(GlobalLayerManager.renameLayer(42, "Forty-two"))
print(GlobalLayerManager.renameLayer(42, "Two"))
print(GlobalLayerManager.renameLayer(42, "HHGTTG"))

print("Test active")
GlobalLayerManager.setActiveLayer(3)
print(GlobalLayerManager.getActiveLayer())
GlobalLayerManager.setActiveLayer(2)
print(GlobalLayerManager.getActiveLayer())

print("Test visible")
GlobalLayerManager.setLayerVisibility("One", False)
print(GlobalLayerManager.layerIsVisible("One"))
GlobalLayerManager.setLayerVisibility("One", True)
print(GlobalLayerManager.layerIsVisible("One"))

GlobalLayerManager.setLayerVisibility(1, False)
print(GlobalLayerManager.layerIsVisible(1))
GlobalLayerManager.setLayerVisibility(1, True)
print(GlobalLayerManager.layerIsVisible(1))

GlobalLayerManager.setSelected(0, True)
GlobalLayerManager.moveSelectionToLayer(1)

0 comments on commit ef19dda

Please sign in to comment.