|
Blender
V2.93
|
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) |
Typedefs | |
| typedef enum eSceneCopyMethod | eSceneCopyMethod |
| typedef struct SceneBaseIter | SceneBaseIter |
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 | |||
| ) |
Definition at line 50 of file BKE_scene.h.
| #define SETLOOPER_SET_ONLY | ( | _sce_basis, | |
| _sce_iter, | |||
| _base | |||
| ) |
Definition at line 62 of file BKE_scene.h.
| #define SETLOOPER_VIEW_LAYER | ( | _sce_basis, | |
| _view_layer, | |||
| _sce_iter, | |||
| _base | |||
| ) |
Definition at line 57 of file BKE_scene.h.
| typedef enum eSceneCopyMethod eSceneCopyMethod |
| typedef struct SceneBaseIter SceneBaseIter |
| enum eSceneCopyMethod |
| Enumerator | |
|---|---|
| SCE_COPY_NEW | |
| SCE_COPY_EMPTY | |
| SCE_COPY_LINK_COLLECTION | |
| SCE_COPY_FULL | |
Definition at line 42 of file BKE_scene.h.
Helper function for the SETLOOPER and SETLOOPER_VIEW_LAYER macros
It iterates over the bases of the active layer and then the bases of the active layer of the background (set) scenes recursively.
Definition at line 2888 of file scene.c.
References BKE_view_layer_default_render(), ListBase::first, if(), Base::next, NULL, ViewLayer::object_bases, and Scene::set.
| int BKE_render_num_threads | ( | const struct RenderData * | r | ) |
| int BKE_render_preview_pixel_size | ( | const struct RenderData * | r | ) |
Definition at line 2078 of file scene.c.
References BKE_id_new(), Scene::id, ID_SCE, id_us_ensure_real(), and id_us_min().
Referenced by BKE_scene_duplicate(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), ED_scene_add(), object_preview_scene_create(), and setup_app_data().
| struct SceneRenderView* BKE_scene_add_render_view | ( | struct Scene * | sce, |
| const char * | name | ||
| ) |
Definition at line 2813 of file scene.c.
References BLI_addtail(), BLI_strncpy(), BLI_uniquename(), DATA_, MEM_callocN, SceneRenderView::name, Scene::r, and RenderData::views.
Referenced by blo_do_versions_270(), render_view_add_exec(), and scene_init_data().
| void BKE_scene_allocate_depsgraph_hash | ( | struct Scene * | scene | ) |
Definition at line 3409 of file scene.c.
References BLI_ghash_new(), Scene::depsgraph_hash, depsgraph_key_compare(), depsgraph_key_hash(), and scene.
Referenced by BKE_scene_ensure_depsgraph_hash().
| void BKE_scene_base_flag_to_objects | ( | struct ViewLayer * | view_layer | ) |
Definition at line 2946 of file scene.c.
References BKE_scene_object_base_flag_sync_from_base(), ListBase::first, Base::next, and ViewLayer::object_bases.
Referenced by set_trans_object_base_flags().
| int BKE_scene_base_iter_next | ( | struct Depsgraph * | depsgraph, |
| struct SceneBaseIter * | iter, | ||
| struct Scene ** | scene, | ||
| int | val, | ||
| struct Base ** | base, | ||
| struct Object ** | ob | ||
| ) |
Definition at line 2160 of file scene.c.
References BKE_view_layer_context_active_PLACEHOLDER(), BKE_view_layer_default_render(), copy_m4_m4(), DEG_get_evaluated_view_layer(), depsgraph, SceneBaseIter::dupli_refob, SceneBaseIter::duplilist, SceneBaseIter::dupob, F_DUPLI, F_SCENE, F_START, ListBase::first, free_object_duplilist(), DupliObject::mat, DupliObject::next, Base::next, NULL, DupliObject::ob, OB_DUPLI, OB_FROMDUPLI, ViewLayer::object_bases, object_duplilist(), Object::obmat, SceneBaseIter::omat, SceneBaseIter::phase, scene, and Node::set().
Referenced by BKE_mball_properties_copy(), and init_meta().
| bool BKE_scene_camera_switch_update | ( | struct Scene * | scene | ) |
Definition at line 2349 of file scene.c.
References Scene::camera, DEG_id_tag_update(), Scene::id, ID_RECALC_COPY_ON_WRITE, and scene.
Referenced by do_render_compositor_scene(), do_render_full_pipeline(), ed_marker_move_apply(), MOD_lineart_compute_feature_lines(), RE_engine_frame_set(), screen_opengl_render_anim_step(), screen_render_single_layer_set(), and seq_render_scene_strip().
Referenced by scene_delete_poll().
| bool BKE_scene_check_color_management_enabled | ( | const struct Scene * | scene | ) |
Referenced by BKE_texture_get_value_ex(), do_texture_effector(), dynamicPaint_setInitialColor(), and project_state_init().
| bool BKE_scene_check_rigidbody_active | ( | const struct Scene * | scene | ) |
Referenced by BKE_rigidbody_eval_simulation(), and BKE_rigidbody_rebuild_sim().
Referenced by Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer().
| void BKE_scene_cursor_from_mat4 | ( | struct View3DCursor * | cursor, |
| const float | mat[4][4], | ||
| bool | use_compat | ||
| ) |
Definition at line 3764 of file scene.c.
References BKE_scene_cursor_mat3_to_rot(), copy_m3_m4(), copy_v3_v3(), and View3DCursor::location.
| void BKE_scene_cursor_mat3_to_rot | ( | struct View3DCursor * | cursor, |
| const float | mat[3][3], | ||
| bool | use_compat | ||
| ) |
Definition at line 3688 of file scene.c.
References BLI_ASSERT_UNIT_M3, copy_v4_v4(), mat3_normalized_to_quat(), mat3_to_axis_angle(), mat3_to_compatible_eulO(), mat3_to_eulO(), quat_to_compatible_quat(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_euler, View3DCursor::rotation_mode, and View3DCursor::rotation_quaternion.
Referenced by BKE_scene_cursor_from_mat4(), snap_curs_to_center_exec(), and view3d_all_exec().
| void BKE_scene_cursor_quat_to_rot | ( | struct View3DCursor * | cursor, |
| const float | quat[4], | ||
| bool | use_compat | ||
| ) |
Definition at line 3723 of file scene.c.
References BLI_ASSERT_UNIT_QUAT, copy_qt_qt(), copy_v4_v4(), quat_to_axis_angle(), quat_to_compatible_eulO(), quat_to_compatible_quat(), quat_to_eulO(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_euler, View3DCursor::rotation_mode, and View3DCursor::rotation_quaternion.
Referenced by ED_view3d_cursor3d_update().
| void BKE_scene_cursor_rot_to_mat3 | ( | const struct View3DCursor * | cursor, |
| float | mat[3][3] | ||
| ) |
| void BKE_scene_cursor_rot_to_quat | ( | const struct View3DCursor * | cursor, |
| float | quat[4] | ||
| ) |
Referenced by DRW_draw_cursor(), and ED_view3d_cursor3d_update().
| void BKE_scene_cursor_to_mat4 | ( | const struct View3DCursor * | cursor, |
| float | mat[4][4] | ||
| ) |
Referenced by calc_initial_placement_point_from_view().
| void BKE_scene_disable_color_management | ( | struct Scene * | scene | ) |
Definition at line 2972 of file scene.c.
References BLI_strncpy(), ColorManagedDisplaySettings::display_device, Scene::display_settings, IMB_colormanagement_display_get_none_name(), IMB_colormanagement_view_get_default_name(), scene, view, Scene::view_settings, and ColorManagedViewSettings::view_transform.
Referenced by blo_do_versions_260().
| struct Scene* BKE_scene_duplicate | ( | struct Main * | bmain, |
| struct Scene * | sce, | ||
| eSceneCopyMethod | type | ||
| ) |
Definition at line 1908 of file scene.c.
References Scene::audio, RenderData::avicodecdata, RenderData::bake, BKE_animdata_duplicate_id_action(), BKE_collection_duplicate(), BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), BKE_curvemapping_copy_data(), BKE_curvemapping_free_data(), BKE_id_copy(), BKE_id_copy_for_duplicate(), BKE_libblock_relink_to_newid(), BKE_main_collection_sync(), BKE_main_id_clear_newpoins(), BKE_main_id_tag_all(), BKE_scene_add(), BKE_scene_copy_data_eevee(), BKE_sound_destroy_scene(), BKE_sound_reset_scene_runtime(), BKE_toolsettings_copy(), BKE_toolsettings_free(), BLI_assert, Scene::display, ImageFormatData::display_settings, Scene::display_settings, RenderData::ffcodecdata, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Scene::gpd, Scene::id, ID_IS_LINKED, id_us_ensure_real(), id_us_min(), IDP_CopyProperty(), BakeData::im_format, RenderData::im_format, LIB_ID_DUPLICATE_IS_SUBPROCESS, LIB_TAG_NEW, LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_dupallocN, ID::name, NULL, Scene::physics_settings, Scene::preview, ID::properties, FFMpegCodecData::properties, Scene::r, remove_sequencer_fcurves(), SCE_COPY_EMPTY, SCE_COPY_FULL, SEQ_editing_free(), Scene::sequencer_colorspace_settings, ID::tag, Scene::toolsettings, type, Scene::unit, USER_DUP_LINKED_ID, USER_DUP_OBJECT, Scene::view_layers, ImageFormatData::view_settings, Scene::view_settings, RenderData::views, and Scene::world.
Referenced by ED_scene_add().
| struct Depsgraph* BKE_scene_ensure_depsgraph | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct ViewLayer * | view_layer | ||
| ) |
Definition at line 3526 of file scene.c.
References NULL, scene, and scene_ensure_depsgraph_p().
Referenced by BKE_scene_view_layer_graph_evaluated_ensure(), count_proportional_objects(), CTX_data_depsgraph_pointer(), ED_render_engine_changed(), ED_scene_change_update(), format_stats(), pygpu_offscreen_draw_view3d(), seq_render_scene_strip(), set_trans_object_base_flags(), update_physics_cache(), wm_draw_update_test_window(), and wm_event_do_depsgraph().
| void BKE_scene_ensure_depsgraph_hash | ( | struct Scene * | scene | ) |
Definition at line 3415 of file scene.c.
References BKE_scene_allocate_depsgraph_hash(), Scene::depsgraph_hash, NULL, and scene.
Referenced by scene_get_depsgraph_p().
Definition at line 3791 of file scene.c.
References Scene::audio, BKE_sound_add_scene_sound_defaults(), BKE_sound_ensure_scene(), BKE_sound_scene_add_scene_sound_defaults(), BKE_sound_set_scene_sound_pan(), BKE_sound_set_scene_sound_pitch(), BKE_sound_set_scene_sound_volume(), BKE_sound_set_scene_volume(), BKE_sound_update_scene_sound(), DEG_debug_print_eval(), depsgraph, Scene::ed, Sequence::flag, Scene::id, bSound::id, ID_RECALC_AUDIO, ID::name, NULL, Sequence::pan, Sequence::pitch, ID::recalc, scene, Sequence::scene, scene_sequencer_disable_sound_strips(), Sequence::scene_sound, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_AUDIO_PAN_ANIMATED, SEQ_AUDIO_PITCH_ANIMATED, SEQ_AUDIO_VOLUME_ANIMATED, SEQ_edit_update_muting(), SEQ_SCENE_STRIPS, SEQ_sound_update_bounds_all(), SEQ_TYPE_SCENE, Sequence::sound, Sequence::type, AudioData::volume, and Sequence::volume.
| struct Scene* BKE_scene_find_from_collection | ( | const struct Main * | bmain, |
| const struct Collection * | collection | ||
| ) |
Referenced by BKE_collection_move().
| const char* BKE_scene_find_last_marker_name | ( | const struct Scene * | scene, |
| int | frame | ||
| ) |
Referenced by stampdata().
| const char* BKE_scene_find_marker_name | ( | const struct Scene * | scene, |
| int | frame | ||
| ) |
Referenced by draw_selected_name().
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(), modifyMesh(), ObjectToTransData(), particle_system_minmax(), pointdensity_cache_psys(), RE_RenderAnim(), and special_aftertrans_update__object().
Sets the frame int/float components.
Definition at line 2475 of file scene.c.
References RenderData::cfra, Scene::r, scene, and RenderData::subframe.
Referenced by bc_update_scene(), deg_flush_updates_and_refresh(), lineart_gpencil_bake_startjob(), RE_engine_frame_set(), and seq_render_scene_strip().
Definition at line 2407 of file scene.c.
References FPS, mod_i(), and round_db_to_int().
Referenced by change_frame_apply().
Referenced by BKE_ptcache_id_time(), and object_add_or_copy_particle_system().
| void BKE_scene_free_depsgraph_hash | ( | struct Scene * | scene | ) |
Definition at line 3422 of file scene.c.
References BLI_ghash_free(), Scene::depsgraph_hash, depsgraph_key_free(), depsgraph_key_value_free(), NULL, and scene.
Referenced by scene_free_data(), and wm_block_autorun_warning_enable_scripts().
Definition at line 3431 of file scene.c.
References BLI_ghash_remove(), Scene::depsgraph_hash, depsgraph_key_free(), depsgraph_key_value_free(), NULL, and scene.
Referenced by ED_scene_view_layer_delete().
Definition at line 2718 of file scene.c.
References depsgraph, and scene_graph_update_tagged().
Referenced by createTransData(), CTX_data_ensure_evaluated_depsgraph(), ED_object_data_xform_container_update_all(), ED_object_particle_edit_mode_enter_ex(), ED_object_xform_skip_child_container_update_all(), object_clear_transform_generic_exec(), sculpt_init_session(), sculpt_undosys_step_decode(), snap_sel_to_grid_exec(), snap_selected_to_location(), transform_convert_mesh_crazyspace_detect(), and wm_xr_session_scene_and_evaluated_depsgraph_get().
| void BKE_scene_graph_update_for_newframe | ( | struct Depsgraph * | depsgraph | ) |
Definition at line 2794 of file scene.c.
References BKE_scene_graph_update_for_newframe_ex(), and depsgraph.
Referenced by bakeModifier(), BKE_ptcache_bake(), ED_update_for_newframe(), blender::io::alembic::export_startjob(), blender::io::usd::export_startjob(), FRS_do_stroke_rendering(), gpencil_strokes_reproject_exec(), lineart_gpencil_bake_startjob(), motionpaths_calc_update_scene(), redraw_timer_step(), screen_opengl_render_anim_step(), screen_opengl_render_end(), seq_render_scene_strip(), and sound_bake_animation_exec().
| void BKE_scene_graph_update_for_newframe_ex | ( | struct Depsgraph * | depsgraph, |
| const bool | clear_recalc | ||
| ) |
Definition at line 2724 of file scene.c.
References backup, BKE_callback_exec_id(), BKE_callback_exec_id_depsgraph(), BKE_CB_EVT_FRAME_CHANGE_POST, BKE_CB_EVT_FRAME_CHANGE_PRE, BKE_image_editors_update_frame(), BKE_scene_frame_get(), BKE_scene_update_sound(), BKE_sound_set_cfra(), RenderData::cfra, DEG_editors_update(), DEG_evaluate_on_framechange(), DEG_evaluate_on_refresh(), DEG_get_bmain(), DEG_get_input_scene(), DEG_graph_relations_update(), DEG_ids_clear_recalc(), DEG_ids_restore_recalc(), DEG_is_fully_evaluated(), depsgraph, Scene::id, Scene::r, and scene.
Referenced by BKE_scene_graph_update_for_newframe(), engine_depsgraph_init(), and RE_engine_frame_set().
Definition at line 2713 of file scene.c.
References depsgraph, and scene_graph_update_tagged().
Referenced by animviz_calc_motionpaths(), bake(), BKE_scene_view_layer_graph_evaluated_ensure(), BlendfileLoadingBaseTest::depsgraph_create(), blender::io::AbstractHierarchyIteratorInvisibleTest::depsgraph_create(), duplibase_for_convert(), blender::io::alembic::export_startjob(), blender::io::usd::export_startjob(), object_convert_exec(), object_preview_scene_create(), SCULPT_dynamic_topology_disable_ex(), SCULPT_dynamic_topology_enable_ex(), vertex_parent_set_exec(), and wm_event_do_depsgraph().
| void BKE_scene_groups_relink | ( | struct Scene * | sce | ) |
Definition at line 2056 of file scene.c.
References BKE_rigidbody_world_groups_relink(), and Scene::rigidbody_world.
| void BKE_scene_multiview_filepath_get | ( | struct SceneRenderView * | srv, |
| const char * | filepath, | ||
| char * | r_filepath | ||
| ) |
Definition at line 3243 of file scene.c.
References BLI_path_suffix(), BLI_strncpy(), FILE_MAX, and SceneRenderView::suffix.
Referenced by RE_RenderAnim().
| bool BKE_scene_multiview_is_render_view_active | ( | const struct RenderData * | rd, |
| const struct SceneRenderView * | srv | ||
| ) |
Referenced by BKE_image_ensure_viewer_views(), check_valid_camera_multiview(), compo_startjob(), blender::compositor::free_exr_channels(), blender::compositor::OutputOpenExrSingleLayerMultiViewOperation::get_handle(), blender::compositor::OutputOpenExrMultiLayerMultiViewOperation::get_handle(), 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 struct RenderData * | rd, |
| const char * | viewname | ||
| ) |
| bool BKE_scene_multiview_is_render_view_last | ( | const struct RenderData * | rd, |
| const char * | viewname | ||
| ) |
| bool BKE_scene_multiview_is_stereo3d | ( | const struct RenderData * | rd | ) |
Referenced by BKE_image_ensure_viewer_views(), screen_opengl_views_setup(), and view3d_stereo3d_active().
| int BKE_scene_multiview_num_videos_get | ( | const struct RenderData * | rd | ) |
Referenced by RE_RenderAnim(), and screen_opengl_render_anim_init().
| int BKE_scene_multiview_num_views_get | ( | const struct RenderData * | rd | ) |
| struct SceneRenderView* BKE_scene_multiview_render_view_findindex | ( | const struct RenderData * | rd, |
| const int | view_id | ||
| ) |
| const char* BKE_scene_multiview_render_view_name_get | ( | const struct RenderData * | rd, |
| const int | view_id | ||
| ) |
Referenced by seq_render_scene_strip().
| void BKE_scene_multiview_videos_dimensions_get | ( | const struct RenderData * | rd, |
| const size_t | width, | ||
| const size_t | height, | ||
| size_t * | r_width, | ||
| size_t * | r_height | ||
| ) |
Referenced by get_videos_dimensions(), and screen_opengl_render_anim_init().
| void BKE_scene_multiview_view_filepath_get | ( | const struct RenderData * | rd, |
| const char * | filepath, | ||
| const char * | view, | ||
| char * | r_filepath | ||
| ) |
Referenced by image_save_single(), and RE_WriteRenderViewsImage().
| int BKE_scene_multiview_view_id_get | ( | const struct RenderData * | rd, |
| const char * | viewname | ||
| ) |
| const char* BKE_scene_multiview_view_id_suffix_get | ( | const struct RenderData * | rd, |
| const int | view_id | ||
| ) |
| void BKE_scene_multiview_view_prefix_get | ( | struct Scene * | scene, |
| const char * | name, | ||
| char * | r_prefix, | ||
| const char ** | r_ext | ||
| ) |
Definition at line 3301 of file scene.c.
References BKE_scene_multiview_is_render_view_active(), BLI_assert, BLI_str_rpartition(), BLI_strncpy(), ListBase::first, len, SceneRenderView::next, NULL, Scene::r, scene, STREQLEN, SceneRenderView::suffix, UNUSED_VARS_NDEBUG, and RenderData::views.
Referenced by image_update_views_format(), SEQ_add_movie_strip(), SEQ_add_reload_new_file(), seq_image_strip_is_multiview_render(), seq_open_anim_file(), seq_proxy_multiview_context_invalid(), and seq_render_image_strip_view().
| const char* BKE_scene_multiview_view_suffix_get | ( | const struct RenderData * | rd, |
| const char * | viewname | ||
| ) |
| int BKE_scene_num_threads | ( | const struct Scene * | scene | ) |
| void BKE_scene_object_base_flag_sync_from_base | ( | Base * | base | ) |
Synchronize object base flags
This is usually handled by the depsgraph. However, in rare occasions we need to use the latest object flags before depsgraph is fully updated.
It should (ideally) only run for copy-on-written objects since this is runtime data generated per-viewlayer.
Definition at line 2966 of file scene.c.
References Object::base_flag, Base::flag, and Base::object.
Referenced by add_collections_to_scene(), BKE_scene_base_flag_to_objects(), BKE_scene_set_background(), ED_object_base_select(), make_object_duplilist_real(), object_base_instance_init(), and object_hide_view_clear_exec().
Check if there is any instance of the object in the scene
Definition at line 2092 of file scene.c.
References BLI_findptr(), LISTBASE_FOREACH, scene, and Scene::view_layers.
Referenced by object_in_any_scene().
Referenced by camera_multiview_advanced(), and gpencil_layer_duplicate_object_exec().
| int BKE_scene_orientation_get_index | ( | struct Scene * | scene, |
| int | slot_index | ||
| ) |
Definition at line 2531 of file scene.c.
References BKE_scene_orientation_slot_get(), BKE_scene_orientation_slot_get_index(), and scene.
Referenced by ED_transform_calc_gizmo_stats(), ED_transform_calc_orientation_from_type(), and gizmo_mesh_extrude_refresh().
| int BKE_scene_orientation_get_index_from_flag | ( | struct Scene * | scene, |
| int | flag | ||
| ) |
Definition at line 2537 of file scene.c.
References BKE_scene_orientation_slot_get_from_flag(), BKE_scene_orientation_slot_get_index(), UnifiedPaintSettings::flag, and scene.
Referenced by WIDGETGROUP_gizmo_refresh(), and WIDGETGROUP_xform_cage_refresh().
| struct TransformOrientationSlot* BKE_scene_orientation_slot_get | ( | struct Scene * | scene, |
| int | slot_index | ||
| ) |
Definition at line 2486 of file scene.c.
References TransformOrientationSlot::flag, Scene::orientation_slots, SCE_ORIENT_DEFAULT, scene, and SELECT.
Referenced by BKE_scene_orientation_get_index(), BKE_scene_orientation_slot_get_from_flag(), gizmo_mesh_spin_init_draw_prepare(), WIDGETGROUP_xform_cage_draw_prepare(), and WIDGETGROUP_xform_shear_draw_prepare().
| struct TransformOrientationSlot* BKE_scene_orientation_slot_get_from_flag | ( | struct Scene * | scene, |
| int | flag | ||
| ) |
Definition at line 2494 of file scene.c.
References BKE_scene_orientation_slot_get(), BLI_assert, UnifiedPaintSettings::flag, SCE_ORIENT_DEFAULT, SCE_ORIENT_ROTATE, SCE_ORIENT_SCALE, SCE_ORIENT_TRANSLATE, scene, V3D_GIZMO_SHOW_OBJECT_ROTATE, V3D_GIZMO_SHOW_OBJECT_SCALE, and V3D_GIZMO_SHOW_OBJECT_TRANSLATE.
Referenced by BKE_scene_orientation_get_index_from_flag(), gizmo_xform_message_subscribe(), WIDGETGROUP_gizmo_draw_prepare(), WIDGETGROUP_gizmo_invoke_prepare(), and WIDGETGROUP_xform_shear_refresh().
| int BKE_scene_orientation_slot_get_index | ( | const struct TransformOrientationSlot * | orient_slot | ) |
Referenced by 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 2517 of file scene.c.
References TransformOrientationSlot::index_custom, TransformOrientationSlot::type, and V3D_ORIENT_CUSTOM.
Referenced by select_orientation_exec().
| bool BKE_scene_remove_render_view | ( | struct Scene * | scene, |
| struct SceneRenderView * | srv | ||
| ) |
Definition at line 2834 of file scene.c.
References RenderData::actview, BLI_findindex(), BLI_remlink(), ListBase::first, ListBase::last, MEM_freeN, Scene::r, scene, and RenderData::views.
Referenced by render_view_remove_exec().
| void BKE_scene_remove_rigidbody_object | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| const bool | free_us | ||
| ) |
Definition at line 2417 of file scene.c.
References BKE_rigidbody_remove_constraint(), BKE_rigidbody_remove_object(), Object::rigidbody_constraint, Object::rigidbody_object, and scene.
Referenced by scene_collections_object_remove().
Sets the active scene, mainly used when running in background mode (--scene command line argument). This is also called to set the scene directly, bypassing windowing code. Otherwise WM_window_set_active_scene is used when changing scenes by the user.
Definition at line 2120 of file scene.c.
References BKE_scene_object_base_flag_sync_from_base(), BKE_scene_validate_setscene(), ListBase::first, Object::flag, Object::id, LISTBASE_FOREACH, ID::next, Main::objects, scene, SELECT, and Scene::view_layers.
Referenced by BKE_scene_set_name(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), ED_scene_change_update(), and setup_app_data().
Definition at line 2145 of file scene.c.
References BKE_libblock_find_name(), BKE_main_blendfile_path(), BKE_scene_set_background(), ID_SCE, and NULL.
Referenced by arg_handle_scene_set().
| struct TransformOrientation* BKE_scene_transform_orientation_find | ( | const struct Scene * | scene, |
| const int | index | ||
| ) |
| int BKE_scene_transform_orientation_get_index | ( | const struct Scene * | scene, |
| const struct TransformOrientation * | orientation | ||
| ) |
Referenced by BIF_selectTransformOrientation().
| void BKE_scene_transform_orientation_remove | ( | struct Scene * | scene, |
| struct TransformOrientation * | orientation | ||
| ) |
Definition at line 3617 of file scene.c.
References ARRAY_SIZE, BKE_scene_transform_orientation_get_index(), BLI_assert, BLI_freelinkN(), TransformOrientationSlot::index_custom, Scene::orientation_slots, scene, Scene::transform_spaces, TransformOrientationSlot::type, V3D_ORIENT_CUSTOM, and V3D_ORIENT_GLOBAL.
Referenced by BIF_removeTransformOrientation().
Definition at line 3549 of file scene.c.
References BLI_ghash_insert(), BLI_ghash_lookup_p(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p(), depsgraph, Scene::depsgraph_hash, ListBase::first, Scene::id, ID::next, NULL, scene, scene_undo_depsgraph_gen_key(), Main::scenes, DepsgraphKey::view_layer, and Scene::view_layers.
Referenced by memfile_undosys_step_decode().
Definition at line 3579 of file scene.c.
References BLI_assert, BLI_ghash_free(), BLI_ghash_lookup_p(), DEG_graph_replace_owners(), DEG_graph_tag_relations_update(), depsgraph, depsgraph_key_value_free(), FILE_MAX, ListBase::first, Scene::id, MAX_ID_NAME, MAX_NAME, MEM_freeN, ID::next, NULL, scene, scene_get_depsgraph_p(), scene_undo_depsgraph_gen_key(), Main::scenes, and Scene::view_layers.
Referenced by memfile_undosys_step_decode().
| double BKE_scene_unit_scale | ( | const struct UnitSettings * | unit, |
| const int | unit_type, | ||
| double | value | ||
| ) |
Referenced by outputNumInput(), ui_get_but_scale_unit(), and user_string_to_number().
Definition at line 2604 of file scene.c.
References Scene::audio, AUDIO_MUTE, BKE_sound_ensure_scene(), BKE_sound_mute_scene(), BKE_sound_seek_scene(), BKE_sound_set_scene_volume(), BKE_sound_update_fps(), BKE_sound_update_scene(), BKE_sound_update_scene_listener(), DEG_get_evaluated_scene(), depsgraph, AudioData::flag, Scene::id, ID_RECALC_AUDIO_FPS, ID_RECALC_AUDIO_LISTENER, ID_RECALC_AUDIO_MUTE, ID_RECALC_AUDIO_SEEK, ID_RECALC_AUDIO_VOLUME, ID::recalc, scene, and AudioData::volume.
Referenced by BKE_scene_graph_update_for_newframe_ex(), render_update_depsgraph(), and scene_graph_update_tagged().
| bool BKE_scene_use_shading_nodes_custom | ( | struct Scene * | scene | ) |
Definition at line 2919 of file scene.c.
References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SHADING_NODES_CUSTOM, scene, and type.
Referenced by shader_tree_poll().
| bool BKE_scene_use_spherical_stereo | ( | struct Scene * | scene | ) |
Definition at line 2925 of file scene.c.
References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SPHERICAL_STEREO, scene, and type.
| bool BKE_scene_uses_blender_eevee | ( | const struct Scene * | scene | ) |
Referenced by uiTemplatePreview(), and view3d_lightcache_update().
| bool BKE_scene_uses_blender_workbench | ( | const struct Scene * | scene | ) |
| bool BKE_scene_uses_cycles | ( | const struct Scene * | scene | ) |
Referenced by advanced_panel_draw(), and panel_draw().
Definition at line 2433 of file scene.c.
References Freestyle::a, BLI_listbase_count(), NULL, Main::scenes, and Scene::set.
Referenced by BKE_scene_set_background().
| void BKE_scene_view_layer_graph_evaluated_ensure | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer | ||
| ) |
Ensures given scene/view_layer pair has a valid, up-to-date depsgraph.
Definition at line 2805 of file scene.c.
References BKE_scene_ensure_depsgraph(), BKE_scene_graph_update_tagged(), DEG_make_active(), depsgraph, and scene.
| struct ToolSettings* BKE_toolsettings_copy | ( | struct ToolSettings * | toolsettings, |
| const int | flag | ||
| ) |
Definition at line 1781 of file scene.c.
References BKE_curvemapping_copy(), BKE_curveprofile_copy(), BKE_paint_copy(), GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, UnifiedPaintSettings::flag, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, MEM_dupallocN, NULL, ParticleEditSettings::object, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ParticleEditSettings::paintcursor, ToolSettings::particle, ParticleEditSettings::scene, ToolSettings::sculpt, SEQ_tool_settings_copy(), ToolSettings::sequencer_tool_settings, ToolSettings::uvsculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_scene_duplicate(), and scene_copy_data().
| void BKE_toolsettings_free | ( | struct ToolSettings * | toolsettings | ) |
Definition at line 1837 of file scene.c.
References BKE_curvemapping_free(), BKE_curveprofile_free(), BKE_paint_free(), GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, MEM_freeN, NULL, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::sculpt, SEQ_tool_settings_free(), ToolSettings::sequencer_tool_settings, ToolSettings::uvsculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_scene_duplicate(), and scene_free_data().
| void free_avicodecdata | ( | struct AviCodecData * | acd | ) |
Definition at line 1746 of file scene.c.
References AviCodecData::cbFormat, AviCodecData::cbParms, AviCodecData::lpFormat, AviCodecData::lpParms, MEM_freeN, and NULL.
Referenced by scene_free_data().
| int get_render_child_particle_number | ( | const struct RenderData * | r, |
| int | num, | ||
| bool | for_render | ||
| ) |
Referenced by psys_get_child_number().
| int get_render_subsurf_level | ( | const struct RenderData * | r, |
| int | lvl, | ||
| bool | for_render | ||
| ) |
Referenced by isDisabled(), multires_get_level(), subdiv_levels_for_modifier_get(), and subsurf_make_derived_from_derived().