14 #ifndef MAYASHADERCOLORDEF_H
15 #define MAYASHADERCOLORDEF_H
40 std::string strip_prefix(std::string full_name);
44 LTexCoordd
project_uv(
const LPoint3d &pos,
const LPoint3d &ref_point)
const;
47 void write(std::ostream &out)
const;
79 BlendType _blend_type;
80 ProjectionType _projection_type;
81 LMatrix4d _projection_matrix;
86 std::string _texture_name;
90 LVector2 _translate_frame;
104 std::string _uvset_name;
110 MObject *_color_object;
113 static void find_textures_modern(
const std::string &shadername,
MayaShaderColorList &list, MPlug inplug,
bool is_alpha);
114 void find_textures_legacy(
MayaShader *shader, MObject color,
bool trans=
false);
116 void set_projection_type(
const std::string &type);
118 LPoint2d map_planar(
const LPoint3d &pos,
const LPoint3d ¢roid)
const;
119 LPoint2d map_spherical(
const LPoint3d &pos,
const LPoint3d ¢roid)
const;
120 LPoint2d map_cylindrical(
const LPoint3d &pos,
const LPoint3d ¢roid)
const;
123 LPoint2d (
MayaShaderColorDef::*_map_uvs)(
const LPoint3d &pos,
const LPoint3d ¢roid)
const;
141 bool _has_flat_color;
143 bool _has_alpha_channel;
The name of a file, such as a texture file or an Egg file.
This defines the various attributes that Maya may associate with the "color" channel for a particular...
bool reset_maya_texture(const Filename &texture)
Changes the texture filename stored in the Maya file for this particular shader.
LMatrix3d compute_texture_matrix() const
Returns a texture matrix corresponding to the texture transforms indicated by the shader.
bool has_projection() const
Returns true if the shader has a projection in effect.
std::string get_panda_uvset_name()
Maya's default uvset name is "map1".
LTexCoordd project_uv(const LPoint3d &pos, const LPoint3d &ref_point) const
If the shader has a projection (has_projection() returns true), this computes the appropriate UV corr...
Corresponds to a single "shader" in Maya.
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.