Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Tue, 14 Aug 2018 00:45:00 +0000 (10:45 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 14 Aug 2018 00:45:00 +0000 (10:45 +1000)
1  2 
source/blender/editors/include/ED_particle.h
source/blender/editors/physics/particle_edit.c

index cb781dc24478db24a28b4712c8857f7edd1673b0,a03892a26d1401c8f08b1164b90995f886ed0736..e722173bcfa64e2d4e138e9db67cc646c8100644
@@@ -1665,13 -1461,13 +1665,13 @@@ int PE_mouse_particles(bContext *C, con
  
        /* 1 = nearest only */
        if (extend)
-               for_mouse_hit_keys(&data, extend_key_select, 1);
+               for_mouse_hit_keys(&data, extend_key_select, true);
        else if (deselect)
-               for_mouse_hit_keys(&data, deselect_key_select, 1);
+               for_mouse_hit_keys(&data, deselect_key_select, true);
        else
-               for_mouse_hit_keys(&data, toggle_key_select, 1);
+               for_mouse_hit_keys(&data, toggle_key_select, true);
  
 -      PE_update_selection(bmain, scene, ob, 1);
 +      PE_update_selection(data.depsgraph, scene, ob, 1);
        WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, data.ob);
  
        return OPERATOR_FINISHED;
@@@ -1900,8 -1696,8 +1900,8 @@@ static int select_linked_exec(bContext 
        data.rad = 75.0f;
        data.select = !RNA_boolean_get(op->ptr, "deselect");
  
-       for_mouse_hit_keys(&data, select_keys, 1);  /* nearest only */
+       for_mouse_hit_keys(&data, select_keys, true);
 -      PE_update_selection(data.bmain, data.scene, data.ob, 1);
 +      PE_update_selection(data.depsgraph, data.scene, data.ob, 1);
        WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, data.ob);
  
        return OPERATOR_FINISHED;
@@@ -1946,11 -1742,12 +1946,11 @@@ void PE_deselect_all_visible(PTCacheEdi
        }
  }
  
- int PE_border_select(bContext *C, rcti *rect, bool select, bool extend)
+ int PE_border_select(bContext *C, const rcti *rect, bool select, bool extend)
  {
 -      Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
        Object *ob = CTX_data_active_object(C);
 -      PTCacheEdit *edit = PE_get_current(bmain, scene, ob);
 +      PTCacheEdit *edit = PE_get_current(scene, ob);
        PEData data;
  
        if (!PE_start_edit(edit))
        data.rect = rect;
        data.select = select;
  
-       for_mouse_hit_keys(&data, select_key, 0);
+       for_mouse_hit_keys(&data, select_key, false);
  
 -      PE_update_selection(bmain, scene, ob, 1);
 +      PE_update_selection(data.depsgraph, scene, ob, 1);
        WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, ob);
  
        return OPERATOR_FINISHED;
@@@ -1988,9 -1786,9 +1988,9 @@@ int PE_circle_select(bContext *C, int s
        data.rad = rad;
        data.select = selecting;
  
-       for_mouse_hit_keys(&data, select_key, 0);
+       for_mouse_hit_keys(&data, select_key, false);
  
 -      PE_update_selection(bmain, scene, ob, 1);
 +      PE_update_selection(data.depsgraph, scene, ob, 1);
        WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, ob);
  
        return OPERATOR_FINISHED;