Skip to content

Materials

M D SAI CHARAN edited this page Oct 5, 2020 · 11 revisions

Materials

[ needs improvement ]

create_material(name)

Creates a material with an appropriate name.

material_exists(ref)

Returns a true or false value depending on if the ref material exists.

delete_material(name)

Deletes the provided ref Material.

get_material(name)

Get the ref material (expecting a string) and return a reference to it.

add_material_to_object(ref, matname)

Adds material matname to an object with ref

remove_material_from_object(ref, matname)

remove_material(ref, matname)

get_all_materials()

Returns a list of all material in the file, provided by bpy.data.materials.

get_materials_from_object(ref)

Get the ref object (expecting a string) and return a list of all materials from it

get_material_names_from_object(ref)

Clone this wiki locally