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:
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_curve.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curve.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index ab800e42cc0..05ec9bda642 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -414,7 +414,7 @@ static bool curve_batch_cache_valid(Curve *cu)
return false;
}
- if (cache->mat_len != max_ii(1, cu->totcol)) {
+ if (cache->mat_len != DRW_curve_material_count_get(cu)) {
return false;
}
@@ -914,6 +914,11 @@ GPUBatch *DRW_curve_batch_cache_get_edge_detection(Curve *cu, bool *r_is_manifol
return DRW_batch_request(&cache->batch.edge_detection);
}
+int DRW_curve_material_count_get(Curve *cu)
+{
+ return max_ii(1, cu->totcol);
+}
+
/** \} */
/* -------------------------------------------------------------------- */