vtool.maya_lib.shade

Function Summary

apply_shading_engine(shader_name, mesh) Adds the named shading engine to the mesh.
get_shading_engine_geo(shader_name) Not implemented
get_shading_engines(shader_name) Get the shading engines attached to a shader.
get_shading_engines_by_geo(geo)
has_shading_engine(geo)
get_shader_info(geo)
set_shader_info(geo, shader_dict)
remove_shaders(geo)
apply_shader(shader_name, mesh)
param shader_name:
 The name of a shader.
apply_new_shader(mesh[, type_of_shader, name]) Create a new shader to be applied to the named mesh.
apply_transparent_lambert(mesh) Convenience to hide geo via shader.
create_texture_ramp(name)
create_texture_file(name[, filepath])
add_2d_placement(texture_node[, name])

Functions

apply_shading_engine(shader_name, mesh)

Adds the named shading engine to the mesh.

Parameters:
  • shader_name (str) – Name of an existing shader in maya.
  • mesh (str) – Name of a mesh to add the shader to.
get_shading_engine_geo(shader_name)

Not implemented

get_shading_engines(shader_name)

Get the shading engines attached to a shader. Maya allows one shader to be attached to more than one engine. Most of the time it is probably just attached to one.

Parameters:shader_name (str) – The name of the shader.
Returns:A list of attached shading engines by name.
Return type:list
get_shading_engines_by_geo(geo)
has_shading_engine(geo)
get_shader_info(geo)
set_shader_info(geo, shader_dict)
remove_shaders(geo)
apply_shader(shader_name, mesh)
Parameters:
  • shader_name (str) – The name of a shader.
  • mesh (str) – The name of the mesh to apply the shader to.
apply_new_shader(mesh, type_of_shader=’blinn’, name=”)

Create a new shader to be applied to the named mesh.

Parameters:
  • mesh (str) – The name of the mesh to apply the shader to.
  • type_of_shader (str) – This corresponds to Maya shader types. Eg. blinn, lambert, etc.
  • name (str) – The name to give the shader. If not name given a name will be made up using the type_of_shader.
Returns:

The name of the new shader.

Return type:

str

apply_transparent_lambert(mesh)

Convenience to hide geo via shader.

Parameters:mesh (str) – Name of the mesh to apply the shader to.
create_texture_ramp(name)
create_texture_file(name, filepath=”)
add_2d_placement(texture_node, name=”)