[Bf-blender-cvs] [aa0bb475762] master: Fix T63257: Grease Pencil renders incorrectly when in edit-mode
Antonioya
noreply at git.blender.org
Wed Apr 3 19:58:53 CEST 2019
Commit: aa0bb47576262b909183947815d7f626df82b35d
Author: Antonioya
Date: Wed Apr 3 19:58:32 2019 +0200
Branches: master
https://developer.blender.org/rBaa0bb47576262b909183947815d7f626df82b35d
Fix T63257: Grease Pencil renders incorrectly when in edit-mode
===================================================================
M source/blender/blenkernel/intern/gpencil_modifier.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
M source/blender/draw/engines/gpencil/gpencil_shader_fx.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index d09a914e23e..30bf30e2842 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -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;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 384f25ecaa5..1cc493dd8f5 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -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 {
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index b1bc796bfa7..1d1fe20aba9 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -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;
}
More information about the Bf-blender-cvs
mailing list