vtool.maya_lib.shade¶
Function Summary
|
Adds the named shading engine to the mesh. |
|
Given a shading engine, get the members |
|
Get the shading engines attached to a shader. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Create a new shader to be applied to the named mesh. |
Convenience to hide geo via shader. |
|
|
|
|
|
|
|
|
|
|
- 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)¶
Given a shading engine, get the members
- get_shading_engines(shader_name=None)¶
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)¶
- get_materials()¶
- has_shading_engine(geo)¶
- get_shader_info(geo)¶
- set_shader_info(geo, shader_dict)¶
- remove_shaders(geo)¶
- delete_geo_shaders(geo)¶
- delete_shader(shader)¶
- delete_all()¶
- reset()¶
- 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.
- create_shader(type_of_shader='blinn', name='')¶
- 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='')¶
- get_one_udim_number(mesh, sample_vertex=0)¶
- get_mesh_texture_color(mesh, texture_node, sample_vertex=0)¶