Fix T63257: Grease Pencil renders incorrectly when in edit-mode

This commit is contained in:
Antonio Vazquez 2019-04-03 19:58:32 +02:00
parent 322abc1428
commit aa0bb47576
Notes: blender-bot 2023-02-14 11:20:29 +01:00
Referenced by issue #63257, Grease Pencil renders incorrectly when in edit-mode
3 changed files with 7 additions and 5 deletions

View File

@ -419,7 +419,7 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g
if (GPENCIL_MODIFIER_ACTIVE(md, is_render)) {
const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type);
if (GPENCIL_MODIFIER_EDIT(md, is_edit)) {
if ((GPENCIL_MODIFIER_EDIT(md, is_edit)) && (!is_render)) {
continue;
}
@ -457,7 +457,7 @@ void BKE_gpencil_geometry_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer
if (GPENCIL_MODIFIER_ACTIVE(md, is_render)) {
const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type);
if (GPENCIL_MODIFIER_EDIT(md, is_edit)) {
if ((GPENCIL_MODIFIER_EDIT(md, is_edit)) && (!is_render)) {
continue;
}
@ -481,7 +481,7 @@ int BKE_gpencil_time_modifier(Depsgraph *depsgraph, Scene *scene, Object *ob,
if (GPENCIL_MODIFIER_ACTIVE(md, is_render)) {
const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type);
if (GPENCIL_MODIFIER_EDIT(md, is_edit)) {
if ((GPENCIL_MODIFIER_EDIT(md, is_edit)) && (!is_render)) {
continue;
}

View File

@ -550,7 +550,7 @@ static void gpencil_add_draw_data(void *vedata, Object *ob)
if (!cache_ob->is_dup_ob) {
/* fill shading groups */
if (!is_multiedit) {
if ((!is_multiedit) || (stl->storage->is_render)) {
DRW_gpencil_populate_datablock(&e_data, vedata, ob, cache_ob);
}
else {

View File

@ -58,7 +58,9 @@ static bool effect_is_active(bGPdata *gpd, ShaderFxData *fx, bool is_render)
}
bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
if (((fx->mode & eShaderFxMode_Editmode) == 0) && (is_edit)) {
if (((fx->mode & eShaderFxMode_Editmode) == 0) &&
(is_edit) && (!is_render))
{
return false;
}