mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Deprecate old set viewport shadow from sun in favour of new solar analysis tools
This commit is contained in:
@@ -24,7 +24,6 @@ classes = (
|
|||||||
operator.GetConnectedSystemElements,
|
operator.GetConnectedSystemElements,
|
||||||
operator.ResizeToStorey,
|
operator.ResizeToStorey,
|
||||||
operator.SetOverrideColour,
|
operator.SetOverrideColour,
|
||||||
operator.SetViewportShadowFromSun,
|
|
||||||
operator.SnapSpacesTogether,
|
operator.SnapSpacesTogether,
|
||||||
operator.SplitAlongEdge,
|
operator.SplitAlongEdge,
|
||||||
prop.BIMMiscProperties,
|
prop.BIMMiscProperties,
|
||||||
|
|||||||
@@ -45,25 +45,6 @@ class SetOverrideColour(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
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):
|
class SnapSpacesTogether(bpy.types.Operator):
|
||||||
bl_idname = "bim.snap_spaces_together"
|
bl_idname = "bim.snap_spaces_together"
|
||||||
bl_label = "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.prop(props, "override_colour", text="")
|
||||||
row.operator("bim.set_override_colour")
|
row.operator("bim.set_override_colour")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.set_viewport_shadow_from_sun")
|
|
||||||
row = layout.row()
|
|
||||||
row.operator("bim.snap_spaces_together")
|
row.operator("bim.snap_spaces_together")
|
||||||
row = layout.split(factor=0.2, align=True)
|
row = layout.split(factor=0.2, align=True)
|
||||||
row.prop(props, "total_storeys", text="")
|
row.prop(props, "total_storeys", text="")
|
||||||
|
|||||||
Reference in New Issue
Block a user