mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge branch 'animation' of https://github.com/MihailRis/voxelcore into animation
This commit is contained in:
commit
2ea77355f2
1 changed files with 12 additions and 2 deletions
|
|
@ -88,12 +88,22 @@ void Skeleton::deserialize(const dv::value& root) {
|
|||
|
||||
void Skeleton::setConfig(std::shared_ptr<const SkeletonConfig> rigConfig) {
|
||||
config = std::move(rigConfig);
|
||||
|
||||
const auto& bones = config->getBones();
|
||||
|
||||
pose.matrices.resize(
|
||||
config->getBones().size(), glm::mat4(1.0f)
|
||||
bones.size(), glm::mat4(1.0f)
|
||||
);
|
||||
calculated.matrices.resize(
|
||||
config->getBones().size(), glm::mat4(1.0f)
|
||||
bones.size(), glm::mat4(1.0f)
|
||||
);
|
||||
|
||||
modelOverrides.resize(bones.size());
|
||||
flags.resize(bones.size());
|
||||
|
||||
for (size_t i = 0; i < bones.size(); i++) {
|
||||
flags[i].visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void get_all_nodes(std::vector<Bone*>& nodes, Bone* node) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue