[Bf-blender-cvs] [0890922dbd5] greasepencil-object: Recover line deleted by mistake in previous commit

Antonio Vazquez noreply at git.blender.org
Sun Apr 1 16:04:02 CEST 2018


Commit: 0890922dbd5ec57776345dca6fff46fd3abe6f80
Author: Antonio Vazquez
Date:   Sun Apr 1 16:02:50 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB0890922dbd5ec57776345dca6fff46fd3abe6f80

Recover line deleted by mistake in previous commit

Still there is a problem when the undo change to a non GP object.

===================================================================

M	source/blender/editors/util/undo.c

===================================================================

diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 40346301075..dfa0602cf98 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -149,6 +149,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
 
 		/* Set special modes for grease pencil */
 		if (sa && (sa->spacetype == SPACE_VIEW3D)) {
+			Object *obact = CTX_data_active_object(C);
 			if (obact && (obact->type == OB_GPENCIL)) {
 				WorkSpace *workspace = CTX_wm_workspace(C);
 				/* set cursor */



More information about the Bf-blender-cvs mailing list