Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/edit_metaball_mode.c
| Show All 22 Lines | |||||
| * \ingroup draw | * \ingroup draw | ||||
| */ | */ | ||||
| #include "DRW_engine.h" | #include "DRW_engine.h" | ||||
| #include "DRW_render.h" | #include "DRW_render.h" | ||||
| #include "DNA_meta_types.h" | #include "DNA_meta_types.h" | ||||
| #include "BKE_object.h" | |||||
| #include "BKE_mball.h" | #include "BKE_mball.h" | ||||
| /* If builtin shaders are needed */ | /* If builtin shaders are needed */ | ||||
| #include "GPU_shader.h" | #include "GPU_shader.h" | ||||
| #include "GPU_select.h" | #include "GPU_select.h" | ||||
| #include "draw_common.h" | #include "draw_common.h" | ||||
| ▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| //EDIT_METABALL_PassList *psl = ((EDIT_METABALL_Data *)vedata)->psl; | //EDIT_METABALL_PassList *psl = ((EDIT_METABALL_Data *)vedata)->psl; | ||||
| EDIT_METABALL_StorageList *stl = ((EDIT_METABALL_Data *)vedata)->stl; | EDIT_METABALL_StorageList *stl = ((EDIT_METABALL_Data *)vedata)->stl; | ||||
| if (ob->type == OB_MBALL) { | if (ob->type == OB_MBALL) { | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| DRWShadingGroup *group = stl->g_data->group; | DRWShadingGroup *group = stl->g_data->group; | ||||
| if (ob == draw_ctx->object_edit) { | #if 0 | ||||
| if (ob == draw_ctx->object_edit) | |||||
| #else | |||||
| if ((ob == draw_ctx->object_edit) || BKE_object_is_in_editmode_and_selected(ob)) | |||||
| #endif | |||||
| { | |||||
| MetaBall *mb = ob->data; | MetaBall *mb = ob->data; | ||||
| const bool is_select = DRW_state_is_select(); | const bool is_select = DRW_state_is_select(); | ||||
| int selection_id = 0; | int selection_id = 0; | ||||
| for (MetaElem *ml = mb->editelems->first; ml != NULL; ml = ml->next) { | for (MetaElem *ml = mb->editelems->first; ml != NULL; ml = ml->next) { | ||||
| BKE_mball_element_calc_scale_xform(ml->draw_scale_xform, ob->obmat, &ml->x); | BKE_mball_element_calc_scale_xform(ml->draw_scale_xform, ob->obmat, &ml->x); | ||||
| ▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines | |||||