Blender  V3.3
Classes | Namespaces | Enumerations | Functions
usd_capi_import.cc File Reference
#include "IO_types.h"
#include "usd.h"
#include "usd_common.h"
#include "usd_hierarchy_iterator.h"
#include "usd_reader_geom.h"
#include "usd_reader_prim.h"
#include "usd_reader_stage.h"
#include "BKE_appdir.h"
#include "BKE_blender_version.h"
#include "BKE_cachefile.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_scene.h"
#include "BKE_world.h"
#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_timeit.hh"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "DNA_cachefile_types.h"
#include "DNA_collection_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "MEM_guardedalloc.h"
#include "WM_api.h"
#include "WM_types.h"
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usdGeom/metrics.h>
#include <pxr/usd/usdGeom/scope.h>
#include <pxr/usd/usdGeom/tokens.h>
#include <pxr/usd/usdGeom/xformCommonAPI.h>
#include <iostream>

Go to the source code of this file.

Classes

struct  blender::io::usd::ImportJobData
 

Namespaces

 blender
 
 blender::io
 
 blender::io::usd
 

Enumerations

enum  { blender::io::usd::USD_NO_ERROR = 0 , blender::io::usd::USD_ARCHIVE_FAIL }
 

Functions

static CacheArchiveHandleblender::io::usd::handle_from_stage_reader (USDStageReader *reader)
 
static USDStageReaderblender::io::usd::stage_reader_from_handle (CacheArchiveHandle *handle)
 
static bool blender::io::usd::gather_objects_paths (const pxr::UsdPrim &object, ListBase *object_paths)
 
static void blender::io::usd::convert_to_z_up (pxr::UsdStageRefPtr stage, ImportSettings *r_settings)
 
static void blender::io::usd::report_job_duration (const ImportJobData *data)
 
static void blender::io::usd::import_startjob (void *customdata, short *stop, short *do_update, float *progress)
 
static void blender::io::usd::import_endjob (void *customdata)
 
static void blender::io::usd::import_freejob (void *user_data)
 
bool USD_import (struct bContext *C, const char *filepath, const USDImportParams *params, bool as_background_job)
 
static USDPrimReaderget_usd_reader (CacheReader *reader, Object *, const char **err_str)
 
struct MeshUSD_read_mesh (struct CacheReader *reader, struct Object *ob, struct Mesh *existing_mesh, const double time, const char **err_str, const int read_flag)
 
bool USD_mesh_topology_changed (CacheReader *reader, Object *ob, Mesh *existing_mesh, const double time, const char **err_str)
 
void USD_CacheReader_incref (CacheReader *reader)
 
CacheReaderCacheReader_open_usd_object (CacheArchiveHandle *handle, CacheReader *reader, Object *object, const char *object_path)
 
void USD_CacheReader_free (CacheReader *reader)
 
CacheArchiveHandleUSD_create_handle (struct Main *, const char *filepath, ListBase *object_paths)
 
void USD_free_handle (CacheArchiveHandle *handle)
 
void USD_get_transform (struct CacheReader *reader, float r_mat_world[4][4], float time, float scale)
 

Function Documentation

◆ CacheReader_open_usd_object()

CacheReader* CacheReader_open_usd_object ( CacheArchiveHandle handle,
CacheReader reader,
Object object,
const char *  object_path 
)

◆ get_usd_reader()

static USDPrimReader* get_usd_reader ( CacheReader reader,
Object ,
const char **  err_str 
)
static

◆ USD_CacheReader_free()

void USD_CacheReader_free ( CacheReader reader)

◆ USD_CacheReader_incref()

void USD_CacheReader_incref ( CacheReader reader)

Definition at line 492 of file usd_capi_import.cc.

References blender::io::usd::USDPrimReader::incref().

◆ USD_create_handle()

CacheArchiveHandle* USD_create_handle ( struct Main bmain,
const char *  filepath,
ListBase object_paths 
)

◆ USD_free_handle()

void USD_free_handle ( CacheArchiveHandle handle)

Definition at line 569 of file usd_capi_import.cc.

References blender::io::usd::stage_reader_from_handle().

Referenced by cachefile_handle_free().

◆ USD_get_transform()

void USD_get_transform ( struct CacheReader reader,
float  r_mat_world[4][4],
float  time,
float  scale 
)

◆ USD_import()

bool USD_import ( struct bContext C,
const char *  filepath,
const USDImportParams params,
bool  as_background_job 
)

◆ USD_mesh_topology_changed()

bool USD_mesh_topology_changed ( CacheReader reader,
Object ob,
Mesh existing_mesh,
const double  time,
const char **  err_str 
)

◆ USD_read_mesh()

struct Mesh* USD_read_mesh ( struct CacheReader reader,
struct Object ob,
struct Mesh existing_mesh,
const double  time,
const char **  err_str,
const int  read_flag 
)

Definition at line 464 of file usd_capi_import.cc.

References get_usd_reader(), blender::io::usd::USDGeomReader::read_mesh(), and time.

Referenced by modifyMesh().