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:
authorDalai Felinto <dfelinto@gmail.com>2018-11-09 15:59:12 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-11-09 16:01:55 +0300
commit6c10ec74d5ec3d6fbbc1531463c117332b91ebed (patch)
treeb0e3226945dab9efab86b938eb18bfb2ebe993c1 /source/blender/editors/space_outliner
parent88d621a68f943f105e2ddf81542b54ac261397e2 (diff)
Fix crash when renaming metaballs
This handles both renaming via outliner and rna. Metaballs as we all know have their geometry based on the metaballs that share the same name with them. Changing the name of a metaball without tagging its geometry to change is asking for trouble.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index da26aab93b5..e5d1a42c274 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -335,6 +335,14 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
WM_event_add_notifier(C, NC_IMAGE, NULL); break;
case ID_SCE:
WM_event_add_notifier(C, NC_SCENE, NULL); break;
+ case ID_OB:
+ {
+ Object *ob = (Object *)tselem->id;
+ if (ob->type == OB_MBALL) {
+ DEG_id_tag_update(&ob->id, DEG_TAG_GEOMETRY);
+ }
+ WM_event_add_notifier(C, NC_ID | NA_RENAME, NULL); break;
+ }
default:
WM_event_add_notifier(C, NC_ID | NA_RENAME, NULL); break;
}