summaryrefslogtreecommitdiffstats
path: root/core/object.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-06-12 13:16:14 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-06-12 14:30:18 +0200
commitb3bc5aafc5dbe6559534bb1e19093e719afbf52c (patch)
tree850db91f87f2bd497c3fb0c662d7d3809a53c6fb /core/object.h
parent84abf5a979648081a9076ec6b342f5f9d33093d4 (diff)
downloadredot-engine-b3bc5aafc5dbe6559534bb1e19093e719afbf52c.tar.gz
Object: Add usage hint to instantiate Object properties in editor
Fixes #36372 as Path2D/Path3D's `curve` property no longer uses a Curve instance as default value, but instead it gets a (unique) default Curve instance when created through the editor (CreateDialog). ClassDB gets a sanity check to ensure that we don't do the same mistake for other properties in the future, but instead use the dedicated property usage hint. Fixes #36372. Fixes #36650. Supersedes #36644 and #36656. Co-authored-by: Thakee Nathees <thakeenathees@gmail.com> Co-authored-by: simpuid <utkarsh.email@yahoo.com>
Diffstat (limited to 'core/object.h')
-rw-r--r--core/object.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/object.h b/core/object.h
index 95662f6208..5b46a0f93a 100644
--- a/core/object.h
+++ b/core/object.h
@@ -124,6 +124,7 @@ enum PropertyUsageFlags {
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_DEFERRED_SET_RESOURCE = 1 << 26, // when loading, the resource for this property can be set at the end of loading
+ PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 27, // For Object properties, instantiate them when creating in editor.
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,