/**************************************************************************/1/* bone_attachment_3d.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "scene/3d/skeleton_3d.h"3334class BoneAttachment3D : public Node3D {35GDCLASS(BoneAttachment3D, Node3D);3637bool bound = false;38String bone_name;39int bone_idx = -1;4041bool override_pose = false;42bool _override_dirty = false;43bool overriding = false;4445bool use_external_skeleton = false;46NodePath external_skeleton_node;47ObjectID external_skeleton_node_cache;4849void _check_bind();50void _check_unbind();5152bool updating = false;53void _transform_changed();54void _update_external_skeleton_cache();5556protected:57void _validate_property(PropertyInfo &p_property) const;58void _notification(int p_what);5960static void _bind_methods();61#ifndef DISABLE_DEPRECATED62virtual void _on_bone_pose_update_bind_compat_90575(int p_bone_index);63static void _bind_compatibility_methods();64#endif6566public:67#ifdef TOOLS_ENABLED68virtual void notify_skeleton_bones_renamed(Node *p_base_scene, Skeleton3D *p_skeleton, Dictionary p_rename_map);69#endif // TOOLS_ENABLED7071virtual PackedStringArray get_configuration_warnings() const override;7273Skeleton3D *get_skeleton();7475void set_bone_name(const String &p_name);76String get_bone_name() const;7778void set_bone_idx(const int &p_idx);79int get_bone_idx() const;8081void set_override_pose(bool p_override_pose);82bool get_override_pose() const;8384void set_use_external_skeleton(bool p_use_external_skeleton);85bool get_use_external_skeleton() const;86void set_external_skeleton(NodePath p_external_skeleton);87NodePath get_external_skeleton() const;8889virtual void on_skeleton_update();9091#ifdef TOOLS_ENABLED92virtual void notify_rebind_required();93#endif9495BoneAttachment3D();96};979899