Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_object.cpp
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | else { | ||||
| for (b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot) | for (b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot) | ||||
| if (slot->link() == BL::MaterialSlot::link_OBJECT) | if (slot->link() == BL::MaterialSlot::link_OBJECT) | ||||
| return true; | return true; | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool BlenderSync::object_is_instancer(BL::Object &b_ob) | |||||
| { | |||||
| /* More detailed checks (instance_collection valid etc.) needed ? */ | |||||
| if (b_ob.is_instancer()) { | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| } | |||||
brecht: No need to have this as its own function or do more detailed checks. It's better to tag too… | |||||
| bool BlenderSync::object_is_geometry(BL::Object &b_ob) | bool BlenderSync::object_is_geometry(BL::Object &b_ob) | ||||
| { | { | ||||
| BL::ID b_ob_data = b_ob.data(); | BL::ID b_ob_data = b_ob.data(); | ||||
| if (!b_ob_data) { | if (!b_ob_data) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 445 Lines • Show Last 20 Lines | |||||
No need to have this as its own function or do more detailed checks. It's better to tag too much than to make this code more expensive.
Just use b_ob.is_instancer() in blender_sync.cpp.