From 6b9c41719bdf7514b9f9ca88e8fb09d3270cf1f2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 1 Jul 2019 12:39:00 +0200 Subject: Fix T65798: Incorrect auto-tex space for Curves There are several aspects to the fix: - Always calculate bounding box for meshes and curves from dependency graph evaluation function. There is a reason why mesh was tagged for geometry update, so can not be spare here in attempts to avoid calculation. - Remove texture space evaluation from RNA accessor. Such data is to be evaluated by a dependency graph. Don't see a reason to be different here: we never force evaluation of any kind from RNA. - Copy bounding box and texture space to original object for active dependency graph. This matches object-level bounding box and allows to remove bounding box evaluation from RNA. --- source/blender/makesrna/intern/rna_mesh.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source/blender/makesrna/intern/rna_mesh.c') diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index c51097fc8c3..ba4f3c53692 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -496,22 +496,12 @@ static int rna_Mesh_texspace_editable(PointerRNA *ptr, const char **UNUSED(r_inf static void rna_Mesh_texspace_size_get(PointerRNA *ptr, float values[3]) { Mesh *me = (Mesh *)ptr->data; - - if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) { - BKE_mesh_texspace_calc(me); - } - copy_v3_v3(values, me->size); } static void rna_Mesh_texspace_loc_get(PointerRNA *ptr, float values[3]) { Mesh *me = (Mesh *)ptr->data; - - if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) { - BKE_mesh_texspace_calc(me); - } - copy_v3_v3(values, me->loc); } -- cgit v1.2.3