mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Snaps are on by default
Users can still turn them off. We are a precision modeling app after all :)
This commit is contained in:
@@ -336,3 +336,9 @@ def load_post(scene):
|
|||||||
WallAxisDecorator.install(bpy.context)
|
WallAxisDecorator.install(bpy.context)
|
||||||
if model_props.show_slab_direction:
|
if model_props.show_slab_direction:
|
||||||
SlabDirectionDecorator.install(bpy.context)
|
SlabDirectionDecorator.install(bpy.context)
|
||||||
|
|
||||||
|
if scene := bpy.context.scene:
|
||||||
|
# Snapping is off by default in Blender, but in BIM, it's more useful to be on
|
||||||
|
scene.tool_settings.use_snap = True
|
||||||
|
# Match default Bonsai snaps
|
||||||
|
scene.tool_settings.snap_elements_base = {"EDGE", "EDGE_PERPENDICULAR", "VERTEX", "EDGE_MIDPOINT", "FACE"}
|
||||||
|
|||||||
@@ -588,14 +588,14 @@ class BIMFilterGroup(PropertyGroup):
|
|||||||
|
|
||||||
|
|
||||||
class BIMSnapGroups(PropertyGroup):
|
class BIMSnapGroups(PropertyGroup):
|
||||||
object: BoolProperty(name="Object")
|
object: BoolProperty(name="Object", default=True)
|
||||||
polyline: BoolProperty(name="Polyline")
|
polyline: BoolProperty(name="Polyline", default=True)
|
||||||
measure: BoolProperty(name="Measure")
|
measure: BoolProperty(name="Measure", default=True)
|
||||||
|
|
||||||
|
|
||||||
class BIMSnapProperties(PropertyGroup):
|
class BIMSnapProperties(PropertyGroup):
|
||||||
vertex: BoolProperty(name="Vertex")
|
vertex: BoolProperty(name="Vertex", default=True)
|
||||||
edge: BoolProperty(name="Edge")
|
edge: BoolProperty(name="Edge", default=True)
|
||||||
edge_center: BoolProperty(name="Edge Center")
|
edge_center: BoolProperty(name="Edge Center", default=True)
|
||||||
edge_intersection: BoolProperty(name="Edge Intersection")
|
edge_intersection: BoolProperty(name="Edge Intersection", default=True)
|
||||||
face: BoolProperty(name="Face")
|
face: BoolProperty(name="Face", default=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user