diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-12-04 19:26:29 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2020-12-04 19:34:50 -0500 |
commit | 40b81339d098d04003ea474aa7690e42bd858091 (patch) | |
tree | 6795eb871af507321723cf680379d1d0f9ed0020 /scene | |
parent | 47f8ac78648a5477e163e669ac545bcc7e7afc94 (diff) |
Rebind Mesh/ArrayMesh enums
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/mesh.cpp | 6 | ||||
-rw-r--r-- | scene/resources/mesh.h | 13 |
2 files changed, 10 insertions, 9 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index d12f92f8f7..c6815c8ecc 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -480,9 +480,6 @@ void Mesh::_bind_methods() { BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLES); BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_STRIP); - BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_NORMALIZED); - BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_RELATIVE); - BIND_ENUM_CONSTANT(ARRAY_VERTEX); BIND_ENUM_CONSTANT(ARRAY_NORMAL); BIND_ENUM_CONSTANT(ARRAY_TANGENT); @@ -1615,6 +1612,9 @@ void ArrayMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_surfaces", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_surfaces", "_get_surfaces"); ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_shape_mode", PROPERTY_HINT_ENUM, "Normalized,Relative"), "set_blend_shape_mode", "get_blend_shape_mode"); ADD_PROPERTY(PropertyInfo(Variant::AABB, "custom_aabb", PROPERTY_HINT_NONE, ""), "set_custom_aabb", "get_custom_aabb"); + + BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_NORMALIZED); + BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_RELATIVE); } void ArrayMesh::reload_from_file() { diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 659574c2c4..ae2139a0cf 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -125,11 +125,6 @@ public: PRIMITIVE_MAX = RenderingServer::PRIMITIVE_MAX, }; - enum BlendShapeMode { - BLEND_SHAPE_MODE_NORMALIZED = RS::BLEND_SHAPE_MODE_NORMALIZED, - BLEND_SHAPE_MODE_RELATIVE = RS::BLEND_SHAPE_MODE_RELATIVE, - }; - virtual int get_surface_count() const = 0; virtual int surface_get_array_len(int p_idx) const = 0; virtual int surface_get_array_index_len(int p_idx) const = 0; @@ -176,6 +171,12 @@ class ArrayMesh : public Mesh { Array _get_surfaces() const; void _set_surfaces(const Array &p_data); +public: + enum BlendShapeMode { + BLEND_SHAPE_MODE_NORMALIZED = RS::BLEND_SHAPE_MODE_NORMALIZED, + BLEND_SHAPE_MODE_RELATIVE = RS::BLEND_SHAPE_MODE_RELATIVE, + }; + private: struct Surface { uint32_t format; @@ -267,6 +268,6 @@ VARIANT_ENUM_CAST(Mesh::ArrayType); VARIANT_ENUM_CAST(Mesh::ArrayFormat); VARIANT_ENUM_CAST(Mesh::ArrayCustomFormat); VARIANT_ENUM_CAST(Mesh::PrimitiveType); -VARIANT_ENUM_CAST(Mesh::BlendShapeMode); +VARIANT_ENUM_CAST(ArrayMesh::BlendShapeMode); #endif |