mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Add get_angle_snap_value() helper to tool/snap.py
This function retrieves the angle snap increment from Blender's tool_settings.snap_angle_increment property, which was added in Blender 4.2. This allows users to configure the angle snap value through Blender's native UI instead of using hardcoded values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Bruno Perdigão
parent
6bb8abdc5a
commit
348e48b49c
@@ -114,6 +114,15 @@ class Snap(bonsai.core.tool.Snap):
|
||||
|
||||
return increment
|
||||
|
||||
@classmethod
|
||||
def get_angle_snap_value(cls, context: bpy.types.Context) -> float:
|
||||
"""Get the angle snap increment from Blender's tool settings.
|
||||
|
||||
:param context: Blender context
|
||||
:return: Angle snap increment in degrees
|
||||
"""
|
||||
return context.scene.tool_settings.snap_angle_increment
|
||||
|
||||
@classmethod
|
||||
def get_snap_points_on_raycasted_face(cls, context, event, obj, face_index):
|
||||
matrix = obj.matrix_world.copy()
|
||||
|
||||
Reference in New Issue
Block a user