Add new node asset scripts for geometry and shader operations
- Implemented `build_mesh_plane.py` to create a geometry node group for mesh planes with customizable parameters. - Created `build_shadeless.py` for a shader node group that displays color without scene lighting while preserving shadows and reflections. - Added `validate.py` to validate the integrity of the newly created node groups and their inputs. - Introduced `validate_cutout.py` to ensure the functionality of cutout node groups and their dependencies. - Developed `validate_mesh_plane.py` to test the mesh plane creation and its modifier settings.
This commit is contained in:
@@ -6,11 +6,7 @@ import sys
|
||||
|
||||
import bpy
|
||||
|
||||
from .preferences import (
|
||||
DEFAULT_UPSCALE_MAX_OUTPUT_SIZE,
|
||||
MAX_UPSCALE_OUTPUT_SIZE,
|
||||
addon_preferences,
|
||||
)
|
||||
from .preferences import addon_preferences
|
||||
from .runtime import runtime
|
||||
from .server import model_catalog as shared_model_catalog
|
||||
|
||||
@@ -201,7 +197,7 @@ def depth_plane_model_enum_items(_owner, _context):
|
||||
return items
|
||||
|
||||
|
||||
def surface_model_enum_items(_owner, _context):
|
||||
def mesh_depth_model_enum_items(_owner, _context):
|
||||
models = [
|
||||
model
|
||||
for model in model_catalog()
|
||||
@@ -223,18 +219,6 @@ def configured_upscale_model(context=None):
|
||||
return shared_model_catalog.DEFAULT_UPSCALE_MODEL_KEY
|
||||
|
||||
|
||||
def configured_upscale_max_output_size(context=None):
|
||||
preferences = addon_preferences(context)
|
||||
value = int(
|
||||
getattr(
|
||||
preferences,
|
||||
"upscale_max_output_size",
|
||||
DEFAULT_UPSCALE_MAX_OUTPUT_SIZE,
|
||||
)
|
||||
)
|
||||
return min(max(value, 1024), MAX_UPSCALE_OUTPUT_SIZE)
|
||||
|
||||
|
||||
def upscale_model_label(model_key):
|
||||
model = shared_model_catalog.UPSCALE_MODELS.get(model_key)
|
||||
return model.label if model is not None else model_key
|
||||
|
||||
Reference in New Issue
Block a user