summaryrefslogtreecommitdiff
path: root/scene/resources/concave_polygon_shape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/concave_polygon_shape.cpp')
-rw-r--r--scene/resources/concave_polygon_shape.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp
index 718aaeb27a..935f041837 100644
--- a/scene/resources/concave_polygon_shape.cpp
+++ b/scene/resources/concave_polygon_shape.cpp
@@ -27,6 +27,7 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+
#include "concave_polygon_shape.h"
#include "servers/physics_server.h"
@@ -63,29 +64,6 @@ Vector<Vector3> ConcavePolygonShape::_gen_debug_mesh_lines() {
return points;
}
-bool ConcavePolygonShape::_set(const StringName &p_name, const Variant &p_value) {
-
- if (p_name == "data")
- PhysicsServer::get_singleton()->shape_set_data(get_shape(), p_value);
- else
- return false;
-
- return true;
-}
-
-bool ConcavePolygonShape::_get(const StringName &p_name, Variant &r_ret) const {
-
- if (p_name == "data")
- r_ret = PhysicsServer::get_singleton()->shape_get_data(get_shape());
- else
- return false;
- return true;
-}
-void ConcavePolygonShape::_get_property_list(List<PropertyInfo> *p_list) const {
-
- p_list->push_back(PropertyInfo(Variant::ARRAY, "data"));
-}
-
void ConcavePolygonShape::_update_shape() {
}
@@ -104,6 +82,7 @@ void ConcavePolygonShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_faces", "faces"), &ConcavePolygonShape::set_faces);
ClassDB::bind_method(D_METHOD("get_faces"), &ConcavePolygonShape::get_faces);
+ ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_faces", "get_faces");
}
ConcavePolygonShape::ConcavePolygonShape() :