diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-21 19:56:08 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-21 19:56:08 -0300 |
commit | 2cc83092498d3b82fa8a3aba37c32ad887d19c2c (patch) | |
tree | 4d2def0a62847170a86c3f134f234af8ae45f0b9 /scene/3d/particles.cpp | |
parent | 92410df24cdf296ad63250274d69b2019996423e (diff) | |
parent | 32dd9a9f668db31e348c5ef5bc181cdb91c07299 (diff) |
Merge pull request #10351 from neikeq/enums-are-for-the-weak
ClassDB: Provide the enum name of integer constants
Diffstat (limited to 'scene/3d/particles.cpp')
-rw-r--r-- | scene/3d/particles.cpp | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index e88a52c76a..70f46e3a0a 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -347,9 +347,10 @@ void Particles::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "draw_pass_" + itos(i + 1), PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_draw_pass_mesh", "get_draw_pass_mesh", i); } - BIND_CONSTANT(DRAW_ORDER_INDEX); - BIND_CONSTANT(DRAW_ORDER_LIFETIME); - BIND_CONSTANT(DRAW_ORDER_VIEW_DEPTH); + BIND_ENUM_CONSTANT(DRAW_ORDER_INDEX); + BIND_ENUM_CONSTANT(DRAW_ORDER_LIFETIME); + BIND_ENUM_CONSTANT(DRAW_ORDER_VIEW_DEPTH); + BIND_CONSTANT(MAX_DRAW_PASSES); } @@ -1487,29 +1488,29 @@ void ParticlesMaterial::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_OFFSET); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "anim_loop"), "set_flag", "get_flag", FLAG_ANIM_LOOP); - BIND_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY); - BIND_CONSTANT(PARAM_ANGULAR_VELOCITY); - BIND_CONSTANT(PARAM_ORBIT_VELOCITY); - BIND_CONSTANT(PARAM_LINEAR_ACCEL); - BIND_CONSTANT(PARAM_RADIAL_ACCEL); - BIND_CONSTANT(PARAM_TANGENTIAL_ACCEL); - BIND_CONSTANT(PARAM_DAMPING); - BIND_CONSTANT(PARAM_ANGLE); - BIND_CONSTANT(PARAM_SCALE); - BIND_CONSTANT(PARAM_HUE_VARIATION); - BIND_CONSTANT(PARAM_ANIM_SPEED); - BIND_CONSTANT(PARAM_ANIM_OFFSET); - BIND_CONSTANT(PARAM_MAX); - - BIND_CONSTANT(FLAG_ALIGN_Y_TO_VELOCITY); - BIND_CONSTANT(FLAG_ROTATE_Y); - BIND_CONSTANT(FLAG_MAX); - - BIND_CONSTANT(EMISSION_SHAPE_POINT); - BIND_CONSTANT(EMISSION_SHAPE_SPHERE); - BIND_CONSTANT(EMISSION_SHAPE_BOX); - BIND_CONSTANT(EMISSION_SHAPE_POINTS); - BIND_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS); + BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY); + BIND_ENUM_CONSTANT(PARAM_ANGULAR_VELOCITY); + BIND_ENUM_CONSTANT(PARAM_ORBIT_VELOCITY); + BIND_ENUM_CONSTANT(PARAM_LINEAR_ACCEL); + BIND_ENUM_CONSTANT(PARAM_RADIAL_ACCEL); + BIND_ENUM_CONSTANT(PARAM_TANGENTIAL_ACCEL); + BIND_ENUM_CONSTANT(PARAM_DAMPING); + BIND_ENUM_CONSTANT(PARAM_ANGLE); + BIND_ENUM_CONSTANT(PARAM_SCALE); + BIND_ENUM_CONSTANT(PARAM_HUE_VARIATION); + BIND_ENUM_CONSTANT(PARAM_ANIM_SPEED); + BIND_ENUM_CONSTANT(PARAM_ANIM_OFFSET); + BIND_ENUM_CONSTANT(PARAM_MAX); + + BIND_ENUM_CONSTANT(FLAG_ALIGN_Y_TO_VELOCITY); + BIND_ENUM_CONSTANT(FLAG_ROTATE_Y); + BIND_ENUM_CONSTANT(FLAG_MAX); + + BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINT); + BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE); + BIND_ENUM_CONSTANT(EMISSION_SHAPE_BOX); + BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINTS); + BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS); } ParticlesMaterial::ParticlesMaterial() |