[Bf-blender-cvs] [1485a665d1b] temp-angavrilov: Revert "Fix T92120 (partially): No bone custom shape with curve object meshes"
Alexander Gavrilov
noreply at git.blender.org
Sat Nov 27 23:57:52 CET 2021
Commit: 1485a665d1b34dfa427a0cd78c62b1b6e8cc2aa5
Author: Alexander Gavrilov
Date: Sun Nov 28 01:39:48 2021 +0300
Branches: temp-angavrilov
https://developer.blender.org/rB1485a665d1b34dfa427a0cd78c62b1b6e8cc2aa5
Revert "Fix T92120 (partially): No bone custom shape with curve object meshes"
This reverts commit a07089dcb10d8f0265220bf5abe07dca03097fe1.
===================================================================
M source/blender/draw/engines/overlay/overlay_armature.c
===================================================================
diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c
index f70fbcc024c..aa8fcddf14e 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -26,7 +26,6 @@
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
-#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
@@ -40,7 +39,6 @@
#include "BKE_armature.h"
#include "BKE_deform.h"
#include "BKE_modifier.h"
-#include "BKE_object.h"
#include "DEG_depsgraph_query.h"
@@ -54,8 +52,6 @@
#include "overlay_private.h"
-#include "draw_cache_impl.h"
-
#define BONE_VAR(eBone, pchan, var) ((eBone) ? (eBone->var) : (pchan->var))
#define BONE_FLAG(eBone, pchan) ((eBone) ? (eBone->flag) : (pchan->bone->flag))
@@ -681,22 +677,13 @@ static void drw_shgroup_bone_custom_solid(ArmatureDrawContext *ctx,
const float outline_color[4],
Object *custom)
{
- /* The custom object is not an evaluated object, so its object->data field hasn't been replaced
- * by #data_eval. This is bad since it gives preference to an object's evaluated mesh over any
- * other data type, but supporting all evaluated geometry components would require a much larger
- * refactor of this area. */
- Mesh *mesh = BKE_object_get_evaluated_mesh(custom);
- if (mesh == NULL) {
- return;
- }
-
/* TODO(fclem): arg... less than ideal but we never iter on this object
* to assure batch cache is valid. */
- DRW_mesh_batch_cache_validate(mesh);
+ drw_batch_cache_validate(custom);
- struct GPUBatch *surf = DRW_mesh_batch_cache_get_surface(mesh);
- struct GPUBatch *edges = DRW_mesh_batch_cache_get_edge_detection(mesh, NULL);
- struct GPUBatch *ledges = DRW_mesh_batch_cache_get_loose_edges(mesh);
+ struct GPUBatch *surf = DRW_cache_object_surface_get(custom);
+ struct GPUBatch *edges = DRW_cache_object_edge_detection_get(custom, NULL);
+ struct GPUBatch *ledges = DRW_cache_object_loose_edges_get(custom);
BoneInstanceData inst_data;
DRWCallBuffer *buf;
More information about the Bf-blender-cvs
mailing list