feat(node_assets): add image plane geometry nodes and validation scripts

- Implemented `image_plane.py` to build the Image Plane Geometry Nodes group with customizable parameters for geometry, subdivide, and thickness.
- Created `image_plane_validation.py` to validate the functionality of the image plane, ensuring correct geometry generation and material assignment.
- Developed `material_layers.py` to construct shader node groups for image materials, including depth and normal handling.
- Authored `plane_layouts.py` to define node arrangements for image geometry assets.
- Introduced `shadeless.py` to create a shadeless shader node group that displays color without scene lighting while preserving shadows and reflections.
This commit is contained in:
2026-09-08 23:24:27 +08:00
parent 196b964efc
commit 4c902ed7db
155 changed files with 9700 additions and 10393 deletions

View File

@@ -8,7 +8,7 @@ SOURCE_ROOT = PROJECT_ROOT / "src" / "anyimage"
class NodeAssetsTest(unittest.TestCase):
def test_geometry_assets_have_readable_local_layouts(self):
def test_geometry_assets_pass_layout_overlap_checks(self):
import bpy
sys.path.insert(0, str(PROJECT_ROOT / "tools" / "node_assets"))
@@ -35,29 +35,6 @@ class NodeAssetsTest(unittest.TestCase):
offenders.append(path.relative_to(PROJECT_ROOT).as_posix())
self.assertEqual(offenders, [])
def test_runtime_node_group_entries_load_assets(self):
material_source = (SOURCE_ROOT / "common" / "material.py").read_text(
encoding="utf-8"
)
mesh_plane_source = (
SOURCE_ROOT / "operators" / "convert_to_plane" / "mesh_plane.py"
).read_text(encoding="utf-8")
depth_plane_source = (
SOURCE_ROOT / "operators" / "convert_to_plane" / "object.py"
).read_text(encoding="utf-8")
self.assertIn("return load_node_group(group_name)", material_source)
self.assertIn(
"load_node_group(MESH_PLANE_NODE_GROUP_NAME)",
mesh_plane_source,
)
self.assertIn(
"load_node_group(DEPTH_PLANE_NODE_GROUP_NAME)",
depth_plane_source,
)
self.assertFalse(
(SOURCE_ROOT / "operators" / "convert_to_plane" / "nodes.py").exists()
)
if __name__ == "__main__":
unittest.main()