Add dedicated macros for property name extraction

* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
This commit is contained in:
Haoyu Qiu
2022-05-19 14:08:47 +08:00
parent c0d189fbb8
commit fc3b845c07
23 changed files with 219 additions and 183 deletions
+8 -8
View File
@@ -102,7 +102,7 @@ private:
float time;
float remaining;*/
StringName active = "active";
StringName active = PNAME("active");
StringName prev_active = "prev_active";
StringName time = "time";
StringName remaining = "remaining";
@@ -148,7 +148,7 @@ VARIANT_ENUM_CAST(AnimationNodeOneShot::MixMode)
class AnimationNodeAdd2 : public AnimationNode {
GDCLASS(AnimationNodeAdd2, AnimationNode);
StringName add_amount = "add_amount";
StringName add_amount = PNAME("add_amount");
bool sync = false;
protected:
@@ -172,7 +172,7 @@ public:
class AnimationNodeAdd3 : public AnimationNode {
GDCLASS(AnimationNodeAdd3, AnimationNode);
StringName add_amount = "add_amount";
StringName add_amount = PNAME("add_amount");
bool sync = false;
protected:
@@ -196,7 +196,7 @@ public:
class AnimationNodeBlend2 : public AnimationNode {
GDCLASS(AnimationNodeBlend2, AnimationNode);
StringName blend_amount = "blend_amount";
StringName blend_amount = PNAME("blend_amount");
bool sync = false;
protected:
@@ -219,7 +219,7 @@ public:
class AnimationNodeBlend3 : public AnimationNode {
GDCLASS(AnimationNodeBlend3, AnimationNode);
StringName blend_amount;
StringName blend_amount = PNAME("blend_amount");
bool sync;
protected:
@@ -241,7 +241,7 @@ public:
class AnimationNodeTimeScale : public AnimationNode {
GDCLASS(AnimationNodeTimeScale, AnimationNode);
StringName scale = "scale";
StringName scale = PNAME("scale");
protected:
static void _bind_methods();
@@ -260,7 +260,7 @@ public:
class AnimationNodeTimeSeek : public AnimationNode {
GDCLASS(AnimationNodeTimeSeek, AnimationNode);
StringName seek_pos = "seek_position";
StringName seek_pos = PNAME("seek_position");
protected:
static void _bind_methods();
@@ -300,7 +300,7 @@ class AnimationNodeTransition : public AnimationNode {
StringName prev_xfading = "prev_xfading";
StringName prev = "prev";
StringName time = "time";
StringName current = "current";
StringName current = PNAME("current");
StringName prev_current = "prev_current";
float xfade = 0.0;