Panda3D
Loading...
Searching...
No Matches
mayaShaders.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file mayaShaders.h
10 * @author drose
11 * @date 2000-02-11
12 */
13
14#ifndef MAYASHADERS_H
15#define MAYASHADERS_H
16
17#include "pandatoolbase.h"
18
19#include "pmap.h"
20#include "pvector.h"
21#include "mayaShaderColorDef.h"
22
23class MayaShader;
24
25/**
26 * Collects the set of MayaShaders that have been encountered so far.
27 */
29public:
32 MayaShader *find_shader_for_node(MObject node, bool legacy_shader);
33 MayaShader *find_shader_for_shading_engine(MObject engine, bool legacy_shader);
34
35 int get_num_shaders() const;
36 MayaShader *get_shader(int n) const;
37
38 MayaFileToUVSetMap _file_to_uvset;
39 pvector<std::string> _uvset_names;
40 void clear();
41 void bind_uvsets(MObject mesh);
42 std::string find_uv_link(const std::string &match);
43
44private:
46 Shaders _shaders;
48 ShadersInOrder _shaders_in_order;
49};
50
51#endif
Corresponds to a single "shader" in Maya.
Definition mayaShader.h:30
Collects the set of MayaShaders that have been encountered so far.
Definition mayaShaders.h:28
void clear()
Frees all of the previously-defined MayaShader objects associated with this set.
void bind_uvsets(MObject mesh)
Causes all shaders in the set to use the given mesh as a file-to-uvset map.
MayaShader * find_shader_for_shading_engine(MObject engine, bool legacy_shader)
Returns the MayaShader object associated with the indicated "shading engine".
MayaShader * get_shader(int n) const
Returns the nth MayaShader that has been discovered so far.
int get_num_shaders() const
Returns the number of unique MayaShaders that have been discovered so far.
std::string find_uv_link(const std::string &match)
Returns the current mapping from file to uvset for the given file texture name.
MayaShader * find_shader_for_node(MObject node, bool legacy_shader)
Extracts the shader assigned to the indicated node.
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.