You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #112267 from KoBeWi/sk8leton
Remove default skeleton path in MeshInstance3D
This commit is contained in:
@@ -1648,6 +1648,9 @@ ProjectSettings::ProjectSettings() {
|
|||||||
GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
|
GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
|
||||||
GLOBAL_DEF("animation/warnings/check_invalid_track_paths", true);
|
GLOBAL_DEF("animation/warnings/check_invalid_track_paths", true);
|
||||||
GLOBAL_DEF("animation/warnings/check_angle_interpolation_type_conflicting", true);
|
GLOBAL_DEF("animation/warnings/check_angle_interpolation_type_conflicting", true);
|
||||||
|
#ifndef DISABLE_DEPRECATED
|
||||||
|
GLOBAL_DEF_RST("animation/compatibility/default_parent_skeleton_in_mesh_instance_3d", false);
|
||||||
|
#endif
|
||||||
|
|
||||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"), "res://default_bus_layout.tres");
|
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"), "res://default_bus_layout.tres");
|
||||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "audio/general/default_playback_type", PROPERTY_HINT_ENUM, "Stream,Sample"), 0);
|
GLOBAL_DEF(PropertyInfo(Variant::INT, "audio/general/default_playback_type", PROPERTY_HINT_ENUM, "Stream,Sample"), 0);
|
||||||
|
|||||||
@@ -128,8 +128,9 @@
|
|||||||
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
||||||
The [Mesh] resource for the instance.
|
The [Mesh] resource for the instance.
|
||||||
</member>
|
</member>
|
||||||
<member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath("..")">
|
<member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath("")">
|
||||||
[NodePath] to the [Skeleton3D] associated with the instance.
|
[NodePath] to the [Skeleton3D] associated with the instance.
|
||||||
|
[b]Note:[/b] The default value of this property has changed in Godot 4.6. Enable [member ProjectSettings.animation/compatibility/default_parent_skeleton_in_mesh_instance_3d] if the old behavior is needed for compatibility.
|
||||||
</member>
|
</member>
|
||||||
<member name="skin" type="Skin" setter="set_skin" getter="get_skin">
|
<member name="skin" type="Skin" setter="set_skin" getter="get_skin">
|
||||||
The [Skin] to be used by this instance.
|
The [Skin] to be used by this instance.
|
||||||
|
|||||||
@@ -269,6 +269,9 @@
|
|||||||
<member name="accessibility/general/updates_per_second" type="int" setter="" getter="" default="60">
|
<member name="accessibility/general/updates_per_second" type="int" setter="" getter="" default="60">
|
||||||
The number of accessibility information updates per second.
|
The number of accessibility information updates per second.
|
||||||
</member>
|
</member>
|
||||||
|
<member name="animation/compatibility/default_parent_skeleton_in_mesh_instance_3d" type="bool" setter="" getter="" default="false">
|
||||||
|
If [code]true[/code], [member MeshInstance3D.skeleton] will point to the parent node ([code]..[/code]) by default, which was the behavior before Godot 4.6. It's recommended to keep this setting disabled unless the old behavior is needed for compatibility.
|
||||||
|
</member>
|
||||||
<member name="animation/warnings/check_angle_interpolation_type_conflicting" type="bool" setter="" getter="" default="true">
|
<member name="animation/warnings/check_angle_interpolation_type_conflicting" type="bool" setter="" getter="" default="true">
|
||||||
If [code]true[/code], [AnimationMixer] prints the warning of interpolation being forced to choose the shortest rotation path due to multiple angle interpolation types being mixed in the [AnimationMixer] cache.
|
If [code]true[/code], [AnimationMixer] prints the warning of interpolation being forced to choose the shortest rotation path due to multiple angle interpolation types being mixed in the [AnimationMixer] cache.
|
||||||
</member>
|
</member>
|
||||||
|
|||||||
@@ -926,6 +926,11 @@ void MeshInstance3D::_bind_methods() {
|
|||||||
|
|
||||||
MeshInstance3D::MeshInstance3D() {
|
MeshInstance3D::MeshInstance3D() {
|
||||||
_define_ancestry(AncestralClass::MESH_INSTANCE_3D);
|
_define_ancestry(AncestralClass::MESH_INSTANCE_3D);
|
||||||
|
#ifndef DISABLE_DEPRECATED
|
||||||
|
if (use_parent_skeleton_compat) {
|
||||||
|
skeleton_path = NodePath("..");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshInstance3D::~MeshInstance3D() {
|
MeshInstance3D::~MeshInstance3D() {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ protected:
|
|||||||
Ref<Skin> skin;
|
Ref<Skin> skin;
|
||||||
Ref<Skin> skin_internal;
|
Ref<Skin> skin_internal;
|
||||||
Ref<SkinReference> skin_ref;
|
Ref<SkinReference> skin_ref;
|
||||||
NodePath skeleton_path = NodePath("..");
|
NodePath skeleton_path;
|
||||||
|
|
||||||
LocalVector<float> blend_shape_tracks;
|
LocalVector<float> blend_shape_tracks;
|
||||||
HashMap<StringName, int> blend_shape_properties;
|
HashMap<StringName, int> blend_shape_properties;
|
||||||
@@ -73,6 +73,10 @@ protected:
|
|||||||
public:
|
public:
|
||||||
static constexpr AncestralClass static_ancestral_class = AncestralClass::MESH_INSTANCE_3D;
|
static constexpr AncestralClass static_ancestral_class = AncestralClass::MESH_INSTANCE_3D;
|
||||||
|
|
||||||
|
#ifndef DISABLE_DEPRECATED
|
||||||
|
static inline bool use_parent_skeleton_compat = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
void set_mesh(const Ref<Mesh> &p_mesh);
|
void set_mesh(const Ref<Mesh> &p_mesh);
|
||||||
Ref<Mesh> get_mesh() const;
|
Ref<Mesh> get_mesh() const;
|
||||||
|
|
||||||
|
|||||||
@@ -607,6 +607,9 @@ void register_scene_types() {
|
|||||||
GDREGISTER_CLASS(Camera3D);
|
GDREGISTER_CLASS(Camera3D);
|
||||||
GDREGISTER_CLASS(AudioListener3D);
|
GDREGISTER_CLASS(AudioListener3D);
|
||||||
GDREGISTER_CLASS(MeshInstance3D);
|
GDREGISTER_CLASS(MeshInstance3D);
|
||||||
|
#ifndef DISABLE_DEPRECATED
|
||||||
|
MeshInstance3D::use_parent_skeleton_compat = GLOBAL_GET("animation/compatibility/default_parent_skeleton_in_mesh_instance_3d");
|
||||||
|
#endif
|
||||||
GDREGISTER_CLASS(OccluderInstance3D);
|
GDREGISTER_CLASS(OccluderInstance3D);
|
||||||
GDREGISTER_ABSTRACT_CLASS(Occluder3D);
|
GDREGISTER_ABSTRACT_CLASS(Occluder3D);
|
||||||
GDREGISTER_CLASS(ArrayOccluder3D);
|
GDREGISTER_CLASS(ArrayOccluder3D);
|
||||||
|
|||||||
Reference in New Issue
Block a user