Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MayaShaders Class Reference

Collects the set of MayaShaders that have been encountered so far. More...

#include "mayaShaders.h"

Public Member Functions

void bind_uvsets (MObject mesh)
 Causes all shaders in the set to use the given mesh as a file-to-uvset map.
 
void clear ()
 Frees all of the previously-defined MayaShader objects associated with this set.
 
MayaShaderfind_shader_for_node (MObject node, bool legacy_shader)
 Extracts the shader assigned to the indicated node.
 
MayaShaderfind_shader_for_shading_engine (MObject engine, bool legacy_shader)
 Returns the MayaShader object associated with the indicated "shading engine".
 
std::string find_uv_link (const std::string &match)
 Returns the current mapping from file to uvset for the given file texture name.
 
int get_num_shaders () const
 Returns the number of unique MayaShaders that have been discovered so far.
 
MayaShaderget_shader (int n) const
 Returns the nth MayaShader that has been discovered so far.
 

Public Attributes

MayaFileToUVSetMap _file_to_uvset
 
pvector< std::string > _uvset_names
 

Detailed Description

Collects the set of MayaShaders that have been encountered so far.

Definition at line 28 of file mayaShaders.h.

Constructor & Destructor Documentation

◆ MayaShaders()

MayaShaders::MayaShaders ( )

Definition at line 35 of file mayaShaders.cxx.

◆ ~MayaShaders()

MayaShaders::~MayaShaders ( )

Definition at line 42 of file mayaShaders.cxx.

Member Function Documentation

◆ bind_uvsets()

void MayaShaders::bind_uvsets ( MObject mesh)

Causes all shaders in the set to use the given mesh as a file-to-uvset map.

Definition at line 98 of file mayaShaders.cxx.

◆ clear()

void MayaShaders::clear ( )

Frees all of the previously-defined MayaShader objects associated with this set.

Definition at line 188 of file mayaShaders.cxx.

Referenced by MayaToEggConverter::clear().

◆ find_shader_for_node()

MayaShader * MayaShaders::find_shader_for_node ( MObject node,
bool legacy_shader )

Extracts the shader assigned to the indicated node.

Definition at line 50 of file mayaShaders.cxx.

References find_shader_for_shading_engine().

◆ find_shader_for_shading_engine()

MayaShader * MayaShaders::find_shader_for_shading_engine ( MObject engine,
bool legacy_shader )

Returns the MayaShader object associated with the indicated "shading engine".

This will create a new MayaShader object if this is the first time we have encountered the indicated engine.

Definition at line 132 of file mayaShaders.cxx.

References MayaShader::bind_uvsets().

Referenced by find_shader_for_node().

◆ find_uv_link()

string MayaShaders::find_uv_link ( const std::string & match)

Returns the current mapping from file to uvset for the given file texture name.

Definition at line 157 of file mayaShaders.cxx.

◆ get_num_shaders()

int MayaShaders::get_num_shaders ( ) const

Returns the number of unique MayaShaders that have been discovered so far.

Definition at line 170 of file mayaShaders.cxx.

◆ get_shader()

MayaShader * MayaShaders::get_shader ( int n) const

Returns the nth MayaShader that has been discovered so far.

Definition at line 178 of file mayaShaders.cxx.

Member Data Documentation

◆ _file_to_uvset

MayaFileToUVSetMap MayaShaders::_file_to_uvset

Definition at line 38 of file mayaShaders.h.

◆ _uvset_names

pvector<std::string> MayaShaders::_uvset_names

Definition at line 39 of file mayaShaders.h.


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