Blender
V3.3
|
#include <cstddef>
#include <cstdio>
#include <cstring>
#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 "BLO_readfile.h"
#include "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_bpath.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_image_format.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 "RNA_access.h"
#include "SEQ_edit.h"
#include "SEQ_iterator.h"
#include "SEQ_sequencer.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_IDSUPER(__data, __id, __do_undo_restore, __action, __reader, __id_old, __cb_flag) |
#define | BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_FUNCTION_CALL(__data, __do_undo_restore, __func_call) |
#define | FOREACHID_PROCESS_IDSUPER(_data, _id_super, _cb_flag) |
Enumerations | |
enum | eSceneForeachUndoPreserveProcess { SCENE_FOREACH_UNDO_RESTORE , SCENE_FOREACH_UNDO_NO_RESTORE } |
enum | eCyclesFeatureSet { CYCLES_FEATURES_SUPPORTED = 0 , CYCLES_FEATURES_EXPERIMENTAL = 1 } |
Variables | |
IDTypeInfo | IDType_ID_SCE = get_type_info() |
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_FUNCTION_CALL | ( | __data, | |
__do_undo_restore, | |||
__func_call | |||
) |
#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER | ( | __data, | |
__id, | |||
__do_undo_restore, | |||
__action, | |||
__reader, | |||
__id_old, | |||
__cb_flag | |||
) |
#define FOREACHID_PROCESS_IDSUPER | ( | _data, | |
_id_super, | |||
_cb_flag | |||
) |
enum eCyclesFeatureSet |
Base* _setlooper_base_step | ( | struct Scene ** | sce_iter, |
struct ViewLayer * | view_layer, | ||
struct Base * | base | ||
) |
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 2807 of file scene.cc.
References BKE_view_layer_default_render(), ListBase::first, if(), Base::next, ViewLayer::object_bases, and Scene::set.
int BKE_render_num_threads | ( | const RenderData * | rd | ) |
Definition at line 2933 of file scene.cc.
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 | ) |
void BKE_render_resolution | ( | const struct RenderData * | r, |
const bool | use_crop, | ||
int * | r_width, | ||
int * | r_height | ||
) |
Definition at line 2960 of file scene.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), r, R_BORDER, and R_CROP.
Referenced by BKE_image_get_size(), blender::compositor::CompositorOperation::determine_canvas(), blender::compositor::TextureBaseOperation::determine_canvas(), blender::compositor::ViewerOperation::determine_canvas(), do_render_compositor_scene(), ED_space_image_get_size(), blender::compositor::RenderLayersProg::execute_pixel_sampled(), blender::compositor::CompositorOperation::execute_region(), blender::io::gpencil::GpencilIO::prepare_camera_params(), RE_PreviewRender(), RE_ReadRenderResult(), render_border_exec(), render_init_from_main(), render_view_open(), screen_opengl_render_init(), SEQ_proxy_rebuild(), seq_render_scene_strip(), sequencer_view_all_preview_exec(), sequencer_view_zoom_ratio_exec(), and view3d_set_1_to_1_viewborder().
Definition at line 2044 of file scene.cc.
References BKE_id_new(), Scene::id, ID_SCE, id_us_ensure_real(), and id_us_min().
Referenced by BKE_scene_duplicate(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), object_preview_scene_create(), scene_add(), blender::bke::tests::SceneTestData::setup(), and setup_app_data().
SceneRenderView* BKE_scene_add_render_view | ( | struct Scene * | sce, |
const char * | name | ||
) |
Return default view.
Definition at line 2740 of file scene.cc.
References BLI_addtail(), BLI_strncpy(), BLI_uniquename(), DATA_, SceneRenderView::name, Scene::r, and RenderData::views.
Referenced by blo_do_versions_270(), render_view_add_exec(), and scene_init_data().
Definition at line 3339 of file scene.cc.
References BLI_ghash_new(), Scene::depsgraph_hash, depsgraph_key_compare(), depsgraph_key_hash(), and scene.
Referenced by BKE_scene_ensure_depsgraph_hash().
Definition at line 2886 of file scene.cc.
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 | ( | struct Depsgraph * | depsgraph, |
struct SceneBaseIter * | iter, | ||
struct Scene ** | scene, | ||
int | val, | ||
struct Base ** | base, | ||
struct Object ** | ob | ||
) |
Used by meta-balls, return all objects (including duplis) existing in the scene (including scene's sets).
Definition at line 2109 of file scene.cc.
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, DupliObject::ob, OB_DUPLI, OB_FROMDUPLI, ViewLayer::object_bases, object_duplilist(), Object::obmat, SceneBaseIter::omat, SceneBaseIter::phase, scene, and Node::set().
Referenced by init_meta().
Definition at line 2295 of file scene.cc.
References Scene::camera, camera, DEG_id_tag_update(), Scene::id, ID_RECALC_COPY_ON_WRITE, scene, and void.
Referenced by do_render_compositor_scene(), do_render_full_pipeline(), ed_marker_move_apply(), MOD_lineart_compute_feature_lines(), blender::io::gpencil::GpencilIO::prepare_camera_params(), RE_engine_frame_set(), screen_opengl_render_anim_step(), screen_render_single_layer_set(), and seq_render_scene_strip().
Definition at line 2029 of file scene.cc.
References ID_IS_LINKED, LISTBASE_FOREACH, scene, and Main::scenes.
Definition at line 2922 of file scene.cc.
References ColorManagedDisplaySettings::display_device, Scene::display_settings, scene, and STREQ.
Definition at line 2927 of file scene.cc.
References RigidBodyWorld::flag, RigidBodyWorld::group, RBW_FLAG_MUTED, Scene::rigidbody_world, and scene.
Definition at line 1855 of file scene.cc.
References Scene::eevee, SceneEEVEE::light_cache_data, and SceneEEVEE::light_cache_info.
Referenced by BKE_scene_duplicate(), and scene_copy_data().
Definition at line 2401 of file scene.cc.
References BKE_scene_frame_to_ctime(), RenderData::cfra, Scene::r, and scene.
void BKE_scene_cursor_from_mat4 | ( | View3DCursor * | cursor, |
const float | mat[4][4], | ||
bool | use_compat | ||
) |
Definition at line 3688 of file scene.cc.
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 3612 of file scene.cc.
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 3647 of file scene.cc.
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 3584 of file scene.cc.
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 3599 of file scene.cc.
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 3680 of file scene.cc.
References BKE_scene_cursor_rot_to_mat3(), copy_m4_m3(), copy_v3_v3(), and View3DCursor::location.
Definition at line 2902 of file scene.cc.
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 1864 of file scene.cc.
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_image_format_copy(), BKE_libblock_relink_to_newid(), BKE_main_collection_sync(), BKE_main_id_newptr_and_tag_clear(), 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, RigidBodyWorld::constraints, Scene::display, Scene::display_settings, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Scene::gpd, RigidBodyWorld::group, Scene::id, ID_IS_LINKED, id_us_ensure_real(), id_us_min(), IDP_CopyProperty(), BakeData::im_format, RenderData::im_format, LIB_ID_COPY_DEFAULT, 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, Scene::physics_settings, Scene::preview, ID::properties, Scene::r, remove_sequencer_fcurves(), Scene::rigidbody_world, 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, Scene::view_settings, RenderData::views, and Scene::world.
Referenced by scene_add().
Depsgraph* BKE_scene_ensure_depsgraph | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct ViewLayer * | view_layer | ||
) |
Definition at line 3456 of file scene.cc.
References 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().
Definition at line 3345 of file scene.cc.
References BKE_scene_allocate_depsgraph_hash(), Scene::depsgraph_hash, and scene.
Referenced by scene_get_depsgraph_p().
Scene* BKE_scene_find_from_collection | ( | const Main * | bmain, |
const Collection * | collection | ||
) |
Definition at line 2239 of file scene.cc.
References BKE_view_layer_has_collection(), LISTBASE_FOREACH, scene, Main::scenes, and Scene::view_layers.
const char* BKE_scene_find_last_marker_name | ( | const Scene * | scene, |
int | frame | ||
) |
Definition at line 2336 of file scene.cc.
References TimeMarker::frame, LISTBASE_FOREACH, Scene::markers, MAXFRAME, TimeMarker::name, and scene.
const char* BKE_scene_find_marker_name | ( | const Scene * | scene, |
int | frame | ||
) |
Definition at line 2310 of file scene.cc.
References TimeMarker::frame, markers, Scene::markers, TimeMarker::name, TimeMarker::next, TimeMarker::prev, and scene.
Definition at line 2415 of file scene.cc.
References RenderData::cfra, Scene::r, scene, and RenderData::subframe.
Referenced by BKE_scene_graph_update_for_newframe_ex().
Set current frame and sub-frame based on a fractional frame.
Definition at line 2420 of file scene.cc.
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 2354 of file scene.cc.
References FPS, mod_i(), and round_db_to_int().
Referenced by change_frame_apply().
Definition at line 2406 of file scene.cc.
References RenderData::framelen, Scene::r, scene, and RenderData::subframe.
Referenced by BKE_scene_ctime_get().
Definition at line 3352 of file scene.cc.
References BLI_ghash_free(), Scene::depsgraph_hash, depsgraph_key_free(), depsgraph_key_value_free(), and scene.
Referenced by scene_free_data(), and wm_block_autorun_warning_enable_scripts().
Definition at line 3361 of file scene.cc.
References BLI_ghash_remove(), Scene::depsgraph_hash, depsgraph_key_free(), depsgraph_key_value_free(), and scene.
Referenced by ED_scene_view_layer_delete().
Definition at line 3443 of file scene.cc.
References BKE_scene_has_view_layer(), BLI_assert, BLI_ghash_lookup(), Scene::depsgraph_hash, scene, and DepsgraphKey::view_layer.
Definition at line 2653 of file scene.cc.
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(), blender::io::obj::OBJDepsgraph::OBJDepsgraph(), 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_do_depsgraph().
Definition at line 2728 of file scene.cc.
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(), generic_bake_deform_stroke(), gpencil_bake_grease_pencil_animation_exec(), 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(), sound_bake_animation_exec(), and blender::io::obj::OBJDepsgraph::update_for_newframe().
Applies changes right away, does all sets too.
Definition at line 2658 of file scene.cc.
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 2648 of file scene.cc.
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().
Definition at line 2022 of file scene.cc.
References BKE_rigidbody_world_groups_relink(), and Scene::rigidbody_world.
Definition at line 2234 of file scene.cc.
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 | ( | const SceneRenderView * | srv, |
const char * | filepath, | ||
char * | r_filepath | ||
) |
Definition at line 3177 of file scene.cc.
References BLI_path_suffix(), BLI_strncpy(), FILE_MAX, and SceneRenderView::suffix.
bool BKE_scene_multiview_is_render_view_active | ( | const RenderData * | rd, |
const SceneRenderView * | srv | ||
) |
Definition at line 3057 of file scene.cc.
References SceneRenderView::name, 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 3083 of file scene.cc.
References BKE_scene_multiview_is_render_view_active(), LISTBASE_FOREACH, 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 3102 of file scene.cc.
References BKE_scene_multiview_is_render_view_active(), LISTBASE_FOREACH_BACKWARD, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.
bool BKE_scene_multiview_is_stereo3d | ( | const RenderData * | rd | ) |
Definition at line 3040 of file scene.cc.
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 3283 of file scene.cc.
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 3009 of file scene.cc.
References BLI_findstring(), LISTBASE_FOREACH, 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 3121 of file scene.cc.
References BKE_scene_multiview_is_render_view_active(), ListBase::first, SceneRenderView::next, 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 3140 of file scene.cc.
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 3263 of file scene.cc.
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 | ||
) |
Definition at line 3185 of file scene.cc.
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 3151 of file scene.cc.
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 3223 of file scene.cc.
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 3233 of file scene.cc.
References BKE_scene_multiview_is_render_view_active(), BLI_assert, BLI_str_rpartition(), BLI_strncpy(), LISTBASE_FOREACH, Scene::r, scene, STREQLEN, 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 3206 of file scene.cc.
References BLI_findstring(), 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 2955 of file scene.cc.
References BKE_render_num_threads(), Scene::r, and scene.
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-view-layer.
Definition at line 2896 of file scene.cc.
References Object::base_flag, Base::flag, and Base::object.
Referenced by BKE_scene_base_flag_to_objects(), BKE_scene_set_background(), ED_object_base_select(), loose_data_instantiate_collection_process(), loose_data_instantiate_object_base_instance_init(), make_object_duplilist_real(), and object_hide_view_clear_exec().
Check if there is any instance of the object in the scene.
Definition at line 2053 of file scene.cc.
References BLI_findptr(), LISTBASE_FOREACH, scene, and Scene::view_layers.
Definition at line 2063 of file scene.cc.
References LISTBASE_FOREACH, scene, STREQ, and Scene::view_layers.
int BKE_scene_orientation_get_index | ( | Scene * | scene, |
int | slot_index | ||
) |
Definition at line 2470 of file scene.cc.
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(), gizmo_mesh_extrude_refresh(), knife_constrain_axis(), v3d_cursor_snap_update(), and view3d_ruler_item_mousemove().
int BKE_scene_orientation_get_index_from_flag | ( | Scene * | scene, |
int | flag | ||
) |
Definition at line 2476 of file scene.cc.
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 2431 of file scene.cc.
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 2439 of file scene.cc.
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 2463 of file scene.cc.
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 | ( | struct 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 2456 of file scene.cc.
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 2759 of file scene.cc.
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 2364 of file scene.cc.
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 2075 of file scene.cc.
References BKE_scene_object_base_flag_sync_from_base(), BKE_scene_validate_setscene(), LISTBASE_FOREACH, 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().
Called from creator_args.c
.
Definition at line 2096 of file scene.cc.
References BKE_libblock_find_name(), BKE_main_blendfile_path(), BKE_scene_set_background(), and ID_SCE.
Referenced by arg_handle_scene_set().
TransformOrientation* BKE_scene_transform_orientation_find | ( | const Scene * | scene, |
const int | index | ||
) |
Definition at line 3565 of file scene.cc.
References BLI_findlink(), scene, and Scene::transform_spaces.
int BKE_scene_transform_orientation_get_index | ( | const Scene * | scene, |
const TransformOrientation * | orientation | ||
) |
Definition at line 3570 of file scene.cc.
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 3545 of file scene.cc.
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 3479 of file scene.cc.
References BLI_ghash_insert(), BLI_ghash_lookup_p(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p(), depsgraph, Scene::depsgraph_hash, LISTBASE_FOREACH, scene, scene_undo_depsgraph_gen_key(), Main::scenes, DepsgraphKey::view_layer, and Scene::view_layers.
Referenced by memfile_undosys_step_decode().
Definition at line 3508 of file scene.cc.
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_FOREACH, MAX_ID_NAME, MAX_NAME, MEM_freeN, 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 | ||
) |
Definition at line 2982 of file scene.cc.
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(), pow(), UnitSettings::scale_length, UnitSettings::system, and USER_UNIT_NONE.
Definition at line 2539 of file scene.cc.
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_VOLUME, ID_RECALC_FRAME_CHANGE, 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 2563 of file scene.cc.
References BLI_assert, DEG_is_evaluated_id(), Scene::id, ID_RECALC_AUDIO_VOLUME, ID::recalc, and scene.
Definition at line 2838 of file scene.cc.
References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SHADING_NODES_CUSTOM, scene, and type.
Referenced by shader_tree_poll().
Definition at line 2844 of file scene.cc.
References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SPHERICAL_STEREO, scene, and type.
Definition at line 2850 of file scene.cc.
References RenderData::engine, Scene::r, RE_engine_id_BLENDER_EEVEE, scene, and STREQ.
Definition at line 2855 of file scene.cc.
References RenderData::engine, Scene::r, RE_engine_id_BLENDER_WORKBENCH, scene, and STREQ.
Definition at line 2860 of file scene.cc.
References RenderData::engine, Scene::r, RE_engine_id_CYCLES, scene, and STREQ.
Referenced by BKE_scene_uses_cycles_experimental_features().
Return whether the Cycles experimental feature is enabled. It is invalid to call without first ensuring that Cycles is the active render engine (e.g. with BKE_scene_uses_cycles).
const
as RNA_id_pointer_create is not using a const ID. Definition at line 2871 of file scene.cc.
References BKE_scene_uses_cycles(), BLI_assert, CYCLES_FEATURES_EXPERIMENTAL, Scene::id, RNA_enum_get(), RNA_id_pointer_create(), RNA_pointer_get(), RNA_pointer_is_null(), and scene.
Referenced by RE_engine_supports_alembic_procedural(), and uiTemplateCacheFileProcedural().
Checks for cycle, returns true if it's all OK.
Definition at line 2379 of file scene.cc.
References Freestyle::a, BLI_listbase_count(), Main::scenes, and Scene::set.
Referenced by BKE_scene_set_background().
void BKE_scene_view_layer_graph_evaluated_ensure | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct ViewLayer * | view_layer | ||
) |
Ensures given scene/view_layer pair has a valid, up-to-date depsgraph.
Definition at line 2733 of file scene.cc.
References BKE_scene_ensure_depsgraph(), BKE_scene_graph_update_tagged(), DEG_make_active(), depsgraph, and scene.
ToolSettings* BKE_toolsettings_copy | ( | struct ToolSettings * | toolsettings, |
int | flag | ||
) |
flag | copying options (see BKE_lib_id.h's LIB_ID_COPY_... flags for more). |
Definition at line 1729 of file scene.cc.
References BKE_curvemapping_copy(), BKE_curveprofile_copy(), BKE_paint_copy(), GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::curves_sculpt, 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, ParticleEditSettings::object, ImagePaintSettings::paint, Sculpt::paint, CurvesSculpt::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 1789 of file scene.cc.
References BKE_curvemapping_free(), BKE_curveprofile_free(), BKE_paint_free(), GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::curves_sculpt, 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, ImagePaintSettings::paint, Sculpt::paint, CurvesSculpt::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().
Definition at line 2484 of file scene.cc.
References blender::compositor::area(), bScreen::areabase, BKE_workspace_active_screen_get(), RenderData::engine, ListBase::first, LISTBASE_FOREACH, OB_RENDER, Scene::r, RE_engines_find(), scene, View3D::shading, SPACE_VIEW3D, type, View3DShading::type, wmWindowManager::windows, and Main::wm.
Referenced by prepare_mesh_for_viewport_render().
Definition at line 1397 of file scene.cc.
References CMP_CRYPTOMATTE_SRC_RENDER, CMP_NODE_CRYPTOMATTE, CMP_NODE_R_LAYERS, Scene::id, LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, and scene.
Referenced by scene_blend_read_lib().
Definition at line 3319 of file scene.cc.
References DepsgraphKey::view_layer.
Referenced by BKE_scene_allocate_depsgraph_hash().
Definition at line 3327 of file scene.cc.
References MEM_freeN.
Referenced by BKE_scene_free_depsgraph_hash(), and BKE_scene_free_view_layer_depsgraph().
|
static |
Definition at line 3311 of file scene.cc.
References BLI_ghashutil_ptrhash(), hash, and DepsgraphKey::view_layer.
Referenced by BKE_scene_allocate_depsgraph_hash().
Definition at line 3333 of file scene.cc.
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 1082 of file scene.cc.
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 1699 of file scene.cc.
References AviCodecData::cbFormat, AviCodecData::cbParms, AviCodecData::lpFormat, AviCodecData::lpParms, and MEM_freeN.
Referenced by scene_free_data().
int get_render_child_particle_number | ( | const RenderData * | r, |
int | child_num, | ||
bool | for_render | ||
) |
Definition at line 2794 of file scene.cc.
References r, and R_SIMPLIFY.
int get_render_subsurf_level | ( | const RenderData * | r, |
int | lvl, | ||
bool | for_render | ||
) |
Definition at line 2781 of file scene.cc.
References min_ii(), r, and R_SIMPLIFY.
|
constexpr |
Definition at line 1659 of file scene.cc.
References BLT_I18NCONTEXT_ID_SCENE, FILTER_ID_SCE, IDTypeInfo::id_code, ID_SCE, INDEX_ID_SCE, scene_blend_read_data(), scene_blend_read_expand(), scene_blend_read_lib(), scene_blend_write(), scene_copy_data(), scene_foreach_cache(), scene_foreach_id(), scene_foreach_path(), scene_free_data(), scene_init_data(), scene_lib_override_apply_post(), and scene_undo_preserve().
|
static |
Definition at line 1092 of file scene.cc.
References BLI_freelinkN(), BLO_read_data_reports(), BLO_read_list(), BlendFileReadReport::count, LISTBASE_FOREACH_MUTABLE, SEQ_valid_strip_channel(), and BlendFileReadReport::sequence_strips_skipped.
Referenced by scene_blend_read_data().
Definition at line 2511 of file scene.cc.
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, params, ID::recalc, and Object::type.
Referenced by scene_graph_update_tagged().
Definition at line 1715 of file scene.cc.
References AnimData::action, action_groups_remove_channel(), BKE_animdata_from_id(), BKE_fcurve_free(), bAction::curves, Scene::id, and LISTBASE_FOREACH_MUTABLE.
Referenced by BKE_scene_duplicate().
|
static |
Definition at line 1108 of file scene.cc.
References Editing::act_seq, Scene::adt, RenderData::avicodecdata, RenderData::bake, 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_image_format_blend_read_data(), 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, PaintModeSettings::canvas_image, Sequence::channels, Editing::channels, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::curves_sculpt, 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, Editing::displayed_channels, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_read_data(), EEVEE_lightcache_info_update(), RigidBodyWorld::effector_weights, float(), Scene::fps_info, 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, BakeData::im_format, RenderData::im_format, 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, RigidBodyWorld::numbodies, ParticleEditSettings::object, RigidBodyWorld::objects, ImagePaintSettings::paint, ToolSettings::paint_mode, ParticleEditSettings::paintcursor, GP_Sculpt_Settings::paintcursor, ToolSettings::particle, RigidBodyWorld_Shared::physics_world, RigidBodyWorld_Shared::pointcache, POINTER_OFFSET, Editing::prefetch_job, Scene::preview, RigidBodyWorld_Shared::ptcaches, Scene::r, R_NO_CAMERA_SWITCH, Scene::rigidbody_world, Editing::runtime, ParticleEditSettings::scene, ToolSettings::sculpt, SEQ_blend_read(), Sequence::seqbase, Editing::seqbase, Editing::seqbasep, EditingRuntime::sequence_lookup, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, srl(), PointCache::startframe, Scene::toolsettings, Scene::transform_spaces, ToolSettings::unified_paint_settings, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, ToolSettings::wpaint, and zero_v3().
Referenced by get_type_info().
|
static |
Definition at line 1548 of file scene.cc.
References RenderData::bake, BKE_collection_compat_blend_read_expand(), BKE_keyingsets_blend_read_expand(), BLO_expand, BakeData::cage_object, Scene::camera, Scene::clip, RigidBodyWorld::constraints, Scene::ed, Scene::gpd, RigidBodyWorld::group, IDP_BlendReadExpand(), Scene::keyingsets, LISTBASE_FOREACH, Scene::markers, module, Scene::r, Scene::rigidbody_world, SEQ_blend_read_expand(), Editing::seqbase, Scene::set, srl(), Scene::view_layers, and Scene::world.
Referenced by get_type_info().
|
static |
Definition at line 1408 of file scene.cc.
References 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_remlink(), BLO_read_id_address, BLO_read_lib_reports(), BLO_reportf_wrap(), BakeData::cage_object, Scene::camera, ImagePaintSettings::canvas, Scene::clip, ImagePaintSettings::clone, composite_patch(), RigidBodyWorld::constraints, ToolSettings::curves_sculpt, Scene::ed, 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, IDP_BlendReadLib(), ToolSettings::imapaint, Scene::keyingsets, ID::lib, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, Scene::markers, MEM_freeN, ID::name, Scene::nodetree, ImagePaintSettings::paint, Sculpt::paint, CurvesSculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::particle, Scene::r, GP_Sculpt_Guide::reference_object, Scene::rigidbody_world, RPT_WARNING, SCE_READFILE_LIBLINK_NEED_SETSCENE_CHECK, ToolSettings::sculpt, SEQ_blend_read_lib(), Editing::seqbase, Scene::set, ParticleEditSettings::shape_object, srl(), ImagePaintSettings::stencil, TIP_, Scene::toolsettings, ToolSettings::uvsculpt, Scene::view_layers, ToolSettings::vpaint, Scene::world, and ToolSettings::wpaint.
Referenced by get_type_info().
|
static |
Definition at line 914 of file scene.cc.
References Scene::adt, RenderData::avicodecdata, RenderData::bake, 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_image_format_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, AviCodecData::cbFormat, AviCodecData::cbParms, Editing::channels, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, Scene::cursor, ToolSettings::curves_sculpt, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, Scene::display, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_write(), RigidBodyWorld::effector_weights, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::id, IDP_BlendWrite(), BakeData::im_format, RenderData::im_format, 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, Editing::metastack, Scene::nodetree, ntreeBlendWrite(), ImagePaintSettings::paint, Sculpt::paint, CurvesSculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, RigidBodyWorld_Shared::pointcache, Scene::preview, RigidBodyWorld_Shared::ptcaches, Scene::r, Scene::rigidbody_world, ToolSettings::sculpt, SEQ_blend_write(), Editing::seqbase, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, Scene::toolsettings, Scene::transform_spaces, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by get_type_info().
Definition at line 234 of file scene.cc.
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_image_format_copy(), 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(), Editing::channels, Scene::depsgraph_hash, Scene::display, Scene::display_settings, Editing::displayed_channels, Scene::ed, ListBase::first, Scene::fps_info, Scene::id, ID_REMAP_SKIP_NEVER_NULL_USAGE, ID_REMAP_SKIP_USER_CLEAR, IDP_CopyProperty(), 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_dupallocN, ViewLayer::next, Scene::nodetree, Scene::preview, View3DShading::prop, 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, Scene::view_settings, and RenderData::views.
Referenced by get_type_info().
|
static |
Definition at line 224 of file scene.cc.
References BLI_duplicatelist(), IDP_CopyProperty_ex(), LISTBASE_FOREACH, and Scene::markers.
Referenced by scene_copy_data().
|
static |
Definition at line 3411 of file scene.cc.
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, scene, and scene_get_depsgraph_p().
Referenced by BKE_scene_ensure_depsgraph().
|
static |
Definition at line 859 of file scene.cc.
References Scene::eevee, IDCacheKey::id_session_uuid, IDTYPE_CACHE_CB_FLAGS_PERSISTENT, SceneEEVEE::light_cache_data, scene, and user_data.
Referenced by get_type_info().
|
static |
Definition at line 773 of file scene.cc.
References RenderData::bake, BKE_keyingsets_foreach_id(), BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_lib_query_idpropertiesForeachIDLink_callback(), BKE_library_foreach_ID_embedded(), BKE_rigidbody_world_id_loop(), BakeData::cage_object, Scene::camera, Scene::clip, data, Scene::ed, 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, Scene::master_collection, Scene::nodetree, Scene::r, Scene::rigidbody_world, scene, scene_foreach_layer_collection(), scene_foreach_rigidbodyworldSceneLooper(), scene_foreach_toolsettings(), SEQ_for_each_callback(), seq_foreach_member_id_cb(), Editing::seqbase, Scene::set, Scene::toolsettings, Scene::view_layers, and Scene::world.
Referenced by get_type_info().
|
static |
Definition at line 724 of file scene.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, IDWALK_CB_EMBEDDED, IDWALK_CB_NOP, LIB_EMBEDDED_DATA, and LISTBASE_FOREACH.
Referenced by scene_foreach_id().
|
static |
Definition at line 521 of file scene.cc.
References BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER, PaintToolSlot::brush, Paint::brush, data, IDWALK_CB_USER, Paint::palette, SCENE_FOREACH_UNDO_RESTORE, Paint::tool_slots, and Paint::tool_slots_len.
Referenced by scene_foreach_toolsettings().
|
static |
Definition at line 906 of file scene.cc.
References Scene::ed, scene, SEQ_for_each_callback(), seq_foreach_path_callback(), and Editing::seqbase.
Referenced by get_type_info().
|
static |
Definition at line 432 of file scene.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_lib_query_foreachid_process(), data, and user_data.
Referenced by scene_foreach_id().
|
static |
Definition at line 562 of file scene.cc.
References BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER, ImagePaintSettings::canvas, ImagePaintSettings::clone, ToolSettings::curves_sculpt, 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, CurvesSculpt::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 455 of file scene.cc.
References BLI_assert, BLO_read_get_new_id_address(), ELEM, id_us_min(), id_us_plus_no_lib(), IDWALK_CB_USER, ID::lib, ID::orig_id, SCENE_FOREACH_UNDO_NO_RESTORE, SCENE_FOREACH_UNDO_RESTORE, and SWAP.
Definition at line 349 of file scene.cc.
References RenderData::avicodecdata, RenderData::bake, BKE_collection_free_data(), BKE_color_managed_view_settings_free(), BKE_curvemapping_free_data(), BKE_image_format_free(), 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(), Scene::fps_info, free_avicodecdata(), RigidBodyWorld::group, Collection::id, IDP_FreeProperty(), BakeData::im_format, RenderData::im_format, Scene::keyingsets, Scene::layer_properties, SceneEEVEE::light_cache_data, LISTBASE_FOREACH_MUTABLE, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_freeN, MEM_SAFE_FREE, Scene::nodetree, ntreeFreeEmbeddedTree(), Scene::preview, View3DShading::prop, 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.
Referenced by get_type_info().
Definition at line 338 of file scene.cc.
References IDP_FreePropertyContent_ex(), LISTBASE_FOREACH_MUTABLE, Scene::markers, MEM_freeN, and scene.
Referenced by scene_free_data().
|
static |
Definition at line 3371 of file scene.cc.
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, scene, and DepsgraphKey::view_layer.
Referenced by BKE_scene_undo_depsgraphs_restore(), and scene_ensure_depsgraph_p().
|
static |
Definition at line 2577 of file scene.cc.
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().
Definition at line 117 of file scene.cc.
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_image_format_init(), 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, 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, 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, Scene::view_settings, VIEWLAYER_ADD_NEW, and RenderData::views.
Referenced by get_type_info().
Definition at line 1646 of file scene.cc.
References BKE_ptcache_id_from_rigidbody(), LISTBASE_FOREACH, PTCACHE_FLAG_INFO_DIRTY, PTCacheID::ptcaches, Scene::rigidbody_world, and scene.
Referenced by get_type_info().
|
static |
Definition at line 3462 of file scene.cc.
References BLI_assert, BLI_strncpy_rlen(), FILE_MAX, Library::filepath, Scene::id, ID_IS_LINKED, ID::lib, MAX_ID_NAME, MAX_NAME, MEM_callocN, ViewLayer::name, ID::name, and scene.
Referenced by BKE_scene_undo_depsgraphs_extract(), and BKE_scene_undo_depsgraphs_restore().
|
static |
Definition at line 1630 of file scene.cc.
References Scene::cursor, scene_foreach_toolsettings(), SWAP, and Scene::toolsettings.
Referenced by get_type_info().
Definition at line 738 of file scene.cc.
References BKE_lib_query_idpropertiesForeachIDLink_callback(), Sequence::clip, data, Sequence::effectdata, FOREACHID_PROCESS_IDSUPER, IDP_foreach_property(), IDP_TYPE_FILTER_ID, IDWALK_CB_NEVER_SELF, IDWALK_CB_NOP, IDWALK_CB_USER, LISTBASE_FOREACH, Sequence::mask, Sequence::modifiers, Sequence::prop, Sequence::scene, Sequence::scene_camera, SEQ_TYPE_TEXT, Sequence::sound, TextVars::text_font, Sequence::type, and user_data.
Referenced by scene_foreach_id().
Definition at line 875 of file scene.cc.
References BKE_bpath_foreach_path_dirfile_fixed_process(), BKE_bpath_foreach_path_fixed_process(), BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE, Strip::dir, ELEM, BPathForeachPathData::flag, len, MEM_allocN_len, MIN2, StripElem::name, SEQ_HAS_PATH, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, Sequence::strip, Strip::stripdata, Sequence::type, and user_data.
Referenced by scene_foreach_path().
IDTypeInfo IDType_ID_SCE = get_type_info() |
Definition at line 1693 of file scene.cc.
Referenced by blender::bke::tests::TEST().
const char* RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE" |
Definition at line 1695 of file scene.cc.
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(), render_engine_supports_ray_visibility(), and scene_init_data().
const char* RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH" |
Definition at line 1696 of file scene.cc.
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 1697 of file scene.cc.
Referenced by BKE_scene_uses_cycles(), blo_do_versions_cycles(), do_versions_after_linking_cycles(), and shader_tree_poll().