Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Werner <stefan.werner@tangent-animation.com>2021-08-21 23:03:31 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2021-08-21 23:03:31 +0300
commitc5b56a525cd6113caa2bd3ec7bfb91fe4a04513a (patch)
tree77dae5ae2fbeccf6703034c94ad3e1f3aa81140b /source/blender/io/usd/usd.h
parent34e8d79c3edbc58fd242cec0c1f2bed4e43855af (diff)
parent67c29bc5a273b66e278bd20c18187b425acf1869 (diff)
Merge branch 'master' into cycles_texture_cachecycles_texture_cache
Diffstat (limited to 'source/blender/io/usd/usd.h')
-rw-r--r--source/blender/io/usd/usd.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/source/blender/io/usd/usd.h b/source/blender/io/usd/usd.h
index 40e2d0d8674..6b6b2d37162 100644
--- a/source/blender/io/usd/usd.h
+++ b/source/blender/io/usd/usd.h
@@ -26,6 +26,10 @@ extern "C" {
#endif
struct bContext;
+struct Object;
+struct CacheArchiveHandle;
+struct CacheReader;
+struct CacheFile;
struct USDExportParams {
bool export_animation;
@@ -39,6 +43,34 @@ struct USDExportParams {
enum eEvaluationMode evaluation_mode;
};
+struct USDImportParams {
+ float scale;
+ bool is_sequence;
+ bool set_frame_range;
+ int sequence_len;
+ int offset;
+ bool validate_meshes;
+ char mesh_read_flag;
+ bool import_cameras;
+ bool import_curves;
+ bool import_lights;
+ bool import_materials;
+ bool import_meshes;
+ bool import_volumes;
+ char *prim_path_mask;
+ bool import_subdiv;
+ bool import_instance_proxies;
+ bool create_collection;
+ bool import_guide;
+ bool import_proxy;
+ bool import_render;
+ bool import_visible_only;
+ bool use_instancing;
+ bool import_usd_preview;
+ bool set_material_blend;
+ float light_intensity_scale;
+};
+
/* The USD_export takes a as_background_job parameter, and returns a boolean.
*
* When as_background_job=true, returns false immediately after scheduling
@@ -53,8 +85,45 @@ bool USD_export(struct bContext *C,
const struct USDExportParams *params,
bool as_background_job);
+bool USD_import(struct bContext *C,
+ const char *filepath,
+ const struct USDImportParams *params,
+ bool as_background_job);
+
int USD_get_version(void);
+/* USD Import and Mesh Cache interface. */
+
+struct CacheArchiveHandle *USD_create_handle(struct Main *bmain,
+ const char *filename,
+ struct ListBase *object_paths);
+
+void USD_free_handle(struct CacheArchiveHandle *handle);
+
+void USD_get_transform(struct CacheReader *reader, float r_mat[4][4], float time, float scale);
+
+/* Either modifies current_mesh in-place or constructs a new mesh. */
+struct Mesh *USD_read_mesh(struct CacheReader *reader,
+ struct Object *ob,
+ struct Mesh *existing_mesh,
+ const float time,
+ const char **err_str,
+ int read_flag);
+
+bool USD_mesh_topology_changed(struct CacheReader *reader,
+ struct Object *ob,
+ struct Mesh *existing_mesh,
+ const float time,
+ const char **err_str);
+
+struct CacheReader *CacheReader_open_usd_object(struct CacheArchiveHandle *handle,
+ struct CacheReader *reader,
+ struct Object *object,
+ const char *object_path);
+
+void USD_CacheReader_incref(struct CacheReader *reader);
+void USD_CacheReader_free(struct CacheReader *reader);
+
#ifdef __cplusplus
}
#endif