Merged 38568-38822
authorJason Hays <jason_hays22@mymail.eku.edu>
Fri, 29 Jul 2011 17:57:46 +0000 (17:57 +0000)
committerJason Hays <jason_hays22@mymail.eku.edu>
Fri, 29 Jul 2011 17:57:46 +0000 (17:57 +0000)
1  2 
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/editors/armature/editarmature.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_scene.c

index a206ff3b274566219a0cc495881f1c58fce0ee40,083c330f61da3cb2b8bf072daed9419671fd18ef..7e523dfc422b38065239c6ccd1e904e44110c889
@@@ -54,21 -54,13 +54,13 @@@ class VIEW3D_HT_header(bpy.types.Header
                  sub.menu("VIEW3D_MT_object")
  
          row = layout.row()
+         # Contains buttons like Mode, Pivot, Manipulator, Layer, Mesh Select Mode...
          row.template_header_3D()
  
-         # do in C for now since these buttons cant be both toggle AND exclusive.
-         '''
-         if obj and obj.mode == 'EDIT' and obj.type == 'MESH':
-             row_sub = row.row(align=True)
-             row_sub.prop(toolsettings, "mesh_select_mode", text="", index=0, icon='VERTEXSEL')
-             row_sub.prop(toolsettings, "mesh_select_mode", text="", index=1, icon='EDGESEL')
-             row_sub.prop(toolsettings, "mesh_select_mode", text="", index=2, icon='FACESEL')
-         '''
          if obj:
              # Particle edit
              if obj.mode == 'PARTICLE_EDIT':
-                 row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True, toggle=True)
+                 row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True)
  
              # Occlude geometry
              if view.viewport_shade in {'SOLID', 'SHADED', 'TEXTURED'} and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
                      row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
  
          # Snap
+         snap_element = toolsettings.snap_element
          row = layout.row(align=True)
          row.prop(toolsettings, "use_snap", text="")
          row.prop(toolsettings, "snap_element", text="", icon_only=True)
-         if toolsettings.snap_element != 'INCREMENT':
+         if snap_element != 'INCREMENT':
              row.prop(toolsettings, "snap_target", text="")
-             if obj and obj.mode == 'OBJECT':
-                 row.prop(toolsettings, "use_snap_align_rotation", text="")
-         if toolsettings.snap_element == 'VOLUME':
+             if obj:
+                 if obj.mode == 'OBJECT':
+                     row.prop(toolsettings, "use_snap_align_rotation", text="")
+                 elif obj.mode == 'EDIT':
+                     row.prop(toolsettings, "use_snap_self", text="")
+         if snap_element == 'VOLUME':
              row.prop(toolsettings, "use_snap_peel_object", text="")
-         elif toolsettings.snap_element == 'FACE':
+         elif snap_element == 'FACE':
              row.prop(toolsettings, "use_snap_project", text="")
-             if toolsettings.use_snap_project and obj.mode == 'EDIT':
-                 row.prop(toolsettings, "use_snap_project_self", text="")
  
          # OpenGL render
          row = layout.row(align=True)
@@@ -1072,8 -1067,6 +1067,8 @@@ class VIEW3D_MT_paint_weight(bpy.types.
          layout.operator("object.vertex_group_invert", text="Invert")
          layout.operator("object.vertex_group_clean", text="Clean")
          layout.operator("object.vertex_group_levels", text="Levels")
 +        #Jason
 +        layout.operator("object.vertex_group_fix", text="Fix Deforms")
  
          layout.separator()
  
index 85a6da35bea3d9395bafd19cffc27a6b367fdae7,91cfd22b3d654c6a2609e79a03f6842538529430..67c595e4654c89079912ced9493b886f78d9d52a
@@@ -58,6 -58,7 +58,7 @@@ def draw_gpencil_tools(context, layout)
      row = col.row()
      row.prop(context.tool_settings, "use_grease_pencil_sessions")
  
  # ********** default tools for objectmode ****************
  
  class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel):
@@@ -116,7 -117,8 +117,8 @@@ class VIEW3D_PT_tools_meshedit(View3DPa
          col.operator("transform.translate")
          col.operator("transform.rotate")
          col.operator("transform.resize", text="Scale")
-         col.operator("transform.shrink_fatten", text="Along Normal")
+         col.operator("transform.shrink_fatten", text="Shrink/Fatten")
+         col.operator("transform.push_pull", text="Push/Pull")
  
          col = layout.column(align=True)
          col.label(text="Deform:")
@@@ -638,8 -640,6 +640,8 @@@ class VIEW3D_PT_tools_brush(PaintPanel
          elif context.weight_paint_object and brush:
              layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
              layout.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize")
 +            # Jason was here
 +            layout.prop(context.tool_settings, "use_multipaint", text="Multi-Paint")
  
              col = layout.column()
  
@@@ -1052,7 -1052,6 +1054,7 @@@ class VIEW3D_PT_tools_weightpaint(View3
          col.operator("object.vertex_group_invert", text="Invert")
          col.operator("object.vertex_group_clean", text="Clean")
          col.operator("object.vertex_group_levels", text="Levels")
 +        col.operator("object.vertex_group_fix", text="Fix Deforms")
  
  
  class VIEW3D_PT_tools_weightpaint_options(View3DPanel, bpy.types.Panel):
index edad8ee0dac7c8b7cd20e773bb465f541140c94a,662c872b7f1cdf6a28c9bff287e2bfaa13a04257..47686c2626fd87cdf8ff49d65cf276869f4781c8
@@@ -268,44 -268,6 +268,44 @@@ static void cdDM_update_normals_from_pb
  
        BLI_pbvh_update(cddm->pbvh, PBVH_UpdateNormals, face_nors);
  }
 +// Jason
 +static void cdDM_drawSelectedVerts(DerivedMesh *dm)
 +{
 +      CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
 +      MVert *mv = cddm->mvert;
 +      int i;
 +      if( GPU_buffer_legacy(dm) ) {
 +              char prev_sel= 0; /* always invalid */;
 +
 +              glBegin(GL_POINTS);
 +              for(i = 0; i < dm->numVertData; i++, mv++) {
 +                      if(!(mv->flag & ME_HIDE)) {
 +                              const char sel= mv->flag & 1;
 +                              if(prev_sel != sel) {
 +                                      prev_sel= sel;
 +
 +                                      // TODO define selected color
 +                                      if(sel) {
 +                                              glColor3f(1.0f, 1.0f, 0.0f);
 +                                      }else {
 +                                              glColor3f(0.0f, 0.0f, 0.0f);
 +                                      }
 +                              }
 +
 +                              glVertex3fv(mv->co);
 +                      }
 +              }
 +              glEnd();
 +      }
 +      else {  /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
 +              GPU_vertex_setup(dm);
 +              if( !GPU_buffer_legacy(dm) ) {
 +                      if(dm->drawObject->tot_triangle_point)  glDrawArrays(GL_POINTS,0, dm->drawObject->tot_triangle_point);
 +                      else                                                    glDrawArrays(GL_POINTS,0, dm->drawObject->tot_loose_point);
 +              }
 +              GPU_buffer_unbind();
 +      }
 +}
  
  static void cdDM_drawVerts(DerivedMesh *dm)
  {
@@@ -1325,6 -1287,7 +1325,7 @@@ static void cdDM_drawMappedFacesGLSL(De
                                                QUATCOPY((float *)&varray[elementsize*curface*3+offset+elementsize*2], tang);
                                                offset += sizeof(float)*4;
                                        }
+                                       (void)offset;
                                }
                                curface++;
                                if(mface->v4) {
                                                        QUATCOPY((float *)&varray[elementsize*curface*3+offset+elementsize*2], tang);
                                                        offset += sizeof(float)*4;
                                                }
+                                               (void)offset;
                                        }
                                        curface++;
                                        i++;
@@@ -1550,8 -1514,6 +1552,8 @@@ static CDDerivedMesh *cdDM_create(cons
        dm->getFaceMap = cdDM_getFaceMap;
  
        dm->drawVerts = cdDM_drawVerts;
 +      // Jason
 +      dm->drawSelectedVerts = cdDM_drawSelectedVerts;
  
        dm->drawUVEdges = cdDM_drawUVEdges;
        dm->drawEdges = cdDM_drawEdges;
index f5293948a7b890390d16622e3aa73d293cc551ca,628cdbf21e9d1373662e57444129b988330b10b5..cfe639578dc877bdf53f866cc34e5d56aec50136
@@@ -1478,10 -1478,8 +1478,8 @@@ static int armature_select_linked_invok
        bArmature *arm;
        EditBone *bone, *curBone, *next;
        int extend= RNA_boolean_get(op->ptr, "extend");
-       ARegion *ar;
        Object *obedit= CTX_data_edit_object(C);
        arm= obedit->data;
-       ar= CTX_wm_region(C);
  
        view3d_operator_needs_opengl(C);
  
@@@ -4260,69 -4258,28 +4258,69 @@@ static int bone_looper(Object *ob, Bon
        
        return count;
  }
 +// Jason
 +Bone* get_other_selected_bone(Object *ob) {
 +      Bone *bone;
 +      int i;
 +      bone = get_indexed_bone(ob, 0);
 +      for(i = 0; bone;){
 +              if(bone->flag & BONE_SELECTED) {
 +                      return bone;
 +              }
 +              i++;
 +              bone = get_indexed_bone(ob, i);
 +      }
  
 +      return NULL;
 +}
  /* called from editview.c, for mode-less pose selection */
  /* assumes scene obact and basact is still on old situation */
  int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, short hits, short extend)
  {
        Object *ob= base->object;
        Bone *nearBone;
 -      
 +      // Jason
 +      Bone *new_act_bone;
 +
        if (!ob || !ob->pose) return 0;
  
        nearBone= get_bone_from_selectbuffer(scene, base, buffer, hits, 1);
 -      
 +
        /* if the bone cannot be affected, don't do anything */
        if ((nearBone) && !(nearBone->flag & BONE_UNSELECTABLE)) {
                bArmature *arm= ob->data;
                
                /* since we do unified select, we don't shift+select a bone if the armature object was not active yet */
 -              if (!(extend) || (base != scene->basact)) {
 -                      ED_pose_deselectall(ob, 0);
 -                      nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
 -                      arm->act_bone= nearBone;
 -                      
 +              /* Jason was here, I'm doing a select for multibone painting */
 +              if ((base != scene->basact)) {//if (!(extend) || (base != scene->basact)) {
 +                      /* Jason was here */
 +                      /* only deselect all if they aren't using 'shift' */
 +                      if(!extend) {
 +                              ED_pose_deselectall(ob, 0);
 +                              nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
 +                              arm->act_bone= nearBone;
 +                              ED_vgroup_select_by_name(OBACT, nearBone->name);
 +                      }
 +                      else {
 +                              // Jason deselect this bone specifically if it is selected already
 +                              if (nearBone->flag & BONE_SELECTED) {
 +                                      nearBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
 +                                      if(nearBone == arm->act_bone) {
 +                                              // make a different bone the active one if it exists
 +                                              new_act_bone = get_other_selected_bone(ob);
 +                                              if(new_act_bone) {
 +                                                      new_act_bone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
 +                                                      arm->act_bone = new_act_bone;
 +                                                      ED_vgroup_select_by_name(OBACT, new_act_bone->name);
 +                                              }
 +                                      }
 +                              // or select the bone if they are using shift
 +                              } else {
 +                                      nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
 +                                      arm->act_bone= nearBone;
 +                              }
 +                      } 
 +                      DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA);
                                // XXX old cruft! use notifiers instead
                        //select_actionchannel_by_name(ob->action, nearBone->name, 1);
                }
@@@ -5086,10 -5043,6 +5084,10 @@@ void POSE_OT_select_inverse(wmOperatorT
  static int pose_de_select_all_exec(bContext *C, wmOperator *op)
  {
        int action = RNA_enum_get(op->ptr, "action");
 +      //Jason
 +      Object *ob = NULL;
 +      Scene *scene= CTX_data_scene(C);
 +      int multipaint = scene->toolsettings->multipaint;
  
        if (action == SEL_TOGGLE) {
                action= CTX_DATA_COUNT(C, selected_pose_bones) ? SEL_DESELECT : SEL_SELECT;
        CTX_DATA_END;
  
        WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
 -      
 +      // Jason
 +      if(multipaint) {
 +              ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
 +              DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
 +      }
 +
        return OPERATOR_FINISHED;
  }
  
index 8b03cf2787e6beb56bc6c169cc5197778fbf0976,34315494e14314274fda2e35413b1d2c2d05f599..f35102edcaf40078c36dbfc048a1dec8a50240c5
@@@ -851,7 -851,7 +851,7 @@@ uiLayout *uiTemplateModifier(uiLayout *
  
        /* verify we have valid data */
        if(!RNA_struct_is_a(ptr->type, &RNA_Modifier)) {
-               RNA_warning("uiTemplateModifier: expected modifier on object.\n");
+               RNA_warning("uiTemplateModifier: Expected modifier on object.\n");
                return NULL;
        }
  
        md= ptr->data;
  
        if(!ob || !(GS(ob->id.name) == ID_OB)) {
-               RNA_warning("uiTemplateModifier: expected modifier on object.\n");
+               RNA_warning("uiTemplateModifier: Expected modifier on object.\n");
                return NULL;
        }
        
@@@ -976,9 -976,6 +976,6 @@@ static uiLayout *draw_constraint(uiLayo
        block= uiLayoutGetBlock(box);
  
        /* Draw constraint header */
-       
-       /* rounded header */
-       // rb_col= (con->flag & CONSTRAINT_ACTIVE)?50:20; // UNUSED
  
        /* open/close */
        uiBlockSetEmboss(block, UI_EMBOSSN);
@@@ -1083,7 -1080,7 +1080,7 @@@ uiLayout *uiTemplateConstraint(uiLayou
  
        /* verify we have valid data */
        if(!RNA_struct_is_a(ptr->type, &RNA_Constraint)) {
-               RNA_warning("uiTemplateConstraint: expected constraint on object.\n");
+               RNA_warning("uiTemplateConstraint: Expected constraint on object.\n");
                return NULL;
        }
  
        con= ptr->data;
  
        if(!ob || !(GS(ob->id.name) == ID_OB)) {
-               RNA_warning("uiTemplateConstraint: expected constraint on object.\n");
+               RNA_warning("uiTemplateConstraint: Expected constraint on object.\n");
                return NULL;
        }
        
@@@ -1137,7 -1134,7 +1134,7 @@@ void uiTemplatePreview(uiLayout *layout
        PointerRNA texture_ptr;
  
        if(id && !ELEM4(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA)) {
-               RNA_warning("uiTemplatePreview: expected ID of type material, texture, lamp or world.\n");
+               RNA_warning("uiTemplatePreview: Expected ID of type material, texture, lamp or world.\n");
                return;
        }
  
@@@ -2121,12 -2118,6 +2118,12 @@@ static void list_item_row(bContext *C, 
                //uiItemR(row, itemptr, "mute", 0, "", ICON_MUTE_IPO_OFF);
                uiBlockSetEmboss(block, UI_EMBOSS);
        }
 +      /* Jason was here: I need the RNA struct for vertex groups */
 +      else if(RNA_struct_is_a(itemptr->type, &RNA_VertexGroup)) {
 +              uiItemL(sub, name, icon);
 +              uiBlockSetEmboss(block, UI_EMBOSS);
 +              uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "flag", 0, 0, 0, 0, 0,  NULL);
 +      }
        else
                uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */
  
@@@ -2177,14 -2168,14 +2174,14 @@@ void uiTemplateList(uiLayout *layout, b
        if(prop) {
                type= RNA_property_type(prop);
                if(type != PROP_COLLECTION) {
-                       RNA_warning("uiTemplateList: expected collection property.\n");
+                       RNA_warning("uiTemplateList: Expected collection property.\n");
                        return;
                }
        }
  
        activetype= RNA_property_type(activeprop);
        if(activetype != PROP_INT) {
-               RNA_warning("uiTemplateList: expected integer property.\n");
+               RNA_warning("uiTemplateList: Expected integer property.\n");
                return;
        }
  
                        /* create list items */
                        RNA_PROP_BEGIN(ptr, itemptr, prop) {
                                /* create button */
-                               if(i == 9)
+                               if(!(i % 9))
                                        row= uiLayoutRow(col, 0);
  
                                icon= list_item_icon_get(C, &itemptr, rnaicon, 1);
        }
        else if(listtype == 'c') {
                /* compact layout */
-               found= 0;
  
                row= uiLayoutRow(layout, 1);
  
index 4632e0897f28175c365d5aff23850bad68573170,ae80a554e08796d872a5f9afe517fdddeb26721e..ab8287ce3a5dd39c069b97f2524dc187b668ea6c
@@@ -495,15 -495,9 +495,15 @@@ void uiTemplateHeader3D(uiLayout *layou
                /* Manipulators aren't used in weight paint mode */
                
                PointerRNA meshptr;
 -
                RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr);
 -              uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
 +              if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) {
 +                      uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
 +              } else {
 +                      // Jason
 +                      row= uiLayoutRow(layout, 1);
 +                      uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
 +                      uiItemR(row, &meshptr, "wp_vert_sel", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
 +              }
        } else {
                const char *str_menu;
  
                uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
                uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
  
-               /* NDOF */
-               /* Not implemented yet
-               if (G.ndofdevice ==0 ) {
-                       uiDefIconTextButC(block, ICONTEXTROW,B_NDOF, ICON_NDOF_TURN, ndof_pup(), 0,0,UI_UNIT_X+10,UI_UNIT_Y, &(v3d->ndofmode), 0, 3.0, 0, 0, "Ndof mode");
-                       uiDefIconButC(block, TOG, B_NDOF,  ICON_NDOF_DOM,
-                                       0,0,UI_UNIT_X,UI_UNIT_Y,
-                                       &v3d->ndoffilter, 0, 1, 0, 0, "dominant axis");
-               }
-                */
                /* Transform widget / manipulators */
                row= uiLayoutRow(layout, 1);
                uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
index e9d7257d472b6b9285eca8de3d9026331b0e372b,2211f93a8aebbc304759160e1df154ab7f55e77f..dcf646532c49b822b89d601052499f3f0d870d8e
@@@ -726,13 -726,10 +726,13 @@@ typedef struct ToolSettings 
        short snap_flag, snap_target;
        short proportional, prop_mode;
        char proportional_objects; /* proportional edit, object mode */
 -      char pad[3];
 +      char pad[7];
  
        int auto_normalize; /*auto normalizing mode in wpaint*/
  
 +      //Jason
 +      int multipaint; /* paint multiple bones in wpaint */
 +
        short sculpt_paint_settings; /* user preferences for sculpt and paint */
        short pad1;
        int sculpt_paint_unified_size; /* unified radius of brush in pixels */
@@@ -1077,7 -1074,7 +1077,7 @@@ typedef struct Scene 
  #define SCE_SNAP_ROTATE                       2
  #define SCE_SNAP_PEEL_OBJECT  4
  #define SCE_SNAP_PROJECT              8
- #define SCE_SNAP_PROJECT_NO_SELF      16
+ #define SCE_SNAP_NO_SELF              16
  /* toolsettings->snap_target */
  #define SCE_SNAP_TARGET_CLOSEST       0
  #define SCE_SNAP_TARGET_CENTER        1
  #define PROP_SHARP             3
  #define PROP_LIN               4
  #define PROP_CONST             5
- #define PROP_RANDOM           6
+ #define PROP_RANDOM            6
+ #define PROP_MODE_MAX          7
  
  /* toolsettings->proportional */
  #define PROP_EDIT_OFF                 0
index 11a1c3a023de51d39de22709b40f00d49f75cb80,f4028e45e965e18bd2a95f4d0e7b4bbf01d78468..048afb594193b8cd88ade71770a74e647ca48083
@@@ -135,7 -135,9 +135,9 @@@ EnumPropertyItem image_type_items[] = 
  #endif
        {R_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
        {R_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
+ #ifdef WITH_FRAMESERVER
        {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"},
+ #endif
  #ifdef WITH_FFMPEG
        {R_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"},
        {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"},
@@@ -1088,14 -1090,6 +1090,14 @@@ static void rna_def_tool_settings(Blend
        RNA_def_property_ui_text(prop, "WPaint Auto-Normalize", 
                "Ensure all bone-deforming vertex groups add up to 1.0 while "
                 "weight painting");
 +      RNA_def_property_update(prop, 0, "rna_update_active_object");
 +
 +      prop = RNA_def_property(srna, "use_multipaint", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1);
 +      RNA_def_property_ui_text(prop, "WPaint Multi-Paint", 
 +              "Paint across all selected bones while "
 +               "weight painting");
 +      RNA_def_property_update(prop, 0, "rna_update_active_object");
  
        prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
        RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
        RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
  
-       prop= RNA_def_property(srna, "use_snap_project_self", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT_NO_SELF);
-       RNA_def_property_ui_text(prop, "Project to Self", "Project into its self (editmode)");
+       prop= RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_NO_SELF);
+       RNA_def_property_ui_text(prop, "Project to Self", "Snap onto its self (editmode)");
        RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
        RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
        
@@@ -2821,7 -2815,7 +2823,7 @@@ static void rna_def_scene_render_data(B
        
        prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "bake_filter");
-       RNA_def_property_range(prop, 0, 32);
+       RNA_def_property_range(prop, 0, 64);
        RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter");
  
        prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);