Timeline-style controller for one authored animation clip. 更多...
#include <AnimationClipEditor.h>
Public 成员函数 | |
| AnimationClipEditor (std::string targetId) | |
| Construct a seeded two-bone preview clip. | |
| animation_editing::Result< void > | loadRuntimeClip (const animation::AnimSkeleton &skeleton, const animation::AnimClip &clip) |
| Atomically replace the editor document from a real runtime skeleton and clip. | |
| animation_editing::Result< void > | writeRuntimeClip (animation::AnimClip &clip, const animation::AnimSkeleton &skeleton) const |
| Replace a runtime clip with the current authoritative editor document. | |
| AnimationClipEditor (const AnimationClipEditor &)=delete | |
| AnimationClipEditor & | operator= (const AnimationClipEditor &)=delete |
| const animation_editing::AnimationClipDocumentTarget & | target () const noexcept |
| Borrow the authoritative clip document. | |
| animation_editing::Result< void > | configureWorkspace (editor::EditorWorkspace &workspace) const |
| Install Skeleton / Pose Preview / Inspector / Dope panels. | |
| animation_editing::Result< void > | setViewport (float width, float rowHeight, float labelWidth) |
| Configure dope-sheet pixel layout. | |
| animation_editing::Result< void > | seekSeconds (double seconds) |
| animation_editing::Result< void > | seekX (float x) |
| animation_editing::Result< void > | pointerDown (float x, float y) |
| animation_editing::Result< void > | selectBone (std::string bone) |
| animation_editing::Result< void > | setMaskWeight (double weight) |
| animation_editing::Result< void > | setDuration (double duration) |
| Commit clip duration through the document transaction path. | |
| animation_editing::Result< void > | setSampleRate (double sampleRate) |
| Commit authored sample rate through the document transaction path. | |
| animation_editing::Result< void > | setLoop (bool loop) |
| Commit looping through the document transaction path. | |
| animation_editing::Result< void > | keySelectedBone () |
| Insert or replace a transform key for the selected bone at the playhead. | |
| animation_editing::Result< void > | deleteSelectedKey () |
| Delete the selected transform key. | |
| animation_editing::Result< void > | setSelectedPosition (double x, double y, double z) |
| Replace the selected bone position at the playhead and create a key when needed. | |
| animation_editing::Result< void > | setSelectedRotation (double xDegrees, double yDegrees, double zDegrees) |
| Replace the selected bone Euler rotation in degrees and create a key when needed. | |
| animation_editing::Result< void > | setSelectedScale (double x, double y, double z) |
| Replace the selected bone scale at the playhead and create a key when needed. | |
| animation_editing::Result< void > | moveSelectedKey (double time) |
| animation_editing::Result< editor::TransactionReceipt > | undo () |
| animation_editing::Result< editor::TransactionReceipt > | redo () |
| void | play () noexcept |
| void | pause () noexcept |
| Pause. | |
| void | stop () noexcept |
| Stops . | |
| animation_editing::Result< void > | update (double deltaSeconds) |
| Advance playhead by injected dt and refresh pose/overlay. | |
| bool | canUndo () const noexcept |
| bool | canRedo () const noexcept |
| Can redo. | |
| bool | isPlaying () const noexcept |
| True when playing. | |
| std::uint64_t | revision () const noexcept |
| Revision. | |
| double | duration () const noexcept |
| Duration. | |
| double | sampleRate () const noexcept |
| Sample rate. | |
| bool | isLooping () const noexcept |
| True when looping. | |
| double | playhead () const noexcept |
| Playhead. | |
| float | layoutWidth () const noexcept |
| Layout width. | |
| float | layoutHeight () const noexcept |
| Layout height. | |
| float | playheadX () const noexcept |
| Playhead x. | |
| std::string | selectedBone () const |
| Selected bone. | |
| double | selectedMaskWeight () const |
| Selected mask weight. | |
| bool | hasSelectedKey () const noexcept |
| True when selected key. | |
| double | selectedKeyTime () const |
| Selected key time. | |
| double | selectedPositionX () const |
| Selected position x. | |
| double | selectedPositionY () const |
| Selected position y. | |
| double | selectedPositionZ () const |
| Selected position z. | |
| double | selectedRotationX () const |
| Selected rotation x. | |
| double | selectedRotationY () const |
| Selected rotation y. | |
| double | selectedRotationZ () const |
| Selected rotation z. | |
| double | selectedScaleX () const |
| Selected scale x. | |
| double | selectedScaleY () const |
| Selected scale y. | |
| double | selectedScaleZ () const |
| Selected scale z. | |
| int | boneCount () const noexcept |
| Bone count. | |
| std::string | boneName (int index) const |
| Bone name. | |
| std::string | boneParent (int index) const |
| Bone parent. | |
| int | trackCount () const |
| Track count. | |
| std::string | trackBone (int index) const |
| Track bone. | |
| std::string | trackId (int index) const |
| Track id. | |
| bool | isTrackSelected (int index) const |
| True when track selected. | |
| int | keyCount () const |
| Key count. | |
| float | keyX (int index) const |
| Key x. | |
| float | keyY (int index) const |
| Key y. | |
| bool | isKeySelected (int index) const |
| True when key selected. | |
| int | eventCount () const |
| Event count. | |
| float | eventX (int index) const |
| Event x. | |
| std::string | eventName (int index) const |
| Event name. | |
| int | primitiveCount () const |
| Primitive count. | |
| std::string | primitiveKind (int index) const |
| Primitive kind. | |
| float | primitiveX (int index) const |
| Primitive x. | |
| float | primitiveY (int index) const |
| Primitive y. | |
| float | primitiveDirX (int index) const |
| Primitive dir x. | |
| float | primitiveDirY (int index) const |
| Primitive dir y. | |
| float | primitiveLength (int index) const |
| Primitive length. | |
| float | primitiveRadius (int index) const |
| Primitive radius. | |
| float | primitiveR (int index) const |
| Primitive r. | |
| float | primitiveG (int index) const |
| Primitive g. | |
| float | primitiveB (int index) const |
| Primitive b. | |
| const animation_editing::AnimationClipPreview & | preview () const noexcept |
| Preview. | |
详细描述
Timeline-style controller for one authored animation clip.
Owns the clip document, local undo, deterministic scrub preview and a renderer-neutral skeleton overlay. Script presenters draw layout getters only.
@ownership Editor owns the document. Overlay snapshots are copied values. @threadaffinity Owner thread only. @reentrancy No unknown callbacks.
在文件 AnimationClipEditor.h 第 37 行定义.
构造及析构函数说明
◆ AnimationClipEditor() [1/2]
|
explicit |
Construct a seeded two-bone preview clip.
在文件 AnimationClipEditor.cpp 第 41 行定义.
◆ AnimationClipEditor() [2/2]
|
delete |
成员函数说明
◆ boneCount()
|
noexcept |
Bone count.
在文件 AnimationClipEditor.cpp 第 517 行定义.
◆ boneName()
| std::string eve::animation_editor::AnimationClipEditor::boneName | ( | int | index | ) | const |
◆ boneParent()
| std::string eve::animation_editor::AnimationClipEditor::boneParent | ( | int | index | ) | const |
◆ canRedo()
|
inlinenoexcept |
Can redo.
在文件 AnimationClipEditor.h 第 124 行定义.
◆ canUndo()
|
inlinenoexcept |
在文件 AnimationClipEditor.h 第 122 行定义.
◆ configureWorkspace()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::configureWorkspace | ( | editor::EditorWorkspace & | workspace | ) | const |
Install Skeleton / Pose Preview / Inspector / Dope panels.
- 注解
- Does not retain
workspace.
在文件 AnimationClipEditor.cpp 第 152 行定义.
引用了 eve::editor::EditorWorkspace::activatePanel(), context, id, order, eve::editor::EditorWorkspace::registerPanel(), eve::editor::EditorWorkspace::setPanelCapability(), eve::editor::EditorWorkspace::setPanelContext() , 以及 title.
◆ deleteSelectedKey()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::deleteSelectedKey | ( | ) |
Delete the selected transform key.
在文件 AnimationClipEditor.cpp 第 322 行定义.
引用了 eve::UuidIdAdapter< Tag >::empty(), key, eve::animation_editing::AnimationClipDocumentTarget::makeSetTrack(), eve::animation_editing::AnimationClipDocumentTarget::tracks() , 以及 tracks.
◆ duration()
|
inlinenoexcept |
◆ eventCount()
| int eve::animation_editor::AnimationClipEditor::eventCount | ( | ) | const |
Event count.
在文件 AnimationClipEditor.cpp 第 559 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::events().
◆ eventName()
| std::string eve::animation_editor::AnimationClipEditor::eventName | ( | int | index | ) | const |
Event name.
在文件 AnimationClipEditor.cpp 第 567 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::events(), events, index , 以及 name.
◆ eventX()
| float eve::animation_editor::AnimationClipEditor::eventX | ( | int | index | ) | const |
Event x.
在文件 AnimationClipEditor.cpp 第 561 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::events(), events, index , 以及 time.
◆ hasSelectedKey()
|
inlinenoexcept |
True when selected key.
在文件 AnimationClipEditor.h 第 148 行定义.
◆ isKeySelected()
| bool eve::animation_editor::AnimationClipEditor::isKeySelected | ( | int | index | ) | const |
True when key selected.
在文件 AnimationClipEditor.cpp 第 551 行定义.
引用了 index, key, eve::animation_editing::AnimationClipDocumentTarget::tracks() , 以及 tracks.
◆ isLooping()
|
inlinenoexcept |
True when looping.
在文件 AnimationClipEditor.h 第 134 行定义.
◆ isPlaying()
|
inlinenoexcept |
True when playing.
在文件 AnimationClipEditor.h 第 126 行定义.
◆ isTrackSelected()
| bool eve::animation_editor::AnimationClipEditor::isTrackSelected | ( | int | index | ) | const |
◆ keyCount()
| int eve::animation_editor::AnimationClipEditor::keyCount | ( | ) | const |
Key count.
在文件 AnimationClipEditor.cpp 第 537 行定义.
◆ keySelectedBone()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::keySelectedBone | ( | ) |
Insert or replace a transform key for the selected bone at the playhead.
在文件 AnimationClipEditor.cpp 第 300 行定义.
引用了 key, eve::animation_editing::AnimationClipDocumentTarget::makeSetTrack(), eve::animation_editing::AnimationClipDocumentTarget::tracks() , 以及 tracks.
◆ keyX()
| float eve::animation_editor::AnimationClipEditor::keyX | ( | int | index | ) | const |
◆ keyY()
| float eve::animation_editor::AnimationClipEditor::keyY | ( | int | index | ) | const |
◆ layoutHeight()
|
noexcept |
Layout height.
在文件 AnimationClipEditor.cpp 第 491 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::tracks().
◆ layoutWidth()
|
inlinenoexcept |
Layout width.
在文件 AnimationClipEditor.h 第 138 行定义.
◆ loadRuntimeClip()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::loadRuntimeClip | ( | const animation::AnimSkeleton & | skeleton, |
| const animation::AnimClip & | clip | ||
| ) |
Atomically replace the editor document from a real runtime skeleton and clip.
- 参数
-
skeleton Borrowed only for this call; the editor copies hierarchy metadata. clip Borrowed only for this call; all authored keys are copied.
- 返回
- Applied, or a structured rejection when the runtime inputs are invalid. @thread Owner thread only. @reentrancy Does not invoke scripts or callbacks.
◆ moveSelectedKey()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::moveSelectedKey | ( | double | time | ) |
◆ operator=()
|
delete |
◆ pause()
|
noexcept |
Pause.
在文件 AnimationClipEditor.cpp 第 429 行定义.
◆ play()
|
noexcept |
在文件 AnimationClipEditor.cpp 第 428 行定义.
◆ playhead()
|
inlinenoexcept |
Playhead.
在文件 AnimationClipEditor.h 第 136 行定义.
◆ playheadX()
|
noexcept |
Playhead x.
在文件 AnimationClipEditor.cpp 第 495 行定义.
◆ pointerDown()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::pointerDown | ( | float | x, |
| float | y | ||
| ) |
在文件 AnimationClipEditor.cpp 第 210 行定义.
引用了 best, bone, distance, dx, dy, seekX(), selectBone(), time, trackId, eve::animation_editing::AnimationClipDocumentTarget::tracks(), tracks, x , 以及 y.
◆ preview()
|
inlinenoexcept |
Preview.
在文件 AnimationClipEditor.h 第 223 行定义.
◆ primitiveB()
| float eve::animation_editor::AnimationClipEditor::primitiveB | ( | int | index | ) | const |
◆ primitiveCount()
| int eve::animation_editor::AnimationClipEditor::primitiveCount | ( | ) | const |
Primitive count.
在文件 AnimationClipEditor.cpp 第 573 行定义.
◆ primitiveDirX()
| float eve::animation_editor::AnimationClipEditor::primitiveDirX | ( | int | index | ) | const |
◆ primitiveDirY()
| float eve::animation_editor::AnimationClipEditor::primitiveDirY | ( | int | index | ) | const |
◆ primitiveG()
| float eve::animation_editor::AnimationClipEditor::primitiveG | ( | int | index | ) | const |
◆ primitiveKind()
| std::string eve::animation_editor::AnimationClipEditor::primitiveKind | ( | int | index | ) | const |
◆ primitiveLength()
| float eve::animation_editor::AnimationClipEditor::primitiveLength | ( | int | index | ) | const |
◆ primitiveR()
| float eve::animation_editor::AnimationClipEditor::primitiveR | ( | int | index | ) | const |
◆ primitiveRadius()
| float eve::animation_editor::AnimationClipEditor::primitiveRadius | ( | int | index | ) | const |
◆ primitiveX()
| float eve::animation_editor::AnimationClipEditor::primitiveX | ( | int | index | ) | const |
◆ primitiveY()
| float eve::animation_editor::AnimationClipEditor::primitiveY | ( | int | index | ) | const |
◆ redo()
| animation_editing::Result< editor::TransactionReceipt > eve::animation_editor::AnimationClipEditor::redo | ( | ) |
◆ revision()
|
inlinenoexcept |
Revision.
在文件 AnimationClipEditor.h 第 128 行定义.
◆ sampleRate()
|
inlinenoexcept |
◆ seekSeconds()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::seekSeconds | ( | double | seconds | ) |
在文件 AnimationClipEditor.cpp 第 194 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::duration() , 以及 duration().
被这些函数引用 seekX().
◆ seekX()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::seekX | ( | float | x | ) |
◆ selectBone()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::selectBone | ( | std::string | bone | ) |
◆ selectedBone()
|
inline |
Selected bone.
在文件 AnimationClipEditor.h 第 144 行定义.
◆ selectedKeyTime()
| double eve::animation_editor::AnimationClipEditor::selectedKeyTime | ( | ) | const |
Selected key time.
在文件 AnimationClipEditor.cpp 第 503 行定义.
引用了 key , 以及 eve::animation_editing::AnimationClipDocumentTarget::tracks().
◆ selectedMaskWeight()
| double eve::animation_editor::AnimationClipEditor::selectedMaskWeight | ( | ) | const |
Selected mask weight.
在文件 AnimationClipEditor.cpp 第 497 行定义.
◆ selectedPositionX()
| double eve::animation_editor::AnimationClipEditor::selectedPositionX | ( | ) | const |
Selected position x.
在文件 AnimationClipEditor.cpp 第 508 行定义.
引用了 eve::animation_editing::AnimationTransformKey::positionX.
◆ selectedPositionY()
| double eve::animation_editor::AnimationClipEditor::selectedPositionY | ( | ) | const |
Selected position y.
在文件 AnimationClipEditor.cpp 第 509 行定义.
引用了 eve::animation_editing::AnimationTransformKey::positionY.
◆ selectedPositionZ()
| double eve::animation_editor::AnimationClipEditor::selectedPositionZ | ( | ) | const |
Selected position z.
在文件 AnimationClipEditor.cpp 第 510 行定义.
引用了 eve::animation_editing::AnimationTransformKey::positionZ.
◆ selectedRotationX()
| double eve::animation_editor::AnimationClipEditor::selectedRotationX | ( | ) | const |
◆ selectedRotationY()
| double eve::animation_editor::AnimationClipEditor::selectedRotationY | ( | ) | const |
◆ selectedRotationZ()
| double eve::animation_editor::AnimationClipEditor::selectedRotationZ | ( | ) | const |
◆ selectedScaleX()
| double eve::animation_editor::AnimationClipEditor::selectedScaleX | ( | ) | const |
Selected scale x.
在文件 AnimationClipEditor.cpp 第 511 行定义.
◆ selectedScaleY()
| double eve::animation_editor::AnimationClipEditor::selectedScaleY | ( | ) | const |
Selected scale y.
在文件 AnimationClipEditor.cpp 第 512 行定义.
◆ selectedScaleZ()
| double eve::animation_editor::AnimationClipEditor::selectedScaleZ | ( | ) | const |
Selected scale z.
在文件 AnimationClipEditor.cpp 第 513 行定义.
◆ setDuration()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setDuration | ( | double | duration | ) |
Commit clip duration through the document transaction path.
- 参数
-
duration New duration in seconds; must be positive and finite.
在文件 AnimationClipEditor.cpp 第 255 行定义.
引用了 duration(), eve::animation_editing::AnimationClipDocumentTarget::isLooping(), eve::animation_editing::AnimationClipDocumentTarget::makeSetSettings() , 以及 eve::animation_editing::AnimationClipDocumentTarget::sampleRate().
◆ setLoop()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setLoop | ( | bool | loop | ) |
Commit looping through the document transaction path.
在文件 AnimationClipEditor.cpp 第 263 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::duration(), loop, eve::animation_editing::AnimationClipDocumentTarget::makeSetSettings() , 以及 eve::animation_editing::AnimationClipDocumentTarget::sampleRate().
◆ setMaskWeight()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setMaskWeight | ( | double | weight | ) |
◆ setSampleRate()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setSampleRate | ( | double | sampleRate | ) |
Commit authored sample rate through the document transaction path.
- 参数
-
sampleRate New sample rate; must be positive and finite.
在文件 AnimationClipEditor.cpp 第 259 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::duration(), eve::animation_editing::AnimationClipDocumentTarget::isLooping(), eve::animation_editing::AnimationClipDocumentTarget::makeSetSettings() , 以及 sampleRate().
◆ setSelectedPosition()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setSelectedPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
◆ setSelectedRotation()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setSelectedRotation | ( | double | xDegrees, |
| double | yDegrees, | ||
| double | zDegrees | ||
| ) |
◆ setSelectedScale()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setSelectedScale | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
◆ setViewport()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setViewport | ( | float | width, |
| float | rowHeight, | ||
| float | labelWidth | ||
| ) |
Configure dope-sheet pixel layout.
- 参数
-
width Timeline width in pixels. rowHeight Track row height. labelWidth Left bone-name column width.
在文件 AnimationClipEditor.cpp 第 182 行定义.
引用了 width.
◆ stop()
|
noexcept |
Stops .
在文件 AnimationClipEditor.cpp 第 430 行定义.
◆ target()
|
inlinenoexcept |
Borrow the authoritative clip document.
在文件 AnimationClipEditor.h 第 65 行定义.
◆ trackBone()
| std::string eve::animation_editor::AnimationClipEditor::trackBone | ( | int | index | ) | const |
Track bone.
在文件 AnimationClipEditor.cpp 第 523 行定义.
引用了 bone, index, eve::animation_editing::AnimationClipDocumentTarget::tracks() , 以及 tracks.
被这些函数引用 isTrackSelected().
◆ trackCount()
| int eve::animation_editor::AnimationClipEditor::trackCount | ( | ) | const |
Track count.
在文件 AnimationClipEditor.cpp 第 521 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::tracks().
◆ trackId()
| std::string eve::animation_editor::AnimationClipEditor::trackId | ( | int | index | ) | const |
Track id.
在文件 AnimationClipEditor.cpp 第 529 行定义.
引用了 index, eve::animation_editing::AnimationClipDocumentTarget::tracks(), tracks , 以及 value.
◆ undo()
| animation_editing::Result< editor::TransactionReceipt > eve::animation_editor::AnimationClipEditor::undo | ( | ) |
◆ update()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::update | ( | double | deltaSeconds | ) |
Advance playhead by injected dt and refresh pose/overlay.
在文件 AnimationClipEditor.cpp 第 435 行定义.
引用了 eve::animation_editing::AnimationClipDocumentTarget::duration(), duration() , 以及 eve::animation_editing::AnimationClipDocumentTarget::isLooping().
◆ writeRuntimeClip()
| animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::writeRuntimeClip | ( | animation::AnimClip & | clip, |
| const animation::AnimSkeleton & | skeleton | ||
| ) | const |
Replace a runtime clip with the current authoritative editor document.
- 参数
-
clip Runtime clip mutated atomically through AnimClip::adopt. skeleton Skeleton used to resolve authored bone names.
- 返回
- Applied, or a structured error; failure leaves
clipunchanged. @thread Owner thread only. @reentrancy Does not invoke scripts or callbacks.
该类的文档由以下文件生成:
- src/modules/animation/editor/AnimationClipEditor.h
- src/modules/animation/editor/AnimationClipEditor.cpp