while looking into adding back brush tool keys found mixed texture/image paint rna...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 1 Apr 2011 04:22:30 +0000 (04:22 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 1 Apr 2011 04:22:30 +0000 (04:22 +0000)
doc/python_api/sphinx_doc_gen.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/context.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/screen/screen_context.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/rna_brush.c

index 3eedd6584062ef38528fa5cb72aadb3925d7121c..fde275c71906aeb9c51c25495f9788977c74b674 100644 (file)
@@ -461,6 +461,7 @@ def pycontext2sphinx(BASEPATH):
         "edit_text": ("Text", False),
         "editable_bones": ("EditBone", True),
         "fluid": ("FluidSimulationModifier", False),
+        "image_paint_object": ("Object", False),
         "lamp": ("Lamp", False),
         "lattice": ("Lattice", False),
         "material": ("Material", False),
@@ -490,7 +491,6 @@ def pycontext2sphinx(BASEPATH):
         "smoke": ("SmokeModifier", False),
         "soft_body": ("SoftBodyModifier", False),
         "texture": ("Texture", False),
-        "texture_paint_object": ("Object", False),
         "texture_slot": ("MaterialTextureSlot", False),
         "vertex_paint_object": ("Object", False),
         "visible_bases": ("ObjectBase", True),
index a77ff0ce5e3062b75034f5d0f5730e74c6dd69aa..b0e2ba053dc60633edefa293af3f310e5d16731b 100644 (file)
@@ -74,20 +74,20 @@ def execute_context_assign(self, context):
     return {'FINISHED'}
 
 
-class BRUSH_OT_set_active_number(bpy.types.Operator):
+class BRUSH_OT_active_index_set(bpy.types.Operator):
     '''Set active sculpt/paint brush from it's number'''
-    bl_idname = "brush.set_active_number"
+    bl_idname = "brush.active_index_set"
     bl_label = "Set Brush Number"
 
     mode = StringProperty(name="mode",
             description="Paint mode to set brush for", maxlen=1024)
-    number = IntProperty(name="number",
+    index = IntProperty(name="number",
             description="Brush number")
 
     _attr_dict = {"sculpt": "use_paint_sculpt",
                   "vertex_paint": "use_paint_vertex",
                   "weight_paint": "use_paint_weight",
-                  "image_paint": "use_paint_texture"}
+                  "image_paint": "use_paint_image"}
 
     def execute(self, context):
         attr = self._attr_dict.get(self.mode)
index b2965d0c37ab8252aa3471f97118d09788d05b77..aaf7336c5c76901ad676348f1f6895b4daa97af3 100644 (file)
@@ -667,7 +667,7 @@ class IMAGE_PT_paint(bpy.types.Panel):
 
             col.prop(brush, "blend", text="Blend")
 
-            if brush.imagepaint_tool == 'CLONE':
+            if brush.image_tool == 'CLONE':
                 col.separator()
                 col.prop(brush, "clone_image", text="Image")
                 col.prop(brush, "clone_alpha", text="Alpha")
@@ -699,13 +699,13 @@ class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, bpy.types.Panel):
 
         col = layout.column(align=True)
 
-        col.prop(brush, "imagepaint_tool", expand=False, text="")
+        col.prop(brush, "image_tool", expand=False, text="")
 
         row = layout.row(align=True)
         row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
         row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
         row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
-        row.prop(brush, "use_paint_texture", text="", icon='TPAINT_HLT')
+        row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
 
 
 class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
index 795e73675ebca26b0957a3a5c0007866a07a1340..4636f1da7221e187c73a88fbf915c8581d14b88c 100644 (file)
@@ -455,7 +455,7 @@ class PaintPanel():
             return ts.vertex_paint
         elif context.weight_paint_object:
             return ts.weight_paint
-        elif context.texture_paint_object:
+        elif context.image_paint_object:
             return ts.image_paint
         elif context.particle_edit_object:
             return ts.particle_edit
@@ -619,7 +619,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
 
         # Texture Paint Mode #
 
-        elif context.texture_paint_object and brush:
+        elif context.image_paint_object and brush:
             col = layout.column()
             col.template_color_wheel(brush, "color", value_slider=True)
             col.prop(brush, "color", text="")
@@ -689,7 +689,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
     def poll(cls, context):
         settings = cls.paint_settings(context)
         return (settings and settings.brush and (context.sculpt_object or
-                             context.texture_paint_object))
+                             context.image_paint_object))
 
     def draw(self, context):
         layout = self.layout
@@ -701,7 +701,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
         col = layout.column()
 
         col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
-        if brush.use_paint_texture:
+        if brush.use_paint_image:
             col.prop(brush, "use_fixed_texture")
 
         if context.sculpt_object:
@@ -787,7 +787,7 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
     def poll(cls, context):
         settings = cls.paint_settings(context)
         return (settings and settings.brush and
-            (context.sculpt_object or context.texture_paint_object or
+            (context.sculpt_object or context.image_paint_object or
             context.vertex_paint_object or context.weight_paint_object))
 
     def draw(self, context):
@@ -796,7 +796,7 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
         settings = __class__.paint_settings(context)
         brush = settings.brush
         ## Unused
-        # texture_paint = context.texture_paint_object
+        # image_paint = context.image_paint_object
         # sculpt = context.sculpt_object
 
         col = layout.column(align=True)
@@ -804,16 +804,16 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
         if context.sculpt_object:
             col.prop(brush, "sculpt_tool", expand=False, text="")
             col.operator("brush.reset")
-        elif context.texture_paint_object:
-            col.prop(brush, "imagepaint_tool", expand=False, text="")
+        elif context.image_paint_object:
+            col.prop(brush, "image_tool", expand=False, text="")
         elif context.vertex_paint_object or context.weight_paint_object:
-            col.prop(brush, "vertexpaint_tool", expand=False, text="")
+            col.prop(brush, "vertex_tool", expand=False, text="")
 
         row = layout.row(align=True)
         row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
         row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
         row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
-        row.prop(brush, "use_paint_texture", text="", icon='TPAINT_HLT')
+        row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
 
 
 class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
@@ -826,14 +826,14 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
         return (settings and settings.brush and (context.sculpt_object or
                              context.vertex_paint_object or
                              context.weight_paint_object or
-                             context.texture_paint_object))
+                             context.image_paint_object))
 
     def draw(self, context):
         layout = self.layout
 
         settings = __class__.paint_settings(context)
         brush = settings.brush
-        texture_paint = context.texture_paint_object
+        image_paint = context.image_paint_object
 
         col = layout.column()
 
@@ -884,7 +884,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
 
             col.separator()
 
-            if not texture_paint:
+            if not image_paint:
                 row = col.row()
                 row.prop(brush, "use_smooth_stroke")
 
@@ -910,7 +910,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
 
             #col.separator()
 
-            #if texture_paint:
+            #if image_paint:
             #    row.prop(brush, "use_pressure_spacing", toggle=True, text="")
 
 
@@ -1018,7 +1018,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
 
     @classmethod
     def poll(cls, context):
-        return (context.sculpt_object and context.tool_settings.sculpt) or (context.vertex_paint_object and context.tool_settings.vertex_paint) or (context.weight_paint_object and context.tool_settings.weight_paint) or (context.texture_paint_object and context.tool_settings.image_paint)
+        return (context.sculpt_object and context.tool_settings.sculpt) or (context.vertex_paint_object and context.tool_settings.vertex_paint) or (context.weight_paint_object and context.tool_settings.weight_paint) or (context.image_paint_object and context.tool_settings.image_paint)
 
     def draw(self, context):
         layout = self.layout
@@ -1135,13 +1135,13 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel, bpy.types.Panel):
 
 
 class VIEW3D_PT_tools_projectpaint(View3DPanel, bpy.types.Panel):
-    bl_context = "texturepaint"
+    bl_context = "imagepaint"
     bl_label = "Project Paint"
 
     @classmethod
     def poll(cls, context):
         brush = context.tool_settings.image_paint.brush
-        return (brush and brush.imagepaint_tool != 'SOFTEN')
+        return (brush and brush.image_tool != 'SOFTEN')
 
     def draw_header(self, context):
         ipaint = context.tool_settings.image_paint
@@ -1184,7 +1184,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, bpy.types.Panel):
         col = layout.column()
         sub = col.column()
         row = sub.row()
-        row.active = (settings.brush.imagepaint_tool == 'CLONE')
+        row.active = (settings.brush.image_tool == 'CLONE')
 
         row.prop(ipaint, "use_clone_layer", text="Layer")
         row.menu("VIEW3D_MT_tools_projectpaint_clone", text=context.active_object.data.uv_texture_clone.name)
@@ -1211,7 +1211,7 @@ class VIEW3D_PT_imagepaint_options(PaintPanel):
 
     @classmethod
     def poll(cls, context):
-        return (context.texture_paint_object and context.tool_settings.image_paint)
+        return (context.image_paint_object and context.tool_settings.image_paint)
 
     def draw(self, context):
         layout = self.layout
index 710e7a28041af955e677d127eda2f8c3b7391d65..4e5a1977ab01da24b2d861ce4cb772f58d4991c5 100644 (file)
@@ -790,7 +790,7 @@ static const char *data_mode_strings[] = {
        "sculpt_mode",
        "weightpaint",
        "vertexpaint",
-       "texturepaint",
+       "imagepaint",
        "particlemode",
        "objectmode",
        NULL
index 03c50d213c18cf5056e1c9645ac4b54770987ddc..77757cce61c09b51a481f372ec5b2ffe3defe734 100644 (file)
@@ -1072,11 +1072,11 @@ static int ui_id_brush_get_icon(bContext *C, ID *id)
                        tool = br->sculpt_tool;
                }
                else if(mode == OB_MODE_VERTEX_PAINT) {
-                       items = brush_vertexpaint_tool_items;
+                       items = brush_vertex_tool_items;
                        tool = br->vertexpaint_tool;
                }
                else if(mode == OB_MODE_TEXTURE_PAINT) {
-                       items = brush_imagepaint_tool_items;
+                       items = brush_image_tool_items;
                        tool = br->imagepaint_tool;
                }
 
index 475e0fea6996704e228fc33fc9f38984beb09117..2def3561cf00cabc08885b1d37c726086b94a247 100644 (file)
@@ -62,7 +62,7 @@ const char *screen_context_dir[] = {
        "visible_pose_bones", "selected_pose_bones", "active_bone", "active_pose_bone",
        "active_base", "active_object", "object", "edit_object",
        "sculpt_object", "vertex_paint_object", "weight_paint_object",
-       "texture_paint_object", "particle_edit_object",
+       "image_paint_object", "particle_edit_object",
        "sequences", "selected_sequences", "selected_editable_sequences", /* sequencer */
        NULL};
 
@@ -340,7 +340,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
 
                return 1;
        }
-       else if(CTX_data_equals(member, "texture_paint_object")) {
+       else if(CTX_data_equals(member, "image_paint_object")) {
                if(obact && (obact->mode & OB_MODE_TEXTURE_PAINT))
                        CTX_data_id_pointer_set(result, &obact->id);
 
index eb9fbea22f4960c17fdb206fbbc83a02615c1f11..b23951733336ae723f707ac4b282bacf539b3d1e 100644 (file)
@@ -239,66 +239,66 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *mode)
 {
        wmKeyMapItem *kmi;
 
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", ONEKEY, KM_PRESS, 0, 0);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", ONEKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 0);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", TWOKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 0);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", TWOKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 1);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", THREEKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 1);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", THREEKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 2);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", FOURKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 2);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", FOURKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 3);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", FIVEKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 3);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", FIVEKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 4);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", SIXKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 4);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", SIXKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 5);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", SEVENKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 5);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", SEVENKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 6);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", EIGHTKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 6);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", EIGHTKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 7);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", NINEKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 7);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", NINEKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 8);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", ZEROKEY, KM_PRESS, 0, 0);
+       RNA_int_set(kmi->ptr, "index", 8);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", ZEROKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 9);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", ONEKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 9);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", ONEKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 10);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", TWOKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 10);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", TWOKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 11);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", THREEKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 11);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", THREEKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 12);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", FOURKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 12);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", FOURKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 13);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", FIVEKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 13);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", FIVEKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 14);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", SIXKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 14);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", SIXKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 15);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", SEVENKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 15);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", SEVENKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 16);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", EIGHTKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 16);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", EIGHTKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 17);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", NINEKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 17);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", NINEKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 18);
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_set_active_number", ZEROKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_int_set(kmi->ptr, "index", 18);
+       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", ZEROKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "mode", mode);
-       RNA_int_set(kmi->ptr, "number", 19);
+       RNA_int_set(kmi->ptr, "index", 19);
 }
 
 static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *UNUSED(path))
@@ -415,7 +415,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        ed_keymap_paint_brush_size(keymap, "tool_settings.image_paint.brush.size");
 
        kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0); /* mask toggle */
-       RNA_string_set(kmi->ptr, "data_path", "texture_paint_object.data.use_paint_mask");
+       RNA_string_set(kmi->ptr, "data_path", "image_paint_object.data.use_paint_mask");
 
        /* face-mask mode */
        keymap= WM_keymap_find(keyconf, "Face Mask", 0, 0);
index d156387eabaed2433c31b7c468289c34cc3f8370..e1e58572c32cca4a0d06586d192793d09a152c97 100644 (file)
@@ -74,8 +74,8 @@ extern EnumPropertyItem event_type_items[];
 extern EnumPropertyItem operator_return_items[];
 
 extern EnumPropertyItem brush_sculpt_tool_items[];
-extern EnumPropertyItem brush_vertexpaint_tool_items[];
-extern EnumPropertyItem brush_imagepaint_tool_items[];
+extern EnumPropertyItem brush_vertex_tool_items[];
+extern EnumPropertyItem brush_image_tool_items[];
 
 extern EnumPropertyItem texture_type_items[];
 
index 06dcaa5441ebb4e5e2077a39de78109ffe1444e9..2d5dba4b7b1697ed2dae6c3172e887c21b495ee2 100644 (file)
@@ -69,7 +69,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
        {0, NULL, 0, NULL, NULL}};
 
 
-EnumPropertyItem brush_vertexpaint_tool_items[] = {
+EnumPropertyItem brush_vertex_tool_items[] = {
        {0, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"},
        {1, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"},
        {2, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"},
@@ -79,7 +79,7 @@ EnumPropertyItem brush_vertexpaint_tool_items[] = {
        {6, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"},
        {0, NULL, 0, NULL, NULL}};
        
-EnumPropertyItem brush_imagepaint_tool_items[] = {
+EnumPropertyItem brush_image_tool_items[] = {
        {PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""},
        {PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""},
        {PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""},
@@ -130,7 +130,7 @@ static void rna_Brush_sculpt_tool_update(Main *bmain, Scene *scene, PointerRNA *
        rna_Brush_update(bmain, scene, ptr);
 }
  
-static void rna_Brush_vertexpaint_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Brush_vertex_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
        Brush *br= (Brush*)ptr->data;
        rna_Brush_reset_icon(br, "vertex_paint");
@@ -140,7 +140,7 @@ static void rna_Brush_vertexpaint_tool_update(Main *bmain, Scene *scene, Pointer
 static void rna_Brush_imagepaint_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
        Brush *br= (Brush*)ptr->data;
-       rna_Brush_reset_icon(br, "texture_paint");
+       rna_Brush_reset_icon(br, "image_paint");
        rna_Brush_update(bmain, scene, ptr);
 }
 
@@ -383,13 +383,15 @@ static void rna_def_brush(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Sculpt Tool", "");
        RNA_def_property_update(prop, 0, "rna_Brush_sculpt_tool_update");
 
-       prop= RNA_def_property(srna, "vertexpaint_tool", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_items(prop, brush_vertexpaint_tool_items);
+       prop= RNA_def_property(srna, "vertex_tool", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "vertexpaint_tool");
+       RNA_def_property_enum_items(prop, brush_vertex_tool_items);
        RNA_def_property_ui_text(prop, "Vertex/Weight Paint Tool", "");
-       RNA_def_property_update(prop, 0, "rna_Brush_vertexpaint_tool_update");
+       RNA_def_property_update(prop, 0, "rna_Brush_vertex_tool_update");
        
-       prop= RNA_def_property(srna, "imagepaint_tool", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_items(prop, brush_imagepaint_tool_items);
+       prop= RNA_def_property(srna, "image_tool", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "imagepaint_tool");
+       RNA_def_property_enum_items(prop, brush_image_tool_items);
        RNA_def_property_ui_text(prop, "Image Paint Tool", "");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_imagepaint_tool_update");
 
@@ -694,7 +696,7 @@ static void rna_def_brush(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_WEIGHT_PAINT);
        RNA_def_property_ui_text(prop, "Use Weight", "Use this brush in weight paint mode");    
 
-       prop= RNA_def_property(srna, "use_paint_texture", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_paint_image", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_TEXTURE_PAINT);
        RNA_def_property_ui_text(prop, "Use Texture", "Use this brush in texture paint mode");