diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-06 18:16:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-06 18:16:11 +0300 |
commit | 310e396b516f25530ca4f9883a73628de59267b4 (patch) | |
tree | 4f50c25a290acb9cd8ce91c4d22c8cd705c9afb1 /source/blender | |
parent | 329b4c3363e439f1c726b79545364d154c55f39d (diff) |
Cleanup: remove unused Blender Internal preview.blend.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/datafiles/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_datafiles.h | 3 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 48 |
3 files changed, 15 insertions, 37 deletions
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index 4c735634b3f..aa764535349 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -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) diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 333e3d72615..c21ef288aeb 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -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[]; diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 7253f07fea4..6d3e6431afb 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -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); |