|
Blender
V2.93
|
#include <stddef.h>#include <stdio.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_anim_types.h"#include "DNA_collection_types.h"#include "DNA_curveprofile_types.h"#include "DNA_defaults.h"#include "DNA_gpencil_types.h"#include "DNA_linestyle_types.h"#include "DNA_mask_types.h"#include "DNA_material_types.h"#include "DNA_mesh_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_sequence_types.h"#include "DNA_sound_types.h"#include "DNA_space_types.h"#include "DNA_text_types.h"#include "DNA_vfont_types.h"#include "DNA_view3d_types.h"#include "DNA_windowmanager_types.h"#include "DNA_workspace_types.h"#include "DNA_world_types.h"#include "BKE_callbacks.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BLI_string.h"#include "BLI_string_utils.h"#include "BLI_task.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "BKE_action.h"#include "BKE_anim_data.h"#include "BKE_animsys.h"#include "BKE_armature.h"#include "BKE_cachefile.h"#include "BKE_collection.h"#include "BKE_colortools.h"#include "BKE_curveprofile.h"#include "BKE_duplilist.h"#include "BKE_editmesh.h"#include "BKE_effect.h"#include "BKE_fcurve.h"#include "BKE_freestyle.h"#include "BKE_gpencil.h"#include "BKE_icons.h"#include "BKE_idprop.h"#include "BKE_idtype.h"#include "BKE_image.h"#include "BKE_layer.h"#include "BKE_lib_id.h"#include "BKE_lib_query.h"#include "BKE_lib_remap.h"#include "BKE_linestyle.h"#include "BKE_main.h"#include "BKE_mask.h"#include "BKE_node.h"#include "BKE_object.h"#include "BKE_paint.h"#include "BKE_pointcache.h"#include "BKE_rigidbody.h"#include "BKE_scene.h"#include "BKE_screen.h"#include "BKE_sound.h"#include "BKE_unit.h"#include "BKE_workspace.h"#include "BKE_world.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_build.h"#include "DEG_depsgraph_debug.h"#include "DEG_depsgraph_query.h"#include "RE_engine.h"#include "SEQ_edit.h"#include "SEQ_iterator.h"#include "SEQ_modifier.h"#include "SEQ_proxy.h"#include "SEQ_relations.h"#include "SEQ_sequencer.h"#include "SEQ_sound.h"#include "BLO_read_write.h"#include "engines/eevee/eevee_lightcache.h"#include "PIL_time.h"#include "IMB_colormanagement.h"#include "IMB_imbuf.h"#include "bmesh.h"Go to the source code of this file.
Classes | |
| struct | DepsgraphKey |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS(__data, __id, __do_undo_restore, __action, __reader, __id_old, __cb_flag) |
Typedefs | |
| typedef enum eSceneForeachUndoPreserveProcess | eSceneForeachUndoPreserveProcess |
| typedef struct DepsgraphKey | DepsgraphKey |
Enumerations | |
| enum | eSceneForeachUndoPreserveProcess { SCENE_FOREACH_UNDO_RESTORE , SCENE_FOREACH_UNDO_NO_RESTORE } |
Variables | |
| IDTypeInfo | IDType_ID_SCE |
| const char * | RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE" |
| const char * | RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH" |
| const char * | RE_engine_id_CYCLES = "CYCLES" |
| #define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS | ( | __data, | |
| __id, | |||
| __do_undo_restore, | |||
| __action, | |||
| __reader, | |||
| __id_old, | |||
| __cb_flag | |||
| ) |
| typedef struct DepsgraphKey DepsgraphKey |
This code is shared by both the regular foreach_id looper, and the code trying to restore or preserve ID pointers like brushes across undo-steps.
Helper function for the SETLOOPER and SETLOOPER_VIEW_LAYER macros
It iterates over the bases of the active layer and then the bases of the active layer of the background (set) scenes recursively.
Definition at line 2888 of file scene.c.
References BKE_view_layer_default_render(), ListBase::first, if(), Base::next, NULL, ViewLayer::object_bases, and Scene::set.
| int BKE_render_num_threads | ( | const RenderData * | rd | ) |
Definition at line 3003 of file scene.c.
References BLI_system_num_threads_override_get(), BLI_system_thread_count(), max_ii(), RenderData::mode, R_FIXED_THREADS, blender::compositor::threads, and RenderData::threads.
Referenced by BKE_scene_num_threads().
| int BKE_render_preview_pixel_size | ( | const RenderData * | r | ) |
Definition at line 2078 of file scene.c.
References BKE_id_new(), Scene::id, ID_SCE, id_us_ensure_real(), and id_us_min().
Referenced by BKE_scene_duplicate(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), ED_scene_add(), object_preview_scene_create(), and setup_app_data().
| SceneRenderView* BKE_scene_add_render_view | ( | Scene * | sce, |
| const char * | name | ||
| ) |
Definition at line 2813 of file scene.c.
References BLI_addtail(), BLI_strncpy(), BLI_uniquename(), DATA_, MEM_callocN, SceneRenderView::name, Scene::r, and RenderData::views.
Referenced by blo_do_versions_270(), render_view_add_exec(), and scene_init_data().
| void BKE_scene_allocate_depsgraph_hash | ( | Scene * | scene | ) |
Definition at line 3409 of file scene.c.
References BLI_ghash_new(), Scene::depsgraph_hash, depsgraph_key_compare(), depsgraph_key_hash(), and scene.
Referenced by BKE_scene_ensure_depsgraph_hash().
| void BKE_scene_base_flag_to_objects | ( | ViewLayer * | view_layer | ) |
Definition at line 2946 of file scene.c.
References BKE_scene_object_base_flag_sync_from_base(), ListBase::first, Base::next, and ViewLayer::object_bases.
Referenced by set_trans_object_base_flags().
| int BKE_scene_base_iter_next | ( | Depsgraph * | depsgraph, |
| SceneBaseIter * | iter, | ||
| Scene ** | scene, | ||
| int | val, | ||
| Base ** | base, | ||
| Object ** | ob | ||
| ) |
Definition at line 2160 of file scene.c.
References BKE_view_layer_context_active_PLACEHOLDER(), BKE_view_layer_default_render(), copy_m4_m4(), DEG_get_evaluated_view_layer(), depsgraph, SceneBaseIter::dupli_refob, SceneBaseIter::duplilist, SceneBaseIter::dupob, F_DUPLI, F_SCENE, F_START, ListBase::first, free_object_duplilist(), DupliObject::mat, DupliObject::next, Base::next, NULL, DupliObject::ob, OB_DUPLI, OB_FROMDUPLI, ViewLayer::object_bases, object_duplilist(), Object::obmat, SceneBaseIter::omat, SceneBaseIter::phase, scene, and Node::set().
Referenced by BKE_mball_properties_copy(), and init_meta().
| bool BKE_scene_camera_switch_update | ( | Scene * | scene | ) |
Definition at line 2349 of file scene.c.
References Scene::camera, DEG_id_tag_update(), Scene::id, ID_RECALC_COPY_ON_WRITE, and scene.
Referenced by do_render_compositor_scene(), do_render_full_pipeline(), ed_marker_move_apply(), MOD_lineart_compute_feature_lines(), RE_engine_frame_set(), screen_opengl_render_anim_step(), screen_render_single_layer_set(), and seq_render_scene_strip().
Definition at line 2063 of file scene.c.
References ID_IS_LINKED, LISTBASE_FOREACH, scene, and Main::scenes.
| bool BKE_scene_check_color_management_enabled | ( | const Scene * | scene | ) |
Definition at line 2992 of file scene.c.
References ColorManagedDisplaySettings::display_device, Scene::display_settings, scene, and STREQ.
| bool BKE_scene_check_rigidbody_active | ( | const Scene * | scene | ) |
Definition at line 2997 of file scene.c.
References RigidBodyWorld::flag, RigidBodyWorld::group, RBW_FLAG_MUTED, Scene::rigidbody_world, and scene.
Definition at line 1899 of file scene.c.
References Scene::eevee, SceneEEVEE::light_cache_data, SceneEEVEE::light_cache_info, and NULL.
Referenced by BKE_scene_duplicate(), and scene_copy_data().
| void BKE_scene_cursor_from_mat4 | ( | View3DCursor * | cursor, |
| const float | mat[4][4], | ||
| bool | use_compat | ||
| ) |
Definition at line 3764 of file scene.c.
References BKE_scene_cursor_mat3_to_rot(), copy_m3_m4(), copy_v3_v3(), and View3DCursor::location.
| void BKE_scene_cursor_mat3_to_rot | ( | View3DCursor * | cursor, |
| const float | mat[3][3], | ||
| bool | use_compat | ||
| ) |
Definition at line 3688 of file scene.c.
References BLI_ASSERT_UNIT_M3, copy_v4_v4(), mat3_normalized_to_quat(), mat3_to_axis_angle(), mat3_to_compatible_eulO(), mat3_to_eulO(), quat_to_compatible_quat(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_euler, View3DCursor::rotation_mode, and View3DCursor::rotation_quaternion.
Referenced by BKE_scene_cursor_from_mat4(), snap_curs_to_center_exec(), and view3d_all_exec().
| void BKE_scene_cursor_quat_to_rot | ( | View3DCursor * | cursor, |
| const float | quat[4], | ||
| bool | use_compat | ||
| ) |
Definition at line 3723 of file scene.c.
References BLI_ASSERT_UNIT_QUAT, copy_qt_qt(), copy_v4_v4(), quat_to_axis_angle(), quat_to_compatible_eulO(), quat_to_compatible_quat(), quat_to_eulO(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_euler, View3DCursor::rotation_mode, and View3DCursor::rotation_quaternion.
Referenced by ED_view3d_cursor3d_update().
| void BKE_scene_cursor_rot_to_mat3 | ( | const View3DCursor * | cursor, |
| float | mat[3][3] | ||
| ) |
Definition at line 3660 of file scene.c.
References axis_angle_to_mat3(), eulO_to_mat3(), normalize_qt_qt(), quat_to_mat3(), ROT_MODE_AXISANGLE, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_euler, View3DCursor::rotation_mode, and View3DCursor::rotation_quaternion.
Referenced by BKE_scene_cursor_to_mat4().
| void BKE_scene_cursor_rot_to_quat | ( | const View3DCursor * | cursor, |
| float | quat[4] | ||
| ) |
Definition at line 3675 of file scene.c.
References axis_angle_to_quat(), eulO_to_quat(), normalize_qt_qt(), ROT_MODE_AXISANGLE, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_euler, View3DCursor::rotation_mode, and View3DCursor::rotation_quaternion.
| void BKE_scene_cursor_to_mat4 | ( | const View3DCursor * | cursor, |
| float | mat[4][4] | ||
| ) |
Definition at line 3756 of file scene.c.
References BKE_scene_cursor_rot_to_mat3(), copy_m4_m3(), copy_v3_v3(), and View3DCursor::location.
| void BKE_scene_disable_color_management | ( | Scene * | scene | ) |
Definition at line 2972 of file scene.c.
References BLI_strncpy(), ColorManagedDisplaySettings::display_device, Scene::display_settings, IMB_colormanagement_display_get_none_name(), IMB_colormanagement_view_get_default_name(), scene, view, Scene::view_settings, and ColorManagedViewSettings::view_transform.
Referenced by blo_do_versions_260().
| Scene* BKE_scene_duplicate | ( | Main * | bmain, |
| Scene * | sce, | ||
| eSceneCopyMethod | type | ||
| ) |
Definition at line 1908 of file scene.c.
References Scene::audio, RenderData::avicodecdata, RenderData::bake, BKE_animdata_duplicate_id_action(), BKE_collection_duplicate(), BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), BKE_curvemapping_copy_data(), BKE_curvemapping_free_data(), BKE_id_copy(), BKE_id_copy_for_duplicate(), BKE_libblock_relink_to_newid(), BKE_main_collection_sync(), BKE_main_id_clear_newpoins(), BKE_main_id_tag_all(), BKE_scene_add(), BKE_scene_copy_data_eevee(), BKE_sound_destroy_scene(), BKE_sound_reset_scene_runtime(), BKE_toolsettings_copy(), BKE_toolsettings_free(), BLI_assert, Scene::display, ImageFormatData::display_settings, Scene::display_settings, RenderData::ffcodecdata, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Scene::gpd, Scene::id, ID_IS_LINKED, id_us_ensure_real(), id_us_min(), IDP_CopyProperty(), BakeData::im_format, RenderData::im_format, LIB_ID_DUPLICATE_IS_SUBPROCESS, LIB_TAG_NEW, LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_dupallocN, ID::name, NULL, Scene::physics_settings, Scene::preview, ID::properties, FFMpegCodecData::properties, Scene::r, remove_sequencer_fcurves(), SCE_COPY_EMPTY, SCE_COPY_FULL, SEQ_editing_free(), Scene::sequencer_colorspace_settings, ID::tag, Scene::toolsettings, type, Scene::unit, USER_DUP_LINKED_ID, USER_DUP_OBJECT, Scene::view_layers, ImageFormatData::view_settings, Scene::view_settings, RenderData::views, and Scene::world.
Referenced by ED_scene_add().
Definition at line 3526 of file scene.c.
References NULL, scene, and scene_ensure_depsgraph_p().
Referenced by BKE_scene_view_layer_graph_evaluated_ensure(), count_proportional_objects(), CTX_data_depsgraph_pointer(), ED_render_engine_changed(), ED_scene_change_update(), format_stats(), pygpu_offscreen_draw_view3d(), seq_render_scene_strip(), set_trans_object_base_flags(), update_physics_cache(), wm_draw_update_test_window(), and wm_event_do_depsgraph().
| void BKE_scene_ensure_depsgraph_hash | ( | Scene * | scene | ) |
Definition at line 3415 of file scene.c.
References BKE_scene_allocate_depsgraph_hash(), Scene::depsgraph_hash, NULL, and scene.
Referenced by scene_get_depsgraph_p().
Definition at line 3791 of file scene.c.
References Scene::audio, BKE_sound_add_scene_sound_defaults(), BKE_sound_ensure_scene(), BKE_sound_scene_add_scene_sound_defaults(), BKE_sound_set_scene_sound_pan(), BKE_sound_set_scene_sound_pitch(), BKE_sound_set_scene_sound_volume(), BKE_sound_set_scene_volume(), BKE_sound_update_scene_sound(), DEG_debug_print_eval(), depsgraph, Scene::ed, Sequence::flag, Scene::id, bSound::id, ID_RECALC_AUDIO, ID::name, NULL, Sequence::pan, Sequence::pitch, ID::recalc, scene, Sequence::scene, scene_sequencer_disable_sound_strips(), Sequence::scene_sound, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_AUDIO_PAN_ANIMATED, SEQ_AUDIO_PITCH_ANIMATED, SEQ_AUDIO_VOLUME_ANIMATED, SEQ_edit_update_muting(), SEQ_SCENE_STRIPS, SEQ_sound_update_bounds_all(), SEQ_TYPE_SCENE, Sequence::sound, Sequence::type, AudioData::volume, and Sequence::volume.
| Scene* BKE_scene_find_from_collection | ( | const Main * | bmain, |
| const Collection * | collection | ||
| ) |
Definition at line 2290 of file scene.c.
References BKE_view_layer_has_collection(), ListBase::first, Scene::id, LISTBASE_FOREACH, ID::next, NULL, scene, Main::scenes, and Scene::view_layers.
| const char* BKE_scene_find_last_marker_name | ( | const Scene * | scene, |
| int | frame | ||
| ) |
Definition at line 2389 of file scene.c.
References ListBase::first, TimeMarker::frame, Scene::markers, MAXFRAME, TimeMarker::name, TimeMarker::next, NULL, and scene.
| const char* BKE_scene_find_marker_name | ( | const Scene * | scene, |
| int | frame | ||
| ) |
Definition at line 2364 of file scene.c.
References TimeMarker::frame, markers, Scene::markers, TimeMarker::name, TimeMarker::next, NULL, TimeMarker::prev, and scene.
This function is needed to cope with fractional frames, needed for motion blur & physics.
Definition at line 2458 of file scene.c.
References BKE_scene_frame_to_ctime(), RenderData::cfra, Scene::r, and scene.
Referenced by BKE_scene_graph_update_for_newframe_ex().
Sets the frame int/float components.
Definition at line 2475 of file scene.c.
References RenderData::cfra, Scene::r, scene, and RenderData::subframe.
Referenced by bc_update_scene(), deg_flush_updates_and_refresh(), lineart_gpencil_bake_startjob(), RE_engine_frame_set(), and seq_render_scene_strip().
Definition at line 2407 of file scene.c.
References FPS, mod_i(), and round_db_to_int().
Referenced by change_frame_apply().
Definition at line 2464 of file scene.c.
References RenderData::framelen, Scene::r, scene, and RenderData::subframe.
Referenced by BKE_scene_frame_get().
| void BKE_scene_free_depsgraph_hash | ( | Scene * | scene | ) |
Definition at line 3422 of file scene.c.
References BLI_ghash_free(), Scene::depsgraph_hash, depsgraph_key_free(), depsgraph_key_value_free(), NULL, and scene.
Referenced by scene_free_data(), and wm_block_autorun_warning_enable_scripts().
Definition at line 3431 of file scene.c.
References BLI_ghash_remove(), Scene::depsgraph_hash, depsgraph_key_free(), depsgraph_key_value_free(), NULL, and scene.
Referenced by ED_scene_view_layer_delete().
Definition at line 3513 of file scene.c.
References BKE_scene_has_view_layer(), BLI_assert, BLI_ghash_lookup(), Scene::depsgraph_hash, NULL, scene, and DepsgraphKey::view_layer.
Definition at line 2718 of file scene.c.
References depsgraph, and scene_graph_update_tagged().
Referenced by createTransData(), CTX_data_ensure_evaluated_depsgraph(), ED_object_data_xform_container_update_all(), ED_object_particle_edit_mode_enter_ex(), ED_object_xform_skip_child_container_update_all(), object_clear_transform_generic_exec(), sculpt_init_session(), sculpt_undosys_step_decode(), snap_sel_to_grid_exec(), snap_selected_to_location(), transform_convert_mesh_crazyspace_detect(), and wm_xr_session_scene_and_evaluated_depsgraph_get().
| void BKE_scene_graph_update_for_newframe | ( | Depsgraph * | depsgraph | ) |
Definition at line 2794 of file scene.c.
References BKE_scene_graph_update_for_newframe_ex(), and depsgraph.
Referenced by bakeModifier(), BKE_ptcache_bake(), ED_update_for_newframe(), blender::io::alembic::export_startjob(), blender::io::usd::export_startjob(), FRS_do_stroke_rendering(), gpencil_strokes_reproject_exec(), lineart_gpencil_bake_startjob(), motionpaths_calc_update_scene(), redraw_timer_step(), screen_opengl_render_anim_step(), screen_opengl_render_end(), seq_render_scene_strip(), and sound_bake_animation_exec().
| void BKE_scene_graph_update_for_newframe_ex | ( | Depsgraph * | depsgraph, |
| const bool | clear_recalc | ||
| ) |
Definition at line 2724 of file scene.c.
References backup, BKE_callback_exec_id(), BKE_callback_exec_id_depsgraph(), BKE_CB_EVT_FRAME_CHANGE_POST, BKE_CB_EVT_FRAME_CHANGE_PRE, BKE_image_editors_update_frame(), BKE_scene_frame_get(), BKE_scene_update_sound(), BKE_sound_set_cfra(), RenderData::cfra, DEG_editors_update(), DEG_evaluate_on_framechange(), DEG_evaluate_on_refresh(), DEG_get_bmain(), DEG_get_input_scene(), DEG_graph_relations_update(), DEG_ids_clear_recalc(), DEG_ids_restore_recalc(), DEG_is_fully_evaluated(), depsgraph, Scene::id, Scene::r, and scene.
Referenced by BKE_scene_graph_update_for_newframe(), engine_depsgraph_init(), and RE_engine_frame_set().
Definition at line 2713 of file scene.c.
References depsgraph, and scene_graph_update_tagged().
Referenced by animviz_calc_motionpaths(), bake(), BKE_scene_view_layer_graph_evaluated_ensure(), BlendfileLoadingBaseTest::depsgraph_create(), blender::io::AbstractHierarchyIteratorInvisibleTest::depsgraph_create(), duplibase_for_convert(), blender::io::alembic::export_startjob(), blender::io::usd::export_startjob(), object_convert_exec(), object_preview_scene_create(), SCULPT_dynamic_topology_disable_ex(), SCULPT_dynamic_topology_enable_ex(), vertex_parent_set_exec(), and wm_event_do_depsgraph().
| void BKE_scene_groups_relink | ( | Scene * | sce | ) |
Definition at line 2056 of file scene.c.
References BKE_rigidbody_world_groups_relink(), and Scene::rigidbody_world.
Definition at line 2285 of file scene.c.
References BLI_findindex(), scene, and Scene::view_layers.
Referenced by BKE_scene_get_depsgraph(), and scene_get_depsgraph_p().
| void BKE_scene_multiview_filepath_get | ( | SceneRenderView * | srv, |
| const char * | filepath, | ||
| char * | r_filepath | ||
| ) |
Definition at line 3243 of file scene.c.
References BLI_path_suffix(), BLI_strncpy(), FILE_MAX, and SceneRenderView::suffix.
Referenced by RE_RenderAnim().
| bool BKE_scene_multiview_is_render_view_active | ( | const RenderData * | rd, |
| const SceneRenderView * | srv | ||
| ) |
Definition at line 3117 of file scene.c.
References SceneRenderView::name, NULL, R_MULTIVIEW, SCE_VIEW_DISABLE, SCE_VIEWS_FORMAT_MULTIVIEW, RenderData::scemode, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, STR_ELEM, SceneRenderView::viewflag, and RenderData::views_format.
Referenced by BKE_scene_multiview_is_render_view_first(), BKE_scene_multiview_is_render_view_last(), BKE_scene_multiview_render_view_findindex(), BKE_scene_multiview_view_id_get(), and BKE_scene_multiview_view_prefix_get().
| bool BKE_scene_multiview_is_render_view_first | ( | const RenderData * | rd, |
| const char * | viewname | ||
| ) |
Definition at line 3144 of file scene.c.
References BKE_scene_multiview_is_render_view_active(), ListBase::first, SceneRenderView::name, SceneRenderView::next, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.
| bool BKE_scene_multiview_is_render_view_last | ( | const RenderData * | rd, |
| const char * | viewname | ||
| ) |
Definition at line 3166 of file scene.c.
References BKE_scene_multiview_is_render_view_active(), ListBase::last, SceneRenderView::name, SceneRenderView::prev, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.
| bool BKE_scene_multiview_is_stereo3d | ( | const RenderData * | rd | ) |
Definition at line 3099 of file scene.c.
References BLI_findstring(), R_MULTIVIEW, SCE_VIEW_DISABLE, RenderData::scemode, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, and RenderData::views.
| int BKE_scene_multiview_num_videos_get | ( | const RenderData * | rd | ) |
Definition at line 3353 of file scene.c.
References BKE_imtype_is_movie(), BKE_scene_multiview_num_views_get(), RenderData::im_format, ImageFormatData::imtype, R_IMF_VIEWS_STEREO_3D, R_MULTIVIEW, RenderData::scemode, and ImageFormatData::views_format.
| int BKE_scene_multiview_num_views_get | ( | const RenderData * | rd | ) |
Definition at line 3069 of file scene.c.
References BLI_findstring(), ListBase::first, SceneRenderView::next, R_MULTIVIEW, SCE_VIEW_DISABLE, SCE_VIEWS_FORMAT_STEREO_3D, RenderData::scemode, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, SceneRenderView::viewflag, RenderData::views, and RenderData::views_format.
Referenced by BKE_scene_multiview_num_videos_get().
| SceneRenderView* BKE_scene_multiview_render_view_findindex | ( | const RenderData * | rd, |
| const int | view_id | ||
| ) |
Definition at line 3187 of file scene.c.
References BKE_scene_multiview_is_render_view_active(), ListBase::first, SceneRenderView::next, NULL, R_MULTIVIEW, RenderData::scemode, and RenderData::views.
Referenced by BKE_scene_multiview_render_view_name_get().
| const char* BKE_scene_multiview_render_view_name_get | ( | const RenderData * | rd, |
| const int | view_id | ||
| ) |
Definition at line 3206 of file scene.c.
References BKE_scene_multiview_render_view_findindex(), and SceneRenderView::name.
Referenced by BKE_scene_multiview_view_id_suffix_get().
| void BKE_scene_multiview_videos_dimensions_get | ( | const RenderData * | rd, |
| const size_t | width, | ||
| const size_t | height, | ||
| size_t * | r_width, | ||
| size_t * | r_height | ||
| ) |
Definition at line 3333 of file scene.c.
References Stereo3dFormat::display_mode, Stereo3dFormat::flag, height, RenderData::im_format, IMB_stereo3d_write_dimensions(), R_IMF_VIEWS_STEREO_3D, R_MULTIVIEW, S3D_SQUEEZED_FRAME, RenderData::scemode, ImageFormatData::stereo3d_format, ImageFormatData::views_format, and width.
| void BKE_scene_multiview_view_filepath_get | ( | const RenderData * | rd, |
| const char * | filepath, | ||
| const char * | viewname, | ||
| char * | r_filepath | ||
| ) |
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 into the file name (e.g., Image_L.jpg). That allows for the user to re-render individual views.
Definition at line 3255 of file scene.c.
References BLI_findstring(), BLI_path_suffix(), BLI_strncpy(), FILE_MAX, SceneRenderView::suffix, and RenderData::views.
| int BKE_scene_multiview_view_id_get | ( | const RenderData * | rd, |
| const char * | viewname | ||
| ) |
Definition at line 3217 of file scene.c.
References BKE_scene_multiview_is_render_view_active(), ListBase::first, SceneRenderView::name, SceneRenderView::next, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.
| const char* BKE_scene_multiview_view_id_suffix_get | ( | const RenderData * | rd, |
| const int | view_id | ||
| ) |
Definition at line 3291 of file scene.c.
References BKE_scene_multiview_render_view_name_get(), BKE_scene_multiview_view_suffix_get(), R_MULTIVIEW, and RenderData::scemode.
| void BKE_scene_multiview_view_prefix_get | ( | Scene * | scene, |
| const char * | name, | ||
| char * | r_prefix, | ||
| const char ** | r_ext | ||
| ) |
Definition at line 3301 of file scene.c.
References BKE_scene_multiview_is_render_view_active(), BLI_assert, BLI_str_rpartition(), BLI_strncpy(), ListBase::first, len, SceneRenderView::next, NULL, Scene::r, scene, STREQLEN, SceneRenderView::suffix, UNUSED_VARS_NDEBUG, and RenderData::views.
Referenced by image_update_views_format(), SEQ_add_movie_strip(), SEQ_add_reload_new_file(), seq_image_strip_is_multiview_render(), seq_open_anim_file(), seq_proxy_multiview_context_invalid(), and seq_render_image_strip_view().
| const char* BKE_scene_multiview_view_suffix_get | ( | const RenderData * | rd, |
| const char * | viewname | ||
| ) |
Definition at line 3275 of file scene.c.
References BLI_findstring(), NULL, SceneRenderView::suffix, and RenderData::views.
Referenced by BKE_scene_multiview_view_id_suffix_get().
| int BKE_scene_num_threads | ( | const Scene * | scene | ) |
Definition at line 3025 of file scene.c.
References BKE_render_num_threads(), Scene::r, and scene.
| void BKE_scene_object_base_flag_sync_from_base | ( | Base * | base | ) |
Synchronize object base flags
This is usually handled by the depsgraph. However, in rare occasions we need to use the latest object flags before depsgraph is fully updated.
It should (ideally) only run for copy-on-written objects since this is runtime data generated per-viewlayer.
Definition at line 2966 of file scene.c.
References Object::base_flag, Base::flag, and Base::object.
Referenced by add_collections_to_scene(), BKE_scene_base_flag_to_objects(), BKE_scene_set_background(), ED_object_base_select(), make_object_duplilist_real(), object_base_instance_init(), and object_hide_view_clear_exec().
Check if there is any instance of the object in the scene
Definition at line 2092 of file scene.c.
References BLI_findptr(), LISTBASE_FOREACH, scene, and Scene::view_layers.
Referenced by object_in_any_scene().
Definition at line 2102 of file scene.c.
References LISTBASE_FOREACH, NULL, scene, STREQ, and Scene::view_layers.
| int BKE_scene_orientation_get_index | ( | Scene * | scene, |
| int | slot_index | ||
| ) |
Definition at line 2531 of file scene.c.
References BKE_scene_orientation_slot_get(), BKE_scene_orientation_slot_get_index(), and scene.
Referenced by ED_transform_calc_gizmo_stats(), ED_transform_calc_orientation_from_type(), and gizmo_mesh_extrude_refresh().
| int BKE_scene_orientation_get_index_from_flag | ( | Scene * | scene, |
| int | flag | ||
| ) |
Definition at line 2537 of file scene.c.
References BKE_scene_orientation_slot_get_from_flag(), BKE_scene_orientation_slot_get_index(), UnifiedPaintSettings::flag, and scene.
Referenced by WIDGETGROUP_gizmo_refresh(), and WIDGETGROUP_xform_cage_refresh().
| TransformOrientationSlot* BKE_scene_orientation_slot_get | ( | Scene * | scene, |
| int | slot_index | ||
| ) |
Definition at line 2486 of file scene.c.
References TransformOrientationSlot::flag, Scene::orientation_slots, SCE_ORIENT_DEFAULT, scene, and SELECT.
Referenced by BKE_scene_orientation_get_index(), BKE_scene_orientation_slot_get_from_flag(), gizmo_mesh_spin_init_draw_prepare(), WIDGETGROUP_xform_cage_draw_prepare(), and WIDGETGROUP_xform_shear_draw_prepare().
| TransformOrientationSlot* BKE_scene_orientation_slot_get_from_flag | ( | Scene * | scene, |
| int | flag | ||
| ) |
Definition at line 2494 of file scene.c.
References BKE_scene_orientation_slot_get(), BLI_assert, UnifiedPaintSettings::flag, SCE_ORIENT_DEFAULT, SCE_ORIENT_ROTATE, SCE_ORIENT_SCALE, SCE_ORIENT_TRANSLATE, scene, V3D_GIZMO_SHOW_OBJECT_ROTATE, V3D_GIZMO_SHOW_OBJECT_SCALE, and V3D_GIZMO_SHOW_OBJECT_TRANSLATE.
Referenced by BKE_scene_orientation_get_index_from_flag(), gizmo_xform_message_subscribe(), WIDGETGROUP_gizmo_draw_prepare(), WIDGETGROUP_gizmo_invoke_prepare(), and WIDGETGROUP_xform_shear_refresh().
| int BKE_scene_orientation_slot_get_index | ( | const TransformOrientationSlot * | orient_slot | ) |
Definition at line 2524 of file scene.c.
References TransformOrientationSlot::index_custom, TransformOrientationSlot::type, and V3D_ORIENT_CUSTOM.
Referenced by BKE_scene_orientation_get_index(), and BKE_scene_orientation_get_index_from_flag().
| void BKE_scene_orientation_slot_set_index | ( | TransformOrientationSlot * | orient_slot, |
| int | orientation | ||
| ) |
Activate a transform orientation in a 3D view based on an enum value.
| orientation | If this is V3D_ORIENT_CUSTOM or greater, the custom transform orientation with index orientation - V3D_ORIENT_CUSTOM gets activated. |
Definition at line 2517 of file scene.c.
References TransformOrientationSlot::index_custom, TransformOrientationSlot::type, and V3D_ORIENT_CUSTOM.
Referenced by select_orientation_exec().
| bool BKE_scene_remove_render_view | ( | Scene * | scene, |
| SceneRenderView * | srv | ||
| ) |
Definition at line 2834 of file scene.c.
References RenderData::actview, BLI_findindex(), BLI_remlink(), ListBase::first, ListBase::last, MEM_freeN, Scene::r, scene, and RenderData::views.
Referenced by render_view_remove_exec().
| void BKE_scene_remove_rigidbody_object | ( | struct Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob, | ||
| const bool | free_us | ||
| ) |
Definition at line 2417 of file scene.c.
References BKE_rigidbody_remove_constraint(), BKE_rigidbody_remove_object(), Object::rigidbody_constraint, Object::rigidbody_object, and scene.
Referenced by scene_collections_object_remove().
Sets the active scene, mainly used when running in background mode (--scene command line argument). 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.
Definition at line 2120 of file scene.c.
References BKE_scene_object_base_flag_sync_from_base(), BKE_scene_validate_setscene(), ListBase::first, Object::flag, Object::id, LISTBASE_FOREACH, ID::next, Main::objects, scene, SELECT, and Scene::view_layers.
Referenced by BKE_scene_set_name(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), ED_scene_change_update(), and setup_app_data().
Definition at line 2145 of file scene.c.
References BKE_libblock_find_name(), BKE_main_blendfile_path(), BKE_scene_set_background(), ID_SCE, and NULL.
Referenced by arg_handle_scene_set().
| TransformOrientation* BKE_scene_transform_orientation_find | ( | const Scene * | scene, |
| const int | index | ||
| ) |
Definition at line 3637 of file scene.c.
References BLI_findlink(), scene, and Scene::transform_spaces.
| int BKE_scene_transform_orientation_get_index | ( | const Scene * | scene, |
| const TransformOrientation * | orientation | ||
| ) |
Definition at line 3646 of file scene.c.
References BLI_findindex(), scene, and Scene::transform_spaces.
Referenced by BKE_scene_transform_orientation_remove().
| void BKE_scene_transform_orientation_remove | ( | Scene * | scene, |
| TransformOrientation * | orientation | ||
| ) |
Definition at line 3617 of file scene.c.
References ARRAY_SIZE, BKE_scene_transform_orientation_get_index(), BLI_assert, BLI_freelinkN(), TransformOrientationSlot::index_custom, Scene::orientation_slots, scene, Scene::transform_spaces, TransformOrientationSlot::type, V3D_ORIENT_CUSTOM, and V3D_ORIENT_GLOBAL.
Referenced by BIF_removeTransformOrientation().
Definition at line 3549 of file scene.c.
References BLI_ghash_insert(), BLI_ghash_lookup_p(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p(), depsgraph, Scene::depsgraph_hash, ListBase::first, Scene::id, ID::next, NULL, scene, scene_undo_depsgraph_gen_key(), Main::scenes, DepsgraphKey::view_layer, and Scene::view_layers.
Referenced by memfile_undosys_step_decode().
Definition at line 3579 of file scene.c.
References BLI_assert, BLI_ghash_free(), BLI_ghash_lookup_p(), DEG_graph_replace_owners(), DEG_graph_tag_relations_update(), depsgraph, depsgraph_key_value_free(), FILE_MAX, ListBase::first, Scene::id, MAX_ID_NAME, MAX_NAME, MEM_freeN, ID::next, NULL, scene, scene_get_depsgraph_p(), scene_undo_depsgraph_gen_key(), Main::scenes, and Scene::view_layers.
Referenced by memfile_undosys_step_decode().
| double BKE_scene_unit_scale | ( | const UnitSettings * | unit, |
| const int | unit_type, | ||
| double | value | ||
| ) |
Apply the needed correction factor to value, based on unit_type (only length-related are affected currently) and unit->scale_length.
Definition at line 3042 of file scene.c.
References B_UNIT_ACCELERATION, B_UNIT_AREA, B_UNIT_CAMERA, B_UNIT_LENGTH, B_UNIT_MASS, B_UNIT_POWER, B_UNIT_VELOCITY, B_UNIT_VOLUME, double(), KDL::pow(), UnitSettings::scale_length, UnitSettings::system, and USER_UNIT_NONE.
Definition at line 2604 of file scene.c.
References Scene::audio, AUDIO_MUTE, BKE_sound_ensure_scene(), BKE_sound_mute_scene(), BKE_sound_seek_scene(), BKE_sound_set_scene_volume(), BKE_sound_update_fps(), BKE_sound_update_scene(), BKE_sound_update_scene_listener(), DEG_get_evaluated_scene(), depsgraph, AudioData::flag, Scene::id, ID_RECALC_AUDIO_FPS, ID_RECALC_AUDIO_LISTENER, ID_RECALC_AUDIO_MUTE, ID_RECALC_AUDIO_SEEK, ID_RECALC_AUDIO_VOLUME, ID::recalc, scene, and AudioData::volume.
Referenced by BKE_scene_graph_update_for_newframe_ex(), render_update_depsgraph(), and scene_graph_update_tagged().
Definition at line 2628 of file scene.c.
References BLI_assert, DEG_is_evaluated_id(), Scene::id, ID_RECALC_AUDIO_VOLUME, ID::recalc, and scene.
| bool BKE_scene_use_shading_nodes_custom | ( | Scene * | scene | ) |
Definition at line 2919 of file scene.c.
References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SHADING_NODES_CUSTOM, scene, and type.
Referenced by shader_tree_poll().
| bool BKE_scene_use_spherical_stereo | ( | Scene * | scene | ) |
Definition at line 2925 of file scene.c.
References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SPHERICAL_STEREO, scene, and type.
| bool BKE_scene_uses_blender_eevee | ( | const Scene * | scene | ) |
Definition at line 2931 of file scene.c.
References RenderData::engine, Scene::r, RE_engine_id_BLENDER_EEVEE, scene, and STREQ.
| bool BKE_scene_uses_blender_workbench | ( | const Scene * | scene | ) |
Definition at line 2936 of file scene.c.
References RenderData::engine, Scene::r, RE_engine_id_BLENDER_WORKBENCH, scene, and STREQ.
| bool BKE_scene_uses_cycles | ( | const Scene * | scene | ) |
Definition at line 2941 of file scene.c.
References RenderData::engine, Scene::r, RE_engine_id_CYCLES, scene, and STREQ.
Definition at line 2433 of file scene.c.
References Freestyle::a, BLI_listbase_count(), NULL, Main::scenes, and Scene::set.
Referenced by BKE_scene_set_background().
| void BKE_scene_view_layer_graph_evaluated_ensure | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer | ||
| ) |
Ensures given scene/view_layer pair has a valid, up-to-date depsgraph.
Definition at line 2805 of file scene.c.
References BKE_scene_ensure_depsgraph(), BKE_scene_graph_update_tagged(), DEG_make_active(), depsgraph, and scene.
| ToolSettings* BKE_toolsettings_copy | ( | ToolSettings * | toolsettings, |
| const int | flag | ||
| ) |
Definition at line 1781 of file scene.c.
References BKE_curvemapping_copy(), BKE_curveprofile_copy(), BKE_paint_copy(), GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, UnifiedPaintSettings::flag, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, MEM_dupallocN, NULL, ParticleEditSettings::object, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ParticleEditSettings::paintcursor, ToolSettings::particle, ParticleEditSettings::scene, ToolSettings::sculpt, SEQ_tool_settings_copy(), ToolSettings::sequencer_tool_settings, ToolSettings::uvsculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_scene_duplicate(), and scene_copy_data().
| void BKE_toolsettings_free | ( | ToolSettings * | toolsettings | ) |
Definition at line 1837 of file scene.c.
References BKE_curvemapping_free(), BKE_curveprofile_free(), BKE_paint_free(), GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, MEM_freeN, NULL, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::sculpt, SEQ_tool_settings_free(), ToolSettings::sequencer_tool_settings, ToolSettings::uvsculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_scene_duplicate(), and scene_free_data().
|
static |
Definition at line 2545 of file scene.c.
References blender::compositor::area(), bScreen::areabase, BKE_workspace_active_screen_get(), RenderData::engine, ListBase::first, wmWindow::next, NULL, OB_RENDER, Scene::r, RE_engines_find(), scene, wmWindow::scene, View3D::shading, SPACE_VIEW3D, type, View3DShading::type, wmWindowManager::windows, Main::wm, and wmWindow::workspace_hook.
Referenced by prepare_mesh_for_viewport_render().
Definition at line 1386 of file scene.c.
References CMP_CRYPTOMATTE_SRC_RENDER, CMP_NODE_CRYPTOMATTE, CMP_NODE_R_LAYERS, Scene::id, LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, NULL, and scene.
Referenced by scene_blend_read_lib().
|
static |
Definition at line 3389 of file scene.c.
References DepsgraphKey::view_layer.
Referenced by BKE_scene_allocate_depsgraph_hash().
|
static |
Definition at line 3397 of file scene.c.
References MEM_freeN.
Referenced by BKE_scene_free_depsgraph_hash(), and BKE_scene_free_view_layer_depsgraph().
|
static |
Definition at line 3381 of file scene.c.
References BLI_ghashutil_ptrhash(), hash, and DepsgraphKey::view_layer.
Referenced by BKE_scene_allocate_depsgraph_hash().
|
static |
Definition at line 3403 of file scene.c.
References DEG_graph_free(), and depsgraph.
Referenced by BKE_scene_free_depsgraph_hash(), BKE_scene_free_view_layer_depsgraph(), and BKE_scene_undo_depsgraphs_restore().
|
static |
Definition at line 1046 of file scene.c.
References BKE_paint_blend_read_data(), BLO_read_data_address, and scene.
Referenced by scene_blend_read_data().
| void free_avicodecdata | ( | AviCodecData * | acd | ) |
Definition at line 1746 of file scene.c.
References AviCodecData::cbFormat, AviCodecData::cbParms, AviCodecData::lpFormat, AviCodecData::lpParms, MEM_freeN, and NULL.
Referenced by scene_free_data().
| int get_render_child_particle_number | ( | const RenderData * | r, |
| int | num, | ||
| bool | for_render | ||
| ) |
Definition at line 2869 of file scene.c.
References r, and R_SIMPLIFY.
| int get_render_subsurf_level | ( | const RenderData * | r, |
| int | lvl, | ||
| bool | for_render | ||
| ) |
Definition at line 2856 of file scene.c.
References min_ii(), r, and R_SIMPLIFY.
|
static |
Definition at line 1056 of file scene.c.
References BLI_freelinkN(), BLO_read_list(), LISTBASE_FOREACH_MUTABLE, and MAXSEQ.
Referenced by scene_blend_read_data().
Definition at line 2573 of file scene.c.
References BMEditMesh::bm, bm, BM_mesh_bm_to_me(), check_rendered_viewport_visible(), Object::data, DEG_id_tag_update(), Mesh::edit_mesh, Mesh::id, Object::id, ID_RECALC_ALL, mesh, OB_MESH, OBEDIT_FROM_VIEW_LAYER, ID::recalc, and Object::type.
Referenced by scene_graph_update_tagged().
|
static |
Definition at line 1762 of file scene.c.
References AnimData::action, action_groups_remove_channel(), BKE_animdata_from_id(), BKE_fcurve_free(), bAction::curves, ListBase::first, Scene::id, FCurve::next, and FCurve::rna_path.
Referenced by BKE_scene_duplicate().
|
static |
Definition at line 1071 of file scene.c.
References Editing::act_seq, Scene::adt, StripProxy::anim, RenderData::avicodecdata, BKE_animdata_blend_read_data(), BKE_collection_compat_blend_read_data(), BKE_color_managed_view_settings_blend_read_data(), BKE_curvemapping_blend_read(), BKE_curveprofile_blend_read(), BKE_effector_add_weights(), BKE_keyingsets_blend_read_data(), BKE_paint_blend_read_data(), BKE_previewimg_blend_read(), BKE_ptcache_blend_read_data(), BKE_screen_view3d_shading_blend_read_data(), BKE_sound_reset_scene_runtime(), BKE_view_layer_blend_read_data(), BLO_read_data_address, BLO_read_data_is_undo(), BLO_read_get_new_data_address(), BLO_read_glob_list(), BLO_read_list(), Editing::cache, Strip::crop, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, Scene::customdata_mask, Scene::customdata_mask_modal, Scene::depsgraph_hash, direct_link_paint_helper(), Scene::display, Strip::done, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_read_data(), EEVEE_lightcache_info_update(), Sequence::effectdata, RigidBodyWorld::effector_weights, ELEM, RenderData::ffcodecdata, Sequence::flag, float(), Scene::fps_info, SpeedControlVars::frameMap, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::id, id_us_ensure_real(), IDP_BlendDataRead, ToolSettings::imapaint, Scene::keyingsets, UnifiedPaintSettings::last_hit, UnifiedPaintSettings::last_location, Scene::layer_properties, SceneEEVEE::light_cache_data, link_recurs_seq(), LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, RigidBodyWorld::ltime, Scene::markers, RenderData::mblur_shutter_curve, Editing::metastack, RenderData::mode, Sequence::modifiers, NULL, RigidBodyWorld::numbodies, ParticleEditSettings::object, RigidBodyWorld::objects, ImagePaintSettings::paint, ParticleEditSettings::paintcursor, GP_Sculpt_Settings::paintcursor, ToolSettings::particle, RigidBodyWorld_Shared::physics_world, RigidBodyWorld_Shared::pointcache, POINTER_OFFSET, Editing::prefetch_job, Scene::preview, Sequence::prop, FFMpegCodecData::properties, Strip::proxy, RigidBodyWorld_Shared::ptcaches, Scene::r, R_NO_CAMERA_SWITCH, Scene::rigidbody_world, ParticleEditSettings::scene, ToolSettings::sculpt, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_EFFECT_NOT_LOADED, SEQ_FONT_NOT_LOADED, SEQ_modifier_blend_read_data(), SEQ_proxy_set(), SEQ_relations_session_uuid_generate(), SEQ_TYPE_EFFECT, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_HD, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SPEED, SEQ_TYPE_TEXT, SEQ_USE_PROXY, Sequence::seqbase, Editing::seqbase, Editing::seqbasep, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, srl(), PointCache::startframe, Sequence::stereo3d_format, Sequence::strip, Strip::stripdata, t, Scene::toolsettings, Strip::transform, Scene::transform_spaces, Sequence::type, ToolSettings::unified_paint_settings, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, ToolSettings::wpaint, and zero_v3().
|
static |
Definition at line 1575 of file scene.c.
References RenderData::bake, BKE_collection_compat_blend_read_expand(), BKE_keyingsets_blend_read_expand(), BLO_expand, BakeData::cage_object, Scene::camera, Scene::clip, Sequence::clip, RigidBodyWorld::constraints, data, Scene::ed, Sequence::effectdata, Scene::gpd, RigidBodyWorld::group, IDP_BlendReadExpand(), Scene::keyingsets, LISTBASE_FOREACH, Scene::markers, Sequence::mask, module, Sequence::prop, Scene::r, Scene::rigidbody_world, Sequence::scene, Sequence::scene_camera, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_TYPE_TEXT, Scene::set, Sequence::sound, srl(), Sequence::type, Scene::view_layers, and Scene::world.
|
static |
Definition at line 1397 of file scene.c.
References Sequence::anims, RenderData::bake, BKE_collection_compat_blend_read_lib(), BKE_keyingsets_blend_read_lib(), BKE_paint_blend_read_lib(), BKE_view_layer_blend_read_lib(), BLI_listbase_clear(), BLI_remlink(), BLO_read_id_address, BLO_read_lib_reports(), BLO_reportf_wrap(), BakeData::cage_object, Scene::camera, ImagePaintSettings::canvas, Scene::clip, Sequence::clip, ImagePaintSettings::clone, composite_patch(), RigidBodyWorld::constraints, Scene::ed, Sequence::effectdata, RigidBodyWorld::effector_weights, Scene::flag, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::gpd, Sculpt::gravity_object, EffectorWeights::group, RigidBodyWorld::group, GP_Sculpt_Settings::guide, Scene::id, id_us_plus_no_lib(), IDP_BlendReadLib(), ToolSettings::imapaint, Scene::keyingsets, ID::lib, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, Scene::markers, Sequence::mask, MEM_freeN, Sequence::modifiers, ID::name, Scene::nodetree, NULL, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::particle, Sequence::prop, Scene::r, GP_Sculpt_Guide::reference_object, Scene::rigidbody_world, RPT_WARNING, SCE_READFILE_LIBLINK_NEED_SETSCENE_CHECK, Sequence::scene, Sequence::scene_camera, Sequence::scene_sound, ToolSettings::sculpt, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_modifier_blend_read_lib(), SEQ_TYPE_SOUND_HD, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_TEXT, Scene::set, ParticleEditSettings::shape_object, Sequence::sound, srl(), ImagePaintSettings::stencil, t, TIP_, Scene::toolsettings, Sequence::type, ToolSettings::uvsculpt, Scene::view_layers, ToolSettings::vpaint, Scene::world, and ToolSettings::wpaint.
|
static |
Definition at line 806 of file scene.c.
References Scene::adt, RenderData::avicodecdata, BKE_animdata_blend_write(), BKE_collection_blend_write_nolib(), BKE_color_managed_view_settings_blend_write(), BKE_curvemapping_blend_write(), BKE_curvemapping_curves_blend_write(), BKE_curveprofile_blend_write(), BKE_id_blend_write(), BKE_keyingsets_blend_write(), BKE_paint_blend_write(), BKE_previewimg_blend_write(), BKE_ptcache_blend_write(), BKE_screen_view3d_shading_blend_write(), BKE_view_layer_blend_write(), BLI_assert, BLO_write_id_struct, BLO_write_is_undo(), BLO_write_raw(), BLO_write_struct, BLO_write_struct_array, AviCodecData::cbFormat, AviCodecData::cbParms, Strip::crop, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, Scene::cursor, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, Scene::display, Strip::done, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_write(), Sequence::effectdata, RigidBodyWorld::effector_weights, ELEM, RenderData::ffcodecdata, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::id, IDP_BlendWrite(), ToolSettings::imapaint, Scene::keyingsets, Scene::layer_properties, SceneEEVEE::light_cache_data, LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::markers, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_allocN_len, Editing::metastack, Sequence::modifiers, Scene::nodetree, ntreeBlendWrite(), NULL, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, RigidBodyWorld_Shared::pointcache, Scene::preview, Sequence::prop, FFMpegCodecData::properties, Strip::proxy, RigidBodyWorld_Shared::ptcaches, Scene::r, Scene::rigidbody_world, ToolSettings::sculpt, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_modifier_blend_write(), SEQ_TYPE_COLOR, SEQ_TYPE_COLORMIX, SEQ_TYPE_GAUSSIAN_BLUR, SEQ_TYPE_GLOW, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_HD, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SPEED, SEQ_TYPE_TEXT, SEQ_TYPE_TRANSFORM, SEQ_TYPE_WIPE, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, Sequence::stereo3d_format, Sequence::strip, Strip::stripdata, Scene::toolsettings, Strip::transform, Scene::transform_spaces, Sequence::type, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, and ToolSettings::wpaint.
Definition at line 253 of file scene.c.
References RenderData::avicodecdata, RenderData::bake, BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), BKE_curvemapping_copy_data(), BKE_id_copy_ex(), BKE_keyingsets_copy(), BKE_libblock_relink_ex(), BKE_previewimg_id_copy(), BKE_rigidbody_world_copy(), BKE_scene_copy_data_eevee(), BKE_sound_reset_scene_runtime(), BKE_toolsettings_copy(), BKE_view_layer_copy_data(), BLI_duplicatelist(), Scene::depsgraph_hash, Scene::display, ImageFormatData::display_settings, Scene::display_settings, Scene::ed, RenderData::ffcodecdata, ListBase::first, Scene::fps_info, Scene::id, ID_REMAP_SKIP_NEVER_NULL_USAGE, IDP_CopyProperty(), IDP_CopyProperty_ex(), BakeData::im_format, RenderData::im_format, Scene::keyingsets, LIB_ID_COPY_NO_PREVIEW, LIB_ID_CREATE_NO_ALLOCATE, LIB_ID_CREATE_NO_USER_REFCOUNT, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_callocN, MEM_dupallocN, Scene::nodetree, NULL, Scene::preview, View3DShading::prop, FFMpegCodecData::properties, Scene::r, Scene::rigidbody_world, scene_copy_markers(), SEQ_DUPE_ALL, SEQ_sequence_base_dupli_recursive(), Editing::seqbase, Editing::seqbasep, Scene::sequencer_colorspace_settings, SceneDisplay::shading, Scene::toolsettings, Scene::transform_spaces, Scene::view_layers, ImageFormatData::view_settings, Scene::view_settings, and RenderData::views.
|
static |
Definition at line 243 of file scene.c.
References BLI_duplicatelist(), IDP_CopyProperty_ex(), LISTBASE_FOREACH, Scene::markers, and NULL.
Referenced by scene_copy_data().
|
static |
Definition at line 3481 of file scene.c.
References BLI_assert, BLI_snprintf(), DAG_EVAL_VIEWPORT, DEG_debug_name_set(), DEG_enable_editors_update(), DEG_graph_new(), Scene::id, ViewLayer::name, ID::name, NULL, scene, and scene_get_depsgraph_p().
Referenced by BKE_scene_ensure_depsgraph().
|
static |
Definition at line 788 of file scene.c.
References Scene::eevee, IDCacheKey::id_session_uuid, IDTYPE_CACHE_CB_FLAGS_PERSISTENT, SceneEEVEE::light_cache_data, scene, and user_data.
|
static |
Definition at line 701 of file scene.c.
References RenderData::bake, BKE_keyingsets_foreach_id(), BKE_LIB_FOREACHID_PROCESS, BKE_lib_query_idpropertiesForeachIDLink_callback(), BKE_library_foreach_ID_embedded(), BKE_rigidbody_world_id_loop(), BakeData::cage_object, Scene::camera, Scene::clip, Sequence::clip, data, Scene::ed, Sequence::effectdata, Scene::gpd, IDP_foreach_property(), IDP_TYPE_FILTER_ID, IDWALK_CB_NEVER_SELF, IDWALK_CB_NOP, IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE, IDWALK_CB_USER, Scene::keyingsets, LISTBASE_FOREACH, Scene::markers, Sequence::mask, Scene::master_collection, Sequence::modifiers, Scene::nodetree, NULL, Sequence::prop, Scene::r, Scene::rigidbody_world, scene, Sequence::scene, Sequence::scene_camera, scene_foreach_layer_collection(), scene_foreach_rigidbodyworldSceneLooper(), scene_foreach_toolsettings(), SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_TYPE_TEXT, Scene::set, Sequence::sound, TextVars::text_font, Scene::toolsettings, Sequence::type, Scene::view_layers, and Scene::world.
|
static |
Definition at line 687 of file scene.c.
References BKE_LIB_FOREACHID_PROCESS, data, IDWALK_CB_EMBEDDED, IDWALK_CB_NOP, LIB_EMBEDDED_DATA, LISTBASE_FOREACH, and NULL.
Referenced by scene_foreach_id().
|
static |
Definition at line 536 of file scene.c.
References BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS, PaintToolSlot::brush, Paint::brush, data, IDWALK_CB_USER, NULL, Paint::palette, SCENE_FOREACH_UNDO_RESTORE, Paint::tool_slots, and Paint::tool_slots_len.
Referenced by scene_foreach_toolsettings().
|
static |
Definition at line 466 of file scene.c.
References BKE_lib_query_foreachid_process(), data, and user_data.
Referenced by scene_foreach_id().
|
static |
Definition at line 577 of file scene.c.
References BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS, ImagePaintSettings::canvas, ImagePaintSettings::clone, data, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Sculpt::gravity_object, GP_Sculpt_Settings::guide, IDWALK_CB_NOP, IDWALK_CB_USER, ToolSettings::imapaint, ParticleEditSettings::object, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::particle, GP_Sculpt_Guide::reference_object, ParticleEditSettings::scene, scene_foreach_paint(), SCENE_FOREACH_UNDO_NO_RESTORE, SCENE_FOREACH_UNDO_RESTORE, ToolSettings::sculpt, ParticleEditSettings::shape_object, ImagePaintSettings::stencil, ToolSettings::uvsculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by scene_foreach_id(), and scene_undo_preserve().
|
static |
Definition at line 488 of file scene.c.
References BLI_assert, BLO_read_get_new_id_address(), ELEM, id_us_min(), id_us_plus_no_lib(), IDWALK_CB_USER, ID::lib, NULL, ID::orig_id, SCENE_FOREACH_UNDO_NO_RESTORE, SCENE_FOREACH_UNDO_RESTORE, and SWAP.
|
static |
Definition at line 378 of file scene.c.
References RenderData::avicodecdata, BKE_collection_free(), BKE_color_managed_view_settings_free(), BKE_curvemapping_free_data(), BKE_keyingsets_free(), BKE_libblock_free_data_py(), BKE_previewimg_free(), BKE_rigidbody_free_world(), BKE_scene_free_depsgraph_hash(), BKE_sound_destroy_scene(), BKE_toolsettings_free(), BKE_view_layer_free_ex(), BLI_assert, BLI_freelistN(), BLI_remlink(), RigidBodyWorld::constraints, Scene::display, Scene::eevee, EEVEE_lightcache_free(), RenderData::ffcodecdata, ListBase::first, Scene::fps_info, free_avicodecdata(), RigidBodyWorld::group, Collection::id, IDP_FreeProperty(), Scene::keyingsets, Scene::layer_properties, SceneEEVEE::light_cache_data, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_freeN, MEM_SAFE_FREE, Scene::nodetree, ntreeFreeEmbeddedTree(), NULL, Scene::preview, View3DShading::prop, FFMpegCodecData::properties, Scene::r, Scene::rigidbody_world, scene, scene_free_markers(), SEQ_editing_free(), SceneDisplay::shading, Scene::toolsettings, Scene::transform_spaces, Scene::view_layers, Scene::view_settings, and RenderData::views.
|
static |
Definition at line 367 of file scene.c.
References IDP_FreePropertyContent_ex(), LISTBASE_FOREACH_MUTABLE, Scene::markers, MEM_freeN, NULL, and scene.
Referenced by scene_free_data().
|
static |
Definition at line 3441 of file scene.c.
References BKE_scene_ensure_depsgraph_hash(), BKE_scene_has_view_layer(), BLI_assert, BLI_ghash_ensure_p_ex(), BLI_ghash_lookup_p(), Scene::depsgraph_hash, MEM_mallocN, NULL, scene, and DepsgraphKey::view_layer.
Referenced by BKE_scene_undo_depsgraphs_restore(), and scene_ensure_depsgraph_p().
|
static |
Definition at line 2642 of file scene.c.
References backup, BKE_callback_exec_id(), BKE_callback_exec_id_depsgraph(), BKE_CB_EVT_DEPSGRAPH_UPDATE_POST, BKE_CB_EVT_DEPSGRAPH_UPDATE_PRE, BKE_scene_update_sound(), DEG_editors_update(), DEG_evaluate_on_refresh(), DEG_get_input_scene(), DEG_get_input_view_layer(), DEG_graph_relations_update(), DEG_id_type_any_updated(), DEG_ids_clear_recalc(), DEG_ids_restore_recalc(), DEG_is_fully_evaluated(), depsgraph, Scene::id, prepare_mesh_for_viewport_render(), and scene.
Referenced by BKE_scene_graph_evaluated_ensure(), and BKE_scene_graph_update_tagged().
|
static |
Definition at line 131 of file scene.c.
References ARRAY_SIZE, ToolSettings::autokey_mode, B_UNIT_LENGTH, B_UNIT_MASS, B_UNIT_TEMPERATURE, B_UNIT_TIME, RenderData::bake, BKE_collection_master_add(), BKE_color_managed_display_settings_init(), BKE_color_managed_view_settings_init_render(), BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_curvemapping_set_defaults(), BKE_curveprofile_add(), BKE_scene_add_render_view(), BKE_sound_reset_scene_runtime(), BKE_unit_base_of_type_get(), BKE_view_layer_add(), BLI_assert, BLI_strncpy(), ParticleEditSettings::brush, CurveMapping::clipr, CurveMapping::cm, COLOR_ROLE_DEFAULT_SEQUENCER, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, CURVE_PRESET_BELL, CURVE_PRESET_GAUSS, CURVE_PRESET_MAX, CURVEMAP_SLOPE_POS_NEG, CURVEMAP_SLOPE_POSITIVE, ToolSettings::custom_bevel_profile_preset, ImageFormatData::display_settings, Scene::display_settings, DNA_struct_default_alloc, DNA_struct_default_get, RenderData::engine, BakeData::filepath, ListBase::first, ToolSettings::gp_sculpt, Scene::grease_pencil_settings, BakeData::im_format, RenderData::im_format, IMB_colormanagement_role_colorspace_name_get(), TransformOrientationSlot::index_custom, ListBase::last, UnitSettings::length_unit, UnitSettings::mass_unit, Scene::master_collection, RenderData::mblur_shutter_curve, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, ColorManagedColorspaceSettings::name, NULL, Scene::orientation_slots, ToolSettings::particle, PE_BRUSH_CUT, RenderData::pic, PROF_PRESET_LINE, Scene::r, RE_engine_id_BLENDER_EEVEE, UnitSettings::scale_length, scene, SEQ_tool_settings_init(), Scene::sequencer_colorspace_settings, ToolSettings::sequencer_tool_settings, SceneGpencil::smaa_threshold, STEREO_LEFT_NAME, STEREO_LEFT_SUFFIX, STEREO_RIGHT_NAME, STEREO_RIGHT_SUFFIX, ParticleBrushData::strength, SceneRenderView::suffix, UnitSettings::system, UnitSettings::temperature_unit, UnitSettings::time_unit, Scene::toolsettings, Scene::unit, USER_UNIT_METRIC, ImageFormatData::view_settings, Scene::view_settings, VIEWLAYER_ADD_NEW, and RenderData::views.
Definition at line 1699 of file scene.c.
References BKE_ptcache_id_from_rigidbody(), LISTBASE_FOREACH, NULL, PTCACHE_FLAG_INFO_DIRTY, PTCacheID::ptcaches, Scene::rigidbody_world, and scene.
|
static |
Definition at line 3776 of file scene.c.
References BKE_sound_remove_scene_sound(), Scene::ed, NULL, scene, Sequence::scene_sound, SEQ_ALL_BEGIN, SEQ_ALL_END, and Scene::sound_scene.
Referenced by BKE_scene_eval_sequencer_sequences().
|
static |
Definition at line 3532 of file scene.c.
References BLI_assert, BLI_strncpy_rlen(), FILE_MAX, Library::filepath, Scene::id, ID::lib, MAX_ID_NAME, MAX_NAME, MEM_callocN, ViewLayer::name, ID::name, NULL, and scene.
Referenced by BKE_scene_undo_depsgraphs_extract(), and BKE_scene_undo_depsgraphs_restore().
|
static |
Definition at line 1683 of file scene.c.
References Scene::cursor, NULL, scene_foreach_toolsettings(), SWAP, and Scene::toolsettings.
| IDTypeInfo IDType_ID_SCE |
Definition at line 1712 of file scene.c.
Referenced by blender::bke::tests::TEST().
| const char* RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE" |
Definition at line 1742 of file scene.c.
Referenced by BKE_scene_uses_blender_eevee(), blo_do_versions_280(), blo_update_defaults_scene(), do_versions_after_linking_280(), ED_view3d_engine_type(), preview_prepare_scene(), and scene_init_data().
| const char* RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH" |
Definition at line 1743 of file scene.c.
Referenced by BKE_scene_uses_blender_workbench(), blo_do_versions_280(), and ED_view3d_has_workbench_in_texture_color().
| const char* RE_engine_id_CYCLES = "CYCLES" |
Definition at line 1744 of file scene.c.
Referenced by BKE_scene_uses_cycles(), blo_do_versions_cycles(), do_versions_after_linking_cycles(), and shader_tree_poll().