feat: Add new Geometry Nodes groups for image relief and shadeless shader
- Implemented the "O Image Relief Plane" Geometry Nodes group to create a fixed-base image relief using depth images and various parameters. - Created the "O Shadeless" shader node group to display color without scene lighting while preserving shadows and reflections. - Introduced a preview feature for node groups, allowing for interactive visualization of node arrangements in an HTML format. - Added a template HTML file for rendering node previews with customizable views and controls.
This commit is contained in:
48
tools/nodes/build.py
Normal file
48
tools/nodes/build.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Build, arrange, and save the bundled node library."""
|
||||
from pathlib import Path
|
||||
|
||||
import bpy
|
||||
|
||||
from .arrangement.arrange import arrange_nodes
|
||||
from .groups.image_plane import build_image_plane_group
|
||||
from .groups.image_depth_plane import build_image_depth_plane_group
|
||||
from .groups.image_relief_plane import build_image_relief_plane_group
|
||||
from .groups.image_cutout import build_image_cutout_group
|
||||
from .groups.image_depth_cutout import build_image_depth_cutout_group
|
||||
from .groups.image_depth_balloon import build_image_depth_balloon_group
|
||||
from .groups.image_layer import build_image_layer_group
|
||||
from .groups.image_depth_layer import build_image_depth_layer_group
|
||||
from .groups.shadeless import build_shadeless_group
|
||||
|
||||
|
||||
OUTPUT_PATH = Path(__file__).resolve().parents[2] / "src/anyimage/assets/O_AnyImage.blend"
|
||||
|
||||
|
||||
def build_node_groups():
|
||||
"""Build each asset once in dependency order."""
|
||||
image_plane = build_image_plane_group()
|
||||
return [
|
||||
image_plane,
|
||||
build_image_depth_plane_group(image_plane),
|
||||
build_image_relief_plane_group(image_plane),
|
||||
build_image_cutout_group(),
|
||||
build_image_depth_cutout_group(),
|
||||
build_image_depth_balloon_group(),
|
||||
build_image_layer_group(),
|
||||
build_image_depth_layer_group(),
|
||||
build_shadeless_group(),
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
bpy.context.preferences.filepaths.save_version = 0
|
||||
for node_group in build_node_groups():
|
||||
if node_group.bl_idname == "GeometryNodeTree":
|
||||
arrange_nodes(node_group)
|
||||
OUTPUT_PATH.parent.mkdir(parents=True, exist_ok=True)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(OUTPUT_PATH), check_existing=False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user