diff options
author | Jacques Lucke <jacques@blender.org> | 2021-01-25 18:20:10 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-01-25 18:25:27 +0300 |
commit | 8a77019474c1a4d05fb74bb86031ff75c116f751 (patch) | |
tree | eadbdb78821f1aedb8d2829d583243dd1114bc4f /intern/cycles/blender/blender_geometry.cpp | |
parent | 04f91bce53bd50fc492130ada8869f97ae205f9a (diff) |
Cycles: modernize usage of rna iterators
Using rna iterators in range-based for loops is possible since {rBc4286ddb095d32714c9d5f10751a14f5871b3844}.
This patch only updates the places that are easy to update
without more changes in surrounding code.
Differential Revision: https://developer.blender.org/D10195
Diffstat (limited to 'intern/cycles/blender/blender_geometry.cpp')
-rw-r--r-- | intern/cycles/blender/blender_geometry.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_geometry.cpp b/intern/cycles/blender/blender_geometry.cpp index 53557e0fe38..a009018f357 100644 --- a/intern/cycles/blender/blender_geometry.cpp +++ b/intern/cycles/blender/blender_geometry.cpp @@ -50,13 +50,12 @@ array<Node *> BlenderSync::find_used_shaders(BL::Object &b_ob) array<Node *> used_shaders; - BL::Object::material_slots_iterator slot; - for (b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot) { + for (BL::MaterialSlot &b_slot : b_ob.material_slots) { if (material_override) { find_shader(material_override, used_shaders, default_shader); } else { - BL::ID b_material(slot->material()); + BL::ID b_material(b_slot.material()); find_shader(b_material, used_shaders, default_shader); } } |