Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 13 Jun 2018 13:36:24 +0000 (15:36 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 13 Jun 2018 13:36:24 +0000 (15:36 +0200)
Conflicts:
source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/pointcache.c
source/blender/editors/include/ED_particle.h
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_edit_undo.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blenderplayer/bad_level_call_stubs/stubs.c

source/blender/blenkernel/BKE_pointcache.h
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_edit_undo.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/makesrna/intern/rna_sculpt_paint.c

index 501c996..8daef03 100644 (file)
@@ -278,7 +278,8 @@ void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, struct Object *ob, struct
 void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, struct Object *ob, struct RigidBodyWorld *rbw);
 
 PTCacheID BKE_ptcache_id_find(struct Object *ob, struct Scene *scene, struct PointCache *cache);
-void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis);
+void BKE_ptcache_ids_from_object(
+        struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis);
 
 /***************** Global funcs ****************************/
 void BKE_ptcache_remove(void);
index 359e936..a87719a 100644 (file)
@@ -56,6 +56,7 @@
 #include "BKE_global.h"
 #include "BKE_object.h"
 #include "BKE_library.h"
+#include "BKE_main.h"
 #include "BKE_mesh.h"
 #include "BKE_mesh_runtime.h"
 #include "BKE_modifier.h"
@@ -117,7 +118,7 @@ int PE_hair_poll(bContext *C)
        if (!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT)) {
                return 0;
        }
-       edit= PE_get_current(scene, ob);
+       edit = PE_get_current(scene, ob);
 
        return (edit && edit->psys);
 }
@@ -364,6 +365,7 @@ typedef struct PEData {
        ViewContext vc;
 
        const bContext *context;
+       Main *bmain;
        Scene *scene;
        ViewLayer *view_layer;
        Object *ob;
@@ -400,6 +402,7 @@ static void PE_set_data(bContext *C, PEData *data)
 {
        memset(data, 0, sizeof(*data));
 
+       data->bmain = CTX_data_main(C);
        data->scene = CTX_data_scene(C);
        data->view_layer = CTX_data_view_layer(C);
        data->ob = CTX_data_active_object(C);
@@ -1638,8 +1641,6 @@ static int select_random_exec(bContext *C, wmOperator *op)
 {
        PEData data;
        int type;
-       Scene *scene;
-       Object *ob;
 
        /* used by LOOP_VISIBLE_POINTS, LOOP_VISIBLE_KEYS and LOOP_KEYS */
        PTCacheEdit *edit;
@@ -1657,9 +1658,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
 
        PE_set_data(C, &data);
        data.select_action = SEL_SELECT;
-       scene = CTX_data_scene(C);
-       ob = CTX_data_active_object(C);
-       edit = PE_get_current(scene, ob);
+       edit = PE_get_current(data.scene, data.ob);
 
        rng = BLI_rng_new_srandom(seed);
 
@@ -3798,6 +3797,7 @@ static int brush_edit_init(bContext *C, wmOperator *op)
 
 static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
 {
+       Main *bmain = CTX_data_main(C);
        BrushEdit *bedit= op->customdata;
        Depsgraph *depsgraph = CTX_data_depsgraph(C);
        Scene *scene= bedit->scene;
@@ -4678,7 +4678,6 @@ static int unify_length_exec(bContext *C, wmOperator *UNUSED(op))
        }
        scale_points_to_length(edit, average_length);
 
-
        PE_update_object(depsgraph, scene, ob, 1);
        if (edit->psys) {
                WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
index 6576d69..fdf765e 100644 (file)
@@ -44,9 +44,9 @@
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
+#include "BKE_context.h"
 #include "BKE_particle.h"
 #include "BKE_pointcache.h"
-#include "BKE_context.h"
 #include "BKE_undo_system.h"
 
 #include "DEG_depsgraph.h"
index 2f95b9a..8a2bf1a 100644 (file)
@@ -2120,7 +2120,6 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
 void flushTransParticles(TransInfo *t)
 {
        FOREACH_TRANS_DATA_CONTAINER (t, tc) {
-
                Scene *scene = t->scene;
                ViewLayer *view_layer = t->view_layer;
                Object *ob = OBACT(view_layer);
index 5ff1ddb..053647c 100644 (file)
@@ -76,6 +76,7 @@
 #include "BKE_fcurve.h"
 #include "BKE_lattice.h"
 #include "BKE_library.h"
+#include "BKE_main.h"
 #include "BKE_nla.h"
 #include "BKE_context.h"
 #include "BKE_paint.h"
index be52a3f..b89b218 100644 (file)
@@ -40,8 +40,9 @@
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
 
-#include "BKE_paint.h"
+#include "BKE_main.h"
 #include "BKE_material.h"
+#include "BKE_paint.h"
 
 #include "ED_image.h"
 
@@ -104,9 +105,9 @@ const EnumPropertyItem rna_enum_symmetrize_direction_items[] = {
 
 #include "BKE_context.h"
 #include "BKE_DerivedMesh.h"
-#include "BKE_pointcache.h"
 #include "BKE_particle.h"
 #include "BKE_pbvh.h"
+#include "BKE_pointcache.h"
 #include "BKE_object.h"
 
 #include "DEG_depsgraph.h"