Blender V5.0
blender::io::usd::NodePlacementContext Struct Reference

#include <usd_reader_material.hh>

Public Member Functions

 NodePlacementContext (float origx, float origy, float horizontal_step=300.0f, float vertical_step=300.0f)
float2 compute_node_loc (int column)
std::string get_key (const pxr::UsdShadeShader &usd_shader, const blender::StringRef tag) const
bNodeget_cached_node (const pxr::UsdShadeShader &usd_shader, const blender::StringRef tag={}) const
void cache_node (const pxr::UsdShadeShader &usd_shader, bNode *node, const blender::StringRef tag={})

Public Attributes

const float origx_
const float origy_
const float horizontal_step_
const float vertical_step_
Vector< float, 8 > column_offsets_ = Vector<float, 8>(8, 0.0f)
ShaderToNodeMap node_cache_

Detailed Description

Definition at line 33 of file usd_reader_material.hh.

Constructor & Destructor Documentation

◆ NodePlacementContext()

blender::io::usd::NodePlacementContext::NodePlacementContext ( float origx,
float origy,
float horizontal_step = 300.0f,
float vertical_step = 300.0f )
inline

Definition at line 46 of file usd_reader_material.hh.

References horizontal_step_, origx_, origy_, and vertical_step_.

Member Function Documentation

◆ cache_node()

◆ compute_node_loc()

◆ get_cached_node()

◆ get_key()

std::string blender::io::usd::NodePlacementContext::get_key ( const pxr::UsdShadeShader & usd_shader,
const blender::StringRef tag ) const

Generate a key for caching a Blender node created for a given USD shader by returning the shader prim path with an optional tag suffix. The tag can be specified in order to generate a unique key when more than one Blender node is created for the USD shader.

Definition at line 431 of file usd_reader_material.cc.

References blender::StringRefBase::is_empty().

Referenced by cache_node(), and get_cached_node().

Member Data Documentation

◆ column_offsets_

Vector<float, 8> blender::io::usd::NodePlacementContext::column_offsets_ = Vector<float, 8>(8, 0.0f)

Definition at line 38 of file usd_reader_material.hh.

Referenced by compute_node_loc().

◆ horizontal_step_

const float blender::io::usd::NodePlacementContext::horizontal_step_

Definition at line 36 of file usd_reader_material.hh.

Referenced by compute_node_loc(), and NodePlacementContext().

◆ node_cache_

ShaderToNodeMap blender::io::usd::NodePlacementContext::node_cache_

Definition at line 44 of file usd_reader_material.hh.

Referenced by cache_node(), and get_cached_node().

◆ origx_

const float blender::io::usd::NodePlacementContext::origx_

Definition at line 34 of file usd_reader_material.hh.

Referenced by compute_node_loc(), and NodePlacementContext().

◆ origy_

const float blender::io::usd::NodePlacementContext::origy_

Definition at line 35 of file usd_reader_material.hh.

Referenced by compute_node_loc(), and NodePlacementContext().

◆ vertical_step_

const float blender::io::usd::NodePlacementContext::vertical_step_

Definition at line 37 of file usd_reader_material.hh.

Referenced by compute_node_loc(), and NodePlacementContext().


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