Update processing resolution to 504 and enhance depth model persistence in conversion dialog
This commit is contained in:
@@ -30,6 +30,9 @@ def image_depth_model_items(owner, context):
|
||||
return model_enum_items(owner, context)
|
||||
|
||||
|
||||
_last_depth_plane_model = "BASE"
|
||||
|
||||
|
||||
def is_image_empty(candidate):
|
||||
return bool(
|
||||
candidate
|
||||
@@ -775,8 +778,10 @@ class ConvertImageToDepthPlane(bpy.types.Operator):
|
||||
return is_image_empty(context.object) and active_job() is None
|
||||
|
||||
def invoke(self, context, _event):
|
||||
global _last_depth_plane_model
|
||||
|
||||
if not self.properties.is_property_set("snapform_model"):
|
||||
self.snapform_model = "BASE"
|
||||
self.snapform_model = _last_depth_plane_model
|
||||
return context.window_manager.invoke_props_dialog(self, width=340)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -867,6 +872,8 @@ class ConvertImageToDepthPlane(bpy.types.Operator):
|
||||
if delete_input:
|
||||
source_path.unlink(missing_ok=True)
|
||||
return {"CANCELLED"}
|
||||
global _last_depth_plane_model
|
||||
_last_depth_plane_model = self.snapform_model
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class SnapFormSettings(bpy.types.PropertyGroup):
|
||||
process_res: bpy.props.IntProperty(
|
||||
name="Process Res",
|
||||
description="DA3 base processing resolution",
|
||||
default=1024,
|
||||
default=504,
|
||||
min=1,
|
||||
soft_max=2048,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user