diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-03-05 09:40:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-03-05 09:40:33 +0300 |
commit | 40b748d40f7efddbd07f35081a3264215025ffb8 (patch) | |
tree | 4d2fc13732d952917733f091da20fd73bf4dcbbc /source | |
parent | 4e500101a7dd3ea578ca6d6f101c0d9ece7f5abc (diff) |
Fix for missing update changing VFont.filepath
Changing the filepath wouldn't reload the font even after calling scene.update().
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 25 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 3 |
2 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 55c54cdac49..a029c8c7748 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2586,7 +2586,18 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id) } } } - + else if (idtype == ID_VF) { + for (obt = bmain->object.first; obt; obt = obt->id.next) { + if (obt->type == OB_FONT) { + Curve *cu = obt->data; + if (ELEM((struct VFont *)id, CURVE_VFONT_ANY(cu))) { + obt->recalc |= OB_RECALC_DATA; + lib_id_recalc_data_tag(bmain, &obt->id); + } + } + } + } + /* set flags based on textures - can influence depgraph via modifiers */ if (idtype == ID_TE) { for (obt = bmain->object.first; obt; obt = obt->id.next) { @@ -2953,18 +2964,6 @@ void DAG_id_tag_update_ex(Main *bmain, ID *id, short flag) } } } - else if (idtype == ID_VF) { - /* this is weak still, should be done delayed as well */ - for (ob = bmain->object.first; ob; ob = ob->id.next) { - if (ob->type == OB_FONT) { - Curve *cu = ob->data; - - if (ELEM((struct VFont *)id, cu->vfont, cu->vfontb, cu->vfonti, cu->vfontbi)) { - ob->recalc |= (flag & OB_RECALC_ALL); - } - } - } - } else { /* disable because this is called on various ID types automatically. * where printing warning is not useful. for now just ignore */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 9be3fbc2348..8f711c1b23b 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -268,6 +268,9 @@ typedef struct Curve { } Curve; +#define CURVE_VFONT_ANY(cu) \ + ((cu)->vfont), ((cu)->vfontb), ((cu)->vfonti), ((cu)->vfontbi) + /* **************** CURVE ********************* */ /* Curve.texflag */ |