|
@@ -93,10 +93,12 @@ class NodeRetype(object):
|
|
|
self._node = node
|
|
|
self._new_type = new_type
|
|
|
self._old_type = commons.get_node_type(model, node)
|
|
|
- if local:
|
|
|
- self._scope = "Local"
|
|
|
- else:
|
|
|
- self._scope = "Global"
|
|
|
+ if not self._scope:
|
|
|
+ # set scope only once at first call to avoid overwriting it during recursive calls
|
|
|
+ if local:
|
|
|
+ self._scope = "Local"
|
|
|
+ else:
|
|
|
+ self._scope = "Global"
|
|
|
|
|
|
if local:
|
|
|
mv.transformation_execute_MANUAL("graph_ops/retype_node", {"gm":model}, {"gm":model},
|