Revision: 37237
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37237
Author:   jwilkins
Date:     2011-06-06 06:06:01 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
changed some operators to not register on the operator panel

** for some, they have no properties to actually show
** for the ones that do (paint/sculpt tool select operators), selecting a new 
tool from the operator panel causes Blender to crash due to bad 
ob->paint->sculpt->hidden_areas pointer.

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c     
2011-06-06 03:53:38 UTC (rev 37236)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c     
2011-06-06 06:06:01 UTC (rev 37237)
@@ -84,7 +84,9 @@
        ot->exec= brush_add_exec;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       ot->flag= OPTYPE_UNDO;
 }
 
 
@@ -139,7 +141,9 @@
        ot->exec= brush_scale_size_exec;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       ot->flag= OPTYPE_UNDO;
 
        RNA_def_float(ot->srna, "scalar", 1, 0, 2, "Scalar", "Factor to scale 
brush size by", 0, 2);
 }
@@ -166,7 +170,9 @@
        ot->poll= vertex_paint_mode_poll;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       ot->flag= OPTYPE_UNDO;
 }
 
 static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
@@ -195,7 +201,9 @@
        ot->exec= brush_reset_exec;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       ot->flag= OPTYPE_UNDO;
 }
 
 /* generic functions for setting the active brush based on the tool */
@@ -258,7 +266,10 @@
        ot->exec= brush_sculpt_tool_set_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       //XXX: currently undo causes a crash
+       ot->flag= 0;
 
        /* props */
        ot->prop= RNA_def_enum(ot->srna, "tool", brush_sculpt_tool_items, 0, 
"Tool", "");
@@ -283,7 +294,10 @@
        ot->exec= brush_vertex_tool_set_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       //XXX: currently undo causes a crash
+       ot->flag= 0;
 
        /* props */
        ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, 
"Tool", "");
@@ -308,7 +322,10 @@
        ot->exec= brush_weight_tool_set_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       //XXX: currently undo causes a crash
+       ot->flag= 0;
 
        /* props */
        ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, 
"Tool", "");
@@ -333,7 +350,10 @@
        ot->exec= brush_image_tool_set_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       //XXX: doesn't seem to be any reason to register ~jwilkins
+       //XXX: currently undo causes a crash
+       ot->flag= 0;
 
        /* props */
        ot->prop= RNA_def_enum(ot->srna, "tool", brush_image_tool_items, 0, 
"Tool", "");

Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c        
2011-06-06 03:53:38 UTC (rev 37236)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c        
2011-06-06 06:06:01 UTC (rev 37237)
@@ -4430,6 +4430,7 @@
                if(ss->hidden_areas.first) {
                        /* Free all hidden areas */
                        BLI_freelistN(&ss->hidden_areas);
+
                        sculpt_area_hide_update(C);
 
                        /* Avoid cracks in multires */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to