Refactor and enhance SnapForm functionality

- Introduced MODEL_NUMBERS for better model indexing.
- Improved enum_items function to cache results and handle download status.
- Updated ActiveJob class to manage temporary input paths and added displacement_via property.
- Changed IMAGE_DEPTH_PROCESS_RES_METHOD from "lower_bound_resize" to "upper_bound_resize".
- Enhanced RunJob operator to include new properties and improved error messages.
- Modified panel layout for better user experience and added runtime installation checks.
- Updated SnapFormSettings to reflect new model properties and defaults.
- Added temporary input path management in runtime.
- Refined worker functions to improve error handling and messaging.
- Expanded tests to cover new functionality and ensure backward compatibility.
- Fixed packaging script to align with versioning conventions.
This commit is contained in:
2026-08-03 13:47:15 +08:00
parent b02372c457
commit a503786c62
14 changed files with 827 additions and 174 deletions

View File

@@ -1,6 +1,6 @@
import bpy
from .models import enum_items
from .models import gs_model_enum_items, model_enum_items
class SnapFormSettings(bpy.types.PropertyGroup):
@@ -19,14 +19,12 @@ class SnapFormSettings(bpy.types.PropertyGroup):
model: bpy.props.EnumProperty(
name="Model",
description="Depth Anything 3 model",
items=enum_items(),
default="BASE",
items=model_enum_items,
)
gs_model: bpy.props.EnumProperty(
name="Model",
description="Depth Anything 3 model with a Gaussian head",
items=enum_items(supports_gs=True),
default="GIANT_1_1",
items=gs_model_enum_items,
)
device: bpy.props.EnumProperty(
name="Device",
@@ -60,7 +58,7 @@ class SnapFormSettings(bpy.types.PropertyGroup):
"Make Process Res the shorter side",
),
),
default="lower_bound_resize",
default="upper_bound_resize",
)
conf_thresh_percentile: bpy.props.FloatProperty(
name="Conf Thresh Percentile",