mesh_outline_projection #1

Merged
theoryshaw merged 6 commits from mesh_outline_projection into main 2026-02-08 20:55:25 +00:00
Showing only changes of commit 6ac8c858ad - Show all commits

View file

@ -632,20 +632,43 @@ class VIEW3D_PT_outline_project(bpy.types.Panel):
layout.label(text="2. Active = target mesh", icon='OBJECT_DATA')
layout.label(text="3. Press Numpad 7 (top view)", icon='CAMERA_DATA')
# Add settings box
box = layout.box()
box.label(text="Settings:")
box.prop(context.scene, 'outline_dissolve_angle', text="Dissolve Angle", slider=True)
row = layout.row()
row.scale_y = 1.5
row.operator("mesh.outline_project", icon='MOD_UVPROJECT')
op = row.operator("mesh.outline_project", icon='MOD_UVPROJECT')
# Pass the scene value to the operator
op.dissolve_angle = context.scene.outline_dissolve_angle
def register():
bpy.utils.register_class(MESH_OT_outline_project)
bpy.utils.register_class(VIEW3D_PT_outline_project)
# Register scene property for UI
bpy.types.Scene.outline_dissolve_angle = bpy.props.FloatProperty(
name="Dissolve Angle",
description="Angle threshold for Limit Dissolve (degrees)",
default=0.04,
min=0.0,
max=5.0,
step=0.01,
precision=3
)
def unregister():
bpy.utils.unregister_class(VIEW3D_PT_outline_project)
bpy.utils.unregister_class(MESH_OT_outline_project)
# Unregister scene property
if hasattr(bpy.types.Scene, 'outline_dissolve_angle'):
del bpy.types.Scene.outline_dissolve_angle
if __name__ == "__main__":
register()