From 158314c0b99761b661b0f3e2b31f7f5a0f9266fe Mon Sep 17 00:00:00 2001 From: HipsterPenguin <38148386+HipsterPenguin@users.noreply.github.com> Date: Sun, 17 Jan 2021 13:25:34 -0600 Subject: [PATCH] Fixed 6DOF set/get check for the path starting with joint_constraints New code checks whether or not property has joint_constraints as the first part of its path. (cherry picked from commit 6bf46cf70f98aeb067f520e2084f8393b1a7c80e) --- scene/3d/physics_body.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 909fdcefaee..3bf0c57e36f 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -1889,6 +1889,10 @@ bool PhysicalBone::SixDOFJointData::_set(const StringName &p_name, const Variant String path = p_name; + if (!path.begins_with("joint_constraints/")) { + return false; + } + Vector3::Axis axis; { const String axis_s = path.get_slicec('/', 1); @@ -2024,6 +2028,10 @@ bool PhysicalBone::SixDOFJointData::_get(const StringName &p_name, Variant &r_re String path = p_name; + if (!path.begins_with("joint_constraints/")) { + return false; + } + int axis; { const String axis_s = path.get_slicec('/', 1);