diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index 9bb008ec69..f6db2f1ae1 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -439,21 +439,6 @@ ActionTimeline* ActionTimelineCache::loadAnimationActionWithFlatBuffersFile(cons float speed = nodeAction->speed(); action->setTimeSpeed(speed); - auto animationList = nodeAction->animationList(); - if(animationList) - { - auto animationLength = animationList->size(); - for (int i = 0; i < animationLength; i++) - { - auto animationFlatBuf = animationList->Get(i); - ActionIndexes indexes; - indexes.startIndex = animationFlatBuf->startIndex(); - indexes.endIndex = animationFlatBuf->endIndex(); - indexes.name = animationFlatBuf->name()->c_str(); - - action->addIndexes(indexes); - } - } auto timelines = nodeAction->timeLines(); int timelineLength = timelines->size(); diff --git a/cocos/editor-support/cocostudio/CSParseBinary_generated.h b/cocos/editor-support/cocostudio/CSParseBinary_generated.h index 703d981c45..d4360f64a0 100644 --- a/cocos/editor-support/cocostudio/CSParseBinary_generated.h +++ b/cocos/editor-support/cocostudio/CSParseBinary_generated.h @@ -1686,97 +1686,44 @@ inline flatbuffers::Offset CreateComAudioOptions(flatbuffers::F return builder_.Finish(); } - -struct AnimationInfo : private flatbuffers::Table { - const flatbuffers::String *name() const { return GetPointer(4); } - int32_t startIndex() const { return GetField(6, 0); } - int32_t endIndex() const { return GetField(8, 0); } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, 4 /* name */) && - verifier.Verify(name()) && - VerifyField(verifier, 6 /* startIndex */) && - VerifyField(verifier, 8 /* endIndex */) && - verifier.EndTable(); - } -}; - -struct AnimationInfoBuilder { - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) { fbb_.AddOffset(4, name); } - void add_startIndex(int32_t startIndex) { fbb_.AddElement(6, startIndex, 0); } - void add_endIndex(int32_t endIndex) { fbb_.AddElement(8, endIndex, 0); } - AnimationInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } - AnimationInfoBuilder &operator=(const AnimationInfoBuilder &); - flatbuffers::Offset Finish() { - auto o = flatbuffers::Offset(fbb_.EndTable(start_, 3)); - return o; - } -}; - -inline flatbuffers::Offset CreateAnimationInfo(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, - int32_t startIndex = 0, - int32_t endIndex = 0) { - AnimationInfoBuilder builder_(_fbb); - builder_.add_endIndex(endIndex); - builder_.add_startIndex(startIndex); - builder_.add_name(name); - return builder_.Finish(); -} - struct NodeAction : private flatbuffers::Table { - int32_t duration() const { return GetField(4, 0); } - float speed() const { return GetField(6, 0); } - const flatbuffers::Vector> *timeLines() const { return GetPointer> *>(8); } - const flatbuffers::Vector> *animationList() const { return GetPointer> *>(10); } - const flatbuffers::String *currentAnimationName() const { return GetPointer(12); } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, 4 /* duration */) && - VerifyField(verifier, 6 /* speed */) && - VerifyField(verifier, 8 /* timeLines */) && - verifier.Verify(timeLines()) && - verifier.VerifyVectorOfTables(timeLines()) && - VerifyField(verifier, 10 /* animationList */) && - verifier.Verify(animationList()) && - verifier.VerifyVectorOfTables(animationList()) && - VerifyField(verifier, 12 /* currentAnimationName */) && - verifier.Verify(currentAnimationName()) && - verifier.EndTable(); - } + int32_t duration() const { return GetField(4, 0); } + float speed() const { return GetField(6, 0); } + const flatbuffers::Vector> *timeLines() const { return GetPointer> *>(8); } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, 4 /* duration */) && + VerifyField(verifier, 6 /* speed */) && + VerifyField(verifier, 8 /* timeLines */) && + verifier.Verify(timeLines()) && + verifier.VerifyVectorOfTables(timeLines()) && + verifier.EndTable(); + } }; struct NodeActionBuilder { - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_duration(int32_t duration) { fbb_.AddElement(4, duration, 0); } - void add_speed(float speed) { fbb_.AddElement(6, speed, 0); } - void add_timeLines(flatbuffers::Offset>> timeLines) { fbb_.AddOffset(8, timeLines); } - void add_animationList(flatbuffers::Offset>> animationList) { fbb_.AddOffset(10, animationList); } - void add_currentAnimationName(flatbuffers::Offset currentAnimationName) { fbb_.AddOffset(12, currentAnimationName); } - NodeActionBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } - NodeActionBuilder &operator=(const NodeActionBuilder &); - flatbuffers::Offset Finish() { - auto o = flatbuffers::Offset(fbb_.EndTable(start_, 5)); - return o; - } + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_duration(int32_t duration) { fbb_.AddElement(4, duration, 0); } + void add_speed(float speed) { fbb_.AddElement(6, speed, 0); } + void add_timeLines(flatbuffers::Offset>> timeLines) { fbb_.AddOffset(8, timeLines); } + NodeActionBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } + NodeActionBuilder &operator=(const NodeActionBuilder &); + flatbuffers::Offset Finish() { + auto o = flatbuffers::Offset(fbb_.EndTable(start_, 3)); + return o; + } }; inline flatbuffers::Offset CreateNodeAction(flatbuffers::FlatBufferBuilder &_fbb, - int32_t duration = 0, - float speed = 0, - flatbuffers::Offset>> timeLines = 0, - flatbuffers::Offset>> animationList = 0, - flatbuffers::Offset currentAnimationName = 0) { - NodeActionBuilder builder_(_fbb); - builder_.add_currentAnimationName(currentAnimationName); - builder_.add_animationList(animationList); - builder_.add_timeLines(timeLines); - builder_.add_speed(speed); - builder_.add_duration(duration); - return builder_.Finish(); + int32_t duration = 0, + float speed = 0, + flatbuffers::Offset>> timeLines = 0) { + NodeActionBuilder builder_(_fbb); + builder_.add_timeLines(timeLines); + builder_.add_speed(speed); + builder_.add_duration(duration); + return builder_.Finish(); } struct TimeLine : private flatbuffers::Table {