Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/object.cpp
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | bool BlenderSync::object_is_geometry(BL::Object &b_ob) | ||||
| } | } | ||||
| BL::Object::type_enum type = b_ob.type(); | BL::Object::type_enum type = b_ob.type(); | ||||
| if (type == BL::Object::type_VOLUME || type == BL::Object::type_HAIR) { | if (type == BL::Object::type_VOLUME || type == BL::Object::type_HAIR) { | ||||
| /* Will be exported attached to mesh. */ | /* Will be exported attached to mesh. */ | ||||
| return true; | return true; | ||||
| } | } | ||||
| else if (type == BL::Object::type_CURVE) { | |||||
| /* Skip exporting curves without faces, overhead can be | |||||
| * significant if there are many for path animation. */ | |||||
| BL::Curve b_curve(b_ob_data); | |||||
| return (b_curve.bevel_object() || b_curve.extrude() != 0.0f || b_curve.bevel_depth() != 0.0f || | /* Other object types that are not meshes but evaluate to meshes are presented to render engines | ||||
| b_curve.dimensions() == BL::Curve::dimensions_2D || b_ob.modifiers.length()); | * as separate instance objects. Metaballs and surface objects have not been affected by that | ||||
| } | * change yet. */ | ||||
| else { | if (type == BL::Object::type_SURFACE || type == BL::Object::type_META) { | ||||
| return (b_ob_data.is_a(&RNA_Mesh) || b_ob_data.is_a(&RNA_Curve) || | return true; | ||||
| b_ob_data.is_a(&RNA_MetaBall)); | |||||
| } | } | ||||
| return b_ob_data.is_a(&RNA_Mesh); | |||||
| } | } | ||||
| bool BlenderSync::object_is_light(BL::Object &b_ob) | bool BlenderSync::object_is_light(BL::Object &b_ob) | ||||
| { | { | ||||
| BL::ID b_ob_data = b_ob.data(); | BL::ID b_ob_data = b_ob.data(); | ||||
| return (b_ob_data && b_ob_data.is_a(&RNA_Light)); | return (b_ob_data && b_ob_data.is_a(&RNA_Light)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 677 Lines • Show Last 20 Lines | |||||