|
Blender
V2.93
|
#include "../ABC_alembic.h"#include <Alembic/AbcMaterial/IMaterial.h>#include "abc_axis_conversion.h"#include "abc_reader_archive.h"#include "abc_reader_camera.h"#include "abc_reader_curves.h"#include "abc_reader_mesh.h"#include "abc_reader_nurbs.h"#include "abc_reader_points.h"#include "abc_reader_transform.h"#include "abc_util.h"#include "MEM_guardedalloc.h"#include "DNA_cachefile_types.h"#include "DNA_collection_types.h"#include "DNA_curve_types.h"#include "DNA_modifier_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_cachefile.h"#include "BKE_context.h"#include "BKE_curve.h"#include "BKE_global.h"#include "BKE_layer.h"#include "BKE_lib_id.h"#include "BKE_object.h"#include "BKE_scene.h"#include "BKE_screen.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_build.h"#include "ED_undo.h"#include "BLI_compiler_compat.h"#include "BLI_fileops.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_path_util.h"#include "BLI_string.h"#include "WM_api.h"#include "WM_types.h"Go to the source code of this file.
Classes | |
| struct | AbcArchiveHandle |
| struct | ImportJobData |
Enumerations | |
| enum | { ABC_NO_ERROR = 0 , ABC_ARCHIVE_FAIL } |
Functions | |
| BLI_INLINE ArchiveReader * | archive_from_handle (AbcArchiveHandle *handle) |
| BLI_INLINE AbcArchiveHandle * | handle_from_archive (ArchiveReader *archive) |
| static bool | gather_objects_paths (const IObject &object, ListBase *object_paths) |
| AbcArchiveHandle * | ABC_create_handle (struct Main *bmain, const char *filename, ListBase *object_paths) |
| void | ABC_free_handle (AbcArchiveHandle *handle) |
| int | ABC_get_version () |
| static void | find_iobject (const IObject &object, IObject &ret, const std::string &path) |
| static std::pair< bool, AbcObjectReader * > | visit_object (const IObject &object, AbcObjectReader::ptr_vector &readers, ImportSettings &settings, AbcObjectReader::ptr_vector &r_assign_as_parent) |
| static void | import_startjob (void *user_data, short *stop, short *do_update, float *progress) |
| static void | import_endjob (void *user_data) |
| static void | import_freejob (void *user_data) |
| bool | ABC_import (bContext *C, const char *filepath, float scale, bool is_sequence, bool set_frame_range, int sequence_len, int offset, bool validate_meshes, bool as_background_job) |
| void | ABC_get_transform (CacheReader *reader, float r_mat_world[4][4], float time, float scale) |
| static AbcObjectReader * | get_abc_reader (CacheReader *reader, Object *ob, const char **err_str) |
| static ISampleSelector | sample_selector_for_time (float time) |
| Mesh * | ABC_read_mesh (CacheReader *reader, Object *ob, Mesh *existing_mesh, const float time, const char **err_str, int read_flag) |
| bool | ABC_mesh_topology_changed (CacheReader *reader, Object *ob, Mesh *existing_mesh, const float time, const char **err_str) |
| void | CacheReader_free (CacheReader *reader) |
| void | CacheReader_incref (CacheReader *reader) |
| CacheReader * | CacheReader_open_alembic_object (AbcArchiveHandle *handle, CacheReader *reader, Object *object, const char *object_path) |
| static const PropertyHeader * | get_property_header (const IPolyMeshSchema &schema, const char *name) |
| bool | ABC_has_vec3_array_property_named (struct CacheReader *reader, const char *name) |
| static V3fArraySamplePtr | get_velocity_prop (const IPolyMeshSchema &schema, const ISampleSelector &iss, const std::string &name) |
| int | ABC_read_velocity_cache (CacheReader *reader, const char *velocity_name, const float time, float velocity_scale, int num_vertices, float *r_vertex_velocities) |
| anonymous enum |
| Enumerator | |
|---|---|
| ABC_NO_ERROR | |
| ABC_ARCHIVE_FAIL | |
Definition at line 413 of file alembic_capi.cc.
| AbcArchiveHandle* ABC_create_handle | ( | struct Main * | bmain, |
| const char * | filename, | ||
| ListBase * | object_paths | ||
| ) |
Definition at line 163 of file alembic_capi.cc.
References gather_objects_paths(), blender::io::alembic::ArchiveReader::getTop(), handle_from_archive(), and blender::io::alembic::ArchiveReader::valid().
Referenced by BKE_cachefile_eval().
| void ABC_free_handle | ( | AbcArchiveHandle * | handle | ) |
Definition at line 181 of file alembic_capi.cc.
References archive_from_handle().
Referenced by cachefile_handle_free().
| void ABC_get_transform | ( | CacheReader * | reader, |
| float | r_mat_world[4][4], | ||
| float | time, | ||
| float | scale | ||
| ) |
Definition at line 727 of file alembic_capi.cc.
References BKE_object_get_parent_matrix(), mul_m4_m4m4(), blender::io::alembic::AbcObjectReader::object(), Object::parent, Object::parentinv, blender::io::alembic::AbcObjectReader::read_matrix(), and time.
Referenced by transformcache_evaluate().
| int ABC_get_version | ( | void | ) |
Definition at line 186 of file alembic_capi.cc.
Referenced by make_alembic_info().
| bool ABC_has_vec3_array_property_named | ( | struct CacheReader * | reader, |
| const char * | name | ||
| ) |
Definition at line 884 of file alembic_capi.cc.
References get_property_header(), blender::io::alembic::AbcObjectReader::iobject(), and mesh.
| bool ABC_import | ( | bContext * | C, |
| const char * | filepath, | ||
| float | scale, | ||
| bool | is_sequence, | ||
| bool | set_frame_range, | ||
| int | sequence_len, | ||
| int | offset, | ||
| bool | validate_meshes, | ||
| bool | as_background_job | ||
| ) |
Definition at line 661 of file alembic_capi.cc.
References ABC_NO_ERROR, ImportJobData::archive, BLI_strncpy(), ImportJobData::bmain, C, ImportJobData::C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), CTX_wm_window(), ImportJobData::error_code, ImportJobData::filename, G, import_endjob(), import_freejob(), ImportJobData::import_ok, import_startjob(), ImportJobData::is_background_job, blender::io::alembic::ImportSettings::is_sequence, NC_SCENE, ND_FRAME, blender::io::alembic::ImportSettings::scale, ImportJobData::scene, blender::io::alembic::ImportSettings::sequence_len, blender::io::alembic::ImportSettings::sequence_offset, blender::io::alembic::ImportSettings::set_frame_range, ImportJobData::settings, blender::io::alembic::ImportSettings::validate_meshes, ImportJobData::view_layer, ImportJobData::was_cancelled, ImportJobData::wm, WM_JOB_PROGRESS, WM_JOB_TYPE_ALEMBIC, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), and WM_jobs_timer().
| bool ABC_mesh_topology_changed | ( | CacheReader * | reader, |
| Object * | ob, | ||
| Mesh * | existing_mesh, | ||
| const float | time, | ||
| const char ** | err_str | ||
| ) |
Definition at line 801 of file alembic_capi.cc.
References get_abc_reader(), sample_selector_for_time(), time, and blender::io::alembic::AbcObjectReader::topology_changed().
Referenced by modifyMesh().
| Mesh* ABC_read_mesh | ( | CacheReader * | reader, |
| Object * | ob, | ||
| Mesh * | existing_mesh, | ||
| const float | time, | ||
| const char ** | err_str, | ||
| int | read_flag | ||
| ) |
Definition at line 785 of file alembic_capi.cc.
References get_abc_reader(), blender::io::alembic::AbcObjectReader::read_mesh(), sample_selector_for_time(), and time.
Referenced by modifyMesh().
| int ABC_read_velocity_cache | ( | CacheReader * | reader, |
| const char * | velocity_name, | ||
| const float | time, | ||
| float | velocity_scale, | ||
| int | num_vertices, | ||
| float * | r_vertex_velocities | ||
| ) |
Definition at line 942 of file alembic_capi.cc.
References copy_v3_v3(), blender::io::alembic::copy_zup_from_yup(), get_velocity_prop(), blender::io::alembic::AbcObjectReader::iobject(), mesh, mul_v3_fl(), blender::compositor::sample(), and time.
| BLI_INLINE ArchiveReader* archive_from_handle | ( | AbcArchiveHandle * | handle | ) |
Definition at line 96 of file alembic_capi.cc.
Referenced by ABC_free_handle(), and CacheReader_open_alembic_object().
| void CacheReader_free | ( | CacheReader * | reader | ) |
Definition at line 815 of file alembic_capi.cc.
References blender::io::alembic::AbcObjectReader::decref(), and blender::io::alembic::AbcObjectReader::refcount().
Referenced by BKE_cachefile_reader_free(), cachefile_handle_free(), and CacheReader_open_alembic_object().
| void CacheReader_incref | ( | CacheReader * | reader | ) |
Definition at line 825 of file alembic_capi.cc.
References blender::io::alembic::AbcObjectReader::incref().
| CacheReader* CacheReader_open_alembic_object | ( | AbcArchiveHandle * | handle, |
| CacheReader * | reader, | ||
| Object * | object, | ||
| const char * | object_path | ||
| ) |
Definition at line 831 of file alembic_capi.cc.
References archive_from_handle(), CacheReader_free(), blender::io::alembic::create_reader(), find_iobject(), blender::io::alembic::ArchiveReader::getTop(), blender::io::alembic::AbcObjectReader::incref(), blender::io::alembic::AbcObjectReader::object(), and blender::io::alembic::ArchiveReader::valid().
Referenced by BKE_cachefile_reader_open().
|
static |
Definition at line 191 of file alembic_capi.cc.
References ret, and blender::io::alembic::split().
Referenced by CacheReader_open_alembic_object().
|
static |
Definition at line 110 of file alembic_capi.cc.
References BLI_addtail(), BLI_strncpy(), getParent(), blender::io::alembic::has_property(), MEM_callocN, and AlembicObjectPath::path.
Referenced by ABC_create_handle().
|
static |
Definition at line 759 of file alembic_capi.cc.
References blender::io::alembic::AbcObjectReader::accepts_object_type(), and blender::io::alembic::AbcObjectReader::iobject().
Referenced by ABC_mesh_topology_changed(), and ABC_read_mesh().
|
static |
Definition at line 867 of file alembic_capi.cc.
References blender::io::alembic::has_property().
Referenced by ABC_has_vec3_array_property_named().
|
static |
Definition at line 916 of file alembic_capi.cc.
References blender::io::alembic::has_property().
Referenced by ABC_read_velocity_cache().
| BLI_INLINE AbcArchiveHandle* handle_from_archive | ( | ArchiveReader * | archive | ) |
Definition at line 101 of file alembic_capi.cc.
Referenced by ABC_create_handle().
|
static |
Definition at line 572 of file alembic_capi.cc.
References ABC_ARCHIVE_FAIL, ABC_NO_ERROR, BKE_collection_object_add(), BKE_id_free_us(), BKE_layer_collection_get_active(), BKE_view_layer_base_deselect_all(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), LayerCollection::collection, data, blender::io::alembic::AbcObjectReader::decref(), DEG_id_tag_update(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), ED_undo_push(), Collection::id, Object::id, ID_RECALC_ANIMATION, ID_RECALC_BASE_FLAGS, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, NC_SCENE, ND_FRAME, blender::io::alembic::AbcObjectReader::refcount(), RPT_ERROR, SCOPE_TIMER, user_data, WM_main_add_notifier(), WM_report(), and WM_set_locked_interface().
Referenced by ABC_import().
|
static |
Definition at line 654 of file alembic_capi.cc.
References data, and user_data.
Referenced by ABC_import().
|
static |
Definition at line 441 of file alembic_capi.cc.
References ABC_ARCHIVE_FAIL, BKE_cachefile_add(), BLI_assert, BLI_path_basename(), CFRA, data, EFRA, CacheFile::filepath, FPS, G, blender::io::alembic::ArchiveReader::getTop(), CacheFile::id, id_us_min(), blender::io::alembic::AbcObjectReader::inherits_xform(), CacheFile::is_sequence, max, blender::io::alembic::AbcObjectReader::maxTime(), min, blender::io::alembic::AbcObjectReader::minTime(), blender::io::alembic::AbcObjectReader::name(), blender::io::alembic::AbcObjectReader::object(), Object::parent, blender::io::alembic::AbcObjectReader::parent_reader, blender::io::alembic::AbcObjectReader::readObjectData(), CacheFile::scale, scene, SCOPE_TIMER, blender::io::alembic::AbcObjectReader::setupObjectTransform(), SFRA, size(), STRNCPY, user_data, blender::io::alembic::ArchiveReader::valid(), blender::io::alembic::AbcObjectReader::valid(), visit_object(), and WM_set_locked_interface().
Referenced by ABC_import().
|
static |
Definition at line 778 of file alembic_capi.cc.
References time.
Referenced by ABC_mesh_topology_changed(), and ABC_read_mesh().
|
static |
Generates an AbcObjectReader for this Alembic object and its children.
| object | The Alembic IObject to visit. |
| readers | The created AbcObjectReader * will be appended to this vector. |
| settings | Import settings, not used directly but passed to the AbcObjectReader subclass constructors. |
| r_assign_as_parent | Return parameter, contains a list of reader pointers, whose parent pointer should still be set. This is filled when this call to visit_object() didn't create a reader that should be the parent. |
NOTE: this function is similar to gather_object_paths above, need to keep them in sync.
Definition at line 233 of file alembic_capi.cc.
References BLI_addtail(), BLI_assert, BLI_strncpy(), blender::io::alembic::ImportSettings::cache_file, getParent(), blender::io::alembic::has_property(), blender::io::alembic::AbcObjectReader::incref(), MEM_callocN, CacheFile::object_paths, blender::io::alembic::AbcObjectReader::parent_reader, and AlembicObjectPath::path.
Referenced by import_startjob().