Skip to content
Snippets Groups Projects
Commit 051d4f7d authored by Damien Picard's avatar Damien Picard
Browse files

Sun position: store previous settings for HDRI sun syncing operator

parent af946274
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import bpy import bpy
from bpy.props import FloatProperty, FloatVectorProperty
import gpu import gpu
from gpu_extras.batch import batch_for_shader from gpu_extras.batch import batch_for_shader
from mathutils import Vector from mathutils import Vector
...@@ -115,7 +116,9 @@ class SUNPOS_OT_ShowHdr(bpy.types.Operator): ...@@ -115,7 +116,9 @@ class SUNPOS_OT_ShowHdr(bpy.types.Operator):
bl_idname = "world.sunpos_show_hdr" bl_idname = "world.sunpos_show_hdr"
bl_label = "Sync Sun to Texture" bl_label = "Sync Sun to Texture"
exposure = 1.0 exposure: FloatProperty(name="Exposure", default=1.0)
scale: FloatProperty(name="Scale", default=1.0)
offset: FloatVectorProperty(name="Offset", default=(0.0, 0.0), size=2, subtype='COORDINATES')
@classmethod @classmethod
def poll(self, context): def poll(self, context):
...@@ -263,8 +266,6 @@ class SUNPOS_OT_ShowHdr(bpy.types.Operator): ...@@ -263,8 +266,6 @@ class SUNPOS_OT_ShowHdr(bpy.types.Operator):
self.is_panning = False self.is_panning = False
self.mouse_prev_x = 0.0 self.mouse_prev_x = 0.0
self.mouse_prev_y = 0.0 self.mouse_prev_y = 0.0
self.offset = Vector((0.0, 0.0))
self.scale = 1.0
# Get at least one 3D View # Get at least one 3D View
area_3d = None area_3d = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment