Cleanup: remove unused Blender Internal preview.blend.

This commit is contained in:
Brecht Van Lommel 2018-09-06 17:16:11 +02:00
parent 329b4c3363
commit 310e396b51
4 changed files with 15 additions and 37 deletions

Binary file not shown.

View File

@ -674,7 +674,6 @@ if(WITH_BLENDER)
# blender UI only
# blends
data_to_c_simple(../../../../release/datafiles/preview.blend SRC)
data_to_c_simple(../../../../release/datafiles/preview_cycles.blend SRC)
data_to_c_simple(../../../../release/datafiles/preview_grease_pencil.blend SRC)

View File

@ -36,9 +36,6 @@
extern int datatoc_startup_blend_size;
extern char datatoc_startup_blend[];
extern int datatoc_preview_blend_size;
extern char datatoc_preview_blend[];
extern int datatoc_preview_cycles_blend_size;
extern char datatoc_preview_cycles_blend[];

View File

@ -197,7 +197,6 @@ typedef struct IconPreview {
/* *************************** Preview for buttons *********************** */
static Main *G_pr_main = NULL;
static Main *G_pr_main_cycles = NULL;
static Main *G_pr_main_grease_pencil = NULL;
@ -227,7 +226,6 @@ void ED_preview_ensure_dbase(void)
static bool base_initialized = false;
BLI_assert(BLI_thread_is_main());
if (!base_initialized) {
G_pr_main = load_main_from_memory(datatoc_preview_blend, datatoc_preview_blend_size);
G_pr_main_cycles = load_main_from_memory(datatoc_preview_cycles_blend, datatoc_preview_cycles_blend_size);
G_pr_main_grease_pencil = load_main_from_memory(datatoc_preview_grease_pencil_blend, datatoc_preview_grease_pencil_blend_size);
base_initialized = true;
@ -249,9 +247,6 @@ static bool check_engine_supports_preview(Scene *scene)
void ED_preview_free_dbase(void)
{
if (G_pr_main)
BKE_main_free(G_pr_main);
if (G_pr_main_cycles)
BKE_main_free(G_pr_main_cycles);
@ -1184,25 +1179,17 @@ static void icon_preview_startjob_all_sizes(void *customdata, short *stop, short
if (is_render) {
BLI_assert(ip->id);
/* texture icon rendering is hardcoded to use the BI scene,
* so don't even think of using cycle's bmain for
* texture icons
*/
if (GS(ip->id->name) != ID_TE) {
/* grease pencil use its own preview file */
if (GS(ip->id->name) == ID_MA) {
ma = (Material *)ip->id;
}
if ((ma == NULL) || (ma->gp_style == NULL)) {
sp->pr_main = G_pr_main_cycles;
}
else {
sp->pr_main = G_pr_main_grease_pencil;
}
/* grease pencil use its own preview file */
if (GS(ip->id->name) == ID_MA) {
ma = (Material *)ip->id;
}
if ((ma == NULL) || (ma->gp_style == NULL)) {
sp->pr_main = G_pr_main_cycles;
}
else {
sp->pr_main = G_pr_main;
sp->pr_main = G_pr_main_grease_pencil;
}
}
@ -1373,22 +1360,17 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
/* hardcoded preview .blend for Eevee + Cycles, this should be solved
* once with custom preview .blend path for external engines */
if ((method != PR_NODE_RENDER) && id_type != ID_TE) {
/* grease pencil use its own preview file */
if (GS(id->name) == ID_MA) {
ma = (Material *)id;
}
if ((ma == NULL) || (ma->gp_style == NULL)) {
sp->pr_main = G_pr_main_cycles;
}
else {
sp->pr_main = G_pr_main_grease_pencil;
}
/* grease pencil use its own preview file */
if (GS(id->name) == ID_MA) {
ma = (Material *)id;
}
if ((ma == NULL) || (ma->gp_style == NULL)) {
sp->pr_main = G_pr_main_cycles;
}
else {
sp->pr_main = G_pr_main;
sp->pr_main = G_pr_main_grease_pencil;
}
if (ob && ob->totcol) copy_v4_v4(sp->col, ob->col);