载入中...
搜索中...
未找到
eve::animation_editor::AnimationClipEditor类 参考

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]

eve::animation_editor::AnimationClipEditor::AnimationClipEditor ( std::string  targetId)
explicit

Construct a seeded two-bone preview clip.

在文件 AnimationClipEditor.cpp 第 41 行定义.

◆ AnimationClipEditor() [2/2]

eve::animation_editor::AnimationClipEditor::AnimationClipEditor ( const AnimationClipEditor &  )
delete

成员函数说明

◆ boneCount()

int eve::animation_editor::AnimationClipEditor::boneCount ( ) const
noexcept

Bone count.

在文件 AnimationClipEditor.cpp 第 517 行定义.

◆ boneName()

std::string eve::animation_editor::AnimationClipEditor::boneName ( int  index) const

Bone name.

在文件 AnimationClipEditor.cpp 第 518 行定义.

引用了 bones , 以及 index.

被这些函数引用 boneParent().

◆ boneParent()

std::string eve::animation_editor::AnimationClipEditor::boneParent ( int  index) const

Bone parent.

在文件 AnimationClipEditor.cpp 第 519 行定义.

引用了 boneName() , 以及 index.

◆ canRedo()

bool eve::animation_editor::AnimationClipEditor::canRedo ( ) const
inlinenoexcept

Can redo.

在文件 AnimationClipEditor.h 第 124 行定义.

◆ canUndo()

bool eve::animation_editor::AnimationClipEditor::canUndo ( ) const
inlinenoexcept

在文件 AnimationClipEditor.h 第 122 行定义.

◆ configureWorkspace()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::configureWorkspace ( editor::EditorWorkspace &  workspace) const

◆ deleteSelectedKey()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::deleteSelectedKey ( )

◆ duration()

double eve::animation_editor::AnimationClipEditor::duration ( ) const
inlinenoexcept

Duration.

在文件 AnimationClipEditor.h 第 130 行定义.

被这些函数引用 seekSeconds(), setDuration() , 以及 update().

◆ eventCount()

int eve::animation_editor::AnimationClipEditor::eventCount ( ) const

◆ eventName()

std::string eve::animation_editor::AnimationClipEditor::eventName ( int  index) const

◆ eventX()

float eve::animation_editor::AnimationClipEditor::eventX ( int  index) const

◆ hasSelectedKey()

bool eve::animation_editor::AnimationClipEditor::hasSelectedKey ( ) const
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()

bool eve::animation_editor::AnimationClipEditor::isLooping ( ) const
inlinenoexcept

True when looping.

在文件 AnimationClipEditor.h 第 134 行定义.

◆ isPlaying()

bool eve::animation_editor::AnimationClipEditor::isPlaying ( ) const
inlinenoexcept

True when playing.

在文件 AnimationClipEditor.h 第 126 行定义.

◆ isTrackSelected()

bool eve::animation_editor::AnimationClipEditor::isTrackSelected ( int  index) const

True when track selected.

在文件 AnimationClipEditor.cpp 第 535 行定义.

引用了 index , 以及 trackBone().

◆ 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

Key x.

在文件 AnimationClipEditor.cpp 第 539 行定义.

引用了 index , 以及 time.

◆ keyY()

float eve::animation_editor::AnimationClipEditor::keyY ( int  index) const

Key y.

在文件 AnimationClipEditor.cpp 第 545 行定义.

引用了 index.

◆ layoutHeight()

float eve::animation_editor::AnimationClipEditor::layoutHeight ( ) const
noexcept

◆ layoutWidth()

float eve::animation_editor::AnimationClipEditor::layoutWidth ( ) const
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.

参数
skeletonBorrowed only for this call; the editor copies hierarchy metadata.
clipBorrowed 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()

◆ operator=()

AnimationClipEditor & eve::animation_editor::AnimationClipEditor::operator= ( const AnimationClipEditor &  )
delete

◆ pause()

void eve::animation_editor::AnimationClipEditor::pause ( )
noexcept

Pause.

在文件 AnimationClipEditor.cpp 第 429 行定义.

◆ play()

void eve::animation_editor::AnimationClipEditor::play ( )
noexcept

在文件 AnimationClipEditor.cpp 第 428 行定义.

◆ playhead()

double eve::animation_editor::AnimationClipEditor::playhead ( ) const
inlinenoexcept

Playhead.

在文件 AnimationClipEditor.h 第 136 行定义.

◆ playheadX()

float eve::animation_editor::AnimationClipEditor::playheadX ( ) const
noexcept

Playhead x.

在文件 AnimationClipEditor.cpp 第 495 行定义.

◆ pointerDown()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::pointerDown ( float  x,
float  y 
)

◆ preview()

const animation_editing::AnimationClipPreview & eve::animation_editor::AnimationClipEditor::preview ( ) const
inlinenoexcept

Preview.

在文件 AnimationClipEditor.h 第 223 行定义.

◆ primitiveB()

float eve::animation_editor::AnimationClipEditor::primitiveB ( int  index) const

Primitive b.

在文件 AnimationClipEditor.cpp 第 620 行定义.

引用了 index.

◆ primitiveCount()

int eve::animation_editor::AnimationClipEditor::primitiveCount ( ) const

Primitive count.

在文件 AnimationClipEditor.cpp 第 573 行定义.

引用了 eve::editing::GizmoSnapshot::primitives.

◆ primitiveDirX()

float eve::animation_editor::AnimationClipEditor::primitiveDirX ( int  index) const

Primitive dir x.

在文件 AnimationClipEditor.cpp 第 590 行定义.

引用了 index.

◆ primitiveDirY()

float eve::animation_editor::AnimationClipEditor::primitiveDirY ( int  index) const

Primitive dir y.

在文件 AnimationClipEditor.cpp 第 595 行定义.

引用了 index.

◆ primitiveG()

float eve::animation_editor::AnimationClipEditor::primitiveG ( int  index) const

Primitive g.

在文件 AnimationClipEditor.cpp 第 615 行定义.

引用了 index.

◆ primitiveKind()

std::string eve::animation_editor::AnimationClipEditor::primitiveKind ( int  index) const

Primitive kind.

在文件 AnimationClipEditor.cpp 第 575 行定义.

引用了 index.

◆ primitiveLength()

float eve::animation_editor::AnimationClipEditor::primitiveLength ( int  index) const

Primitive length.

在文件 AnimationClipEditor.cpp 第 600 行定义.

引用了 index.

◆ primitiveR()

float eve::animation_editor::AnimationClipEditor::primitiveR ( int  index) const

Primitive r.

在文件 AnimationClipEditor.cpp 第 610 行定义.

引用了 index.

◆ primitiveRadius()

float eve::animation_editor::AnimationClipEditor::primitiveRadius ( int  index) const

Primitive radius.

在文件 AnimationClipEditor.cpp 第 605 行定义.

引用了 index.

◆ primitiveX()

float eve::animation_editor::AnimationClipEditor::primitiveX ( int  index) const

Primitive x.

在文件 AnimationClipEditor.cpp 第 580 行定义.

引用了 index.

◆ primitiveY()

float eve::animation_editor::AnimationClipEditor::primitiveY ( int  index) const

Primitive y.

在文件 AnimationClipEditor.cpp 第 585 行定义.

引用了 index.

◆ redo()

animation_editing::Result< editor::TransactionReceipt > eve::animation_editor::AnimationClipEditor::redo ( )

◆ revision()

std::uint64_t eve::animation_editor::AnimationClipEditor::revision ( ) const
inlinenoexcept

Revision.

在文件 AnimationClipEditor.h 第 128 行定义.

◆ sampleRate()

double eve::animation_editor::AnimationClipEditor::sampleRate ( ) const
inlinenoexcept

Sample rate.

在文件 AnimationClipEditor.h 第 132 行定义.

被这些函数引用 setSampleRate().

◆ 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)

在文件 AnimationClipEditor.cpp 第 203 行定义.

引用了 seekSeconds() , 以及 x.

被这些函数引用 pointerDown().

◆ selectBone()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::selectBone ( std::string  bone)

在文件 AnimationClipEditor.cpp 第 243 行定义.

引用了 bone.

被这些函数引用 pointerDown().

◆ selectedBone()

std::string eve::animation_editor::AnimationClipEditor::selectedBone ( ) const
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 行定义.

引用了 eve::animation_editing::AnimationClipPreview::bones.

◆ 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

Selected rotation x.

在文件 AnimationClipEditor.cpp 第 514 行定义.

引用了 q.

◆ selectedRotationY()

double eve::animation_editor::AnimationClipEditor::selectedRotationY ( ) const

Selected rotation y.

在文件 AnimationClipEditor.cpp 第 515 行定义.

引用了 q.

◆ selectedRotationZ()

double eve::animation_editor::AnimationClipEditor::selectedRotationZ ( ) const

Selected rotation z.

在文件 AnimationClipEditor.cpp 第 516 行定义.

引用了 q.

◆ selectedScaleX()

double eve::animation_editor::AnimationClipEditor::selectedScaleX ( ) const

Selected scale x.

在文件 AnimationClipEditor.cpp 第 511 行定义.

引用了 eve::animation_editing::AnimationTransformKey::scaleX.

◆ selectedScaleY()

double eve::animation_editor::AnimationClipEditor::selectedScaleY ( ) const

Selected scale y.

在文件 AnimationClipEditor.cpp 第 512 行定义.

引用了 eve::animation_editing::AnimationTransformKey::scaleY.

◆ selectedScaleZ()

double eve::animation_editor::AnimationClipEditor::selectedScaleZ ( ) const

Selected scale z.

在文件 AnimationClipEditor.cpp 第 513 行定义.

引用了 eve::animation_editing::AnimationTransformKey::scaleZ.

◆ setDuration()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setDuration ( double  duration)

Commit clip duration through the document transaction path.

参数
durationNew 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)

◆ 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.

参数
sampleRateNew 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 
)

Replace the selected bone position at the playhead and create a key when needed.

在文件 AnimationClipEditor.cpp 第 361 行定义.

引用了 value, x, y , 以及 z.

◆ setSelectedRotation()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setSelectedRotation ( double  xDegrees,
double  yDegrees,
double  zDegrees 
)

Replace the selected bone Euler rotation in degrees and create a key when needed.

在文件 AnimationClipEditor.cpp 第 368 行定义.

引用了 cx, cy, sx, sy, sz , 以及 value.

◆ setSelectedScale()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setSelectedScale ( double  x,
double  y,
double  z 
)

Replace the selected bone scale at the playhead and create a key when needed.

在文件 AnimationClipEditor.cpp 第 379 行定义.

引用了 value, x, y , 以及 z.

◆ setViewport()

animation_editing::Result< void > eve::animation_editor::AnimationClipEditor::setViewport ( float  width,
float  rowHeight,
float  labelWidth 
)

Configure dope-sheet pixel layout.

参数
widthTimeline width in pixels.
rowHeightTrack row height.
labelWidthLeft bone-name column width.

在文件 AnimationClipEditor.cpp 第 182 行定义.

引用了 width.

◆ stop()

void eve::animation_editor::AnimationClipEditor::stop ( )
noexcept

Stops .

在文件 AnimationClipEditor.cpp 第 430 行定义.

◆ target()

const animation_editing::AnimationClipDocumentTarget & eve::animation_editor::AnimationClipEditor::target ( ) const
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

◆ trackId()

std::string eve::animation_editor::AnimationClipEditor::trackId ( int  index) const

◆ 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.

参数
clipRuntime clip mutated atomically through AnimClip::adopt.
skeletonSkeleton used to resolve authored bone names.
返回
Applied, or a structured error; failure leaves clip unchanged. @thread Owner thread only. @reentrancy Does not invoke scripts or callbacks.

该类的文档由以下文件生成: