Fix T64514: wrong grease pencil icon preview renders

This broken when the new Cycles/Eevee preview scene was added, make it work
the same as before for Grease Pencil now.
This commit is contained in:
2019-05-14 17:57:10 +02:00
parent 70f3ff808a
commit 0ab7e78b85

View File

@@ -270,7 +270,7 @@ static const char *preview_collection_name(const char pr_type)
case MA_FLUID:
return "Fluid";
case MA_SPHERE_A:
return "World Shader Ball";
return "World Sphere";
case MA_LAMP:
return "Lamp";
case MA_SKY:
@@ -437,7 +437,14 @@ static Scene *preview_prepare_scene(
sce->world->horb = 0.05f;
}
set_preview_visibility(sce, view_layer, mat->pr_type, sp->pr_method);
if (sp->pr_method == PR_ICON_RENDER && sp->pr_main == G_pr_main_grease_pencil) {
/* For grease pencil, always use sphere for icon renders. */
set_preview_visibility(sce, view_layer, MA_SPHERE_A, sp->pr_method);
}
else {
/* Use specified preview shape for both preview panel and icon previews. */
set_preview_visibility(sce, view_layer, mat->pr_type, sp->pr_method);
}
if (sp->pr_method != PR_ICON_RENDER) {
if (mat->nodetree && sp->pr_method == PR_NODE_RENDER) {