[Bf-blender-cvs] [6f090b3e37c] soc-2019-npr: LANPR: Updating GPencil will now automatically redraw.
YimingWu
noreply at git.blender.org
Mon Jul 1 11:21:33 CEST 2019
Commit: 6f090b3e37c12c0c5ac1b399d1f5b9ff2d784863
Author: YimingWu
Date: Mon Jul 1 16:30:14 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB6f090b3e37c12c0c5ac1b399d1f5b9ff2d784863
LANPR: Updating GPencil will now automatically redraw.
===================================================================
M source/blender/draw/engines/lanpr/lanpr_ops.c
===================================================================
diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c
index fda2c6e8c39..8309cd81242 100644
--- a/source/blender/draw/engines/lanpr/lanpr_ops.c
+++ b/source/blender/draw/engines/lanpr/lanpr_ops.c
@@ -4489,6 +4489,7 @@ void lanpr_update_gp_strokes_recursive(Depsgraph *dg, struct Collection *col, in
flmd->material,
NULL,
flmd->types);
+ DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
}
}
}
@@ -4537,6 +4538,7 @@ void lanpr_update_gp_strokes_collection(Depsgraph *dg, struct Collection *col, i
col->lanpr.material,
col,
col->lanpr.types);
+ DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
}
int lanpr_update_gp_strokes_exec(struct bContext *C, struct wmOperator *op)
{
@@ -4551,6 +4553,8 @@ int lanpr_update_gp_strokes_exec(struct bContext *C, struct wmOperator *op)
lanpr_update_gp_strokes_collection(dg, scene->master_collection, frame);
+ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
+
return OPERATOR_FINISHED;
}
int lanpr_bake_gp_strokes_exec(struct bContext *C, struct wmOperator *op)
@@ -4575,6 +4579,8 @@ int lanpr_bake_gp_strokes_exec(struct bContext *C, struct wmOperator *op)
lanpr_update_gp_strokes_collection(dg, scene->master_collection, frame);
}
+ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
+
return OPERATOR_FINISHED;
}
More information about the Bf-blender-cvs
mailing list