Removed the use of SoGui in Arch OfflineRenderingUtils module

This commit is contained in:
Yorik van Havre
2023-09-22 15:21:48 +02:00
committed by wwmayer
parent 836c237d3c
commit afdbd4c094

View File

@@ -471,7 +471,12 @@ def viewer(scene=None,background=(1.0,1.0,1.0),lightdir=None):
# Initialize Coin. This returns a main window to use
from pivy import coin
from pivy import sogui
from pivy import quarter
from PySide2 import QtWidgets
app = QtWidgets.QApplication([])
# Create a Qt widget, which will be our window.
win = quarter.QuarterWidget()
win = sogui.SoGui.init()
if win is None:
@@ -495,17 +500,14 @@ def viewer(scene=None,background=(1.0,1.0,1.0),lightdir=None):
# ref the scene so it doesn't get garbage-collected
scene.ref()
# Create a viewer in which to see our scene graph
viewer = sogui.SoGuiExaminerViewer(win)
# Put our scene into viewer, change the title
viewer.setSceneGraph(scene)
viewer.setTitle("Coin viewer")
viewer.show()
sogui.SoGui.show(win) # Display main window
sogui.SoGui.mainLoop() # Main Coin event loop
win.setSceneGraph(scene)
win.setWindowTitle("Coin viewer")
# IMPORTANT!!!!! Windows are hidden by default.
win.show()
# Start the event loop.
app.exec_()
def embedLight(scene,lightdir):