Fix: un-escaped strings for node operators/UI
Correct error [0] constructing data paths without escaping.
[0]: 2a1a658492
This commit is contained in:
@@ -298,7 +298,7 @@ class NodeSwapOperator(NodeOperator):
|
||||
new_socket = new_node.inputs[input.name]
|
||||
new_value = cast_value(source=input, target=new_socket)
|
||||
|
||||
settings_name = "inputs[\"{:s}\"].default_value".format(input.name)
|
||||
settings_name = "inputs[\"{:s}\"].default_value".format(bpy.utils.escape_identifier(input.name))
|
||||
already_defined = (settings_name in self.settings)
|
||||
|
||||
if (new_value is not None) and not already_defined:
|
||||
|
||||
@@ -196,7 +196,7 @@ class NodeMenu(Menu):
|
||||
translate=False,
|
||||
search_weight=search_weight)
|
||||
prop = props.settings.add()
|
||||
prop.name = "inputs[\"{:s}\"].default_value".format(socket_identifier)
|
||||
prop.name = "inputs[\"{:s}\"].default_value".format(bpy.utils.escape_identifier(socket_identifier))
|
||||
prop.value = repr(enum_name)
|
||||
operators.append(props)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user