[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56323] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: add support for macro redo if all operators in the macro have an exec()

Campbell Barton ideasman42 at gmail.com
Fri Apr 26 19:36:54 CEST 2013


Revision: 56323
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56323
Author:   campbellbarton
Date:     2013-04-26 17:36:54 +0000 (Fri, 26 Apr 2013)
Log Message:
-----------
add support for macro redo if all operators in the macro have an exec()
this fixes [#35079] 

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2013-04-26 17:29:42 UTC (rev 56322)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2013-04-26 17:36:54 UTC (rev 56323)
@@ -711,7 +711,21 @@
  * checks if WM_operator_repeat() can run at all, not that it WILL run at any time. */
 int WM_operator_repeat_check(const bContext *UNUSED(C), wmOperator *op)
 {
-	return op->type->exec != NULL;
+	if (op->type->exec != NULL) {
+		return true;
+	}
+	else if (op->opm) {
+		/* for macros, check all have exec() we can call */
+		wmOperator *opm;
+		for (opm = op->opm->type->macro.first; opm; opm = opm->next) {
+			if (opm->type->exec == NULL) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	return false;
 }
 
 static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot,




More information about the Bf-blender-cvs mailing list