From 62b1d11613ed230710a427ad313205daa1c1167b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Jun 2017 11:09:30 +1000 Subject: RNA: update_gpu_tag() to force Batch re-generation --- source/blender/makesrna/intern/rna_curve_api.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesrna/intern/rna_curve_api.c') diff --git a/source/blender/makesrna/intern/rna_curve_api.c b/source/blender/makesrna/intern/rna_curve_api.c index 5a123603ed5..4da262daf8d 100644 --- a/source/blender/makesrna/intern/rna_curve_api.c +++ b/source/blender/makesrna/intern/rna_curve_api.c @@ -49,6 +49,12 @@ static void rna_Curve_transform(Curve *cu, float *mat, int shape_keys) DEG_id_tag_update(&cu->id, 0); } + +static void rna_Curve_update_gpu_tag(Curve *cu) +{ + BKE_curve_batch_cache_dirty(cu, BKE_CURVE_BATCH_DIRTY_ALL); +} + #else void RNA_api_curve(StructRNA *srna) @@ -67,6 +73,8 @@ void RNA_api_curve(StructRNA *srna) "has had invalid indices corrected (to default 0)"); parm = RNA_def_boolean(func, "result", 0, "Result", ""); RNA_def_function_return(func, parm); + + RNA_def_function(srna, "update_gpu_tag", "rna_Curve_update_gpu_tag"); } #endif -- cgit v1.2.3