You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Use range iterators for Map
This commit is contained in:
@@ -98,9 +98,9 @@ void FBXSkeleton::init_skeleton(const ImportState &state) {
|
||||
|
||||
ERR_FAIL_COND_MSG(skeleton->get_bone_count() != bone_count, "Not all bones got added, is the file corrupted?");
|
||||
|
||||
for (Map<int, Ref<FBXBone>>::Element *bone_element = bone_map.front(); bone_element; bone_element = bone_element->next()) {
|
||||
const Ref<FBXBone> bone = bone_element->value();
|
||||
int bone_index = bone_element->key();
|
||||
for (const KeyValue<int, Ref<FBXBone>> &bone_element : bone_map) {
|
||||
const Ref<FBXBone> bone = bone_element.value;
|
||||
int bone_index = bone_element.key;
|
||||
print_verbose("working on bone: " + itos(bone_index) + " bone name:" + bone->bone_name);
|
||||
|
||||
skeleton->set_bone_rest(bone->godot_bone_id, get_unscaled_transform(bone->node->pivot_transform->LocalTransform, state.scale));
|
||||
|
||||
Reference in New Issue
Block a user