Blender Material Return Plan
Which generated map lands in which slot
- material_return_plan_json
- manifest_line
- summary_json
A PBR material isn't one image - it's a stack: base color, normal, roughness, metallic, emission, alpha. When you generate textures in ComfyUI, you want to hand all of them back to Blender and have them land in the right slots, not shuffled into a folder of numbered files. MKRBlenderMaterialReturnPlan is the node that writes that contract down. You tell it where each map lives and which Blender object and material slot they belong to, and it produces a material_return_plan_json plus a manifest line that the add-on side can act on.
Part of MKRShift_Nodes by criskb. Install via ComfyUI Manager (search "MKRShift_Nodes") or git clone https://github.com/criskb/MKRShift_Nodes into custom_nodes/, restart.
The inputs - it's mostly a list of paths
The node is basically six file-path fields plus targeting:
base_color_path,normal_path,roughness_path,metallic_path,emission_path,alpha_path- where each generated map sits on disk. Leave the ones you don't have empty; the plan only lists what you fill in.material_name- the name the rebuilt material should carry.target_object_nameandtarget_material_slot- where in the scene it applies. These are optional in effect: empty means "first/best guess," filled means "this object, this slot."notes(optional) - free text riders for the plan.
Outputs: material_return_plan_json (the structured plan), manifest_line (a compact CSV-style summary for logging or a downstream manifest node), and summary_json.
How to think about it
This node plans; it doesn't write. The actual write-back of generated maps is handled by the runtime side (the pack's MKRBlenderReturnOutput family for single assets, and the add-on for the material rebuild). So the flow is: generate your six maps → point this node at them → get the plan → the plan tells the runtime where everything goes. The pattern keeps the intent (which slot gets which map) as inspectable JSON rather than burying it in the graph.
The one thing to keep straight is that an empty path means "no map," not "Blender should figure it out." If your normal map silently goes missing, the first thing to check is whether normal_path actually got wired from your generation node - this node faithfully reports what you gave it, and the summary won't lie about the count.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| material_name | STRING | MKRShift Material | — |
| base_color_path | STRING | — | |
| normal_path | STRING | — | |
| roughness_path | STRING | — | |
| metallic_path | STRING | — | |
| emission_path | STRING | — | |
| alpha_path | STRING | — | |
| target_object_name | STRING | — | |
| target_material_slot | STRING | — | |
| notesopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| material_return_plan_json | STRING | — |
| manifest_line | STRING | — |
| summary_json | STRING | — |