Cleanup: use DRW_cache_mesh prefix w/ mesh objects
authorCampbell Barton <ideasman42@gmail.com>
Wed, 12 Apr 2017 08:08:07 +0000 (18:08 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 12 Apr 2017 08:11:10 +0000 (18:11 +1000)
Avoid confusion for non mesh types where verts/wire/surface might apply.

Other object types use this convention already.

17 files changed:
source/blender/draw/engines/clay/clay.c
source/blender/draw/engines/eevee/eevee.c
source/blender/draw/intern/draw_cache.c
source/blender/draw/intern/draw_cache.h
source/blender/draw/modes/edit_curve_mode.c
source/blender/draw/modes/edit_lattice_mode.c
source/blender/draw/modes/edit_mesh_mode.c
source/blender/draw/modes/edit_metaball_mode.c
source/blender/draw/modes/edit_surface_mode.c
source/blender/draw/modes/edit_text_mode.c
source/blender/draw/modes/object_mode.c
source/blender/draw/modes/paint_texture_mode.c
source/blender/draw/modes/paint_vertex_mode.c
source/blender/draw/modes/paint_weight_mode.c
source/blender/draw/modes/particle_mode.c
source/blender/draw/modes/pose_mode.c
source/blender/draw/modes/sculpt_mode.c

index 512ed7dfe73a399a1488bc8f3dea9c0aa9a04b8e..c1e01e3375e08d3b66fdcbd440a5f85530ee363a 100644 (file)
@@ -579,7 +579,7 @@ static void CLAY_cache_populate(void *vedata, Object *ob)
 
        /* TODO all renderable */
        if (ob->type == OB_MESH) {
-               geom = DRW_cache_surface_get(ob);
+               geom = DRW_cache_mesh_surface_get(ob);
 
                /* Depth Prepass */
                DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob->obmat);
index 3b03d00e88285419bc034274126157e937c0017d..301ec8b11d1b7214358382d5eb60c7641ab1f0ef 100644 (file)
@@ -186,7 +186,7 @@ static void EEVEE_cache_populate(void *vedata, Object *ob)
        if (ob->type == OB_MESH) {
                IDProperty *ces_mode_ob = BKE_object_collection_engine_get(ob, COLLECTION_MODE_OBJECT, "");
                bool do_cull = BKE_collection_engine_property_value_get_bool(ces_mode_ob, "show_backface_culling");
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Depth Prepass */
                DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob->obmat);
index 89ffa0101456a1dc23fc0e98d2f155bee25ec2ad..79f9e26f3b5be1aa5fe058717acd9bb19c200352 100644 (file)
@@ -1496,7 +1496,7 @@ Batch *DRW_cache_single_vert_get(void)
 }
 
 /* Meshes */
-void DRW_cache_wire_overlay_get(Object *ob, Batch **tris, Batch **ledges, Batch **lverts)
+void DRW_cache_mesh_wire_overlay_get(Object *ob, Batch **tris, Batch **ledges, Batch **lverts)
 {
        BLI_assert(ob->type == OB_MESH);
 
@@ -1516,7 +1516,7 @@ Batch *DRW_cache_face_centers_get(Object *ob)
        return BKE_mesh_batch_cache_get_overlay_facedots(me);
 }
 
-Batch *DRW_cache_wire_outline_get(Object *ob)
+Batch *DRW_cache_mesh_wire_outline_get(Object *ob)
 {
        Batch *fancy_wire = NULL;
 
@@ -1528,7 +1528,7 @@ Batch *DRW_cache_wire_outline_get(Object *ob)
        return fancy_wire;
 }
 
-Batch *DRW_cache_surface_get(Object *ob)
+Batch *DRW_cache_mesh_surface_get(Object *ob)
 {
        Batch *surface = NULL;
 
@@ -1540,7 +1540,7 @@ Batch *DRW_cache_surface_get(Object *ob)
        return surface;
 }
 
-Batch *DRW_cache_surface_verts_get(Object *ob)
+Batch *DRW_cache_mesh_surface_verts_get(Object *ob)
 {
        Batch *surface = NULL;
 
@@ -1552,7 +1552,7 @@ Batch *DRW_cache_surface_verts_get(Object *ob)
        return surface;
 }
 
-Batch *DRW_cache_verts_get(Object *ob)
+Batch *DRW_cache_mesh_verts_get(Object *ob)
 {
        Batch *surface = NULL;
 
index 94d3f57a8321c4604a5e9194e4f133837d04a65c..26412c54c9cca1dc65c36860046002d883e51834 100644 (file)
@@ -79,12 +79,12 @@ struct Batch *DRW_cache_bone_point_wire_outline_get(void);
 struct Batch *DRW_cache_bone_arrows_get(void);
 
 /* Meshes */
-void DRW_cache_wire_overlay_get(
-       struct Object *ob, struct Batch **tris, struct Batch **ledges, struct Batch **lverts);
+void DRW_cache_mesh_wire_overlay_get(
+        struct Object *ob, struct Batch **tris, struct Batch **ledges, struct Batch **lverts);
 struct Batch *DRW_cache_face_centers_get(struct Object *ob);
-struct Batch *DRW_cache_wire_outline_get(struct Object *ob);
-struct Batch *DRW_cache_surface_get(struct Object *ob);
-struct Batch *DRW_cache_surface_verts_get(struct Object *ob);
-struct Batch *DRW_cache_verts_get(struct Object *ob);
+struct Batch *DRW_cache_mesh_wire_outline_get(struct Object *ob);
+struct Batch *DRW_cache_mesh_surface_get(struct Object *ob);
+struct Batch *DRW_cache_mesh_surface_verts_get(struct Object *ob);
+struct Batch *DRW_cache_mesh_verts_get(struct Object *ob);
 
 #endif /* __DRAW_CACHE_H__ */
\ No newline at end of file
index 5c60df270f909578308f3616cdeb8e2ad252afe3..7a2bfa2792abc04ed89468a64e760a45e00e0811 100644 (file)
@@ -184,7 +184,7 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index ecb3844547cc446844d520c4d5bd432cb1c3479c..994682ecbedeb4c99890a7ad44a7e8de403e5f48 100644 (file)
@@ -182,7 +182,7 @@ static void EDIT_LATTICE_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index dd3f7083b799a24efe19c7a58975b1073da5fdb3..dc53ca44f25a58124492abb30bb5ecf46156bae2 100644 (file)
@@ -375,7 +375,7 @@ static void edit_mesh_add_ob_to_pass(
        struct Batch *geo_ovl_tris, *geo_ovl_ledges, *geo_ovl_lverts, *geo_ovl_fcenter;
        ToolSettings *tsettings = scene->toolsettings;
 
-       DRW_cache_wire_overlay_get(ob, &geo_ovl_tris, &geo_ovl_ledges, &geo_ovl_lverts);
+       DRW_cache_mesh_wire_overlay_get(ob, &geo_ovl_tris, &geo_ovl_ledges, &geo_ovl_lverts);
        DRW_shgroup_call_add(face_shgrp, geo_ovl_tris, ob->obmat);
        DRW_shgroup_call_add(ledges_shgrp, geo_ovl_ledges, ob->obmat);
 
@@ -418,7 +418,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
                        face_mod = (do_occlude_wire) ? 0.0f : 1.0f;
 
                        if (do_occlude_wire) {
-                               geom = DRW_cache_surface_get(ob);
+                               geom = DRW_cache_mesh_surface_get(ob);
                                DRW_shgroup_call_add(stl->g_data->depth_shgrp_hidden_wire, geom, ob->obmat);
                        }
 
@@ -428,12 +428,12 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
                        }
 
                        if (vnormals_do) {
-                               geom = DRW_cache_verts_get(ob);
+                               geom = DRW_cache_mesh_verts_get(ob);
                                DRW_shgroup_call_add(stl->g_data->vnormals_shgrp, geom, ob->obmat);
                        }
 
                        if (lnormals_do) {
-                               geom = DRW_cache_surface_verts_get(ob);
+                               geom = DRW_cache_mesh_surface_verts_get(ob);
                                DRW_shgroup_call_add(stl->g_data->lnormals_shgrp, geom, ob->obmat);
                        }
 
index 989f1350f9dc3dcefa41135fdd815ec15c51cb91..d5cc2a0f07bd4cfaa0907d9cfd5aab0ce9c40c33 100644 (file)
@@ -182,7 +182,7 @@ static void EDIT_METABALL_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index eb6673a52ba772f7666c4ca89c17372bf0b8e42c..d30cfb77f470668b87e4d69098b7d34d6b5834d3 100644 (file)
@@ -182,7 +182,7 @@ static void EDIT_SURFACE_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index 5fd14c04240a48bd27728fa32b677d345b8d8ed4..fc11ed90ea7bfe30a69e9c9d79226147ab8d00e6 100644 (file)
@@ -182,7 +182,7 @@ static void EDIT_TEXT_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index fc1710421d9357c2a93db03cb3df840a711cab3e..8e9d328cecff6cad0c67aedbf4f918dfd458dda7 100644 (file)
@@ -1101,7 +1101,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
                                int theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
                                if (ob != obedit) {
                                        if (do_outlines) {
-                                               struct Batch *geom = DRW_cache_surface_get(ob);
+                                               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
                                                switch (theme_id) {
                                                        case TH_ACTIVE:
                                                                DRW_shgroup_call_add(stl->g_data->outlines_active, geom, ob->obmat);
index 4476ed69b756057920dfe5648c5253e265de90af..a795727e816a5330f759ab805ed575142648b18c 100644 (file)
@@ -182,7 +182,7 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index 6bb8cc38488f86e1d35cb77bebe2f466f5ce51f9..cd72881357f2268fddc1787bbb92d0f20d4758ae 100644 (file)
@@ -182,7 +182,7 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index 72251e18067f468e7ee215a2b106d2b585ccda0f..4e5bcd7e042bf66cf72ef2ad9f07841cbb59a8a4 100644 (file)
@@ -179,7 +179,7 @@ static void PAINT_WEIGHT_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index 611f08e8abf3663d676a64992e3eab36df115387..2fa32946196a824d9fd2e35d3280a19f57d3e5b2 100644 (file)
@@ -176,7 +176,7 @@ static void PARTICLE_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index fc8dc4090f6abe27dc898df677a82c31668fa7af..e779e2f4ca3e222c2226fbe660629e6430551a83 100644 (file)
@@ -176,7 +176,7 @@ static void POSE_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);
index c21140e46d33b0e6a47e9bfc17be06543c8bd93d..2fdd240ca79d6d486b0638766230daca7510ff01 100644 (file)
@@ -176,7 +176,7 @@ static void SCULPT_cache_populate(void *vedata, Object *ob)
 
        if (ob->type == OB_MESH) {
                /* Get geometry cache */
-               struct Batch *geom = DRW_cache_surface_get(ob);
+               struct Batch *geom = DRW_cache_mesh_surface_get(ob);
 
                /* Add geom to a shading group */
                DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);