Commit: 2f596756b79e526e9df6ac93373094ee45fd3323
Author: Lukas Tönne
Date:   Wed Jul 13 16:50:23 2016 +0200
Branches: strand_editmode strand_gpu
https://developer.blender.org/rB2f596756b79e526e9df6ac93373094ee45fd3323

Merge branch 'master' into strand_editmode

===================================================================



===================================================================

diff --cc source/blender/editors/sculpt_paint/paint_ops.c
index 8cdb55c,f88b641..1ff6dd4
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@@ -65,26 -63,13 +65,26 @@@
  static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
  {
        /*int type = RNA_enum_get(op->ptr, "type");*/
 -      Paint *paint = BKE_paint_get_active_from_context(C);
 -      Brush *br = BKE_paint_brush(paint);
        Main *bmain = CTX_data_main(C);
        PaintMode mode = BKE_paintmode_get_active_from_context(C);
 -
 +      Scene *scene = CTX_data_scene(C);
 +      Object *ob = CTX_data_active_object(C);
 +      Paint *paint = NULL;
 +      HairEditSettings *hair_edit = NULL;
 +      Brush *br = NULL;
 +      
 +      /* get active brush context */
 +      if (ob->mode == OB_MODE_HAIR_EDIT) {
 +              hair_edit = &scene->toolsettings->hair_edit;
 +              br = hair_edit->brush;
 +      }
 +      else {
 +              paint = BKE_paint_get_active_from_context(C);
 +              br = BKE_paint_brush(paint);
 +      }
 +      
        if (br)
-               br = BKE_brush_copy(br);
+               br = BKE_brush_copy(bmain, br);
        else
                br = BKE_brush_add(bmain, "Brush", 
BKE_paint_object_mode_from_paint_mode(mode));

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

Reply via email to