feat: Implement cutout tool and depth generation features
- Added a new cutout tool for selecting regions in images, allowing users to choose mesh shapes based on selected areas. - Introduced depth generation capabilities for rasterized images, including normal data extraction. - Created jobs for generating depth planes and region data, enhancing the AI data generation workflow. - Developed a selection refinement process for cutout regions, improving accuracy in generated outputs. - Established a new region module for handling rasterized image regions and their associated AI generation tasks. - Enhanced node graph builders for asset generation, facilitating smoother integration of new features.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import bpy
|
||||
|
||||
from .operators.common.image import is_image_empty
|
||||
from .operators.common.image_data import is_image_empty
|
||||
from .operators.upscale import upscale_output_size
|
||||
|
||||
|
||||
class AnyImageImageMenu(bpy.types.Menu):
|
||||
@@ -53,11 +54,10 @@ def upscale_menu_label(context):
|
||||
source_object = getattr(context, "object", None)
|
||||
if not is_image_empty(source_object):
|
||||
return "Upscale"
|
||||
width, height = (
|
||||
int(value) for value in getattr(source_object.data, "size", (0, 0))
|
||||
)
|
||||
if width <= 0 or height <= 0:
|
||||
output_size = upscale_output_size(source_object.data)
|
||||
if output_size is None:
|
||||
return "Upscale"
|
||||
width, height = output_size
|
||||
return f"Upscale ({width} × {height})"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user