[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21528] branches/blender2.5/blender/source /blender: 2.5: X11

Brecht Van Lommel brecht at blender.org
Sat Jul 11 16:51:13 CEST 2009


Revision: 21528
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21528
Author:   blendix
Date:     2009-07-11 16:51:13 +0200 (Sat, 11 Jul 2009)

Log Message:
-----------
2.5: X11

* Cursor grabbing is now done only if the OPTYPE_BLOCKING flag
  is set for the operator, since for e.g. render it should not
  block.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/animation/anim_markers.c
    branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
    branches/blender2.5/blender/source/blender/editors/armature/editarmature_sketch.c
    branches/blender2.5/blender/source/blender/editors/armature/poselib.c
    branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c
    branches/blender2.5/blender/source/blender/editors/physics/editparticle.c
    branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c
    branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c
    branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c
    branches/blender2.5/blender/source/blender/editors/space_image/image_ops.c
    branches/blender2.5/blender/source/blender/editors/space_node/node_edit.c
    branches/blender2.5/blender/source/blender/editors/space_node/node_select.c
    branches/blender2.5/blender/source/blender/editors/space_text/text_ops.c
    branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_edit.c
    branches/blender2.5/blender/source/blender/editors/transform/transform_ops.c
    branches/blender2.5/blender/source/blender/windowmanager/WM_types.h
    branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: branches/blender2.5/blender/source/blender/editors/animation/anim_markers.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_markers.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_markers.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -620,7 +620,7 @@
 	ot->poll= ED_operator_areaactive;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 	
 	/* rna storage */
 	RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);

Modified: branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -209,6 +209,9 @@
 	ot->invoke= change_frame_invoke;
 	ot->cancel= change_frame_cancel;
 	ot->modal= change_frame_modal;
+	
+	/* flags */
+	ot->flag= OPTYPE_BLOCKING;
 
 	/* rna */
 	RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);

Modified: branches/blender2.5/blender/source/blender/editors/armature/editarmature_sketch.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/editarmature_sketch.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/armature/editarmature_sketch.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -3463,7 +3463,7 @@
 	RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
 
 	/* flags */
-//	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO
 }
 
 void SKETCH_OT_gesture(wmOperatorType *ot)
@@ -3482,5 +3482,6 @@
 	RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
 
 	/* flags */
-//	ot->flag= OPTYPE_UNDO;
+	ot->flag= OPTYPE_BLOCKING; // OPTYPE_UNDO
 }
+

Modified: branches/blender2.5/blender/source/blender/editors/armature/poselib.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/poselib.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/armature/poselib.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -1489,7 +1489,7 @@
 	ot->poll= ED_operator_posemode;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 	
 	/* properties */	
 	RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);

Modified: branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -257,7 +257,7 @@
 	ot->modal= view_pan_modal;
 	
 	/* operator is repeatable */
-	ot->flag= OPTYPE_REGISTER;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
 	
 	/* rna - must keep these in sync with the other operators */
 	RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -832,7 +832,7 @@
 	ot->modal= view_zoomdrag_modal;
 	
 	/* operator is repeatable */
-	ot->flag= OPTYPE_REGISTER;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
 	
 	/* rna - must keep these in sync with the other operators */
 	RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, "Delta X", "", -FLT_MAX, FLT_MAX);
@@ -1261,6 +1261,9 @@
 	/* identifiers */
 	ot->name= "Scroller Activate";
 	ot->idname= "VIEW2D_OT_scroller_activate";
+
+	/* flags */
+	ot->flag= OPTYPE_BLOCKING;
 	
 	/* api callbacks */
 	ot->invoke= scroller_activate_invoke;

Modified: branches/blender2.5/blender/source/blender/editors/physics/editparticle.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/physics/editparticle.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/physics/editparticle.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -2344,7 +2344,7 @@
 	ot->poll= PE_poll;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 }
 
 /*************************** delete operator **************************/
@@ -3358,7 +3358,7 @@
 	ot->poll= PE_poll_3dview;
 
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
 	/* properties */
 	RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");

Modified: branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -503,8 +503,10 @@
 	
 	ot->invoke= actionzone_invoke;
 	ot->modal= actionzone_modal;
+	ot->poll= actionzone_area_poll;
+
+	ot->flag= OPTYPE_BLOCKING;
 	
-	ot->poll= actionzone_area_poll;
 	RNA_def_int(ot->srna, "modifier", 0, 0, 2, "modifier", "modifier state", 0, 2);
 }
 
@@ -618,6 +620,8 @@
 	ot->invoke= area_swap_invoke;
 	ot->modal= area_swap_modal;
 	ot->poll= ED_operator_areaactive;
+
+	ot->flag= OPTYPE_BLOCKING;
 }
 
 /* *********** Duplicate area as new window operator ****************** */
@@ -912,9 +916,10 @@
 	ot->invoke= area_move_invoke;
 	ot->cancel= area_move_cancel;
 	ot->modal= area_move_modal;
-
 	ot->poll= ED_operator_screen_mainwinactive; /* when mouse is over area-edge */
 
+	ot->flag= OPTYPE_BLOCKING;
+
 	/* rna */
 	RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
 	RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
@@ -1227,7 +1232,7 @@
 	ot->modal= area_split_modal;
 	
 	ot->poll= ED_operator_areaactive;
-	ot->flag= OPTYPE_REGISTER;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
 	
 	/* rna */
 	RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", "");
@@ -1344,6 +1349,8 @@
 	ot->modal= region_scale_modal;
 	
 	ot->poll= ED_operator_areaactive;
+	
+	ot->flag= OPTYPE_BLOCKING;
 }
 
 
@@ -1725,9 +1732,10 @@
 	ot->exec= area_join_exec;
 	ot->invoke= area_join_invoke;
 	ot->modal= area_join_modal;
-
 	ot->poll= ED_operator_areaactive;
 
+	ot->flag= OPTYPE_BLOCKING;
+
 	/* rna */
 	RNA_def_int(ot->srna, "x1", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX);
 	RNA_def_int(ot->srna, "y1", -100, INT_MIN, INT_MAX, "Y 1", "", INT_MIN, INT_MAX);

Modified: branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_image.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -4804,7 +4804,7 @@
 	ot->poll= image_paint_poll;
 
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
 	/* properties */
 	RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
@@ -4911,7 +4911,7 @@
 	ot->poll= image_paint_poll;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 }
 
 /************************ grab clone operator ************************/
@@ -5010,7 +5010,7 @@
 	ot->poll= image_paint_2d_clone_poll;
 
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
 	/* properties */
 	RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates.", -1.0f, 1.0f);

Modified: branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -1225,7 +1225,7 @@
 	ot->poll= wp_poll;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 }
 
 void PAINT_OT_vertex_paint_radial_control(wmOperatorType *ot)
@@ -1241,7 +1241,7 @@
 	ot->poll= vp_poll;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 }
 
 /* ************ weight paint operator ********** */
@@ -1567,7 +1567,7 @@
 	ot->poll= wp_poll;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 	
 }
 
@@ -1864,6 +1864,6 @@
 	ot->poll= vp_poll;
 	
 	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 }
 

Modified: branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c	2009-07-11 14:50:12 UTC (rev 21527)
+++ branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c	2009-07-11 14:51:13 UTC (rev 21528)
@@ -1151,7 +1151,7 @@
 	ot->exec= sculpt_radial_control_exec;
 	ot->poll= sculpt_poll;
 
-	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 }
 
 /**** Operator for applying a stroke (various attributes including mouse path)
@@ -1589,7 +1589,7 @@
 	ot->poll= sculpt_poll;
 	
 	/* flags (sculpt does own undo? (ton) */
-	ot->flag= OPTYPE_REGISTER;
+	ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
 
 	/* properties */
 	RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");

Modified: branches/blender2.5/blender/source/blender/editors/space_image/image_ops.c

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list