Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_engine.c
| Show All 24 Lines | |||||
| #include "DRW_engine.h" | #include "DRW_engine.h" | ||||
| #include "DRW_render.h" | #include "DRW_render.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_paint.h" | |||||
| #include "overlay_engine.h" | #include "overlay_engine.h" | ||||
| #include "overlay_private.h" | #include "overlay_private.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Engine Callbacks | /** \name Engine Callbacks | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | static void OVERLAY_cache_populate(void *vedata, Object *ob) | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| const bool is_select = DRW_state_is_select(); | const bool is_select = DRW_state_is_select(); | ||||
| const bool renderable = DRW_object_is_renderable(ob); | const bool renderable = DRW_object_is_renderable(ob); | ||||
| const bool in_pose_mode = ob->type == OB_ARMATURE && OVERLAY_armature_is_pose_mode(ob, draw_ctx); | const bool in_pose_mode = ob->type == OB_ARMATURE && OVERLAY_armature_is_pose_mode(ob, draw_ctx); | ||||
| const bool in_edit_mode = overlay_object_is_edit_mode(pd, ob); | const bool in_edit_mode = overlay_object_is_edit_mode(pd, ob); | ||||
| const bool in_particle_edit_mode = ob->mode == OB_MODE_PARTICLE_EDIT; | const bool in_particle_edit_mode = ob->mode == OB_MODE_PARTICLE_EDIT; | ||||
| const bool in_paint_mode = (ob == draw_ctx->obact) && | const bool in_paint_mode = (ob == draw_ctx->obact) && | ||||
| (draw_ctx->object_mode & OB_MODE_ALL_PAINT); | (draw_ctx->object_mode & OB_MODE_ALL_PAINT); | ||||
| const bool in_sculpt_mode = (ob == draw_ctx->obact) && (ob->sculpt != NULL); | const bool in_sculpt_mode = (ob == draw_ctx->obact) && (ob->sculpt != NULL) && | ||||
| (ob->sculpt->mode_type == OB_MODE_SCULPT); | |||||
| const bool has_surface = ELEM(ob->type, | const bool has_surface = ELEM(ob->type, | ||||
| OB_MESH, | OB_MESH, | ||||
| OB_CURVE, | OB_CURVE, | ||||
| OB_SURF, | OB_SURF, | ||||
| OB_MBALL, | OB_MBALL, | ||||
| OB_FONT, | OB_FONT, | ||||
| OB_GPENCIL, | OB_GPENCIL, | ||||
| OB_HAIR, | OB_HAIR, | ||||
| ▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines | |||||