mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +00:00
add 'vec3model.modelname' notation support to skeletons
This commit is contained in:
parent
0c9fb987a1
commit
87ba344401
1 changed files with 5 additions and 1 deletions
|
|
@ -228,7 +228,11 @@ void AssetsLoader::addDefaults(AssetsLoader& loader, const Content* content) {
|
||||||
for (auto& entry : content->getSkeletons()) {
|
for (auto& entry : content->getSkeletons()) {
|
||||||
auto& skeleton = *entry.second;
|
auto& skeleton = *entry.second;
|
||||||
for (auto& bone : skeleton.getBones()) {
|
for (auto& bone : skeleton.getBones()) {
|
||||||
auto& model = bone->model.name;
|
std::string model = bone->model.name;
|
||||||
|
size_t pos = model.rfind('.');
|
||||||
|
if (pos != std::string::npos) {
|
||||||
|
model = model.substr(0, pos);
|
||||||
|
}
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
loader.add(
|
loader.add(
|
||||||
AssetType::MODEL, MODELS_FOLDER + "/" + model, model
|
AssetType::MODEL, MODELS_FOLDER + "/" + model, model
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue