diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index da9151906ba..3aaebd0b7a0 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -491,10 +491,10 @@ class IMAGE_PT_paint(bpy.types.Panel): sub = layout.row(align=True) else: sub = layout.column(align=True) - sub.prop_enum(toolsettings, "tool", 'DRAW') - sub.prop_enum(toolsettings, "tool", 'SOFTEN') - sub.prop_enum(toolsettings, "tool", 'CLONE') - sub.prop_enum(toolsettings, "tool", 'SMEAR') + sub.prop_enum(brush, "imagepaint_tool", 'DRAW') + sub.prop_enum(brush, "imagepaint_tool", 'SOFTEN') + sub.prop_enum(brush, "imagepaint_tool", 'CLONE') + sub.prop_enum(brush, "imagepaint_tool", 'SMEAR') if brush: col = layout.column() @@ -515,6 +515,10 @@ class IMAGE_PT_paint(bpy.types.Panel): col.prop(brush, "blend", text="Blend") + if brush.imagepaint_tool == 'CLONE': + col.separator() + col.prop(brush, "clone_image", text="Image") + col.prop(brush, "clone_alpha", text="Alpha") class IMAGE_PT_paint_stroke(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' @@ -544,6 +548,7 @@ class IMAGE_PT_paint_stroke(bpy.types.Panel): row.prop(brush, "spacing", text="Distance", slider=True) row.prop(brush, "use_spacing_pressure", toggle=True, text="") + layout.prop(brush, "use_wrap") class IMAGE_PT_paint_curve(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index c00b6b56072..27f9a1ae8e6 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -308,6 +308,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_texture_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PAINT_OT_clone_cursor_set", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 3cb00baf427..a653838c073 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -516,8 +516,6 @@ void image_keymap(struct wmKeyConfig *keyconf) RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f); RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f); - WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "IMAGE_OT_sample", ACTIONMOUSE, KM_PRESS, 0, 0); RNA_enum_set(WM_keymap_add_item(keymap, "IMAGE_OT_curves_point_set", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "point", 0); RNA_enum_set(WM_keymap_add_item(keymap, "IMAGE_OT_curves_point_set", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "point", 1); diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index f9f6f9e5020..eba41178333 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -154,7 +154,7 @@ static void rna_def_brush(BlenderRNA *brna) prop= RNA_def_property(srna, "imagepaint_tool", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, brush_imagepaint_tool_items); RNA_def_property_ui_text(prop, "Image Paint Tool", ""); - RNA_def_property_update(prop, 0, "rna_Brush_update"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update"); prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); @@ -302,19 +302,19 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "clone.image"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool."); - RNA_def_property_update(prop, 0, "rna_Brush_update"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update"); - prop= RNA_def_property(srna, "clone_opacity", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "clone_alpha", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "clone.alpha"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Clone Opacity", "Opacity of clone image display."); - RNA_def_property_update(prop, 0, "rna_Brush_update"); + RNA_def_property_ui_text(prop, "Clone Alpha", "Opacity of clone image display."); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update"); prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "clone.offset"); RNA_def_property_ui_text(prop, "Clone Offset", ""); RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3); - RNA_def_property_update(prop, 0, "rna_Brush_update"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update"); }