Blender V4.3
blender::io::hydra Namespace Reference

Namespaces

namespace  usdtokens
 

Classes

class  CurvesData
 
class  HairData
 
class  HydraSceneDelegate
 
class  IdData
 
class  InstancerData
 
class  LightData
 
class  MaterialData
 
class  MeshData
 
class  ObjectData
 
class  USDSceneDelegate
 
class  VolumeData
 
class  VolumeModifierData
 
class  WorldData
 

Typedefs

using MaterialDataMap = Map<pxr::SdfPath, std::unique_ptr<MaterialData>>
 
using ObjectDataMap = Map<pxr::SdfPath, std::unique_ptr<ObjectData>>
 

Functions

 CLG_LOGREF_DECLARE_GLOBAL (LOG_HYDRA_SCENE, "hydra.scene")
 
static std::string cache_image_file (Main *bmain, Scene *scene, Image *image, ImageUser *iuser, bool check_exist)
 
std::string cache_or_get_image_file (Main *bmain, Scene *scene, Image *image, ImageUser *iuser)
 
template<typename T >
static void resize_uninitialized (pxr::VtArray< T > &array, const int new_size)
 
static std::pair< bke::MeshNormalDomain, Span< float3 > > get_mesh_normals (const Mesh &mesh)
 
template<typename T >
void gather_vert_data (const Span< int > verts, const bool copy_all_verts, const Span< T > src_data, MutableSpan< T > dst_data)
 
template<typename T >
void gather_face_data (const Span< int > tri_faces, const IndexMask &triangles, const Span< T > src_data, MutableSpan< T > dst_data)
 
template<typename T >
void gather_corner_data (const Span< int3 > corner_tris, const IndexMask &triangles, const Span< T > src_data, MutableSpan< T > dst_data)
 
static void copy_submesh (const Mesh &mesh, const Span< float3 > vert_positions, const Span< int > corner_verts, const Span< int3 > corner_tris, const Span< int > tri_faces, const std::pair< bke::MeshNormalDomain, Span< float3 > > normals, const Span< float2 > uv_map, const IndexMask &triangles, MeshData::SubMesh &sm)
 
pxr::GfMatrix4d gf_matrix_from_transform (const float m[4][4])
 

Variables

struct CLG_LogRefLOG_HYDRA_SCENE
 

Typedef Documentation

◆ MaterialDataMap

using blender::io::hydra::MaterialDataMap = Map<pxr::SdfPath, std::unique_ptr<MaterialData>>

Definition at line 41 of file material.hh.

◆ ObjectDataMap

using blender::io::hydra::ObjectDataMap = Map<pxr::SdfPath, std::unique_ptr<ObjectData>>

Definition at line 54 of file object.hh.

Function Documentation

◆ cache_image_file()

◆ cache_or_get_image_file()

◆ CLG_LOGREF_DECLARE_GLOBAL()

blender::io::hydra::CLG_LOGREF_DECLARE_GLOBAL ( LOG_HYDRA_SCENE ,
"hydra.scene"  )

◆ copy_submesh()

◆ gather_corner_data()

template<typename T >
void blender::io::hydra::gather_corner_data ( const Span< int3 > corner_tris,
const IndexMask & triangles,
const Span< T > src_data,
MutableSpan< T > dst_data )

Definition at line 275 of file io/usd/hydra/mesh.cc.

Referenced by copy_submesh().

◆ gather_face_data()

template<typename T >
void blender::io::hydra::gather_face_data ( const Span< int > tri_faces,
const IndexMask & triangles,
const Span< T > src_data,
MutableSpan< T > dst_data )

Definition at line 264 of file io/usd/hydra/mesh.cc.

◆ gather_vert_data()

template<typename T >
void blender::io::hydra::gather_vert_data ( const Span< int > verts,
const bool copy_all_verts,
const Span< T > src_data,
MutableSpan< T > dst_data )

Definition at line 250 of file io/usd/hydra/mesh.cc.

References blender::array_utils::copy(), blender::array_utils::gather(), and verts.

Referenced by copy_submesh().

◆ get_mesh_normals()

static std::pair< bke::MeshNormalDomain, Span< float3 > > blender::io::hydra::get_mesh_normals ( const Mesh & mesh)
static

◆ gf_matrix_from_transform()

◆ resize_uninitialized()

template<typename T >
static void blender::io::hydra::resize_uninitialized ( pxr::VtArray< T > & array,
const int new_size )
static

#VtArray::resize() does value initialization of every new value, which ends up being memset for the trivial attribute types we deal with here. This is unnecessary since every item is initialized via copy from a Blender mesh here anyway. This specializes the resize call to skip initialization.

Definition at line 229 of file io/usd/hydra/mesh.cc.

References array< T, alignment >::resize().

Referenced by copy_submesh().

Variable Documentation

◆ LOG_HYDRA_SCENE