Changing the time of day also changes the sky color.
This commit is contained in:
parent
b236de9611
commit
0d49345f29
@ -1187,6 +1187,8 @@ class EditorTab(QtGui.QWidget):
|
||||
def setDayTime(self, value):
|
||||
if self.editorSession.textureAtlas:
|
||||
self.editorSession.textureAtlas.dayTime = value
|
||||
for view in self.views:
|
||||
view.setDayTime(value)
|
||||
self.currentView().update()
|
||||
|
||||
def setGamma(self, value):
|
||||
|
@ -135,6 +135,7 @@ class WorldView(QGLWidget):
|
||||
self.geometryCache = geometryCache
|
||||
|
||||
self.matrixNode = None
|
||||
self.skyNode = None
|
||||
self.overlayNode = scenenode.Node()
|
||||
|
||||
self.sceneGraph = None
|
||||
@ -225,7 +226,7 @@ class WorldView(QGLWidget):
|
||||
self.worldScene.setVisibleLayers(self.layerToggleGroup.getVisibleLayers())
|
||||
|
||||
clearNode = ClearNode()
|
||||
skyNode = sky.SkyNode()
|
||||
self.skyNode = sky.SkyNode()
|
||||
self.loadableChunksNode = loadablechunks.LoadableChunksNode(self.dimension)
|
||||
|
||||
self.matrixNode = MatrixNode()
|
||||
@ -236,7 +237,7 @@ class WorldView(QGLWidget):
|
||||
self.matrixNode.addChild(self.overlayNode)
|
||||
|
||||
sceneGraph.addChild(clearNode)
|
||||
sceneGraph.addChild(skyNode)
|
||||
sceneGraph.addChild(self.skyNode)
|
||||
sceneGraph.addChild(self.matrixNode)
|
||||
sceneGraph.addChild(self.compassOrthoNode)
|
||||
if self.cursorNode:
|
||||
@ -661,6 +662,10 @@ class WorldView(QGLWidget):
|
||||
self.worldScene.setLayerVisible(layerName, visible)
|
||||
self.resetLoadOrder()
|
||||
|
||||
def setDayTime(self, value):
|
||||
if self.skyNode:
|
||||
self.skyNode.setDayTime(value)
|
||||
|
||||
def iterateChunks(x, z, radius):
|
||||
"""
|
||||
Yields a list of chunk positions starting from the center and going outward in a square spiral pattern.
|
||||
|
Reference in New Issue
Block a user