Blender V5.3
blender::io::hydra::PopulateContext Struct Reference

#include <populate_context.hh>

Public Member Functions

 PopulateContext (Depsgraph *depsgraph, Main *bmain, Scene *scene, const View3D *view3d, const pxr::SdfPath &root_path, bool use_materialx, Span< pxr::TfToken > material_render_contexts, Span< pxr::TfToken > shader_source_types, Map< const Material *, EmittedMaterial > &emitted_materials, Map< EmittedGeometryKey, EmittedGeometry > &emitted_geometry, Map< const Object *, Vector< const ID * > > &instance_geometries_by_object, const Set< pxr::SdfPath > &current_paths)
Path naming scheme for each prim
pxr::SdfPath object_prim_id (const Object *object) const
pxr::SdfPath submesh_prim_id (const Object *object, int submesh_index) const
pxr::SdfPath hair_prim_id (const Object *object, const ParticleSystem *psys) const
pxr::SdfPath material_prim_id (const Material *material) const
pxr::SdfPath instancer_prim_id () const
pxr::SdfPath instancer_proto_root (const Object *source) const
pxr::SdfPath instancer_proto_submesh (const Object *source, int submesh_index) const
pxr::SdfPath instance_clone_prim_id (const Object *source, int instance_index) const
Materials
const EmittedMaterial * get_or_create_material (const Material *material)
BObjectInfo / EmittedGeometryKey
EmittedGeometryKey emitted_geometry_key (const BObjectInfo &info, const pxr::TfToken &type) const
Emit
void emit_prim (const pxr::SdfPath &path, const pxr::TfToken &type, const pxr::HdContainerDataSourceHandle &ds)
void emit_object_prim (EmittedObject &emitted, const pxr::SdfPath &path, const pxr::TfToken &type, const pxr::HdContainerDataSourceHandle &ds, const pxr::GfMatrix4d &geometry_xform=pxr::GfMatrix4d(1.0))
Instances and Prototypes
pxr::HdContainerDataSourceHandle proto_instanced_by (const Object *source) const
void add_instance (const Object *source, const float dupli_mat[4][4])

Public Attributes

Depsgraph * depsgraph
Main * bmain
Scene * scene
const View3D * view3d
pxr::SdfPath root_path
bool use_materialx
Span< pxr::TfToken > material_render_contexts
Span< pxr::TfToken > shader_source_types
Map< const Material *, EmittedMaterial > & emitted_materials
Map< EmittedGeometryKey, EmittedGeometry > & emitted_geometry
const Set< pxr::SdfPath > & emitted_paths
Map< const Object *, Vector< const ID * > > & instance_geometries_by_object
Set< const Material * > used_emitted_materials
Vector< const Material * > new_emitted_materials
Set< EmittedGeometryKey > used_emitted_geometry
Set< const Object * > used_instance_sources
Set< pxr::SdfPath > new_paths
pxr::HdRetainedSceneIndex::AddedPrimEntries to_add
pxr::HdSceneIndexObserver::DirtiedPrimEntries to_dirty
Map< const Object *, EmittedObject > new_emitted_objects
Vector< pxr::SdfPath > all_proto_paths
Vector< pxr::VtIntArray > per_proto_indices
pxr::VtMatrix4dArray instance_transforms
Map< const Object *, IndexRange > proto_range_by_source
Map< const Object *, int > nonmesh_instance_count

Detailed Description

Definition at line 48 of file populate_context.hh.

Constructor & Destructor Documentation

◆ PopulateContext()

blender::io::hydra::PopulateContext::PopulateContext ( Depsgraph * depsgraph,
Main * bmain,
Scene * scene,
const View3D * view3d,
const pxr::SdfPath & root_path,
bool use_materialx,
Span< pxr::TfToken > material_render_contexts,
Span< pxr::TfToken > shader_source_types,
Map< const Material *, EmittedMaterial > & emitted_materials,
Map< EmittedGeometryKey, EmittedGeometry > & emitted_geometry,
Map< const Object *, Vector< const ID * > > & instance_geometries_by_object,
const Set< pxr::SdfPath > & current_paths )
inline

Member Function Documentation

◆ add_instance()

void blender::io::hydra::PopulateContext::add_instance ( const Object * source,
const float dupli_mat[4][4] )

◆ emit_object_prim()

void blender::io::hydra::PopulateContext::emit_object_prim ( EmittedObject & emitted,
const pxr::SdfPath & path,
const pxr::TfToken & type,
const pxr::HdContainerDataSourceHandle & ds,
const pxr::GfMatrix4d & geometry_xform = pxr::GfMatrix4d(1.0) )

◆ emit_prim()

◆ emitted_geometry_key()

◆ get_or_create_material()

◆ hair_prim_id()

pxr::SdfPath blender::io::hydra::PopulateContext::hair_prim_id ( const Object * object,
const ParticleSystem * psys ) const

Definition at line 101 of file populate_context.cc.

References root_path, and SNPRINTF.

Referenced by blender::io::hydra::emit_hair_for_object().

◆ instance_clone_prim_id()

pxr::SdfPath blender::io::hydra::PopulateContext::instance_clone_prim_id ( const Object * source,
int instance_index ) const

◆ instancer_prim_id()

pxr::SdfPath blender::io::hydra::PopulateContext::instancer_prim_id ( ) const

◆ instancer_proto_root()

pxr::SdfPath blender::io::hydra::PopulateContext::instancer_proto_root ( const Object * source) const

◆ instancer_proto_submesh()

pxr::SdfPath blender::io::hydra::PopulateContext::instancer_proto_submesh ( const Object * source,
int submesh_index ) const

Definition at line 127 of file populate_context.cc.

References instancer_proto_root(), and SNPRINTF.

Referenced by blender::io::hydra::emit_mesh_proto().

◆ material_prim_id()

pxr::SdfPath blender::io::hydra::PopulateContext::material_prim_id ( const Material * material) const

Definition at line 108 of file populate_context.cc.

References root_path, and SNPRINTF.

Referenced by blender::io::hydra::build_emitted_material().

◆ object_prim_id()

pxr::SdfPath blender::io::hydra::PopulateContext::object_prim_id ( const Object * object) const

◆ proto_instanced_by()

pxr::HdContainerDataSourceHandle blender::io::hydra::PopulateContext::proto_instanced_by ( const Object * source) const

◆ submesh_prim_id()

pxr::SdfPath blender::io::hydra::PopulateContext::submesh_prim_id ( const Object * object,
int submesh_index ) const

Definition at line 94 of file populate_context.cc.

References object_prim_id(), and SNPRINTF.

Referenced by blender::io::hydra::emit_mesh_object().

Member Data Documentation

◆ all_proto_paths

◆ bmain

◆ depsgraph

◆ emitted_geometry

Map<EmittedGeometryKey, EmittedGeometry>& blender::io::hydra::PopulateContext::emitted_geometry

◆ emitted_materials

Map<const Material *, EmittedMaterial>& blender::io::hydra::PopulateContext::emitted_materials

Definition at line 87 of file populate_context.hh.

Referenced by get_or_create_material(), and PopulateContext().

◆ emitted_paths

const Set<pxr::SdfPath>& blender::io::hydra::PopulateContext::emitted_paths

Definition at line 89 of file populate_context.hh.

Referenced by emit_prim(), and PopulateContext().

◆ instance_geometries_by_object

Map<const Object *, Vector<const ID *> >& blender::io::hydra::PopulateContext::instance_geometries_by_object

◆ instance_transforms

pxr::VtMatrix4dArray blender::io::hydra::PopulateContext::instance_transforms

◆ material_render_contexts

Span<pxr::TfToken> blender::io::hydra::PopulateContext::material_render_contexts

◆ new_emitted_materials

Vector<const Material *> blender::io::hydra::PopulateContext::new_emitted_materials

◆ new_emitted_objects

Map<const Object *, EmittedObject> blender::io::hydra::PopulateContext::new_emitted_objects

Definition at line 106 of file populate_context.hh.

Referenced by blender::io::hydra::HydraSceneIndex::populate().

◆ new_paths

Set<pxr::SdfPath> blender::io::hydra::PopulateContext::new_paths

◆ nonmesh_instance_count

Map<const Object *, int> blender::io::hydra::PopulateContext::nonmesh_instance_count

◆ per_proto_indices

◆ proto_range_by_source

Map<const Object *, IndexRange> blender::io::hydra::PopulateContext::proto_range_by_source

◆ root_path

pxr::SdfPath blender::io::hydra::PopulateContext::root_path

◆ scene

Scene* blender::io::hydra::PopulateContext::scene

◆ shader_source_types

Span<pxr::TfToken> blender::io::hydra::PopulateContext::shader_source_types

◆ to_add

pxr::HdRetainedSceneIndex::AddedPrimEntries blender::io::hydra::PopulateContext::to_add

◆ to_dirty

pxr::HdSceneIndexObserver::DirtiedPrimEntries blender::io::hydra::PopulateContext::to_dirty

◆ use_materialx

bool blender::io::hydra::PopulateContext::use_materialx

◆ used_emitted_geometry

◆ used_emitted_materials

Set<const Material *> blender::io::hydra::PopulateContext::used_emitted_materials

◆ used_instance_sources

Set<const Object *> blender::io::hydra::PopulateContext::used_instance_sources

◆ view3d

const View3D* blender::io::hydra::PopulateContext::view3d

The documentation for this struct was generated from the following files: