Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / object / object_edit.c
index 3dc7d8ebd4b6e664c780505000e03d38e1587b01..e467dbd05eb445f8c15539205b1192a72c238889 100644 (file)
@@ -75,7 +75,6 @@
 #include "BKE_mball.h"
 #include "BKE_mesh.h"
 #include "BKE_object.h"
-#include "BKE_pointcache.h"
 #include "BKE_property.h"
 #include "BKE_sca.h"
 #include "BKE_softbody.h"
@@ -430,22 +429,9 @@ void ED_object_editmode_exit(bContext *C, int flag)
 
        /* freedata only 0 now on file saves and render */
        if (freedata) {
-               ListBase pidlist;
-               PTCacheID *pid;
-
                /* for example; displist make is different in editmode */
                scene->obedit = NULL; // XXX for context
 
-               /* flag object caches as outdated */
-               BKE_ptcache_ids_from_object(&pidlist, obedit, scene, 0);
-               for (pid = pidlist.first; pid; pid = pid->next) {
-                       if (pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
-                               pid->cache->flag |= PTCACHE_OUTDATED;
-               }
-               BLI_freelistN(&pidlist);
-               
-               BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED);
-
                /* also flush ob recalc, doesn't take much overhead, but used for particles */
                DAG_id_tag_update(&obedit->id, OB_RECALC_OB | OB_RECALC_DATA);
        
@@ -1583,13 +1569,9 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(
 
        ob = CTX_data_active_object(C);
        if (ob) {
-               const bool use_mode_particle_edit = (BLI_listbase_is_empty(&ob->particlesystem) == false) ||
-                                                   (ob->soft != NULL) ||
-                                                   (modifiers_findByType(ob, eModifierType_Cloth) != NULL);
                while (input->identifier) {
                        if ((input->value == OB_MODE_EDIT && OB_TYPE_SUPPORT_EDITMODE(ob->type)) ||
                            (input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
-                           (input->value == OB_MODE_PARTICLE_EDIT && use_mode_particle_edit) ||
                            (ELEM(input->value, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT,
                                   OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
                            (input->value == OB_MODE_OBJECT))
@@ -1631,8 +1613,6 @@ static const char *object_mode_op_string(int mode)
                return "PAINT_OT_weight_paint_toggle";
        if (mode == OB_MODE_TEXTURE_PAINT)
                return "PAINT_OT_texture_paint_toggle";
-       if (mode == OB_MODE_PARTICLE_EDIT)
-               return "PARTICLE_OT_particle_edit_toggle";
        if (mode == OB_MODE_POSE)
                return "OBJECT_OT_posemode_toggle";
        if (mode == OB_MODE_GPENCIL)
@@ -1654,7 +1634,7 @@ static bool object_mode_compat_test(Object *ob, ObjectMode mode)
                switch (ob->type) {
                        case OB_MESH:
                                if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT |
-                                           OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
+                                           OB_MODE_TEXTURE_PAINT))
                                {
                                        return true;
                                }