Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/screen.c
| Show All 30 Lines | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "DNA_workspace_types.h" | #include "DNA_workspace_types.h" | ||||
| #include "DNA_defaults.h" | |||||
| #include "BLI_math_vector.h" | #include "BLI_math_vector.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_rect.h" | #include "BLI_rect.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_icons.h" | #include "BKE_icons.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| ▲ Show 20 Lines • Show All 800 Lines • ▼ Show 20 Lines | for (sl = sa->spacedata.first; sl; sl = sl->next) { | ||||
| BKE_screen_view3d_sync(v3d, scene); | BKE_screen_view3d_sync(v3d, scene); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void BKE_screen_view3d_shading_init(View3DShading *shading) | void BKE_screen_view3d_shading_init(View3DShading *shading) | ||||
| { | { | ||||
| memset(shading, 0, sizeof(*shading)); | const View3DShading *shading_default = DNA_struct_default_get(View3DShading); | ||||
| memcpy(shading, shading_default, sizeof(*shading)); | |||||
| shading->type = OB_SOLID; | |||||
| shading->prev_type = OB_SOLID; | |||||
| shading->flag = V3D_SHADING_SPECULAR_HIGHLIGHT | V3D_SHADING_XRAY_WIREFRAME | | |||||
| V3D_SHADING_SCENE_LIGHTS_RENDER | V3D_SHADING_SCENE_WORLD_RENDER; | |||||
| shading->light = V3D_LIGHTING_STUDIO; | |||||
| shading->shadow_intensity = 0.5f; | |||||
| shading->xray_alpha = 0.5f; | |||||
| shading->xray_alpha_wire = 0.0f; | |||||
| shading->cavity_valley_factor = 1.0f; | |||||
| shading->cavity_ridge_factor = 1.0f; | |||||
| shading->cavity_type = V3D_SHADING_CAVITY_CURVATURE; | |||||
| shading->curvature_ridge_factor = 1.0f; | |||||
| shading->curvature_valley_factor = 1.0f; | |||||
| copy_v3_fl(shading->single_color, 0.8f); | |||||
| copy_v3_fl(shading->background_color, 0.05f); | |||||
| shading->studiolight_intensity = 1.0f; | |||||
| } | } | ||||
| /* magic zoom calculation, no idea what | /* magic zoom calculation, no idea what | ||||
| * it signifies, if you find out, tell me! -zr | * it signifies, if you find out, tell me! -zr | ||||
| */ | */ | ||||
| /* simple, its magic dude! | /* simple, its magic dude! | ||||
| * well, to be honest, this gives a natural feeling zooming | * well, to be honest, this gives a natural feeling zooming | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||