33 #define DNA_DEPRECATED_ALLOW
115 flag_private_id_data);
260 .name_plural =
"materials",
269 .foreach_cache =
NULL,
277 .blend_read_undo_preserve =
NULL,
279 .lib_override_apply_post =
NULL,
347 return &(pointcloud->
mat);
351 return &(volume->
mat);
380 return &(pointcloud->
totcol);
397 return &(((
Mesh *)
id)->mat);
399 return &(((
Curve *)
id)->mat);
403 return &(((
bGPdata *)
id)->mat);
405 return &(((
Hair *)
id)->mat);
409 return &(((
Volume *)
id)->mat);
423 return &(((
Mesh *)
id)->totcol);
425 return &(((
Curve *)
id)->totcol);
429 return &(((
bGPdata *)
id)->totcol);
431 return &(((
Hair *)
id)->totcol);
435 return &(((
Volume *)
id)->totcol);
516 *materials_len_p_dst = *materials_len_p_src;
517 if (*materials_len_p_src != 0) {
520 for (
int a = 0;
a < *materials_len_p_src;
a++) {
538 if (do_id_user && totcol < (*totcolp)) {
540 for (i = totcol; i < (*totcolp); i++) {
567 memcpy(mat, *matar,
sizeof(
void *) * (*totcol));
574 (*matar)[(*totcol)++] = ma;
586 short index = (short)index_i;
591 if (index >= 0 && index < (*totcol)) {
592 ret = (*matar)[index];
601 if (index + 1 != (*totcol)) {
602 memmove((*matar) + index,
603 (*matar) + (index + 1),
604 sizeof(
void *) * ((*totcol) - (index + 1)));
608 *matar =
MEM_reallocN(*matar,
sizeof(
void *) * (*totcol));
628 while ((*totcol)--) {
648 const short *totcolp;
672 ma_p = &ob->
mat[act - 1];
677 if (*totcolp < ob->totcol) {
686 if (matarar && *matarar) {
687 ma_p = &(*matarar)[act - 1];
700 return ma_p ? *ma_p :
NULL;
732 if (do_id_user && totcol < ob->totcol) {
733 for (
int i = totcol; i < ob->
totcol; i++) {
746 else if (ob->
totcol < totcol) {
747 newmatar =
MEM_callocN(
sizeof(
void *) * totcol,
"newmatar");
748 newmatbits =
MEM_callocN(
sizeof(
char) * totcol,
"newmatbits");
750 memcpy(newmatar, ob->
mat,
sizeof(
void *) * ob->
totcol);
796 if (ob->
data ==
id) {
820 if (totcolp ==
NULL || matarar ==
NULL) {
824 if (act > *totcolp) {
825 matar =
MEM_callocN(
sizeof(
void *) * act,
"matarray1");
828 memcpy(matar, *matarar,
sizeof(
void *) * (*totcolp));
837 mao = (*matarar)[act - 1];
841 (*matarar)[act - 1] = ma;
874 if (totcolp ==
NULL || matarar ==
NULL) {
878 if (act > *totcolp) {
879 matar =
MEM_callocN(
sizeof(
void *) * act,
"matarray1");
882 memcpy(matar, *matarar,
sizeof(
void *) * (*totcolp));
908 switch (assign_type) {
926 mao = ob->
mat[act - 1];
930 ob->
mat[act - 1] = ma;
934 mao = (*matarar)[act - 1];
938 (*matarar)[act - 1] = ma;
985 if (ob_src->
totcol == 0) {
991 for (
int i = 0; i < ob_dst->
totcol; i++) {
1000 for (; i < ob_src->
totcol; i++) {
1001 remap_src_to_dst[i] = i;
1005 for (; i < ob_dst->
totcol; i++) {
1006 remap_src_to_dst[i] = i;
1008 for (; i < ob_src->
totcol; i++) {
1009 remap_src_to_dst[i] = 0;
1014 for (
int i = 0; i < ob_src->
totcol; i++) {
1036 const bool to_object_only)
1038 int actcol_orig = ob->
actcol;
1045 for (
int i = 0; i < totcol; i++) {
1046 if (to_object_only && ob->
matbits[i] == 0) {
1057 if (actcol_orig > ob->
totcol) {
1058 actcol_orig = ob->
totcol;
1061 ob->
actcol = actcol_orig;
1076 if (totcolp ==
NULL || matarar ==
NULL) {
1080 for (
a = 0;
a < *totcolp;
a++) {
1081 if ((*matarar)[
a] == ma) {
1132 if (
ELEM(
NULL, matarar, *matarar)) {
1142 mao = (*matarar)[ob->
actcol - 1];
1147 for (
int a = ob->
actcol; a < ob->totcol;
a++) {
1148 (*matarar)[
a - 1] = (*matarar)[
a];
1152 if (*totcolp == 0) {
1157 const int actcol = ob->
actcol;
1160 if (obt->data == ob->
data) {
1162 if (actcol > obt->totcol) {
1166 mao = obt->mat[actcol - 1];
1171 for (
int a = actcol;
a < obt->totcol;
a++) {
1172 obt->mat[
a - 1] = obt->mat[
a];
1173 obt->matbits[
a - 1] = obt->matbits[
a];
1176 if (obt->actcol > obt->totcol) {
1177 obt->actcol = obt->totcol;
1180 if (obt->totcol == 0) {
1184 obt->matbits =
NULL;
1209 for (sock =
node->inputs.first; sock; sock = sock->
next) {
1247 (*((
int *)userdata))++;
1363 for (
int i = 1; i < ob->
totcol + 1; i++) {
1397 float tmp, facm = 1.0f - fac;
1401 r_col[0] = facm * (r_col[0]) + fac *
col[0];
1402 r_col[1] = facm * (r_col[1]) + fac *
col[1];
1403 r_col[2] = facm * (r_col[2]) + fac *
col[2];
1406 r_col[0] += fac *
col[0];
1407 r_col[1] += fac *
col[1];
1408 r_col[2] += fac *
col[2];
1411 r_col[0] *= (facm + fac *
col[0]);
1412 r_col[1] *= (facm + fac *
col[1]);
1413 r_col[2] *= (facm + fac *
col[2]);
1416 r_col[0] = 1.0f - (facm + fac * (1.0f -
col[0])) * (1.0f - r_col[0]);
1417 r_col[1] = 1.0f - (facm + fac * (1.0f -
col[1])) * (1.0f - r_col[1]);
1418 r_col[2] = 1.0f - (facm + fac * (1.0f -
col[2])) * (1.0f - r_col[2]);
1421 if (r_col[0] < 0.5f) {
1422 r_col[0] *= (facm + 2.0f * fac *
col[0]);
1425 r_col[0] = 1.0f - (facm + 2.0f * fac * (1.0f -
col[0])) * (1.0f - r_col[0]);
1427 if (r_col[1] < 0.5f) {
1428 r_col[1] *= (facm + 2.0f * fac *
col[1]);
1431 r_col[1] = 1.0f - (facm + 2.0f * fac * (1.0f -
col[1])) * (1.0f - r_col[1]);
1433 if (r_col[2] < 0.5f) {
1434 r_col[2] *= (facm + 2.0f * fac *
col[2]);
1437 r_col[2] = 1.0f - (facm + 2.0f * fac * (1.0f -
col[2])) * (1.0f - r_col[2]);
1441 r_col[0] -= fac *
col[0];
1442 r_col[1] -= fac *
col[1];
1443 r_col[2] -= fac *
col[2];
1446 if (
col[0] != 0.0f) {
1447 r_col[0] = facm * (r_col[0]) + fac * (r_col[0]) /
col[0];
1449 if (
col[1] != 0.0f) {
1450 r_col[1] = facm * (r_col[1]) + fac * (r_col[1]) /
col[1];
1452 if (
col[2] != 0.0f) {
1453 r_col[2] = facm * (r_col[2]) + fac * (r_col[2]) /
col[2];
1457 r_col[0] = facm * (r_col[0]) + fac *
fabsf(r_col[0] -
col[0]);
1458 r_col[1] = facm * (r_col[1]) + fac *
fabsf(r_col[1] -
col[1]);
1459 r_col[2] = facm * (r_col[2]) + fac *
fabsf(r_col[2] -
col[2]);
1462 r_col[0] =
min_ff(r_col[0],
col[0]) * fac + r_col[0] * facm;
1463 r_col[1] =
min_ff(r_col[1],
col[1]) * fac + r_col[1] * facm;
1464 r_col[2] =
min_ff(r_col[2],
col[2]) * fac + r_col[2] * facm;
1468 if (tmp > r_col[0]) {
1472 if (tmp > r_col[1]) {
1476 if (tmp > r_col[2]) {
1481 if (r_col[0] != 0.0f) {
1482 tmp = 1.0f - fac *
col[0];
1486 else if ((tmp = (r_col[0]) / tmp) > 1.0f) {
1493 if (r_col[1] != 0.0f) {
1494 tmp = 1.0f - fac *
col[1];
1498 else if ((tmp = (r_col[1]) / tmp) > 1.0f) {
1505 if (r_col[2] != 0.0f) {
1506 tmp = 1.0f - fac *
col[2];
1510 else if ((tmp = (r_col[2]) / tmp) > 1.0f) {
1519 tmp = facm + fac *
col[0];
1524 else if ((tmp = (1.0f - (1.0f - (r_col[0])) / tmp)) < 0.0f) {
1527 else if (tmp > 1.0f) {
1534 tmp = facm + fac *
col[1];
1538 else if ((tmp = (1.0f - (1.0f - (r_col[1])) / tmp)) < 0.0f) {
1541 else if (tmp > 1.0f) {
1548 tmp = facm + fac *
col[2];
1552 else if ((tmp = (1.0f - (1.0f - (r_col[2])) / tmp)) < 0.0f) {
1555 else if (tmp > 1.0f) {
1564 float colH, colS, colV;
1565 float tmpr, tmpg, tmpb;
1568 rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
1569 hsv_to_rgb(colH, rS, rV, &tmpr, &tmpg, &tmpb);
1570 r_col[0] = facm * (r_col[0]) + fac * tmpr;
1571 r_col[1] = facm * (r_col[1]) + fac * tmpg;
1572 r_col[2] = facm * (r_col[2]) + fac * tmpb;
1578 float colH, colS, colV;
1579 rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
1582 hsv_to_rgb(rH, (facm * rS + fac * colS), rV, r_col + 0, r_col + 1, r_col + 2);
1588 float colH, colS, colV;
1589 rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
1591 hsv_to_rgb(rH, rS, (facm * rV + fac * colV), r_col + 0, r_col + 1, r_col + 2);
1596 float colH, colS, colV;
1597 float tmpr, tmpg, tmpb;
1600 rgb_to_hsv(r_col[0], r_col[1], r_col[2], &rH, &rS, &rV);
1601 hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
1602 r_col[0] = facm * (r_col[0]) + fac * tmpr;
1603 r_col[1] = facm * (r_col[1]) + fac * tmpg;
1604 r_col[2] = facm * (r_col[2]) + fac * tmpb;
1609 float scr, scg, scb;
1612 scr = 1.0f - (1.0f -
col[0]) * (1.0f - r_col[0]);
1613 scg = 1.0f - (1.0f -
col[1]) * (1.0f - r_col[1]);
1614 scb = 1.0f - (1.0f -
col[2]) * (1.0f - r_col[2]);
1616 r_col[0] = facm * (r_col[0]) +
1617 fac * (((1.0f - r_col[0]) *
col[0] * (r_col[0])) + (r_col[0] * scr));
1618 r_col[1] = facm * (r_col[1]) +
1619 fac * (((1.0f - r_col[1]) *
col[1] * (r_col[1])) + (r_col[1] * scg));
1620 r_col[2] = facm * (r_col[2]) +
1621 fac * (((1.0f - r_col[2]) *
col[2] * (r_col[2])) + (r_col[2] * scb));
1625 if (
col[0] > 0.5f) {
1626 r_col[0] = r_col[0] + fac * (2.0f * (
col[0] - 0.5f));
1629 r_col[0] = r_col[0] + fac * (2.0f * (
col[0]) - 1.0f);
1631 if (
col[1] > 0.5f) {
1632 r_col[1] = r_col[1] + fac * (2.0f * (
col[1] - 0.5f));
1635 r_col[1] = r_col[1] + fac * (2.0f * (
col[1]) - 1.0f);
1637 if (
col[2] > 0.5f) {
1638 r_col[2] = r_col[2] + fac * (2.0f * (
col[2] - 0.5f));
1641 r_col[2] = r_col[2] + fac * (2.0f * (
col[2]) - 1.0f);
1742 strcpy(ma->
id.
name,
"MADefault GPencil");
1765 principled->
locx = 10.0f;
1766 principled->
locy = 300.0f;
1788 principled->
locx = 10.0f;
1789 principled->
locy = 300.0f;
1811 holdout->
locx = 10.0f;
1812 holdout->
locy = 300.0f;
void BKE_animdata_blend_read_data(struct BlendDataReader *reader, struct AnimData *adt)
void BKE_animdata_blend_write(struct BlendWriter *writer, struct AnimData *adt)
bool BKE_curve_material_index_used(const struct Curve *cu, int index)
void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsigned int remap_len)
void BKE_curve_material_index_clear(struct Curve *cu)
void BKE_curve_material_index_remove(struct Curve *cu, int index)
display list (or rather multi purpose list) stuff.
void BKE_displist_free(struct ListBase *lb)
bool BKE_gpencil_material_index_used(struct bGPdata *gpd, int index)
void BKE_gpencil_material_remap(struct bGPdata *gpd, const unsigned int *remap, unsigned int remap_len)
void BKE_gpencil_material_index_reassign(struct bGPdata *gpd, int totcol, int index)
void BKE_icon_id_delete(struct ID *id)
void BKE_previewimg_free(struct PreviewImage **prv)
void BKE_previewimg_id_copy(struct ID *new_id, const struct ID *old_id)
void BKE_previewimg_blend_read(struct BlendDataReader *reader, struct PreviewImage *prv)
void BKE_previewimg_blend_write(struct BlendWriter *writer, const struct PreviewImage *prv)
void id_us_min(struct ID *id)
@ LIB_ID_CREATE_NO_ALLOCATE
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag)
void id_us_plus(struct ID *id)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
void * BKE_id_new(struct Main *bmain, const short type, const char *name)
#define BKE_LIB_FOREACHID_PROCESS(_data, _id_super, _cb_flag)
bool BKE_library_foreach_ID_embedded(struct LibraryForeachIDData *data, struct ID **id_pp)
void BKE_main_unlock(struct Main *bmain)
void BKE_main_lock(struct Main *bmain)
General operations, lookup, etc. for materials.
@ BKE_MAT_ASSIGN_USERPREF
@ BKE_MAT_ASSIGN_EXISTING
bool BKE_mesh_material_index_used(struct Mesh *me, short index)
void BKE_mesh_material_remap(struct Mesh *me, const unsigned int *remap, unsigned int remap_len)
void BKE_mesh_material_index_remove(struct Mesh *me, short index)
void BKE_mesh_material_index_clear(struct Mesh *me)
void ntreeBlendWrite(struct BlendWriter *writer, struct bNodeTree *ntree)
#define NODE_CUSTOM_GROUP
#define SH_NODE_BSDF_PRINCIPLED
struct bNodeTree * ntreeCopyTree_ex(const struct bNodeTree *ntree, struct Main *bmain, const bool do_id_user)
void ntreeFreeEmbeddedTree(struct bNodeTree *ntree)
struct bNodeLink * nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock)
struct bNodeSocket * nodeFindSocket(const struct bNode *node, eNodeSocketInOut in_out, const char *identifier)
struct bNode * nodeGetActiveTexture(struct bNodeTree *ntree)
struct bNodeTree * ntreeAddTree(struct Main *bmain, const char *name, const char *idname)
struct bNode * nodeAddStaticNode(const struct bContext *C, struct bNodeTree *ntree, int type)
#define NODE_CLASS_TEXTURE
void nodeSetActive(struct bNodeTree *ntree, struct bNode *node)
Generic array manipulation API.
#define BLI_array_permute(arr, arr_len, order)
bool BLI_ghash_reinsert(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void ** BLI_ghash_lookup_p(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
GHash * BLI_ghash_ptr_new_ex(const char *info, const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
MINLINE float min_ff(float a, float b)
void rgb_to_hsv(float r, float g, float b, float *r_h, float *r_s, float *r_v)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
MINLINE void add_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define ARRAY_SET_ITEMS(...)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define BLO_read_data_address(reader, ptr_p)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
bool BLO_write_is_undo(BlendWriter *writer)
#define BLT_I18NCONTEXT_ID_MATERIAL
#define CLOG_ERROR(clg_ref,...)
struct Depsgraph Depsgraph
void DEG_debug_print_eval(struct Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
ID and Library types, which are fundamental for sdna.
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_LINKED(_id)
Object groups, one object can be in many groups at once.
#define DNA_struct_default_get(struct_name)
@ GP_MATERIAL_STROKE_SHOW
Object is a sort of wrapper for general info.
#define OB_DATA_SUPPORT_ID(_id_type)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void GPU_material_free(struct ListBase *gpumaterial)
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
#define MEM_reallocN(vmemh, len)
static void init_data(ModifierData *md)
struct bNodeTreeType * ntreeType_Shader
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient SH_NODE_HOLDOUT
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume SH_NODE_VOLUME_PRINCIPLED
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume SH_NODE_TEX_IMAGE
Group RGB to Bright Vector Camera Vector Combine SH_NODE_OUTPUT_MATERIAL
const Depsgraph * depsgraph
DEGForeachIDComponentCallback callback
void * ntreeFreeLocalTree
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_recallocN_id)(void *vmemh, size_t len, const char *str)
void *(* MEM_callocN)(size_t len, const char *str)
bool(* ForEachTexNodeCallback)(bNode *node, void *userdata)
static void material_default_surface_init(Material *ma)
void BKE_materials_init(void)
void BKE_materials_exit(void)
static void material_default_holdout_init(Material *ma)
static void material_data_index_clear_id(ID *id)
static void material_blend_read_lib(BlendLibReader *reader, ID *id)
static void fill_texpaint_slots_recursive(bNodeTree *nodetree, bNode *active_node, Material *ma, int slot_len)
void BKE_gpencil_material_attr_init(Material *ma)
void BKE_id_material_clear(Main *bmain, ID *id)
void BKE_object_material_array_assign(Main *bmain, struct Object *ob, struct Material ***matar, int totcol, const bool to_object_only)
Material * BKE_material_default_empty(void)
void BKE_material_copybuf_copy(Main *bmain, Material *ma)
static Material matcopybuf
copy/paste buffer, if we had a proper py api that would be better
Material ** BKE_object_material_get_p(Object *ob, short act)
void BKE_object_material_remap(Object *ob, const unsigned int *remap)
void BKE_id_material_assign(Main *bmain, ID *id, Material *ma, short act)
static Material default_material_gpencil
static void material_foreach_id(ID *id, LibraryForeachIDData *data)
short BKE_object_material_slot_find_index(Object *ob, Material *ma)
static bool count_texture_nodes_cb(bNode *UNUSED(node), void *userdata)
Material * BKE_id_material_pop(Main *bmain, ID *id, int index_i)
Material * BKE_gpencil_material_add(Main *bmain, const char *name)
static void material_data_index_remove_id(ID *id, short index)
Material *** BKE_object_material_array_p(Object *ob)
static Material default_material_surface
Material * BKE_gpencil_material(Object *ob, short act)
Material * BKE_material_default_gpencil(void)
static void material_blend_write(BlendWriter *writer, ID *id, const void *id_address)
short * BKE_object_material_len_p(Object *ob)
static bool texpaint_slot_node_find_cb(bNode *node, void *userdata)
void BKE_material_copybuf_paste(Main *bmain, Material *ma)
short * BKE_id_material_len_p(ID *id)
static Material default_material_empty
void BKE_id_materials_copy(Main *bmain, ID *id_src, ID *id_dst)
static int count_texture_nodes_recursive(bNodeTree *nodetree)
bool BKE_object_material_slot_add(Main *bmain, Object *ob)
static void material_free_data(ID *id)
bNode * BKE_texpaint_slot_material_find_node(Material *ma, short texpaint_slot)
static Material * default_materials[]
void BKE_id_material_resize(Main *bmain, ID *id, short totcol, bool do_id_user)
Material *** BKE_id_material_array_p(ID *id)
void BKE_material_copybuf_free(void)
static void material_blend_read_expand(BlendExpander *expander, ID *id)
static Material default_material_holdout
MaterialGPencilStyle * BKE_gpencil_material_settings(Object *ob, short act)
bool BKE_object_material_slot_used(ID *id, short actcol)
Material * BKE_material_default_volume(void)
void BKE_object_materials_test(Main *bmain, Object *ob, ID *id)
void BKE_id_material_append(Main *bmain, ID *id, Material *ma)
void BKE_object_material_resize(Main *bmain, Object *ob, const short totcol, bool do_id_user)
void BKE_objects_materials_test_all(Main *bmain, ID *id)
static void material_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag)
void BKE_texpaint_slots_refresh_object(Scene *scene, struct Object *ob)
void BKE_object_material_remap_calc(Object *ob_dst, Object *ob_src, short *remap_src_to_dst)
static void material_default_volume_init(Material *ma)
static void material_default_gpencil_init(Material *ma)
static void material_blend_read_data(BlendDataReader *reader, ID *id)
Material * BKE_material_default_holdout(void)
Material * BKE_object_material_get(Object *ob, short act)
static void material_init_data(ID *id)
static bool ntree_foreach_texnode_recursive(bNodeTree *nodetree, ForEachTexNodeCallback callback, void *userdata)
Material * BKE_material_add(Main *bmain, const char *name)
void BKE_object_material_assign(Main *bmain, Object *ob, Material *ma, short act, int assign_type)
void BKE_material_defaults_free_gpu(void)
static Material default_material_volume
static bool fill_texpaint_slots_cb(bNode *node, void *userdata)
void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma)
void BKE_material_copybuf_clear(void)
void BKE_material_eval(struct Depsgraph *depsgraph, Material *material)
Material * BKE_material_default_surface(void)
bool BKE_object_material_slot_remove(Main *bmain, Object *ob)
static bNode * nodetree_uv_node_recursive(bNode *node)
void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
struct bNodeTree * nodetree
struct PreviewImage * preview
struct MaterialGPencilStyle * gp_style
struct TexPaintSlot * texpaintslot
struct CurveCache * curve_cache
struct ToolSettings * toolsettings
struct bNodeSocket * next
struct bNodeType * typeinfo