add 'vec3model.modelname' notation support to skeletons
This commit is contained in:
parent
0c9fb987a1
commit
87ba344401
@ -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…
x
Reference in New Issue
Block a user