You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of this behavior, set_point_array(make_unique=true) is not working as expected. SS2D_Point resources are not duplicated, when SS2D_Point_Array is duplicated. Only dictionary that holds them is duplicated, preserving SS2D_Point references that are stored as dictionary values.
This is a part of deeper design issue involving copy-pasting of shapes, meta shapes and sharing/not sharing shape properties. At this moment, copy-paste of a shape produces a shape copy in a state that is not easily fixable via UI.
The text was updated successfully, but these errors were encountered:
So, the engine internal implementation of Resource does not pass the deep copy parameter of duplicate to the duplicate call of its array/dictionary properties?
That sounds like an engine bug.
So, the engine internal implementation of Resource does not pass the deep copy parameter of duplicate to the duplicate call of its array/dictionary properties?
It passes, they don't act on it as expected it seems. Only non-Object Variant values are deep-copied.
What the hell. I found a related issue here: godotengine/godot#37162. The documentation could really be more clear on this.
Alright, so we need to add duplicate back, at least in some classes, under a different name to not override the internal duplicate, manually deep copy affected properties, and then adapt other code to use the custom duplicate function.
Related to #4.
Because of this behavior,
set_point_array(make_unique=true)
is not working as expected.SS2D_Point
resources are not duplicated, whenSS2D_Point_Array
is duplicated. Only dictionary that holds them is duplicated, preservingSS2D_Point
references that are stored as dictionary values.This is a part of deeper design issue involving copy-pasting of shapes, meta shapes and sharing/not sharing shape properties. At this moment, copy-paste of a shape produces a shape copy in a state that is not easily fixable via UI.
The text was updated successfully, but these errors were encountered: