Added extra field in animation clip container for time multiplier #427

Merged
XiaoQiDigipen merged 3 commits from SP3-22-AnimationController into main 2023-03-14 16:50:24 +08:00
6 changed files with 6 additions and 6 deletions
Showing only changes of commit 3ca463aa21 - Show all commits

View File

@ -180,8 +180,8 @@ namespace Sandbox
// Link up SHDebugDraw
SHDebugDraw::Init(SHSystemManager::GetSystem<SHDebugDrawSystem>());
auto clip = SHResourceManager::LoadOrGet<SHRawAnimation>(77816045);
auto rig = SHResourceManager::LoadOrGet<SHRig>(77816045);
//auto clip = SHResourceManager::LoadOrGet<SHRawAnimation>(77816045);
//auto rig = SHResourceManager::LoadOrGet<SHRig>(77816045);
}
void SBApplication::Update(void)

View File

@ -25,8 +25,8 @@ namespace SHADE
std::string name;
uint32_t firstIndex;
uint32_t lastIndex;
AssetID animRawDataAssetId; // Not serialised, only populated during runtime from parent asset
float playbackMultiplier = 1.0f;
AssetID animRawDataAssetId; // Not serialised, only populated during runtime from parent asset
};
struct SH_API SHAnimClipContainerAsset final : SHAssetData

View File

@ -79,7 +79,7 @@ namespace SHADE
file.write(
reinterpret_cast<char const*>(&clip->firstIndex),
sizeof(uint32_t) * 2
sizeof(uint32_t) * 3
);
}
}
@ -118,7 +118,7 @@ namespace SHADE
file.read(
reinterpret_cast<char*>(&clip->firstIndex),
sizeof(uint32_t) * 2
sizeof(uint32_t) * 3
);
clip->animRawDataAssetId = data->animRawDataAssetId;

View File

@ -313,7 +313,7 @@ namespace SHADE
.isSubAsset = true,
.parent = parent
};
auto& newClip {animContainer->clips.emplace_back()};
auto& newClip {animContainer->clips.emplace_back(new SHAnimClipAsset())};
newClip->name = name;
assetCollection.emplace(id, asset);
assetCollection[parent].subAssets.push_back(&assetCollection[id]);