Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/object_mode.c
| Show All 37 Lines | |||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "BIF_gl.h" | #include "BIF_gl.h" | ||||
| #include "BKE_anim.h" | #include "BKE_anim.h" | ||||
| #include "BKE_camera.h" | #include "BKE_camera.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_object.h" | |||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| #include "BKE_image.h" | #include "BKE_image.h" | ||||
| #include "BKE_texture.h" | #include "BKE_texture.h" | ||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #include "GPU_shader.h" | #include "GPU_shader.h" | ||||
| ▲ Show 20 Lines • Show All 1,503 Lines • ▼ Show 20 Lines | static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl) | ||||
| if (prb->type == LIGHTPROBE_TYPE_CUBE) { | if (prb->type == LIGHTPROBE_TYPE_CUBE) { | ||||
| DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundline, ob->obmat[3]); | DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundline, ob->obmat[3]); | ||||
| DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundpoint, ob->obmat[3]); | DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundpoint, ob->obmat[3]); | ||||
| } | } | ||||
| } | } | ||||
| static void DRW_shgroup_relationship_lines(OBJECT_StorageList *stl, Object *ob) | static void DRW_shgroup_relationship_lines(OBJECT_StorageList *stl, Object *ob) | ||||
| { | { | ||||
| if (ob->parent && ((ob->parent->base_flag & BASE_VISIBLED) != 0)) { | if (ob->parent && BKE_object_is_visible(ob->parent)) { | ||||
| DRW_shgroup_call_dynamic_add(stl->g_data->relationship_lines, ob->obmat[3]); | DRW_shgroup_call_dynamic_add(stl->g_data->relationship_lines, ob->obmat[3]); | ||||
| DRW_shgroup_call_dynamic_add(stl->g_data->relationship_lines, ob->parent->obmat[3]); | DRW_shgroup_call_dynamic_add(stl->g_data->relationship_lines, ob->parent->obmat[3]); | ||||
| } | } | ||||
| } | } | ||||
| static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl, View3D *v3d) | static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl, View3D *v3d) | ||||
| { | { | ||||
| const bool is_library = ob->id.us > 1 || ID_IS_LINKED_DATABLOCK(ob); | const bool is_library = ob->id.us > 1 || ID_IS_LINKED_DATABLOCK(ob); | ||||
| ▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | static void OBJECT_cache_populate(void *vedata, Object *ob) | ||||
| OBJECT_PassList *psl = ((OBJECT_Data *)vedata)->psl; | OBJECT_PassList *psl = ((OBJECT_Data *)vedata)->psl; | ||||
| OBJECT_StorageList *stl = ((OBJECT_Data *)vedata)->stl; | OBJECT_StorageList *stl = ((OBJECT_Data *)vedata)->stl; | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| Scene *scene = draw_ctx->scene; | Scene *scene = draw_ctx->scene; | ||||
| SceneLayer *sl = draw_ctx->scene_layer; | SceneLayer *sl = draw_ctx->scene_layer; | ||||
| View3D *v3d = draw_ctx->v3d; | View3D *v3d = draw_ctx->v3d; | ||||
| int theme_id = TH_UNDEFINED; | int theme_id = TH_UNDEFINED; | ||||
| if (!BKE_object_is_visible(ob)) { | |||||
| return; | |||||
| } | |||||
| //CollectionEngineSettings *ces_mode_ob = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_OBJECT, ""); | //CollectionEngineSettings *ces_mode_ob = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_OBJECT, ""); | ||||
| //bool do_wire = BKE_collection_engine_property_value_get_bool(ces_mode_ob, "show_wire"); | //bool do_wire = BKE_collection_engine_property_value_get_bool(ces_mode_ob, "show_wire"); | ||||
| bool do_outlines = ((ob->base_flag & BASE_SELECTED) != 0); | bool do_outlines = ((ob->base_flag & BASE_SELECTED) != 0); | ||||
| if (do_outlines) { | if (do_outlines) { | ||||
| Object *obedit = scene->obedit; | Object *obedit = scene->obedit; | ||||
| if (ob != obedit && !((ob == draw_ctx->obact) && (ob->mode & OB_MODE_ALL_PAINT))) { | if (ob != obedit && !((ob == draw_ctx->obact) && (ob->mode & OB_MODE_ALL_PAINT))) { | ||||
| ▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines | |||||