diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-23 13:44:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-23 13:44:43 +0100 |
commit | e7e8318546cef3aa482d71c5b0ddd5a664e241eb (patch) | |
tree | e98c50d05635bceb6957cc5c4cfb5e812cc95ff8 /scene | |
parent | e7947c81d6a84949d1a3d261c9599cb746160c85 (diff) | |
parent | ba177ccaecb91c3800e220272864dfb5c23958e7 (diff) |
Merge pull request #35465 from akien-mga/doc-various-fixes
doc: Misc updates for AnimationNode* and others
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 15 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.h | 4 | ||||
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 4 |
3 files changed, 2 insertions, 21 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index c325de00b8..f59e3461b1 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -294,15 +294,6 @@ float CPUParticles2D::get_spread() const { return spread; } -void CPUParticles2D::set_flatness(float p_flatness) { - - flatness = p_flatness; -} -float CPUParticles2D::get_flatness() const { - - return flatness; -} - void CPUParticles2D::set_param(Parameter p_param, float p_value) { ERR_FAIL_INDEX(p_param, PARAM_MAX); @@ -1169,7 +1160,6 @@ void CPUParticles2D::convert_from_particles(Node *p_particles) { Vector3 dir = material->get_direction(); set_direction(Vector2(dir.x, dir.y)); set_spread(material->get_spread()); - set_flatness(material->get_flatness()); set_color(material->get_color()); @@ -1283,9 +1273,6 @@ void CPUParticles2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_spread", "degrees"), &CPUParticles2D::set_spread); ClassDB::bind_method(D_METHOD("get_spread"), &CPUParticles2D::get_spread); - ClassDB::bind_method(D_METHOD("set_flatness", "amount"), &CPUParticles2D::set_flatness); - ClassDB::bind_method(D_METHOD("get_flatness"), &CPUParticles2D::get_flatness); - ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &CPUParticles2D::set_param); ClassDB::bind_method(D_METHOD("get_param", "param"), &CPUParticles2D::get_param); @@ -1341,7 +1328,6 @@ void CPUParticles2D::_bind_methods() { ADD_GROUP("Direction", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "direction"), "set_direction", "get_direction"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness"); ADD_GROUP("Gravity", ""); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity"), "set_gravity", "get_gravity"); ADD_GROUP("Initial Velocity", "initial_"); @@ -1452,7 +1438,6 @@ CPUParticles2D::CPUParticles2D() { set_direction(Vector2(1, 0)); set_spread(45); - set_flatness(0); set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0); set_param(PARAM_ANGULAR_VELOCITY, 0); set_param(PARAM_ORBIT_VELOCITY, 0); diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h index cbaff70c2a..085ec99ea0 100644 --- a/scene/2d/cpu_particles_2d.h +++ b/scene/2d/cpu_particles_2d.h @@ -154,7 +154,6 @@ private: Vector2 direction; float spread; - float flatness; float parameters[PARAM_MAX]; float randomness[PARAM_MAX]; @@ -243,9 +242,6 @@ public: void set_spread(float p_spread); float get_spread() const; - void set_flatness(float p_flatness); - float get_flatness() const; - void set_param(Parameter p_param, float p_value); float get_param(Parameter p_param) const; diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 5f606ff4c5..5c284cb483 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -832,8 +832,8 @@ void AnimationNodeTransition::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time"); for (int i = 0; i < MAX_INPUTS; i++) { - ADD_PROPERTYI(PropertyInfo(Variant::STRING, "input_" + itos(i) + "/name"), "set_input_caption", "get_input_caption", i); - ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "input_" + itos(i) + "/auto_advance"), "set_input_as_auto_advance", "is_input_set_as_auto_advance", i); + ADD_PROPERTYI(PropertyInfo(Variant::STRING, "input_" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_input_caption", "get_input_caption", i); + ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "input_" + itos(i) + "/auto_advance", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_input_as_auto_advance", "is_input_set_as_auto_advance", i); } } |