本文整理汇总了C++中bl::Object::type方法的典型用法代码示例。如果您正苦于以下问题:C++ Object::type方法的具体用法?C++ Object::type怎么用?C++ Object::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bl::Object
的用法示例。
在下文中一共展示了Object::type方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: object_is_mesh
bool BlenderSync::object_is_mesh(BL::Object& b_ob)
{
BL::ID b_ob_data = b_ob.data();
if(!b_ob_data) {
return false;
}
if(b_ob.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 ||
b_curve.dimensions() == BL::Curve::dimensions_2D ||
b_ob.modifiers.length());
}
else {
return (b_ob_data.is_a(&RNA_Mesh) ||
b_ob_data.is_a(&RNA_Curve) ||
b_ob_data.is_a(&RNA_MetaBall));
}
}
示例2: BKE_object_is_modified
CCL_NAMESPACE_BEGIN
/* Utilities */
bool BlenderSync::BKE_object_is_modified(BL::Object& b_ob)
{
/* test if we can instance or if the object is modified */
if(b_ob.type() == BL::Object::type_META) {
/* multi-user and dupli metaballs are fused, can't instance */
return true;
}
else if(ccl::BKE_object_is_modified(b_ob, b_scene, preview)) {
/* modifiers */
return true;
}
else {
/* object level material links */
BL::Object::material_slots_iterator slot;
for(b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot)
if(slot->link() == BL::MaterialSlot::link_OBJECT)
return true;
}
return false;
}
示例3: object_render_hide
static bool object_render_hide(BL::Object b_ob, bool top_level, bool parent_hide, bool& hide_triangles)
{
/* check if we should render or hide particle emitter */
BL::Object::particle_systems_iterator b_psys;
bool hair_present = false;
bool show_emitter = false;
bool hide_emitter = false;
bool hide_as_dupli_parent = false;
bool hide_as_dupli_child_original = false;
for(b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
if((b_psys->settings().render_type() == BL::ParticleSettings::render_type_PATH) &&
(b_psys->settings().type()==BL::ParticleSettings::type_HAIR))
hair_present = true;
if(b_psys->settings().use_render_emitter())
show_emitter = true;
else
hide_emitter = true;
}
if(show_emitter)
hide_emitter = false;
/* duplicators hidden by default, except dupliframes which duplicate self */
if(b_ob.is_duplicator())
if(top_level || b_ob.dupli_type() != BL::Object::dupli_type_FRAMES)
hide_as_dupli_parent = true;
/* hide original object for duplis */
BL::Object parent = b_ob.parent();
if(parent && object_render_hide_original(b_ob.type(), parent.dupli_type()))
if(parent_hide)
hide_as_dupli_child_original = true;
hide_triangles = hide_emitter;
if(show_emitter) {
return false;
}
else if(hair_present) {
return hide_as_dupli_child_original;
}
else {
return (hide_as_dupli_parent || hide_as_dupli_child_original);
}
}
示例4: object_render_hide_duplis
static bool object_render_hide_duplis(BL::Object b_ob)
{
BL::Object parent = b_ob.parent();
return (parent && object_render_hide_original(b_ob.type(), parent.dupli_type()));
}