Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/icons.c
| Show All 31 Lines | |||||
| #include <math.h> | #include <math.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "DNA_group_types.h" | |||||
| #include "DNA_lamp_types.h" | #include "DNA_lamp_types.h" | ||||
| #include "DNA_material_types.h" | #include "DNA_material_types.h" | ||||
| #include "DNA_object_types.h" | |||||
| #include "DNA_scene_types.h" | |||||
| #include "DNA_texture_types.h" | #include "DNA_texture_types.h" | ||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "DNA_brush_types.h" | #include "DNA_brush_types.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_ghash.h" | #include "BLI_ghash.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| ▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | PreviewImage **BKE_previewimg_id_get_p(ID *id) | ||||
| switch (GS(id->name)) { | switch (GS(id->name)) { | ||||
| #define ID_PRV_CASE(id_code, id_struct) case id_code: { return &((id_struct *)id)->preview; } | #define ID_PRV_CASE(id_code, id_struct) case id_code: { return &((id_struct *)id)->preview; } | ||||
| ID_PRV_CASE(ID_MA, Material); | ID_PRV_CASE(ID_MA, Material); | ||||
| ID_PRV_CASE(ID_TE, Tex); | ID_PRV_CASE(ID_TE, Tex); | ||||
| ID_PRV_CASE(ID_WO, World); | ID_PRV_CASE(ID_WO, World); | ||||
| ID_PRV_CASE(ID_LA, Lamp); | ID_PRV_CASE(ID_LA, Lamp); | ||||
| ID_PRV_CASE(ID_IM, Image); | ID_PRV_CASE(ID_IM, Image); | ||||
| ID_PRV_CASE(ID_BR, Brush); | ID_PRV_CASE(ID_BR, Brush); | ||||
| ID_PRV_CASE(ID_OB, Object); | |||||
| ID_PRV_CASE(ID_GR, Group); | |||||
| ID_PRV_CASE(ID_SCE, Scene); | |||||
| #undef ID_PRV_CASE | #undef ID_PRV_CASE | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| void BKE_previewimg_id_free(ID *id) | void BKE_previewimg_id_free(ID *id) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines | |||||