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:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-05-13 15:15:52 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-05-13 15:26:50 +0300
commited4647b5d7f506e5d72f1272286499da719f4d12 (patch)
treea706d3421305a23e5c452d859a1bc358e4a49861 /source/blender/editors/object/object_add.c
parent9db08b77e4d6b3564721a42391cbbcef08e04f9b (diff)
Fix missing ID tag when converting objects
Parenting to a curve path animation depends on both geometry and transform components. Conversion of mesh to curve will make it so parent have path animation, conversion of curve to mesh makes it so there is no more path animation. Both cases affects children of the converted objects, and it's not possible to rely on special case for curve parent in the dependency graph as that link will be lost after conversion of curve to mesh. Simplest approach is to tag object for both geometry and transform update, which will ensure all children are at valid state after the conversion.
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r--source/blender/editors/object/object_add.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 4a229ae741f..0e609b5e903 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2540,7 +2540,12 @@ static int convert_exec(bContext *C, wmOperator *op)
}
if (!keep_original && (ob->flag & OB_DONE)) {
- DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
+ /* NOTE: Tag transform for update because object parenting to curve with path is handled
+ * differently from all other cases. Converting curve to mesh and mesh to curve will likely
+ * affect the way children are evaluated.
+ * It is not enough to tag only geometry and rely on the curve parenting relations because
+ * this relation is lost when curve is converted to mesh. */
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
((ID *)ob->data)->tag &= ~LIB_TAG_DOIT; /* flag not to convert this datablock again */
}
}