Blender  V3.3
ABC_alembic.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #pragma once
3 
8 #include "DEG_depsgraph.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 struct CacheArchiveHandle;
15 struct CacheFileLayer;
16 struct CacheReader;
17 struct ListBase;
18 struct Main;
19 struct Mesh;
20 struct Object;
21 struct Scene;
22 struct bContext;
23 
24 int ABC_get_version(void);
25 
27  double frame_start;
28  double frame_end;
29 
30  unsigned int frame_samples_xform;
31  unsigned int frame_samples_shape;
32 
33  double shutter_open;
34  double shutter_close;
35 
37  bool uvs;
38  bool normals;
39  bool vcolors;
40  bool orcos;
45  bool face_sets;
47  bool packuv;
54 
55  /* See MOD_TRIANGULATE_NGON_xxx and MOD_TRIANGULATE_QUAD_xxx
56  * in DNA_modifier_types.h */
59 
60  float global_scale;
61 };
62 
63 /* The ABC_export and ABC_import functions both take a as_background_job
64  * parameter, and return a boolean.
65  *
66  * When as_background_job=true, returns false immediately after scheduling
67  * a background job.
68  *
69  * When as_background_job=false, performs the export synchronously, and returns
70  * true when the export was ok, and false if there were any errors.
71  */
72 
73 bool ABC_export(struct Scene *scene,
74  struct bContext *C,
75  const char *filepath,
76  const struct AlembicExportParams *params,
77  bool as_background_job);
78 
79 bool ABC_import(struct bContext *C,
80  const char *filepath,
81  float scale,
82  bool is_sequence,
83  bool set_frame_range,
84  int sequence_len,
85  int offset,
86  bool validate_meshes,
87  bool always_add_cache_reader,
88  bool as_background_job);
89 
91  const char *filename,
92  const struct CacheFileLayer *layers,
93  struct ListBase *object_paths);
94 
95 void ABC_free_handle(struct CacheArchiveHandle *handle);
96 
97 void ABC_get_transform(struct CacheReader *reader,
98  float r_mat_world[4][4],
99  double time,
100  float scale);
101 
102 typedef struct ABCReadParams {
103  double time;
105  const char *velocity_name;
108 
109 /* Either modifies existing_mesh in-place or constructs a new mesh. */
110 struct Mesh *ABC_read_mesh(struct CacheReader *reader,
111  struct Object *ob,
112  struct Mesh *existing_mesh,
113  const ABCReadParams *params,
114  const char **err_str);
115 
117  struct Object *ob,
118  const struct Mesh *existing_mesh,
119  double time,
120  const char **err_str);
121 
122 void ABC_CacheReader_incref(struct CacheReader *reader);
123 void ABC_CacheReader_free(struct CacheReader *reader);
124 
126  struct CacheReader *reader,
127  struct Object *object,
128  const char *object_path);
129 
130 #ifdef __cplusplus
131 }
132 #endif
struct ABCReadParams ABCReadParams
bool ABC_import(struct bContext *C, const char *filepath, float scale, bool is_sequence, bool set_frame_range, int sequence_len, int offset, bool validate_meshes, bool always_add_cache_reader, bool as_background_job)
struct CacheArchiveHandle * ABC_create_handle(struct Main *bmain, const char *filename, const struct CacheFileLayer *layers, struct ListBase *object_paths)
struct CacheReader * CacheReader_open_alembic_object(struct CacheArchiveHandle *handle, struct CacheReader *reader, struct Object *object, const char *object_path)
int ABC_get_version(void)
struct Mesh * ABC_read_mesh(struct CacheReader *reader, struct Object *ob, struct Mesh *existing_mesh, const ABCReadParams *params, const char **err_str)
void ABC_CacheReader_free(struct CacheReader *reader)
void ABC_get_transform(struct CacheReader *reader, float r_mat_world[4][4], double time, float scale)
bool ABC_mesh_topology_changed(struct CacheReader *reader, struct Object *ob, const struct Mesh *existing_mesh, double time, const char **err_str)
void ABC_free_handle(struct CacheArchiveHandle *handle)
bool ABC_export(struct Scene *scene, struct bContext *C, const char *filepath, const struct AlembicExportParams *params, bool as_background_job)
void ABC_CacheReader_incref(struct CacheReader *reader)
eEvaluationMode
Definition: DEG_depsgraph.h:44
#define C
Definition: RandGen.cpp:25
double time
Scene scene
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
float velocity_scale
Definition: ABC_alembic.h:106
const char * velocity_name
Definition: ABC_alembic.h:105
enum eEvaluationMode evaluation_mode
Definition: ABC_alembic.h:53
unsigned int frame_samples_xform
Definition: ABC_alembic.h:30
unsigned int frame_samples_shape
Definition: ABC_alembic.h:31
bool export_custom_properties
Definition: ABC_alembic.h:51
Definition: BKE_main.h:121