Changeset View
Changeset View
Standalone View
Standalone View
source/blender/alembic/intern/abc_exporter.cc
| Show All 36 Lines | |||||
| #include "DNA_camera_types.h" | #include "DNA_camera_types.h" | ||||
| #include "DNA_curve_types.h" | #include "DNA_curve_types.h" | ||||
| #include "DNA_meta_types.h" | #include "DNA_meta_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_space_types.h" /* for FILE_MAX */ | #include "DNA_space_types.h" /* for FILE_MAX */ | ||||
| #include "DNA_fluid_types.h" | |||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #ifdef WIN32 | #ifdef WIN32 | ||||
| /* needed for MSCV because of snprintf from BLI_string */ | /* needed for MSCV because of snprintf from BLI_string */ | ||||
| # include "BLI_winstuff.h" | # include "BLI_winstuff.h" | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | : scene(NULL), | ||||
| quad_method(0), | quad_method(0), | ||||
| ngon_method(0), | ngon_method(0), | ||||
| do_convert_axis(false) | do_convert_axis(false) | ||||
| { | { | ||||
| } | } | ||||
| static bool object_is_smoke_sim(Object *ob) | static bool object_is_smoke_sim(Object *ob) | ||||
| { | { | ||||
| ModifierData *md = modifiers_findByType(ob, eModifierType_Smoke); | ModifierData *md = modifiers_findByType(ob, eModifierType_Fluid); | ||||
| if (md) { | if (md) { | ||||
| SmokeModifierData *smd = reinterpret_cast<SmokeModifierData *>(md); | FluidModifierData *smd = reinterpret_cast<FluidModifierData *>(md); | ||||
| return (smd->type == MOD_SMOKE_TYPE_DOMAIN); | return (smd->type == MOD_FLUID_TYPE_DOMAIN && smd->domain && | ||||
| smd->domain->type == FLUID_DOMAIN_TYPE_GAS); | |||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| static bool object_type_is_exportable(Scene *scene, Object *ob) | static bool object_type_is_exportable(Scene *scene, Object *ob) | ||||
| { | { | ||||
| switch (ob->type) { | switch (ob->type) { | ||||
| ▲ Show 20 Lines • Show All 427 Lines • ▼ Show 20 Lines | for (; psys; psys = psys->next) { | ||||
| if (!psys_check_enabled(ob, psys, G.is_rendering) || !psys->part) { | if (!psys_check_enabled(ob, psys, G.is_rendering) || !psys->part) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| if (m_settings.export_hair && psys->part->type == PART_HAIR) { | if (m_settings.export_hair && psys->part->type == PART_HAIR) { | ||||
| m_settings.export_child_hairs = true; | m_settings.export_child_hairs = true; | ||||
| m_shapes.push_back(new AbcHairWriter(ob, xform, m_shape_sampling_index, m_settings, psys)); | m_shapes.push_back(new AbcHairWriter(ob, xform, m_shape_sampling_index, m_settings, psys)); | ||||
| } | } | ||||
| else if (m_settings.export_particles && psys->part->type == PART_EMITTER) { | else if (m_settings.export_particles && | ||||
| (psys->part->type & PART_EMITTER || psys->part->type & PART_FLUID_FLIP || | |||||
| psys->part->type & PART_FLUID_SPRAY || psys->part->type & PART_FLUID_BUBBLE || | |||||
| psys->part->type & PART_FLUID_FOAM || psys->part->type & PART_FLUID_TRACER)) { | |||||
| m_shapes.push_back(new AbcPointsWriter(ob, xform, m_shape_sampling_index, m_settings, psys)); | m_shapes.push_back(new AbcPointsWriter(ob, xform, m_shape_sampling_index, m_settings, psys)); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) | void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) | ||||
| { | { | ||||
| if (!object_type_is_exportable(m_settings.scene, ob)) { | if (!object_type_is_exportable(m_settings.scene, ob)) { | ||||
| ▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines | |||||