Deprecate old set viewport shadow from sun in favour of new solar analysis tools

This commit is contained in:
Dion Moult
2024-07-17 17:37:09 +10:00
parent 607f79f2f5
commit 766eb75e3a
3 changed files with 0 additions and 22 deletions
@@ -24,7 +24,6 @@ classes = (
operator.GetConnectedSystemElements,
operator.ResizeToStorey,
operator.SetOverrideColour,
operator.SetViewportShadowFromSun,
operator.SnapSpacesTogether,
operator.SplitAlongEdge,
prop.BIMMiscProperties,
@@ -45,25 +45,6 @@ class SetOverrideColour(bpy.types.Operator):
return {"FINISHED"}
class SetViewportShadowFromSun(bpy.types.Operator):
bl_idname = "bim.set_viewport_shadow_from_sun"
bl_label = "Set Viewport Shadow from Sun"
bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
return context.active_object
def execute(self, context):
# Does this belong in the drawing module? Perhaps.
# The vector used for the light direction is a bit funny
mat = Matrix(((-1.0, 0.0, 0.0, 0.0), (0.0, 0, 1.0, 0.0), (-0.0, -1.0, 0, 0.0), (0.0, 0.0, 0.0, 1.0)))
context.scene.display.light_direction = mat.inverted() @ (
context.active_object.matrix_world.to_quaternion() @ Vector((0, 0, -1))
)
return {"FINISHED"}
class SnapSpacesTogether(bpy.types.Operator):
bl_idname = "bim.snap_spaces_together"
bl_label = "Snap Spaces Together"
@@ -35,8 +35,6 @@ class BIM_PT_misc_utilities(bpy.types.Panel):
row.prop(props, "override_colour", text="")
row.operator("bim.set_override_colour")
row = layout.row()
row.operator("bim.set_viewport_shadow_from_sun")
row = layout.row()
row.operator("bim.snap_spaces_together")
row = layout.split(factor=0.2, align=True)
row.prop(props, "total_storeys", text="")