mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Need a little more freedom to rotate a RCP
This commit is contained in:
@@ -113,7 +113,6 @@ class IfcExporter:
|
|||||||
# Ensure reflected ceiling cameras have the correct scale
|
# Ensure reflected ceiling cameras have the correct scale
|
||||||
if obj.scale != (-1, -1, -1):
|
if obj.scale != (-1, -1, -1):
|
||||||
obj.scale = (-1, -1, -1)
|
obj.scale = (-1, -1, -1)
|
||||||
obj.rotation_euler = (0.0, 0.0, radians(180))
|
|
||||||
# Skip all other scale handling for cameras
|
# Skip all other scale handling for cameras
|
||||||
elif tool.Geometry.is_scaled(obj):
|
elif tool.Geometry.is_scaled(obj):
|
||||||
bpy.ops.bim.update_representation(obj=obj.name)
|
bpy.ops.bim.update_representation(obj=obj.name)
|
||||||
|
|||||||
@@ -2358,14 +2358,14 @@ class ActivateDrawingBase(tool.Ifc.Operator):
|
|||||||
is_reflected = ifcopenshell.util.element.get_pset(camera_element, "EPset_Drawing", "TargetView") == "REFLECTED_PLAN_VIEW"
|
is_reflected = ifcopenshell.util.element.get_pset(camera_element, "EPset_Drawing", "TargetView") == "REFLECTED_PLAN_VIEW"
|
||||||
if is_reflected and camera.scale != (-1, -1, -1):
|
if is_reflected and camera.scale != (-1, -1, -1):
|
||||||
camera.scale = (-1, -1, -1)
|
camera.scale = (-1, -1, -1)
|
||||||
camera.rotation_euler = (0.0, 0.0, radians(180))
|
|
||||||
|
|
||||||
if camera_props.update_representation(camera.matrix_world):
|
if camera_props.update_representation(camera.matrix_world):
|
||||||
bpy.ops.bim.update_representation(obj=camera.name, ifc_representation_class="")
|
bpy.ops.bim.update_representation(obj=camera.name, ifc_representation_class="")
|
||||||
# Restore the scale after update if needed
|
# Restore the scale after update if needed
|
||||||
if is_reflected:
|
if is_reflected:
|
||||||
camera.scale = (-1, -1, -1)
|
camera.scale = (-1, -1, -1)
|
||||||
camera.rotation_euler = (0.0, 0.0, radians(180))
|
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ def block_scale(scene: bpy.types.Scene) -> None:
|
|||||||
# Only update if scale isn't already (-1, -1, -1)
|
# Only update if scale isn't already (-1, -1, -1)
|
||||||
if obj.scale != (-1, -1, -1):
|
if obj.scale != (-1, -1, -1):
|
||||||
obj.scale = (-1, -1, -1)
|
obj.scale = (-1, -1, -1)
|
||||||
obj.rotation_euler = (0.0, 0.0, math.radians(180))
|
|
||||||
else:
|
else:
|
||||||
if obj.scale != (1, 1, 1):
|
if obj.scale != (1, 1, 1):
|
||||||
obj.scale = (1, 1, 1)
|
obj.scale = (1, 1, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user