diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-07-18 00:44:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 00:44:57 +0200 |
commit | f36cd77feb9790847c6123eccfa18be74fc89b32 (patch) | |
tree | 53f004c07aa57f6ae19395e2392977f32dd3db00 /scene | |
parent | 34c20248b30c0270fe748e7f9553c74e6212554a (diff) | |
parent | bf18c35dd7e1e74da4ee23eddb2f638ab09c3650 (diff) |
Merge pull request #9639 from rminderhoud/primitives
Moved binds of PRIMITIVE_* contants from ArrayMesh to Mesh
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/mesh.cpp | 19 | ||||
-rw-r--r-- | scene/resources/mesh.h | 2 |
2 files changed, 13 insertions, 8 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index ef7011b2af..414d0a6240 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -413,6 +413,17 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { return newmesh; } +void Mesh::_bind_methods() { + + BIND_CONSTANT(PRIMITIVE_POINTS); + BIND_CONSTANT(PRIMITIVE_LINES); + BIND_CONSTANT(PRIMITIVE_LINE_STRIP); + BIND_CONSTANT(PRIMITIVE_LINE_LOOP); + BIND_CONSTANT(PRIMITIVE_TRIANGLES); + BIND_CONSTANT(PRIMITIVE_TRIANGLE_STRIP); + BIND_CONSTANT(PRIMITIVE_TRIANGLE_FAN); +} + Mesh::Mesh() { } @@ -1034,14 +1045,6 @@ void ArrayMesh::_bind_methods() { BIND_CONSTANT(ARRAY_FORMAT_BONES); BIND_CONSTANT(ARRAY_FORMAT_WEIGHTS); BIND_CONSTANT(ARRAY_FORMAT_INDEX); - - BIND_CONSTANT(PRIMITIVE_POINTS); - BIND_CONSTANT(PRIMITIVE_LINES); - BIND_CONSTANT(PRIMITIVE_LINE_STRIP); - BIND_CONSTANT(PRIMITIVE_LINE_LOOP); - BIND_CONSTANT(PRIMITIVE_TRIANGLES); - BIND_CONSTANT(PRIMITIVE_TRIANGLE_STRIP); - BIND_CONSTANT(PRIMITIVE_TRIANGLE_FAN); } ArrayMesh::ArrayMesh() { diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index f716b59fe9..4adb871e09 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -46,6 +46,8 @@ class Mesh : public Resource { protected: void _clear_triangle_mesh(); + static void _bind_methods(); + public: enum { |