Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Add PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag #41924

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

jkb0o
Copy link
Contributor

@jkb0o jkb0o commented Sep 9, 2020

This adds PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag for 3.2 branch (master #41923). With this PR, Resource.duplicate will not duplicate Object.script property. Fixes #33079.

@jkb0o jkb0o force-pushed the always_share_on_duplicate_3.2 branch 4 times, most recently from fd7243a to 0ee4142 Compare September 9, 2020 19:28
core/object.h Outdated
PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 23,
PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 24,
PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 25, // Used in inspector to increment property when keyed in animation player
PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE = 1 << 22, // If the object is duplicated this property will never be duplicated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 3.2 it probably should be added to the end of the enum, to avoid breaking compatibility with existing GDNative libraries.

And it should be added to the NativeScript enum in the https://github.com/godotengine/godot/blob/master/modules/gdnative/include/nativescript/godot_nativescript.h#L87 (relevant for both this and #41923).

Copy link
Contributor Author

@jkb0o jkb0o Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of missing enums in NativeScript (PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE and others are missed). I guess all of them should be added in a separate commit.

@Calinou Calinou added this to the 3.2 milestone Sep 9, 2020
@jkb0o jkb0o force-pushed the always_share_on_duplicate_3.2 branch from 0ee4142 to a6c2880 Compare September 9, 2020 19:53
@jkb0o jkb0o requested a review from a team as a code owner March 12, 2021 12:26
Base automatically changed from 3.2 to 3.x March 16, 2021 11:11
@akien-mga akien-mga modified the milestones: 3.2, 3.3 Mar 17, 2021
@akien-mga akien-mga modified the milestones: 3.3, 3.4 Mar 26, 2021
@akien-mga akien-mga changed the title [3.2] Add PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag [3.x] Add PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag Mar 26, 2021
@Chaosus Chaosus modified the milestones: 3.4, 3.5 Nov 8, 2021
@akien-mga akien-mga force-pushed the 3.x branch 2 times, most recently from 71cb8d3 to c58391c Compare January 6, 2022 22:40
@akien-mga akien-mga modified the milestones: 3.5, 3.x Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants