Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-27 04:01:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-27 04:01:35 +0400
commitca05219f3ec3574d2e1cb9c8eaa2790f685f26bb (patch)
treeb4cfdda1c423fe0552f024c06363272c5f3d8eff /source/blender/blenkernel
parent4d802ff682b81143012d9a10cf6a58322dd18d89 (diff)
fix [#30651] bpy.ops.object.mode_set(...) editmode removes faces.
problem was that BMesh had tessellation call when undo pushes were called. if python called an operator with no undo push, tessfaces would not be created. fix this by making it the responsibility of each editmesh operator to re-tessellate, as it is with notifiers and depsgraph. added EDBM_update_generic() function to add notifier, tag for depsgraph update and optionally re-tessellate.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_tessmesh.h4
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_tessmesh.h b/source/blender/blenkernel/BKE_tessmesh.h
index 947b980bb75..407b96320a4 100644
--- a/source/blender/blenkernel/BKE_tessmesh.h
+++ b/source/blender/blenkernel/BKE_tessmesh.h
@@ -80,10 +80,6 @@ typedef struct BMEditMesh {
int mirr_free_arrays;
} BMEditMesh;
-/* undo triggers editmesh tessface update, this is odd but works OK.
- * BMESH_TODO, look into having the update elsewhere. */
-#define BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND
-
void BMEdit_RecalcTessellation(BMEditMesh *tm);
BMEditMesh *BMEdit_Create(BMesh *bm, int do_tessellate);
BMEditMesh *BMEdit_Copy(BMEditMesh *tm);
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 783652e9a75..a1a2465ceac 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2716,7 +2716,6 @@ void DAG_id_tag_update(ID *id, short flag)
/* flag is for objects and particle systems */
if (flag) {
Object *ob;
- ParticleSystem *psys;
short idtype = GS(id->name);
if (idtype == ID_OB) {
@@ -2725,6 +2724,7 @@ void DAG_id_tag_update(ID *id, short flag)
ob->recalc |= (flag & OB_RECALC_ALL);
}
else if (idtype == ID_PA) {
+ ParticleSystem *psys;
/* this is weak still, should be done delayed as well */
for (ob=bmain->object.first; ob; ob=ob->id.next) {
for (psys=ob->particlesystem.first; psys; psys=psys->next) {
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 70b55356e6a..40d829808ca 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -511,7 +511,8 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, float fram
BKE_animsys_evaluate_animdata(scene, &cu->id, cu->adt, frame, ADT_RECALC_ANIM);
}
- ob->recalc |= OB_RECALC_ALL;
+ /* was originally OB_RECALC_ALL - TODO - which flags are really needed??? */
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, frame, ADT_RECALC_ANIM);
if (flags & UPDATE_MESH) {
/* ignore cache clear during subframe updates