فهرست منبع

Merge pull request #92896 from TokageItLab/skeleton-mod-get-skeleton

Expose `get_skeleton()` from `SkeletonModifier3D`
Rémi Verschelde 1 سال پیش
والد
کامیت
76b1a1f834
2فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 6 0
      doc/classes/SkeletonModifier3D.xml
  2. 2 0
      scene/3d/skeleton_modifier_3d.cpp

+ 6 - 0
doc/classes/SkeletonModifier3D.xml

@@ -18,6 +18,12 @@
 				[method _process_modification] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier.
 				[method _process_modification] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier.
 			</description>
 			</description>
 		</method>
 		</method>
+		<method name="get_skeleton" qualifiers="const">
+			<return type="Skeleton3D" />
+			<description>
+				Get parent [Skeleton3D] node if found.
+			</description>
+		</method>
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="active" type="bool" setter="set_active" getter="is_active" default="true">
 		<member name="active" type="bool" setter="set_active" getter="is_active" default="true">

+ 2 - 0
scene/3d/skeleton_modifier_3d.cpp

@@ -123,6 +123,8 @@ void SkeletonModifier3D::_notification(int p_what) {
 }
 }
 
 
 void SkeletonModifier3D::_bind_methods() {
 void SkeletonModifier3D::_bind_methods() {
+	ClassDB::bind_method(D_METHOD("get_skeleton"), &SkeletonModifier3D::get_skeleton);
+
 	ClassDB::bind_method(D_METHOD("set_active", "active"), &SkeletonModifier3D::set_active);
 	ClassDB::bind_method(D_METHOD("set_active", "active"), &SkeletonModifier3D::set_active);
 	ClassDB::bind_method(D_METHOD("is_active"), &SkeletonModifier3D::is_active);
 	ClassDB::bind_method(D_METHOD("is_active"), &SkeletonModifier3D::is_active);