Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/object_mode.c
| Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | typedef struct OBJECT_PrivateData { | ||||
| DRWShadingGroup *field_wind; | DRWShadingGroup *field_wind; | ||||
| DRWShadingGroup *field_force; | DRWShadingGroup *field_force; | ||||
| DRWShadingGroup *field_vortex; | DRWShadingGroup *field_vortex; | ||||
| DRWShadingGroup *field_curve_sta; | DRWShadingGroup *field_curve_sta; | ||||
| DRWShadingGroup *field_curve_end; | DRWShadingGroup *field_curve_end; | ||||
| DRWShadingGroup *field_tube_limit; | DRWShadingGroup *field_tube_limit; | ||||
| DRWShadingGroup *field_cone_limit; | DRWShadingGroup *field_cone_limit; | ||||
| /* Grease Pencil */ | |||||
| DRWShadingGroup *gpencil_axes; | |||||
| /* Speaker */ | /* Speaker */ | ||||
| DRWShadingGroup *speaker; | DRWShadingGroup *speaker; | ||||
| /* Probe */ | /* Probe */ | ||||
| DRWShadingGroup *probe_cube; | DRWShadingGroup *probe_cube; | ||||
| DRWShadingGroup *probe_planar; | DRWShadingGroup *probe_planar; | ||||
| DRWShadingGroup *probe_grid; | DRWShadingGroup *probe_grid; | ||||
| ▲ Show 20 Lines • Show All 955 Lines • ▼ Show 20 Lines | g_data = stl->g_data; | ||||
| stl->g_data->field_force = shgroup_instance_screen_aligned(psl->non_meshes, geom); | stl->g_data->field_force = shgroup_instance_screen_aligned(psl->non_meshes, geom); | ||||
| geom = DRW_cache_field_vortex_get(); | geom = DRW_cache_field_vortex_get(); | ||||
| stl->g_data->field_vortex = shgroup_instance_scaled(psl->non_meshes, geom); | stl->g_data->field_vortex = shgroup_instance_scaled(psl->non_meshes, geom); | ||||
| geom = DRW_cache_screenspace_circle_get(); | geom = DRW_cache_screenspace_circle_get(); | ||||
| stl->g_data->field_curve_sta = shgroup_instance_screen_aligned(psl->non_meshes, geom); | stl->g_data->field_curve_sta = shgroup_instance_screen_aligned(psl->non_meshes, geom); | ||||
| /* Grease Pencil */ | |||||
| geom = DRW_cache_gpencil_axes_get(); | |||||
| stl->g_data->gpencil_axes = shgroup_instance(psl->non_meshes, geom); | |||||
| /* Speaker */ | /* Speaker */ | ||||
| geom = DRW_cache_speaker_get(); | geom = DRW_cache_speaker_get(); | ||||
| stl->g_data->speaker = shgroup_instance(psl->non_meshes, geom); | stl->g_data->speaker = shgroup_instance(psl->non_meshes, geom); | ||||
| /* Probe */ | /* Probe */ | ||||
| static float probeSize = 14.0f; | static float probeSize = 14.0f; | ||||
| geom = DRW_cache_lightprobe_cube_get(); | geom = DRW_cache_lightprobe_cube_get(); | ||||
| stl->g_data->probe_cube = shgroup_instance_screenspace(psl->non_meshes, geom, &probeSize); | stl->g_data->probe_cube = shgroup_instance_screenspace(psl->non_meshes, geom, &probeSize); | ||||
| ▲ Show 20 Lines • Show All 668 Lines • ▼ Show 20 Lines | static void volumes_free_smoke_textures(void) | ||||
| * all viewport in a redraw at least. */ | * all viewport in a redraw at least. */ | ||||
| for (LinkData *link = e_data.smoke_domains.first; link; link = link->next) { | for (LinkData *link = e_data.smoke_domains.first; link; link = link->next) { | ||||
| SmokeModifierData *smd = (SmokeModifierData *)link->data; | SmokeModifierData *smd = (SmokeModifierData *)link->data; | ||||
| GPU_free_smoke(smd); | GPU_free_smoke(smd); | ||||
| } | } | ||||
| BLI_freelistN(&e_data.smoke_domains); | BLI_freelistN(&e_data.smoke_domains); | ||||
| } | } | ||||
| static void DRW_shgroup_gpencil(OBJECT_StorageList *stl, Object *ob, ViewLayer *view_layer) | |||||
| { | |||||
| float *color; | |||||
| DRW_object_wire_theme_get(ob, view_layer, &color); | |||||
| DRW_shgroup_call_dynamic_add(stl->g_data->gpencil_axes, color, &ob->empty_drawsize, ob->obmat); | |||||
| } | |||||
| static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, ViewLayer *view_layer) | static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, ViewLayer *view_layer) | ||||
| { | { | ||||
| float *color; | float *color; | ||||
| static float one = 1.0f; | static float one = 1.0f; | ||||
| DRW_object_wire_theme_get(ob, view_layer, &color); | DRW_object_wire_theme_get(ob, view_layer, &color); | ||||
| DRW_shgroup_call_dynamic_add(stl->g_data->speaker, color, &one, ob->obmat); | DRW_shgroup_call_dynamic_add(stl->g_data->speaker, color, &one, ob->obmat); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 609 Lines • ▼ Show 20 Lines | case OB_CAMERA: | ||||
| DRW_shgroup_camera(stl, ob, view_layer); | DRW_shgroup_camera(stl, ob, view_layer); | ||||
| break; | break; | ||||
| case OB_EMPTY: | case OB_EMPTY: | ||||
| if (hide_object_extra) { | if (hide_object_extra) { | ||||
| break; | break; | ||||
| } | } | ||||
| DRW_shgroup_empty(stl, psl, ob, view_layer); | DRW_shgroup_empty(stl, psl, ob, view_layer); | ||||
| break; | break; | ||||
| case OB_GPENCIL: | |||||
| DRW_shgroup_gpencil(stl, ob, view_layer); | |||||
| break; | |||||
| case OB_SPEAKER: | case OB_SPEAKER: | ||||
| if (hide_object_extra) { | if (hide_object_extra) { | ||||
| break; | break; | ||||
| } | } | ||||
| DRW_shgroup_speaker(stl, ob, view_layer); | DRW_shgroup_speaker(stl, ob, view_layer); | ||||
| break; | break; | ||||
| case OB_LIGHTPROBE: | case OB_LIGHTPROBE: | ||||
| if (hide_object_extra) { | if (hide_object_extra) { | ||||
| ▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines | |||||