Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/scene.c
| Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | static void scene_init_data(ID *id) | ||||
| BKE_color_managed_view_settings_init_render( | BKE_color_managed_view_settings_init_render( | ||||
| &scene->r.bake.im_format.view_settings, &scene->r.bake.im_format.display_settings, "Filmic"); | &scene->r.bake.im_format.view_settings, &scene->r.bake.im_format.display_settings, "Filmic"); | ||||
| /* Curve Profile */ | /* Curve Profile */ | ||||
| scene->toolsettings->custom_bevel_profile_preset = BKE_curveprofile_add(PROF_PRESET_LINE); | scene->toolsettings->custom_bevel_profile_preset = BKE_curveprofile_add(PROF_PRESET_LINE); | ||||
| /* Sequencer */ | /* Sequencer */ | ||||
| scene->toolsettings->sequencer_tool_settings = SEQ_tool_settings_init(); | scene->toolsettings->sequencer_tool_settings = SEQ_tool_settings_init(); | ||||
| scene->toolsettings->snap_flag |= SCE_SNAP_SEQ; | |||||
| for (size_t i = 0; i < ARRAY_SIZE(scene->orientation_slots); i++) { | for (size_t i = 0; i < ARRAY_SIZE(scene->orientation_slots); i++) { | ||||
| scene->orientation_slots[i].index_custom = -1; | scene->orientation_slots[i].index_custom = -1; | ||||
| } | } | ||||
| /* Master Collection */ | /* Master Collection */ | ||||
| scene->master_collection = BKE_collection_master_add(); | scene->master_collection = BKE_collection_master_add(); | ||||
| ▲ Show 20 Lines • Show All 1,857 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /** | /** | ||||
| * Sets the active scene, mainly used when running in background mode | * Sets the active scene, mainly used when running in background mode | ||||
| * (``--scene`` command line argument). | * (`--scene` command line argument). | ||||
| * This is also called to set the scene directly, bypassing windowing code. | * This is also called to set the scene directly, bypassing windowing code. | ||||
| * Otherwise #WM_window_set_active_scene is used when changing scenes by the user. | * Otherwise #WM_window_set_active_scene is used when changing scenes by the user. | ||||
| */ | */ | ||||
| void BKE_scene_set_background(Main *bmain, Scene *scene) | void BKE_scene_set_background(Main *bmain, Scene *scene) | ||||
| { | { | ||||
| Object *ob; | Object *ob; | ||||
| /* check for cyclic sets, for reading old files but also for definite security (py?) */ | /* check for cyclic sets, for reading old files but also for definite security (py?) */ | ||||
| ▲ Show 20 Lines • Show All 1,120 Lines • ▼ Show 20 Lines | |||||
| void BKE_scene_multiview_filepath_get(SceneRenderView *srv, const char *filepath, char *r_filepath) | void BKE_scene_multiview_filepath_get(SceneRenderView *srv, const char *filepath, char *r_filepath) | ||||
| { | { | ||||
| BLI_strncpy(r_filepath, filepath, FILE_MAX); | BLI_strncpy(r_filepath, filepath, FILE_MAX); | ||||
| BLI_path_suffix(r_filepath, FILE_MAX, srv->suffix, ""); | BLI_path_suffix(r_filepath, FILE_MAX, srv->suffix, ""); | ||||
| } | } | ||||
| /** | /** | ||||
| * When multiview is not used the filepath is as usual (e.g., ``Image.jpg``). | * When multiview is not used the filepath is as usual (e.g., `Image.jpg`). | ||||
| * When multiview is on, even if only one view is enabled the view is incorporated | * When multiview is on, even if only one view is enabled the view is incorporated | ||||
| * into the file name (e.g., ``Image_L.jpg``). That allows for the user to re-render | * into the file name (e.g., `Image_L.jpg`). That allows for the user to re-render | ||||
| * individual views. | * individual views. | ||||
| */ | */ | ||||
| void BKE_scene_multiview_view_filepath_get(const RenderData *rd, | void BKE_scene_multiview_view_filepath_get(const RenderData *rd, | ||||
| const char *filepath, | const char *filepath, | ||||
| const char *viewname, | const char *viewname, | ||||
| char *r_filepath) | char *r_filepath) | ||||
| { | { | ||||
| SceneRenderView *srv; | SceneRenderView *srv; | ||||
| ▲ Show 20 Lines • Show All 578 Lines • Show Last 20 Lines | |||||