Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AnimationMixer (2)
- AudioStreamPlayer
- CanvasItem (2)
- CanvasLayer (1)
- EditorFileSystem
- EditorPlugin (1)
- EditorResourcePreview
- HTTPRequest
- InstancePlaceholder
- MissingNode
- MultiplayerSpawner
- MultiplayerSynchronizer
- NavigationAgent2D
- NavigationAgent3D
- Node3D (31)
- ResourcePreloader
- ShaderGlobalsOverride
- StatusIndicator
- Timer
- Viewport (2)
- WorldEnvironment
- AudioListener3D
- AudioStreamPlayer3D
- BoneAttachment3D
- Camera3D (1)
- CollisionObject3D (2)
- CollisionPolygon3D
- CollisionShape3D
- GridMap
- ImporterMeshInstance3D
- Joint3D (5)
- LightmapProbe
- Marker3D
- NavigationLink3D
- NavigationObstacle3D
- NavigationRegion3D
- OpenXRCompositionLayer (3)
- OpenXRHand
- Path3D
- PathFollow3D
- RayCast3D
- RemoteTransform3D
- ShapeCast3D
- Skeleton3D
- SkeletonModifier3D (7)
- SpringArm3D
- SpringBoneCollision3D (3)
- VehicleWheel3D
- VisualInstance3D (13)
- XRFaceModifier3D
- XRNode3D (2)
- XROrigin3D
- LookAtModifier3D
- PhysicalBoneSimulator3D
- RetargetModifier3D
- SkeletonIK3D
- SpringBoneSimulator3D
- XRBodyModifier3D
- XRHandModifier3D
Table of contents
-
var enable = TRANSFORM_FLAG_ALL -
var profile: SkeletonProfile -
var use_global_pose: bool = false -
const func is_position_enabled() -> bool -
const func is_rotation_enabled() -> bool -
const func is_scale_enabled() -> bool -
func set_position_enabled(enabled: bool) -> void -
func set_rotation_enabled(enabled: bool) -> void -
func set_scale_enabled(enabled: bool) -> void -
const TRANSFORM_FLAG_POSITION = 1 enum TransformFlagBitfield -
const TRANSFORM_FLAG_ROTATION = 2 enum TransformFlagBitfield -
const TRANSFORM_FLAG_SCALE = 4 enum TransformFlagBitfield -
const TRANSFORM_FLAG_ALL = 7 enum TransformFlagBitfield -
enum TransformFlag
RetargetModifier3D #
is_instantiable, Node3D, Node, core, not_builtin_classes
A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.
Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton.
This modifier rewrites the pose of the child skeleton directly in the parent skeleton's update process. This means that it overwrites the mapped bone pose set in the normal process on the target skeleton. If you want to set the target skeleton bone pose after retargeting, you will need to add a SkeletonModifier3D child to the target skeleton and thereby modify the pose.
Note: When the use_global_pose is enabled, even if it is an unmapped bone, it can cause visual problems because the global pose is applied ignoring the parent bone's pose if it has mapped bone children. See also use_global_pose.
Members #
var enable = TRANSFORM_FLAG_ALL#
Flags to control the process of the transform elements individually when use_global_pose is disabled.
var profile: SkeletonProfile#
SkeletonProfile for retargeting bones with names matching the bone list.
var use_global_pose: bool = false#
If false, in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored.
Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately.
If true, retargeting is performed taking into account global pose.
In case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform is taken into account. However, bone length between skeletons must match exactly, if not, the bones will be forced to expand or shrink.
This is useful for using dummy bone with length 0 to match postures when retargeting between models with different number of bones.
Methods #
const func is_position_enabled() -> bool#
Returns true if enable has TRANSFORM_FLAG_POSITION.
const func is_rotation_enabled() -> bool#
Returns true if enable has TRANSFORM_FLAG_ROTATION.
const func is_scale_enabled() -> bool#
Returns true if enable has TRANSFORM_FLAG_SCALE.
func set_position_enabled(enabled: bool) -> void#
Sets TRANSFORM_FLAG_POSITION into enable.
func set_rotation_enabled(enabled: bool) -> void#
Sets TRANSFORM_FLAG_ROTATION into enable.
func set_scale_enabled(enabled: bool) -> void#
Sets TRANSFORM_FLAG_SCALE into enable.
Annotations #
Constants #
const TRANSFORM_FLAG_POSITION = 1 enum TransformFlagBitfield#
If set, allows to retarget the position.
const TRANSFORM_FLAG_ROTATION = 2 enum TransformFlagBitfield#
If set, allows to retarget the rotation.
const TRANSFORM_FLAG_SCALE = 4 enum TransformFlagBitfield#
If set, allows to retarget the scale.
const TRANSFORM_FLAG_ALL = 7 enum TransformFlagBitfield#
If set, allows to retarget the position/rotation/scale.
Constructors #
Enums #
TransformFlag#
enum TransformFlag {
TRANSFORM_FLAG_POSITION = 1,
TRANSFORM_FLAG_ROTATION = 2,
TRANSFORM_FLAG_SCALE = 4,
TRANSFORM_FLAG_ALL = 7,
}