-
-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate Guide
Lvoxx edited this page Dec 30, 2024
·
9 revisions
This page guides you on how to migrate older versions when upgrading to a new version, primarily focusing on renaming nodes and adjusting input/output sockets.
- For major upgrades (e.g., v1.9.9 to v2.0.1), deprecated nodes will be removed, and operational structures may differ.
- For regular upgrades, deprecated nodes will not be removed from the version. Instead, they will either be encapsulated within a new node or replaced by an entirely new node.
Due to the stability requirements across Blender versions, we have decided not to arbitrarily delete nodes or rename them to avoid causing "Missing resources." In the future, BPotato will address this issue.
Changed names:
- Metal Ramp -> Metal Ramp Builder
- Init Face Ramp -> Faceramp Builder
- Init Nose Ramp -> Noseramp Builder
Added Factor socket:
- Add HightLight From LightMap
- Add HightLight From SphereMap
- Add Toon Highlight
- Add Random Toon Highlight
- Add Highlight
- Add Tint V-Body
- Add Frequent Hair Highlight
Changed World Color Enable default to 0:
- Make Toon
- LSCherry Main Controller
How to update World Color Enable socket in Make Toon ?
Here how to set the socket back to 0, which is the same behavior on v1.0.1
import bpy
# Define the node group name and property to modify
NODE_GROUP_NAME = "Make Toon"
PROPERTY_NAME = "World Color Enable"
NEW_VALUE = 0 # Change value to 0
# Iterate through all materials
for mat in bpy.data.materials:
# Ensure the material uses nodes
if mat.use_nodes:
# Get the material's node tree
nodes = mat.node_tree.nodes
# Iterate through all nodes in the material
for node in nodes:
# Check if the node is a node group and matches the specified group name
if node.type == 'GROUP' and node.node_tree and node.node_tree.name == NODE_GROUP_NAME:
# Check if the property exists in the node group inputs
if PROPERTY_NAME in node.inputs:
# Update the value
input_socket = node.inputs[PROPERTY_NAME]
input_socket.default_value = NEW_VALUE
print(f"Updated {PROPERTY_NAME} in material {mat.name}")
else:
print(f"Property {PROPERTY_NAME} not found in {NODE_GROUP_NAME} of material {mat.name}")