16#define DNA_DEPRECATED_ALLOW
75#define U (*((const UserDef *)&U))
85 N_(
"Video_Editing")));
90 const char *workspace_name)
135 if (
STREQ(workspace_name,
"UV Editing")) {
142 else if (
STR_ELEM(workspace_name,
"Texture Paint",
"Shading")) {
198 View3D *v3d =
static_cast<View3D *
>(area->spacedata.first);
228 constexpr float viewports_to_level[][4] = {
230 {0x1.6e7cb8p-1, -0x1.c1747p-2, -0x1.2997dap-2, -0x1.d5d806p-2},
232 {0x1.6e7cb8p-1, -0x1.c17478p-2, -0x1.2997dcp-2, -0x1.d5d80cp-2},
234 {0x1.6e7cb6p-1, -0x1.c17476p-2, -0x1.2997dep-2, -0x1.d5d80cp-2},
237 constexpr float viewports_to_clear_ofs[][4] = {
239 {0x1.6e7cb6p-1, -0x1.c17476p-2, -0x1.2997dep-2, -0x1.d5d80cp-2},
241 {0x1.885b28p-1, -0x1.2d10cp-1, -0x1.42ae54p-3, -0x1.a486a2p-3},
244 constexpr float unified_viewquat[4] = {
245 0x1.6cbc88p-1, -0x1.c3a5c8p-2, -0x1.26413ep-2, -0x1.db430ap-2};
251 for (
int i = 0;
i <
ARRAY_SIZE(viewports_to_clear_ofs);
i++) {
274 const bool hide_image_tool_header =
STREQ(workspace_name,
"Rendering");
283 if (((sl->spacetype ==
SPACE_IMAGE) && hide_image_tool_header) ||
305 View3D *v3d =
static_cast<View3D *
>(area->spacedata.first);
318 if (layout->screen) {
337 bScreen *screen = layout->screen;
342 View3D *v3d =
static_cast<View3D *
>(area->spacedata.first);
356 bScreen *screen = layout->screen;
364 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
423 scene->
r.
cfra = 1.0f;
428 if (scene->nodetree) {
431 scene->nodetree =
nullptr;
432 scene->use_nodes =
false;
442 view_layer->eevee.ambient_occlusion_distance = 10.0f;
453 scene->
eevee.motion_blur_shutter_deprecated = 0.5f;
463 const float default_snap_angle_increment =
DEG2RADF(5.0f);
466 const float default_snap_angle_increment_precision =
DEG2RADF(1.0f);
476 &gp_falloff_curve->
clipr,
485 &gp_primitive_curve->
clipr,
499 const float uv_values[24][2] = {
500 {0.625, 0.50}, {0.875, 0.50}, {0.875, 0.75}, {0.625, 0.75}, {0.375, 0.75}, {0.625, 0.75},
501 {0.625, 1.00}, {0.375, 1.00}, {0.375, 0.00}, {0.625, 0.00}, {0.625, 0.25}, {0.375, 0.25},
502 {0.125, 0.50}, {0.375, 0.50}, {0.375, 0.75}, {0.125, 0.75}, {0.375, 0.50}, {0.625, 0.50},
503 {0.625, 0.75}, {0.375, 0.75}, {0.375, 0.25}, {0.625, 0.25}, {0.625, 0.50}, {0.375, 0.50},
505 float (*uv_map)[2] =
static_cast<float (*)[2]
>(
507 memcpy(uv_map, uv_values,
sizeof(
float[2]) * mesh->
corners_num);
526 if (ts->unified_paint_settings.input_samples == 0) {
527 ts->unified_paint_settings.input_samples = 1;
531 ts->unified_paint_settings.flag = default_ups.
flag;
535 if (ts->unified_paint_settings.curve_rand_hue ==
nullptr) {
538 if (ts->unified_paint_settings.curve_rand_saturation ==
nullptr) {
541 if (ts->unified_paint_settings.curve_rand_value ==
nullptr) {
620 if (assets_path.has_value()) {
621 const std::string assets_blend_path = *assets_path +
"/essentials_brushes-gp_draw.blend";
624 &material->id, assets_blend_path.c_str(), material->id.name);
661 win->workspace_hook, workspace);
666 if (!
STREQ(screen->
id.
name + 2, workspace->id.name + 2)) {
674 if (layout != layout_iter) {
688 STRNCPY_UTF8(scene->view_settings.view_transform,
"Standard");
693 STRNCPY_UTF8(scene->view_settings.view_transform,
"AgX");
739 mesh->smoothresh_legacy =
DEG2RADF(30);
745 mesh->remesh_voxel_size = 0.035f;
753 mesh->attributes_for_write().remove(
".sculpt_face_set");
758 camera->dof.focus_distance = 10.0f;
759 camera->dof.aperture_fstop = 2.8f;
764 light->clipsta = 0.05f;
765 light->att_dist = 40.0f;
771 ma->roughness = 0.5f;
776 for (
bNode *node : ma->nodetree->all_nodes()) {
784 *node,
SOCK_IN,
"Emission Strength");
792 node->location[0] = -200.0f;
793 node->location[1] = 100.0f;
801 node->location[0] = 200.0f;
802 node->location[1] = 100.0f;
833 light->shadow_maximum_resolution = 0.001f;
834 light->transmission_fac = 1.0f;
842 if (world->nodetree) {
843 for (
bNode *node : world->nodetree->all_nodes()) {
845 node->location[0] = 200.0f;
846 node->location[1] = 100.0f;
849 node->location[0] = -200.0f;
850 node->location[1] = 100.0f;
860 scene->grease_pencil_settings.smaa_threshold = 1.0f;
861 scene->grease_pencil_settings.smaa_threshold_render = 0.25f;
862 scene->grease_pencil_settings.aa_samples = 8;
863 scene->grease_pencil_settings.motion_blur_steps = 8;
const char * BKE_appdir_folder_default() ATTR_WARN_UNUSED_RESULT
std::optional< std::string > BKE_appdir_folder_id(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
@ BLENDER_SYSTEM_DATAFILES
struct CurveProfile * BKE_curveprofile_add(eCurveProfilePresets preset)
CustomData interface, see also DNA_customdata_types.h.
void CustomData_free_layers(CustomData *data, eCustomDataType type)
void * CustomData_get_layer_for_write(CustomData *data, eCustomDataType type, int totelem)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene)
void IDP_ClearProperty(IDProperty *prop)
IDProperty * IDP_GetProperties(ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_view_layer_rename(Main *bmain, Scene *scene, ViewLayer *view_layer, const char *newname)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
IDNewNameResult BKE_libblock_rename(Main &bmain, ID &id, blender::StringRefNull name, const IDNewNameMode mode=IDNewNameMode::RenameExistingNever)
void BKE_main_library_weak_reference_add(ID *local_id, const char *library_filepath, const char *library_id_name)
General operations, lookup, etc. for materials.
Material * BKE_gpencil_material_add(Main *bmain, const char *name)
#define SH_NODE_OUTPUT_WORLD
#define SH_NODE_BSDF_PRINCIPLED
#define SH_NODE_SUBSURFACE_SCATTERING
#define SH_NODE_OUTPUT_MATERIAL
#define SH_NODE_BACKGROUND
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
CurveMapping * BKE_paint_default_curve()
bool BKE_paint_ensure_from_paintmode(Scene *sce, PaintMode mode)
ARegion * BKE_region_find_in_listbase_by_type(const ListBase *regionbase, const int region_type)
void BKE_area_region_panels_free(ListBase *panels)
void BKE_workspace_tool_remove(WorkSpace *workspace, bToolRef *tref) ATTR_NONNULL(1
void BKE_workspace_layout_remove(Main *bmain, WorkSpace *workspace, WorkSpaceLayout *layout) ATTR_NONNULL()
WorkSpaceLayout * BKE_workspace_active_layout_for_workspace_get(const WorkSpaceInstanceHook *hook, const WorkSpace *workspace) GETTER_ATTRS
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void copy_qt_qt(float q[4], const float a[4])
MINLINE void copy_v2_fl2(float v[2], float x, float y)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE bool equals_v4v4(const float v1[4], const float v2[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE void copy_v4_fl(float r[4], float f)
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
#define SET_FLAG_FROM_TEST(value, test, flag)
external readfile function prototypes.
@ ADS_FLAG_SUMMARY_COLLAPSED
#define DNA_struct_default_get(struct_name)
@ GP_DATA_STROKE_PAINTMODE
@ MA_BL_TRANSPARENT_SHADOW
@ GP_MATERIAL_STROKE_SHOW
@ GP_MATERIAL_MODE_SQUARE
@ ME_REMESH_REPROJECT_ATTRIBUTES
@ ME_REMESH_REPROJECT_VOLUME
@ SHD_SUBSURFACE_RANDOM_WALK
@ OB_MODE_PAINT_GREASE_PENCIL
Object is a sort of wrapper for general info.
@ OB_DRAW_GROUPUSER_ACTIVE
@ SCE_EEVEE_VOLUME_CUSTOM_RANGE
@ R_IMF_EXR_FLAG_MULTIPART
@ RGN_FLAG_HIDDEN_BY_USER
@ SEQ_CACHE_PREFETCH_ENABLE
@ SEQ_EDIT_SHOW_MISSING_MEDIA
@ SEQ_RENDER_SIZE_PROXY_100
@ SEQ_TIMELINE_SHOW_STRIP_DURATION
@ SEQ_TIMELINE_SHOW_THUMBNAILS
@ SEQ_TIMELINE_SHOW_STRIP_RETIMING
@ SEQ_TIMELINE_WAVEFORMS_HALF
@ SEQ_TIMELINE_SHOW_STRIP_SOURCE
@ SEQ_TIMELINE_SHOW_STRIP_NAME
@ SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG
@ SEQ_PREVIEW_SHOW_OUTLINE_SELECTED
@ SEQ_DRAW_TRANSFORM_PREVIEW
@ SEQ_CACHE_SHOW_FINAL_OUT
@ V3D_SHADING_BACKGROUND_VIEWPORT
@ V3D_SHADING_MATERIAL_COLOR
@ V3D_SHADING_SINGLE_COLOR
@ V3D_SHADING_SPECULAR_HIGHLIGHT
@ V3D_SHADING_CAVITY_CURVATURE
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_OVERLAY_EDIT_CU_NORMALS
@ V3D_OVERLAY_EDIT_EDGES_DEPRECATED
Read Guarded memory(de)allocation.
void MEM_freeN(void *vmemh)
bNodeSocket * node_find_socket(bNode &node, eNodeSocketInOut in_out, StringRef identifier)
void mesh_smooth_set(Mesh &mesh, bool use_smooth, bool keep_sharp_edges=false)
void node_tree_free_embedded_tree(bNodeTree *ntree)
VecBase< float, 3 > float3
const char * RE_engine_id_BLENDER_EEVEE
struct ImageFormatData im_format
int show_missing_media_flag
struct CurveMapping * cur_primitive
struct CurveMapping * cur_falloff
struct MaterialGPencilStyle * gp_style
float shadow_terminator_shading_offset
float shadow_terminator_geometry_offset
float shadow_terminator_normal_offset
struct UnifiedPaintSettings unified_paint_settings
struct ImageFormatData im_format
struct SceneDisplay display
struct ToolSettings * toolsettings
struct DisplaySafeAreas safe_areas
int automasking_boundary_edges_propagation_steps
FileSelectParams * params
struct BLI_mempool * treestore
struct SequencerCacheOverlay cache_overlay
struct SequencerTimelineOverlay timeline_overlay
struct SequencerPreviewOverlay preview_overlay
struct CurveMapping * curve_rand_value
struct CurveMapping * curve_rand_saturation
struct CurveMapping * curve_rand_hue
float normals_constant_screen_size
float texture_paint_mode_opacity
float vertex_paint_mode_opacity
float gpencil_vertex_paint_opacity
float weight_paint_mode_opacity
float background_color[3]
XrSessionSettings session_settings
ID * do_versions_rename_id(Main *bmain, const short id_type, const char *name_src, const char *name_dst)
float * version_cycles_node_socket_float_value(bNodeSocket *socket)
float * version_cycles_node_socket_rgba_value(bNodeSocket *socket)
void BLO_update_defaults_workspace(WorkSpace *workspace, const char *app_template)
static void blo_update_defaults_paint(Paint *paint)
static void blo_update_defaults_screen(bScreen *screen, const char *app_template, const char *workspace_name)
static void blo_update_defaults_scene(Main *bmain, Scene *scene)
static void blo_update_defaults_windowmanager(wmWindowManager *wm)
void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
static bool blo_is_builtin_template(const char *app_template)