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:
authorClément Foucault <foucault.clem@gmail.com>2020-01-28 18:39:33 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-01-28 18:39:37 +0300
commit3fd4c88e3a2e9d99d45a0856fcc339e013c0a79a (patch)
treec9349a1f1fc7e80b113ce4110891e27992c12e98 /source/blender/draw/intern/draw_cache_impl.h
parentfd0bc7e002ced8ffd85e9aa3edcae173dbd13392 (diff)
Fix T72593 Blender crashes when modifier change the material count
Instead of changing the modifiers behavior, we make sure to always use the data->totcol instead of the ob->totcol. Also we centralize getting this number to avoid future issues. Fix T72593 Blender crashes when separating mesh Fix T72017 Crash on set visibility change
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index 8cb318bd0bb..2970314db64 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -69,6 +69,8 @@ void DRW_mesh_batch_cache_free_old(struct Mesh *me, int ctime);
/* Curve */
void DRW_curve_batch_cache_create_requested(struct Object *ob);
+int DRW_curve_material_count_get(struct Curve *cu);
+
struct GPUBatch *DRW_curve_batch_cache_get_wire_edge(struct Curve *cu);
struct GPUBatch *DRW_curve_batch_cache_get_normal_edge(struct Curve *cu);
struct GPUBatch *DRW_curve_batch_cache_get_edge_detection(struct Curve *cu, bool *r_is_manifold);
@@ -80,7 +82,10 @@ struct GPUBatch **DRW_curve_batch_cache_get_surface_shaded(struct Curve *cu,
struct GPUMaterial **gpumat_array,
uint gpumat_array_len);
struct GPUBatch *DRW_curve_batch_cache_get_wireframes_face(struct Curve *cu);
+
/* Metaball */
+int DRW_metaball_material_count_get(struct MetaBall *mb);
+
struct GPUBatch *DRW_metaball_batch_cache_get_triangles_with_normals(struct Object *ob);
struct GPUBatch **DRW_metaball_batch_cache_get_surface_shaded(struct Object *ob,
struct MetaBall *mb,
@@ -163,6 +168,8 @@ struct GPUBatch *DRW_mesh_batch_cache_get_edituv_facedots(struct Mesh *me);
struct GPUBatch *DRW_mesh_batch_cache_get_uv_edges(struct Mesh *me);
struct GPUBatch *DRW_mesh_batch_cache_get_edit_mesh_analysis(struct Mesh *me);
+int DRW_mesh_material_count_get(struct Mesh *me);
+
/* Edit mesh bitflags (is this the right place?) */
enum {
VFLAG_VERT_ACTIVE = 1 << 0,