Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/material.c
| Context not available. | |||||
| #include <math.h> | #include <math.h> | ||||
| #include <stddef.h> | #include <stddef.h> | ||||
| #include "CLG_log.h" | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| Context not available. | |||||
| /* used in UI and render */ | /* used in UI and render */ | ||||
| Material defmaterial; | Material defmaterial; | ||||
| static CLG_LogRef LOG = { "bke.material" }; | |||||
| /* called on startup, creator.c */ | /* called on startup, creator.c */ | ||||
| void init_def_material(void) | void init_def_material(void) | ||||
| { | { | ||||
| Context not available. | |||||
| return NULL; | return NULL; | ||||
| else if (act <= 0) { | else if (act <= 0) { | ||||
| if (act < 0) { | if (act < 0) { | ||||
| printf("Negative material index!\n"); | CLOG_ERROR(&LOG, "Negative material index!"); | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| Context not available. | |||||
| /* this should never happen and used to crash */ | /* this should never happen and used to crash */ | ||||
| if (ob->actcol <= 0) { | if (ob->actcol <= 0) { | ||||
| printf("%s: invalid material index %d, report a bug!\n", __func__, ob->actcol); | CLOG_FATAL(&LOG, "invalid material index %d, report a bug!", ob->actcol); | ||||
| BLI_assert(0); | BLI_assert(0); | ||||
| return false; | return false; | ||||
| } | } | ||||
| Context not available. | |||||