|
Blender V4.3
|
#include "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | SceneBaseIter |
Macros | |
| #define | SETLOOPER(_sce_basis, _sce_iter, _base) |
| #define | SETLOOPER_VIEW_LAYER(_sce_basis, _view_layer, _sce_iter, _base) |
| #define | SETLOOPER_SET_ONLY(_sce_basis, _sce_iter, _base) |
Enumerations | |
| enum | eSceneCopyMethod { SCE_COPY_NEW = 0 , SCE_COPY_EMPTY = 1 , SCE_COPY_LINK_COLLECTION = 2 , SCE_COPY_FULL = 3 } |
| #define SETLOOPER | ( | _sce_basis, | |
| _sce_iter, | |||
| _base ) |
Use as the contents of a 'for' loop: for (SETLOOPER(...)) { ... }.
Definition at line 37 of file BKE_scene.hh.
| #define SETLOOPER_SET_ONLY | ( | _sce_basis, | |
| _sce_iter, | |||
| _base ) |
Definition at line 49 of file BKE_scene.hh.
Referenced by clean_viewport_memory().
| #define SETLOOPER_VIEW_LAYER | ( | _sce_basis, | |
| _view_layer, | |||
| _sce_iter, | |||
| _base ) |
Definition at line 44 of file BKE_scene.hh.
Referenced by BKE_ptcache_bake().
| enum eSceneCopyMethod |
| Enumerator | |
|---|---|
| SCE_COPY_NEW | |
| SCE_COPY_EMPTY | |
| SCE_COPY_LINK_COLLECTION | |
| SCE_COPY_FULL | |
Definition at line 29 of file BKE_scene.hh.
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 2726 of file scene.cc.
References BKE_view_layer_default_render(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), ListBase::first, Base::next, and Scene::set.
| int BKE_render_num_threads | ( | const RenderData * | r | ) |
Definition at line 2850 of file scene.cc.
References BLI_system_num_threads_override_get(), BLI_system_thread_count(), max_ii(), RenderData::mode, R_FIXED_THREADS, and RenderData::threads.
Referenced by BKE_scene_num_threads(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), COM_execute(), lineart_create_render_buffer_v3(), and RE_init_threadcount().
| int BKE_render_preview_pixel_size | ( | const RenderData * | r | ) |
Definition at line 2892 of file scene.cc.
References RenderData::preview_pixel_size.
Referenced by blender::eevee::Film::init(), and blender::eevee::Sampling::init().
| void BKE_render_resolution | ( | const RenderData * | r, |
| const bool | use_crop, | ||
| int * | r_width, | ||
| int * | r_height ) |
Definition at line 2877 of file scene.cc.
References RenderData::border, int, RenderData::mode, R_BORDER, R_CROP, RenderData::size, rctf::xmax, rctf::xmin, RenderData::xsch, rctf::ymax, rctf::ymin, and RenderData::ysch.
Referenced by BKE_image_get_size(), blender::io::alembic::ABCCameraWriter::create_alembic_objects(), 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::render::Context::get_render_size(), is_compositing_possible(), is_compositing_possible_on_gpu(), 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 1954 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(), blender::bke::tests::WholeIDTestData::setup(), and setup_app_data().
| SceneRenderView * BKE_scene_add_render_view | ( | Scene * | sce, |
| const char * | name ) |
Return default view.
Definition at line 2659 of file scene.cc.
References BLI_addtail(), BLI_uniquename(), DATA_, SceneRenderView::name, offsetof, Scene::r, STRNCPY, 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 3259 of file scene.cc.
References BLI_ghash_new(), depsgraph_key_compare(), and depsgraph_key_hash().
Referenced by BKE_scene_ensure_depsgraph_hash().
Definition at line 2812 of file scene.cc.
References BKE_scene_object_base_flag_sync_from_base(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), and LISTBASE_FOREACH.
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 ) |
Used by meta-balls, return all objects (including duplis) existing in the scene (including scene's sets).
Definition at line 2022 of file scene.cc.
References BKE_view_layer_context_active_PLACEHOLDER(), BKE_view_layer_default_render(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), 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, Base::next, DupliObject::next, DupliObject::ob, OB_DUPLI, OB_FROMDUPLI, object_duplilist(), SceneBaseIter::omat, SceneBaseIter::phase, Object::runtime, and Node::set().
Referenced by init_meta().
| bool BKE_scene_camera_switch_update | ( | Scene * | scene | ) |
Definition at line 2213 of file scene.cc.
References camera, DEG_id_tag_update(), and ID_RECALC_SYNC_TO_EVAL.
Referenced by do_render_compositor_scene(), do_render_full_pipeline(), ed_marker_camera_bind_exec(), ed_marker_move_apply(), blender::io::grease_pencil::PDFExporter::export_scene(), MOD_lineart_compute_feature_lines_v3(), blender::io::grease_pencil::persmat_from_camera_object(), RE_engine_frame_set(), screen_opengl_render_anim_step(), screen_render_single_layer_set(), seq_render_scene_strip(), and sound_bake_animation_exec().
Definition at line 1939 of file scene.cc.
References ID_IS_LINKED, LISTBASE_FOREACH, and Main::scenes.
Referenced by scene_delete_poll().
| bool BKE_scene_check_rigidbody_active | ( | const Scene * | scene | ) |
Definition at line 2844 of file scene.cc.
References RBW_FLAG_MUTED.
Referenced by BKE_rigidbody_eval_simulation(), and BKE_rigidbody_rebuild_sim().
Definition at line 1772 of file scene.cc.
References Scene::eevee.
Referenced by BKE_scene_duplicate(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), and scene_copy_data().
Return fractional frame number taking into account sub-frames and time remapping. This the time value used by animation, modifiers and physics evaluation.
Definition at line 2317 of file scene.cc.
References BKE_scene_frame_to_ctime().
Referenced by action_layer_next_exec(), action_layer_prev_exec(), BKE_cachefile_filepath_get(), BKE_object_eval_constraints(), BKE_pose_constraints_evaluate(), BKE_pose_eval_bone(), BKE_pose_eval_cleanup(), BKE_pose_eval_init_ik(), BKE_pose_iktree_evaluate(), BKE_pose_splineik_evaluate(), BKE_pose_where_is(), BKE_ptcache_id_time(), DEG_evaluate_on_refresh(), draw_current_frame(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), dynamicPaint_doStep(), explodeMesh(), meshcache_do(), modify_mesh(), blender::nodes::node_geo_input_scene_time_cc::node_exec(), ObjectToTransData(), particle_system_minmax(), pointdensity_cache_psys(), RE_RenderAnim(), and special_aftertrans_update__object().
| void BKE_scene_disable_color_management | ( | Scene * | scene | ) |
Definition at line 2826 of file scene.cc.
References ColorManagedDisplaySettings::display_device, IMB_colormanagement_display_get_none_name(), IMB_colormanagement_view_get_raw_or_default_name(), STRNCPY, view, and ColorManagedViewSettings::view_transform.
Referenced by blo_do_versions_260(), and blo_do_versions_400().
| Scene * BKE_scene_duplicate | ( | Main * | bmain, |
| Scene * | sce, | ||
| eSceneCopyMethod | type ) |
Definition at line 1778 of file scene.cc.
References Scene::audio, 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_TAG_NEW, id_us_ensure_real(), id_us_min(), IDP_CopyProperty(), BakeData::im_format, RenderData::im_format, LIB_ID_COPY_DEFAULT, LIB_ID_DUPLICATE_IS_SUBPROCESS, LISTBASE_FOREACH, Scene::master_collection, RenderData::mblur_shutter_curve, 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, Scene::unit, USER_DUP_LINKED_ID, USER_DUP_OBJECT, Scene::view_layers, Scene::view_settings, RenderData::views, and Scene::world.
Referenced by scene_add().
Definition at line 3377 of file scene.cc.
References 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 3265 of file scene.cc.
References BKE_scene_allocate_depsgraph_hash().
Referenced by scene_get_depsgraph_p().
| Scene * BKE_scene_find_from_collection | ( | const Main * | bmain, |
| const Collection * | collection ) |
Definition at line 2157 of file scene.cc.
References BKE_view_layer_has_collection(), LISTBASE_FOREACH, scene, and Main::scenes.
Return the current marker for this frame, we can have more than 1 marker per frame, this just returns the first (unfortunately).
Definition at line 2255 of file scene.cc.
References TimeMarker::frame, LISTBASE_FOREACH, MAXFRAME, and TimeMarker::name.
Referenced by stampdata().
Definition at line 2228 of file scene.cc.
References TimeMarker::frame, markers, TimeMarker::name, TimeMarker::next, and TimeMarker::prev.
Referenced by draw_selected_name().
Get current fractional frame based on frame and sub-frame.
Definition at line 2331 of file scene.cc.
Referenced by blender::animrig::autokeyframe_cfra_can_key(), blender::animrig::autokeyframe_object(), blender::animrig::autokeyframe_object(), blender::animrig::autokeyframe_pchan(), blender::animrig::autokeyframe_pose_channel(), BKE_constraint_apply_for_object(), BKE_constraint_apply_for_pose(), BKE_scene_graph_update_for_newframe_ex(), DEG_evaluate_on_refresh(), delete_key_button_exec(), delete_key_using_keying_set(), delete_key_v3d_without_keying_set(), engine_depsgraph_init(), freeze_frame_add_from_strip_selection(), insert_key(), insert_key_button_exec(), insert_key_with_keyingset(), keyframe_jump_exec(), keyframe_jump_exec(), paste_get_y_offset(), pose_propagate_exec(), render_update_depsgraph(), retiming_key_add_new_for_seq(), seq_update_sound_properties(), and sequencer_retiming_key_add_exec().
Set current frame and sub-frame based on a fractional frame.
Definition at line 2336 of file scene.cc.
References int.
Referenced by bc_update_scene(), deg_flush_updates_and_refresh(), keyframe_jump_exec(), keyframe_jump_exec(), lineart_bake_startjob(), RE_engine_frame_set(), and seq_render_scene_strip().
Definition at line 2273 of file scene.cc.
References FPS, mod_i(), and round_db_to_int().
Referenced by change_frame_apply().
Convert integer frame number to fractional frame number taking into account sub-frames and time remapping.
Definition at line 2322 of file scene.cc.
Referenced by BKE_ptcache_id_time(), BKE_scene_ctime_get(), DEG_evaluate_on_framechange(), and object_add_or_copy_particle_system().
| void BKE_scene_free_depsgraph_hash | ( | Scene * | scene | ) |
Definition at line 3272 of file scene.cc.
References BLI_ghash_free(), depsgraph_key_free(), and depsgraph_key_value_free().
Referenced by scene_free_data(), and wm_block_autorun_warning_enable_scripts().
Definition at line 3281 of file scene.cc.
References BLI_ghash_remove(), depsgraph_key_free(), and depsgraph_key_value_free().
Referenced by ED_scene_view_layer_delete().
Definition at line 3364 of file scene.cc.
References BKE_scene_has_view_layer(), BLI_assert, BLI_ghash_lookup(), and DepsgraphKey::view_layer.
Referenced by CTX_data_depsgraph_on_load(), DRW_cache_free_old_batches(), screen_animation_step_invoke(), sound_jack_sync_callback(), view3d_main_region_listener(), wm_event_do_handlers(), and wm_xr_session_scene_and_depsgraph_get().
| void BKE_scene_graph_evaluated_ensure | ( | Depsgraph * | depsgraph, |
| Main * | bmain ) |
Definition at line 2573 of file scene.cc.
References depsgraph, and scene_graph_update_tagged().
Referenced by BKE_sculpt_mask_layers_ensure(), create_trans_data(), CTX_data_ensure_evaluated_depsgraph(), blender::ed::object::data_xform_container_update_all(), ED_object_particle_edit_mode_enter_ex(), ED_object_texture_paint_mode_enter_ex(), blender::io::ply::exporter_main(), blender::io::stl::exporter_main(), blender::ed::sculpt_paint::init_sculpt_mode_session(), blender::io::obj::OBJDepsgraph::OBJDepsgraph(), blender::ed::object::object_clear_transform_generic_exec(), blender::ed::object::object_xform_skip_child_container_update_all(), snap_sel_to_grid_exec(), snap_selected_to_location(), blender::ed::sculpt_paint::undo::step_decode(), transform_convert_mesh_crazyspace_detect(), and wm_xr_session_do_depsgraph().
| void BKE_scene_graph_update_for_newframe | ( | Depsgraph * | depsgraph | ) |
Definition at line 2647 of file scene.cc.
References BKE_scene_graph_update_for_newframe_ex(), and depsgraph.
Referenced by blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_ptcache_bake(), ED_update_for_newframe(), blender::io::grease_pencil::PDFExporter::export_scene(), blender::io::alembic::export_startjob(), blender::io::usd::export_to_stage(), FRS_do_stroke_rendering(), blender::ed::greasepencil::grease_pencil_reproject_exec(), lineart_bake_startjob(), motionpaths_calc_update_scene(), redraw_timer_step(), screen_opengl_render_anim_step(), screen_opengl_render_end(), seq_render_scene_strip(), blender::ed::object::bake_simulation::simulate_to_frame_startjob(), sound_bake_animation_exec(), and blender::io::obj::OBJDepsgraph::update_for_newframe().
| void BKE_scene_graph_update_for_newframe_ex | ( | Depsgraph * | depsgraph, |
| bool | clear_recalc ) |
Applies changes right away, does all sets too.
Definition at line 2578 of file scene.cc.
References 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(), DEG_editors_update(), DEG_evaluate_on_framechange(), DEG_evaluate_on_refresh(), DEG_EVALUATE_SYNC_WRITEBACK_YES, DEG_get_bmain(), DEG_get_input_scene(), DEG_graph_relations_update(), DEG_ids_clear_recalc(), DEG_ids_restore_recalc(), DEG_is_fully_evaluated(), and depsgraph.
Referenced by BKE_scene_graph_update_for_newframe(), engine_depsgraph_init(), and RE_engine_frame_set().
| void BKE_scene_graph_update_tagged | ( | Depsgraph * | depsgraph, |
| Main * | bmain ) |
Definition at line 2568 of file scene.cc.
References depsgraph, and scene_graph_update_tagged().
Referenced by animviz_calc_motionpaths(), blender::ed::object::bake(), BKE_scene_view_layer_graph_evaluated_ensure(), blender::io::AbstractHierarchyIteratorInvisibleTest::depsgraph_create(), BlendfileLoadingBaseTest::depsgraph_create(), blender::ed::sculpt_paint::dyntopo::disable(), blender::ed::object::duplibase_for_convert(), blender::ed::sculpt_paint::dyntopo::enable_ex(), blender::io::alembic::export_startjob(), blender::io::usd::export_startjob(), blender::io::usd::export_to_stage(), blender::ed::object::object_convert_exec(), object_preview_scene_create(), blender::ed::object::vertex_parent_set_exec(), and wm_event_do_depsgraph().
| void BKE_scene_groups_relink | ( | Scene * | sce | ) |
Definition at line 1932 of file scene.cc.
References BKE_rigidbody_world_groups_relink(), and Scene::rigidbody_world.
Definition at line 2152 of file scene.cc.
References BLI_findindex().
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 3096 of file scene.cc.
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 ) |
Return whether to render this SceneRenderView.
Definition at line 2976 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_image_ensure_viewer_views(), 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(), BKE_scene_multiview_view_prefix_get(), check_valid_camera_multiview(), blender::ed::space_node::compo_startjob(), image_update_views_format(), image_viewer_create_views(), RE_RenderAnim(), render_result_views_new(), and screen_opengl_views_setup().
| bool BKE_scene_multiview_is_render_view_first | ( | const RenderData * | rd, |
| const char * | viewname ) |
viewname is the first or if the name is NULL or not found. Definition at line 3002 of file scene.cc.
References BKE_scene_multiview_is_render_view_active(), LISTBASE_FOREACH, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.
Referenced by blender::render::Context::viewer_output_to_viewer_image().
| bool BKE_scene_multiview_is_render_view_last | ( | const RenderData * | rd, |
| const char * | viewname ) |
viewname is the last or if the name is NULL or not found. Definition at line 3021 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 2959 of file scene.cc.
References BLI_findstring(), offsetof, R_MULTIVIEW, SCE_VIEW_DISABLE, RenderData::scemode, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, and RenderData::views.
Referenced by BKE_image_ensure_viewer_views(), screen_opengl_views_setup(), and view3d_stereo3d_active().
| int BKE_scene_multiview_num_videos_get | ( | const RenderData * | rd | ) |
Definition at line 3203 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.
Referenced by RE_RenderAnim(), and screen_opengl_render_anim_init().
| int BKE_scene_multiview_num_views_get | ( | const RenderData * | rd | ) |
Definition at line 2928 of file scene.cc.
References BLI_findstring(), LISTBASE_FOREACH, offsetof, 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_image_ensure_viewer_views(), BKE_scene_multiview_num_videos_get(), do_render_sequencer(), blender::nodes::node_composite_file_output_cc::FileOutputOperation::execute_single_layer(), screen_opengl_render_init(), seq_num_files(), seq_proxy_context_count(), seq_render_image_strip(), seq_render_movie_strip(), and seq_render_scene_strip().
| SceneRenderView * BKE_scene_multiview_render_view_findindex | ( | const RenderData * | rd, |
| int | view_id ) |
Definition at line 3040 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, |
| int | view_id ) |
Definition at line 3059 of file scene.cc.
References BKE_scene_multiview_render_view_findindex(), and SceneRenderView::name.
Referenced by BKE_scene_multiview_view_id_suffix_get(), and seq_render_scene_strip().
| void BKE_scene_multiview_videos_dimensions_get | ( | const RenderData * | rd, |
| size_t | width, | ||
| size_t | height, | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 3183 of file scene.cc.
References Stereo3dFormat::display_mode, Stereo3dFormat::flag, RenderData::im_format, IMB_stereo3d_write_dimensions(), R_IMF_VIEWS_STEREO_3D, R_MULTIVIEW, S3D_SQUEEZED_FRAME, RenderData::scemode, ImageFormatData::stereo3d_format, and ImageFormatData::views_format.
Referenced by get_videos_dimensions(), and screen_opengl_render_anim_init().
| void BKE_scene_multiview_view_filepath_get | ( | const RenderData * | rd, |
| const char * | filepath, | ||
| const char * | view, | ||
| char * | r_filepath ) |
When multi-view is not used the filepath is as usual (e.g., Image.jpg). When multi-view 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 3104 of file scene.cc.
References BLI_findstring(), BLI_path_suffix(), BLI_strncpy(), FILE_MAX, offsetof, STRNCPY, SceneRenderView::suffix, and RenderData::views.
Referenced by BKE_image_render_write(), and image_save_single().
| int BKE_scene_multiview_view_id_get | ( | const RenderData * | rd, |
| const char * | viewname ) |
Definition at line 3070 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.
Referenced by BKE_image_acquire_multilayer_view_ibuf(), image_buffer_rect_update(), RE_ResultGet32(), sequencer_ibuf_get(), and blender::render::Context::viewer_output_to_viewer_image().
| const char * BKE_scene_multiview_view_id_suffix_get | ( | const RenderData * | rd, |
| int | view_id ) |
Definition at line 3142 of file scene.cc.
References BKE_scene_multiview_render_view_name_get(), BKE_scene_multiview_view_suffix_get(), R_MULTIVIEW, and RenderData::scemode.
Referenced by open_anim_file_multiview(), RE_RenderAnim(), RE_WriteRenderViewsMovie(), screen_opengl_render_anim_init(), seq_anim_add_suffix(), and seq_multiview_name().
| void BKE_scene_multiview_view_prefix_get | ( | Scene * | scene, |
| const char * | filepath, | ||
| char * | r_prefix, | ||
| const char ** | r_ext ) |
Definition at line 3152 of file scene.cc.
References BKE_scene_multiview_is_render_view_active(), BLI_assert, BLI_str_rpartition(), BLI_strncpy(), LISTBASE_FOREACH, and STREQLEN.
Referenced by image_update_views_format(), open_anim_file_multiview(), SEQ_add_movie_strip(), SEQ_add_reload_new_file(), seq_image_strip_is_multiview_render(), 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 3125 of file scene.cc.
References BLI_findstring(), offsetof, SceneRenderView::suffix, and RenderData::views.
Referenced by BKE_camera_multiview_render(), BKE_scene_multiview_view_id_suffix_get(), and blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_multi_layer_exr_image_path().
Definition at line 2872 of file scene.cc.
References BKE_render_num_threads().
Referenced by blender::ed::object::init_multiresbake_job(), blender::ed::object::multiresbake_image_exec_locked(), proj_paint_state_thread_init(), sb_cf_threads_run(), and sb_sfesf_threads_run().
| 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-view-layer.
Definition at line 2820 of file scene.cc.
References Object::base_flag, Base::flag, and Base::object.
Referenced by blender::ed::object::base_select(), BKE_scene_base_flag_to_objects(), BKE_scene_set_background(), loose_data_instantiate_collection_process(), loose_data_instantiate_object_base_instance_init(), blender::ed::object::make_object_duplilist_real(), and blender::ed::object::object_hide_view_clear_exec().
Check if there is any instance of the object in the scene.
Definition at line 1963 of file scene.cc.
References BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), BLI_findptr(), LISTBASE_FOREACH, and offsetof.
Definition at line 1974 of file scene.cc.
References BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), LISTBASE_FOREACH, and STREQ.
Referenced by camera_multiview_advanced().
Definition at line 2386 of file scene.cc.
References BKE_scene_orientation_slot_get(), and BKE_scene_orientation_slot_get_index().
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().
Definition at line 2392 of file scene.cc.
References BKE_scene_orientation_slot_get_from_flag(), BKE_scene_orientation_slot_get_index(), and flag.
Referenced by WIDGETGROUP_gizmo_refresh(), and WIDGETGROUP_xform_cage_refresh().
| TransformOrientationSlot * BKE_scene_orientation_slot_get | ( | Scene * | scene, |
| int | slot_index ) |
Definition at line 2347 of file scene.cc.
References SCE_ORIENT_DEFAULT, 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 2355 of file scene.cc.
References BKE_scene_orientation_slot_get(), BLI_assert, flag, SCE_ORIENT_DEFAULT, SCE_ORIENT_ROTATE, SCE_ORIENT_SCALE, SCE_ORIENT_TRANSLATE, 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 2379 of file scene.cc.
References TransformOrientationSlot::index_custom, TransformOrientationSlot::type, and V3D_ORIENT_CUSTOM.
Referenced by BKE_scene_orientation_get_index(), BKE_scene_orientation_get_index_from_flag(), WIDGETGROUP_gizmo_invoke_prepare(), and WIDGETGROUP_xform_shear_refresh().
| 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 2372 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 2678 of file scene.cc.
References BLI_findindex(), BLI_remlink(), and MEM_freeN().
Referenced by render_view_remove_exec().
Definition at line 2283 of file scene.cc.
References BKE_rigidbody_remove_constraint(), BKE_rigidbody_remove_object(), Object::rigidbody_constraint, and Object::rigidbody_object.
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 1987 of file scene.cc.
References BKE_scene_object_base_flag_sync_from_base(), BKE_scene_validate_setscene(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), LISTBASE_FOREACH, and Main::objects.
Referenced by BKE_scene_set_name(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), ED_scene_change_update(), and setup_app_data().
Called from creator_args.cc.
Definition at line 2009 of file scene.cc.
References BKE_libblock_find_name(), BKE_main_blendfile_path(), BKE_scene_set_background(), ID_SCE, and printf.
Referenced by arg_handle_scene_set().
| TransformOrientation * BKE_scene_transform_orientation_find | ( | const Scene * | scene, |
| int | index ) |
Definition at line 3486 of file scene.cc.
References BLI_findlink().
Referenced by BIF_removeTransformOrientationIndex(), ED_transform_calc_orientation_from_type_ex(), and transform_orientations_spacename_get().
| int BKE_scene_transform_orientation_get_index | ( | const Scene * | scene, |
| const TransformOrientation * | orientation ) |
Definition at line 3491 of file scene.cc.
References BLI_findindex().
Referenced by BIF_selectTransformOrientation(), and BKE_scene_transform_orientation_remove().
| void BKE_scene_transform_orientation_remove | ( | Scene * | scene, |
| TransformOrientation * | orientation ) |
Definition at line 3466 of file scene.cc.
References ARRAY_SIZE, BKE_scene_transform_orientation_get_index(), BLI_assert, BLI_freelinkN(), TransformOrientationSlot::index_custom, TransformOrientationSlot::type, V3D_ORIENT_CUSTOM, and V3D_ORIENT_GLOBAL.
Referenced by BIF_removeTransformOrientation().
Definition at line 3400 of file scene.cc.
References BLI_ghash_insert(), BLI_ghash_lookup_p(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p(), depsgraph, LISTBASE_FOREACH, scene_undo_depsgraph_gen_key(), Main::scenes, and DepsgraphKey::view_layer.
Referenced by memfile_undosys_step_decode().
Definition at line 3429 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_get_depsgraph_p(), scene_undo_depsgraph_gen_key(), and Main::scenes.
Referenced by memfile_undosys_step_decode().
| double BKE_scene_unit_scale | ( | const UnitSettings * | unit, |
| 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 2900 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, B_UNIT_WAVELENGTH, double(), pow(), and USER_UNIT_NONE.
Referenced by outputNumInput(), ui_get_but_scale_unit(), and user_string_to_number().
| void BKE_scene_update_sound | ( | Depsgraph * | depsgraph, |
| Main * | bmain ) |
Definition at line 2458 of file scene.cc.
References 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(), DAG_EVAL_VIEWPORT, DEG_get_evaluated_scene(), DEG_get_mode(), depsgraph, ID_RECALC_AUDIO_FPS, ID_RECALC_AUDIO_LISTENER, ID_RECALC_AUDIO_MUTE, ID_RECALC_AUDIO_VOLUME, and ID_RECALC_FRAME_CHANGE.
Referenced by BKE_scene_graph_update_for_newframe_ex(), render_update_depsgraph(), and scene_graph_update_tagged().
| void BKE_scene_update_tag_audio_volume | ( | Depsgraph * | , |
| Scene * | scene ) |
Definition at line 2483 of file scene.cc.
References BLI_assert, DEG_is_evaluated_id(), and ID_RECALC_AUDIO_VOLUME.
| bool BKE_scene_use_shading_nodes_custom | ( | Scene * | scene | ) |
Definition at line 2759 of file scene.cc.
References RE_engines_find(), and RE_USE_SHADING_NODES_CUSTOM.
Referenced by shader_tree_poll().
| bool BKE_scene_use_spherical_stereo | ( | Scene * | scene | ) |
Definition at line 2765 of file scene.cc.
References RE_engines_find(), and RE_USE_SPHERICAL_STEREO.
| bool BKE_scene_uses_blender_eevee | ( | const Scene * | scene | ) |
Definition at line 2771 of file scene.cc.
References RE_engine_id_BLENDER_EEVEE, RE_engine_id_BLENDER_EEVEE_NEXT, and STREQ.
Referenced by BKE_scene_uses_shader_previews(), ED_view3d_draw_offscreen_imbuf_simple(), blender::nodes::node_shader_tex_sky_cc::node_shader_buts_tex_sky(), and uiTemplatePreview().
| bool BKE_scene_uses_blender_workbench | ( | const Scene * | scene | ) |
Definition at line 2777 of file scene.cc.
References RE_engine_id_BLENDER_WORKBENCH, and STREQ.
Referenced by blender::draw::overlay::Paints::begin_sync(), blender::draw::color_management::drw_color_management_type_for_v3d(), ED_view3d_draw_offscreen_imbuf_simple(), ED_view3d_has_workbench_in_texture_color(), blender::draw::overlay::Instance::init(), OVERLAY_engine_init(), OVERLAY_paint_cache_init(), and snap_use_backface_culling().
| bool BKE_scene_uses_cycles | ( | const Scene * | scene | ) |
Definition at line 2782 of file scene.cc.
References RE_engine_id_CYCLES, and STREQ.
Referenced by advanced_panel_draw(), BKE_scene_uses_cycles_experimental_features(), BKE_scene_uses_shader_previews(), panel_draw(), RE_engine_supports_alembic_procedural(), and uiTemplateCacheFileProcedural().
| bool BKE_scene_uses_cycles_experimental_features | ( | Scene * | scene | ) |
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 2798 of file scene.cc.
References BKE_scene_uses_cycles(), BLI_assert, CYCLES_FEATURES_EXPERIMENTAL, RNA_enum_get(), RNA_id_pointer_create(), RNA_pointer_get(), and RNA_pointer_is_null().
Referenced by RE_engine_supports_alembic_procedural(), and uiTemplateCacheFileProcedural().
| bool BKE_scene_uses_shader_previews | ( | const Scene * | scene | ) |
Definition at line 2787 of file scene.cc.
References BKE_scene_uses_blender_eevee(), and BKE_scene_uses_cycles().
Referenced by blender::ed::space_node::draw_nodetree().
Checks for cycle, returns true if it's all OK.
Definition at line 2295 of file scene.cc.
References BLI_listbase_count(), 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 2652 of file scene.cc.
References BKE_scene_ensure_depsgraph(), BKE_scene_graph_update_tagged(), DEG_make_active(), and depsgraph.
| ToolSettings * BKE_toolsettings_copy | ( | ToolSettings * | toolsettings, |
| int | flag ) |
| flag | copying options (see BKE_lib_id.hh's LIB_ID_COPY_... flags for more). |
Definition at line 1628 of file scene.cc.
References Sculpt::automasking_cavity_curve, Sculpt::automasking_cavity_curve_op, BKE_curvemapping_copy(), BKE_curvemapping_init(), 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, 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, CurvesSculpt::paint, GpPaint::paint, GpSculptPaint::paint, GpVertexPaint::paint, GpWeightPaint::paint, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, ParticleEditSettings::paintcursor, ToolSettings::particle, ParticleEditSettings::scene, ToolSettings::sculpt, SEQ_tool_settings_copy(), ToolSettings::sequencer_tool_settings, UvSculpt::strength_curve, 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 1700 of file scene.cc.
References Sculpt::automasking_cavity_curve, Sculpt::automasking_cavity_curve_op, 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(), CurvesSculpt::paint, GpPaint::paint, GpSculptPaint::paint, GpVertexPaint::paint, GpWeightPaint::paint, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, ToolSettings::sculpt, SEQ_tool_settings_free(), ToolSettings::sequencer_tool_settings, UvSculpt::strength_curve, ToolSettings::uvsculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_scene_duplicate(), and scene_free_data().
| int get_render_child_particle_number | ( | const RenderData * | r, |
| int | child_num, | ||
| bool | for_render ) |
Definition at line 2713 of file scene.cc.
References int, RenderData::mode, R_SIMPLIFY, RenderData::simplify_particles, and RenderData::simplify_particles_render.
Referenced by psys_get_child_number().
| int get_render_subsurf_level | ( | const RenderData * | r, |
| int | lvl, | ||
| bool | for_render ) |
Definition at line 2700 of file scene.cc.
References min_ii(), RenderData::mode, R_SIMPLIFY, RenderData::simplify_subsurf, and RenderData::simplify_subsurf_render.
Referenced by is_disabled(), multires_get_level(), subdiv_levels_for_modifier_get(), and subsurf_make_derived_from_derived().