Commit: 048c5580c2136165f401b1d6b88624fbc1484d46 Author: Jeroen Bakker Date: Fri Oct 9 07:25:43 2020 +0200 Branches: master https://developer.blender.org/rB048c5580c2136165f401b1d6b88624fbc1484d46
Revert "CleanUp: Introduce `eMeshBatchDirtyMode` enum" This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5. =================================================================== M source/blender/blenkernel/BKE_curve.h M source/blender/blenkernel/BKE_hair.h M source/blender/blenkernel/BKE_lattice.h M source/blender/blenkernel/BKE_mball.h M source/blender/blenkernel/BKE_mesh.h D source/blender/blenkernel/BKE_mesh_types.h M source/blender/blenkernel/BKE_particle.h M source/blender/blenkernel/BKE_pointcloud.h M source/blender/blenkernel/BKE_volume.h M source/blender/blenkernel/intern/curve.c M source/blender/blenkernel/intern/hair.c M source/blender/blenkernel/intern/lattice.c M source/blender/blenkernel/intern/mball.c M source/blender/blenkernel/intern/mesh_runtime.c M source/blender/blenkernel/intern/particle.c M source/blender/blenkernel/intern/pointcloud.c M source/blender/blenkernel/intern/volume.cc M source/blender/draw/intern/draw_cache_impl.h M source/blender/draw/intern/draw_cache_impl_curve.c M source/blender/draw/intern/draw_cache_impl_hair.c M source/blender/draw/intern/draw_cache_impl_lattice.c M source/blender/draw/intern/draw_cache_impl_mesh.c M source/blender/draw/intern/draw_cache_impl_metaball.c M source/blender/draw/intern/draw_cache_impl_particles.c M source/blender/draw/intern/draw_cache_impl_pointcloud.c M source/blender/draw/intern/draw_cache_impl_volume.c =================================================================== diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 2b238ef18f5..d9138db2769 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -22,8 +22,6 @@ * \ingroup bke */ -#include "BKE_mesh_types.h" - #include "DNA_scene_types.h" #ifdef __cplusplus @@ -277,10 +275,10 @@ enum { BKE_CURVE_BATCH_DIRTY_ALL = 0, BKE_CURVE_BATCH_DIRTY_SELECT, }; -void BKE_curve_batch_cache_dirty_tag(struct Curve *cu, eMeshBatchDirtyMode mode); +void BKE_curve_batch_cache_dirty_tag(struct Curve *cu, int mode); void BKE_curve_batch_cache_free(struct Curve *cu); -extern void (*BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, eMeshBatchDirtyMode mode); +extern void (*BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, int mode); extern void (*BKE_curve_batch_cache_free_cb)(struct Curve *cu); /* -------------------------------------------------------------------- */ diff --git a/source/blender/blenkernel/BKE_hair.h b/source/blender/blenkernel/BKE_hair.h index 1d7985e5c98..403e461a9dc 100644 --- a/source/blender/blenkernel/BKE_hair.h +++ b/source/blender/blenkernel/BKE_hair.h @@ -16,8 +16,6 @@ #pragma once -#include "BKE_mesh_types.h" - /** \file * \ingroup bke * \brief General operations for hairs. @@ -54,10 +52,10 @@ enum { BKE_HAIR_BATCH_DIRTY_ALL = 0, }; -void BKE_hair_batch_cache_dirty_tag(struct Hair *hair, eMeshBatchDirtyMode mode); +void BKE_hair_batch_cache_dirty_tag(struct Hair *hair, int mode); void BKE_hair_batch_cache_free(struct Hair *hair); -extern void (*BKE_hair_batch_cache_dirty_tag_cb)(struct Hair *hair, eMeshBatchDirtyMode mode); +extern void (*BKE_hair_batch_cache_dirty_tag_cb)(struct Hair *hair, int mode); extern void (*BKE_hair_batch_cache_free_cb)(struct Hair *hair); #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index 0396d050b35..f4c1a6fdcb4 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -22,7 +22,6 @@ /** \file * \ingroup bke */ -#include "BKE_mesh_types.h" #include "BLI_compiler_attrs.h" @@ -92,10 +91,10 @@ enum { BKE_LATTICE_BATCH_DIRTY_ALL = 0, BKE_LATTICE_BATCH_DIRTY_SELECT, }; -void BKE_lattice_batch_cache_dirty_tag(struct Lattice *lt, eMeshBatchDirtyMode mode); +void BKE_lattice_batch_cache_dirty_tag(struct Lattice *lt, int mode); void BKE_lattice_batch_cache_free(struct Lattice *lt); -extern void (*BKE_lattice_batch_cache_dirty_tag_cb)(struct Lattice *lt, eMeshBatchDirtyMode mode); +extern void (*BKE_lattice_batch_cache_dirty_tag_cb)(struct Lattice *lt, int mode); extern void (*BKE_lattice_batch_cache_free_cb)(struct Lattice *lt); /* -------------------------------------------------------------------- */ diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index 8a294c96e26..db4dca14535 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -22,8 +22,6 @@ * \ingroup bke */ -#include "BKE_mesh_types.h" - #ifdef __cplusplus extern "C" { #endif @@ -83,10 +81,10 @@ struct Depsgraph; enum { BKE_MBALL_BATCH_DIRTY_ALL = 0, }; -void BKE_mball_batch_cache_dirty_tag(struct MetaBall *mb, eMeshBatchDirtyMode mode); +void BKE_mball_batch_cache_dirty_tag(struct MetaBall *mb, int mode); void BKE_mball_batch_cache_free(struct MetaBall *mb); -extern void (*BKE_mball_batch_cache_dirty_tag_cb)(struct MetaBall *mb, eMeshBatchDirtyMode mode); +extern void (*BKE_mball_batch_cache_dirty_tag_cb)(struct MetaBall *mb, int mode); extern void (*BKE_mball_batch_cache_free_cb)(struct MetaBall *mb); #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index a61e453ec52..42d22cb9f16 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -23,7 +23,6 @@ */ /* defines BLI_INLINE */ -#include "BKE_mesh_types.h" #include "BLI_compiler_compat.h" struct BLI_Stack; @@ -685,10 +684,18 @@ void BKE_mesh_wrapper_deferred_finalize(struct Mesh *me_eval, void BKE_mesh_eval_geometry(struct Depsgraph *depsgraph, struct Mesh *mesh); /* Draw Cache */ -void BKE_mesh_batch_cache_dirty_tag(struct Mesh *me, eMeshBatchDirtyMode mode); +enum { + BKE_MESH_BATCH_DIRTY_ALL = 0, + BKE_MESH_BATCH_DIRTY_SELECT, + BKE_MESH_BATCH_DIRTY_SELECT_PAINT, + BKE_MESH_BATCH_DIRTY_SHADING, + BKE_MESH_BATCH_DIRTY_UVEDIT_ALL, + BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT, +}; +void BKE_mesh_batch_cache_dirty_tag(struct Mesh *me, int mode); void BKE_mesh_batch_cache_free(struct Mesh *me); -extern void (*BKE_mesh_batch_cache_dirty_tag_cb)(struct Mesh *me, eMeshBatchDirtyMode mode); +extern void (*BKE_mesh_batch_cache_dirty_tag_cb)(struct Mesh *me, int mode); extern void (*BKE_mesh_batch_cache_free_cb)(struct Mesh *me); /* Inlines */ diff --git a/source/blender/blenkernel/BKE_mesh_types.h b/source/blender/blenkernel/BKE_mesh_types.h deleted file mode 100644 index aed8c44a031..00000000000 --- a/source/blender/blenkernel/BKE_mesh_types.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2020 by Blender Foundation - * All rights reserved. - */ -#pragma once - -/** \file - * \ingroup bke - */ - -typedef enum eMeshBatchDirtyMode { - BKE_MESH_BATCH_DIRTY_ALL = 0, - BKE_MESH_BATCH_DIRTY_SELECT, - BKE_MESH_BATCH_DIRTY_SELECT_PAINT, - BKE_MESH_BATCH_DIRTY_SHADING, - BKE_MESH_BATCH_DIRTY_UVEDIT_ALL, - BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT, -} eMeshBatchDirtyMode; diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index f726b48ebeb..6ed3b94b8e5 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -33,7 +33,6 @@ #include "DNA_particle_types.h" #include "BKE_customdata.h" -#include "BKE_mesh_types.h" #ifdef __cplusplus extern "C" { @@ -620,11 +619,10 @@ void BKE_particle_system_eval_init(struct Depsgraph *depsgraph, struct Object *o enum { BKE_PARTICLE_BATCH_DIRTY_ALL = 0, }; -void BKE_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, eMeshBatchDirtyMode mode); +void BKE_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode); void BKE_particle_batch_cache_free(struct ParticleSystem *psys); -extern void (*BKE_particle_batch_cache_dirty_tag_cb)(struct ParticleSystem *psys, - eMeshBatchDirtyMode mode); +extern void (*BKE_particle_batch_cache_dirty_tag_cb)(struct ParticleSystem *psys, int mode); extern void (*BKE_particle_batch_cache_free_cb)(struct ParticleSystem *psys); #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_pointcloud.h b/source/blender/blenkernel/BKE_pointcloud.h index 682797991bd..985a8cc3ca7 100644 --- a/source/blender/blenkernel/BKE_pointcloud.h +++ b/source/blender/blenkernel/BKE_pointcloud.h @@ -20,9 +20,6 @@ * \ingroup bke * \brief General operations for point-clouds. */ - -#include "BKE_mesh_types.h" - #ifdef __cplusplus extern "C" { #endif @@ -64,11 +61,10 @@ enum { BKE_POINTCLOUD_BATCH_DIRTY_ALL = 0, }; -void BKE_pointcloud_batch_cache_dirty_tag(struct PointCloud *pointcloud, eMeshBatchDirtyMode mode); +void BKE_pointcloud_batch_cache_dirty_tag(struct PointCloud *pointcloud, int mode); void BKE_pointcloud_batch_cache_free(struct PointCloud *pointcloud); -extern void (*BKE_pointcloud_batch_cache_dirty_tag_cb)(struct PointCloud *pointcloud, - eMeshBatchDirtyMode mode); +extern void (*BKE_pointcloud_batch_cache_dirty_tag_cb)(struct PointCloud *pointcloud, int mode); extern void (*BKE_pointcloud_batch_cache_free_cb)(struct PointCloud *pointcloud); #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h index f48f417ab6d..2a272d06986 100644 --- a/source/blender/blenkernel/BKE_volume.h +++ b/source/blender/blenkernel/BKE_volume.h @@ -16,8 +16,6 @@ #pragma once -#include "BKE_mesh_types.h" - /** \file * \ingroup bke * \brief Volume datablock. @@ -66,11 +64,10 @@ enum { BKE_VOLUME_BATCH_DIRTY_ALL = 0, }; -void BKE_volume_batch_cache_dirty_tag(struct Volume *volume, eMeshBatchDirtyMode mode); +void BKE_volume_batch_cache_dirty_tag(struct Volume *volume, int mode); void BKE_volume_batch_cache_free(struct Volume *volume); -extern void (*BKE_volume_batch_cache_dirty_tag_cb)(struct Volume *volume, - eMeshBatchDirtyMode mode); +extern void (*BKE_volume_batch_cache_dirty_tag_cb)(struct Volume *volume, int mode); extern void (*BKE_volume_batch_cache_free_cb)(struct Volume *volume); /* Grids diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 452f5835171..8a5b60fb0e8 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -5583,10 +5583,10 @@ void BKE_curve_eval_geometry(Depsgraph *depsgraph, Curve *curve) } /* Draw Engine */ -void (*BKE_curve_batch_cache_dirty_tag_cb)(Curve *cu, eMeshBatchDirtyMode mode) = NULL; +void (*BKE_curve_batch_cache_dirty_tag_cb)(Curve *cu, int mode) = NULL; void (*BKE_curve_batch_cache_free_cb)(Curve *cu) = NULL; -void BKE_curve_batch_cache_dirty_tag(Curve *cu, eMeshBatchDirtyMode mode) +void BKE_curve_batch_cache_dirty_tag(Curve *cu, int mode) { if (cu @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs