Blender
V3.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) |
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 | |||
) |
Use as the contents of a 'for' loop: for (SETLOOPER(...)) { ... }
.
Definition at line 36 of file BKE_scene.h.
#define SETLOOPER_SET_ONLY | ( | _sce_basis, | |
_sce_iter, | |||
_base | |||
) |
Definition at line 48 of file BKE_scene.h.
#define SETLOOPER_VIEW_LAYER | ( | _sce_basis, | |
_view_layer, | |||
_sce_iter, | |||
_base | |||
) |
Definition at line 43 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 28 of file BKE_scene.h.
struct 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 struct RenderData * | r | ) |
int BKE_render_preview_pixel_size | ( | const struct 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().
struct 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().
Referenced by scene_delete_poll().
Referenced by BKE_texture_get_value_ex(), do_texture_effector(), dynamicPaint_setInitialColor(), and project_state_init().
Referenced by BKE_rigidbody_eval_simulation(), and BKE_rigidbody_rebuild_sim().
Referenced by Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer().
Return fractional frame number taking into account sub-frames and time remapping. This the time value used by animation, modifiers and physics evaluation.
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(), 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_cursor_from_mat4 | ( | struct 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 | ( | struct 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 | ( | struct 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 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().
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().
struct Scene* BKE_scene_duplicate | ( | struct Main * | bmain, |
struct 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().
struct 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().
struct Scene* BKE_scene_find_from_collection | ( | const struct Main * | bmain, |
const struct Collection * | collection | ||
) |
const char* BKE_scene_find_last_marker_name | ( | const struct Scene * | scene, |
int | frame | ||
) |
Return the current marker for this frame, we can have more than 1 marker per frame, this just returns the first (unfortunately).
Referenced by stampdata().
const char* BKE_scene_find_marker_name | ( | const struct Scene * | scene, |
int | frame | ||
) |
Referenced by draw_selected_name().
Get current fractional frame based on frame and sub-frame.
Referenced by BKE_constraint_apply_for_object(), BKE_constraint_apply_for_pose(), DEG_evaluate_on_refresh(), engine_depsgraph_init(), and render_update_depsgraph().
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().
Convert integer frame number to fractional frame number taking into account sub-frames and time remapping.
Referenced by BKE_ptcache_id_time(), DEG_evaluate_on_framechange(), and object_add_or_copy_particle_system().
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().
struct Depsgraph* BKE_scene_get_depsgraph | ( | const struct Scene * | scene, |
const struct ViewLayer * | 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().
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.
void BKE_scene_multiview_filepath_get | ( | const struct SceneRenderView * | srv, |
const char * | filepath, | ||
char * | r_filepath | ||
) |
Referenced by RE_RenderAnim().
bool BKE_scene_multiview_is_render_view_active | ( | const struct RenderData * | rd, |
const struct SceneRenderView * | srv | ||
) |
Return whether to render this SceneRenderView.
Referenced by BKE_image_ensure_viewer_views(), check_valid_camera_multiview(), blender::ed::space_node::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 | ||
) |
viewname
is the first or if the name is NULL or not found. Referenced by blender::compositor::OutputOpenExrSingleLayerMultiViewOperation::get_handle(), blender::compositor::OutputOpenExrMultiLayerMultiViewOperation::get_handle(), and blender::compositor::OutputStereoOperation::get_handle().
bool BKE_scene_multiview_is_render_view_last | ( | const struct RenderData * | rd, |
const char * | viewname | ||
) |
viewname
is the last or if the name is NULL or not found. Referenced by blender::compositor::OutputOpenExrSingleLayerMultiViewOperation::deinit_execution(), blender::compositor::OutputOpenExrMultiLayerMultiViewOperation::deinit_execution(), and blender::compositor::OutputStereoOperation::deinit_execution().
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, |
int | view_id | ||
) |
const char* BKE_scene_multiview_render_view_name_get | ( | const struct RenderData * | rd, |
int | view_id | ||
) |
Referenced by seq_render_scene_strip().
void BKE_scene_multiview_videos_dimensions_get | ( | const struct RenderData * | rd, |
size_t | width, | ||
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 | ||
) |
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.
Referenced by BKE_image_render_write(), and image_save_single().
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, |
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 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 struct RenderData * | rd, |
const char * | viewname | ||
) |
int BKE_scene_num_threads | ( | const struct Scene * | 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.
Referenced by camera_multiview_advanced().
int BKE_scene_orientation_get_index | ( | struct 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 | ( | struct 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().
struct TransformOrientationSlot* BKE_scene_orientation_slot_get | ( | struct 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().
struct TransformOrientationSlot* BKE_scene_orientation_slot_get_from_flag | ( | struct 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 struct TransformOrientationSlot * | orient_slot | ) |
Referenced by WIDGETGROUP_gizmo_invoke_prepare(), and WIDGETGROUP_xform_shear_refresh().
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 | ( | struct Scene * | scene, |
struct 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, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
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().
struct TransformOrientation* BKE_scene_transform_orientation_find | ( | const struct Scene * | scene, |
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 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 struct 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
.
Referenced by outputNumInput(), ui_get_but_scale_unit(), and user_string_to_number().
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 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.
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.
struct 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 | ( | struct 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().
void free_avicodecdata | ( | struct 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 struct RenderData * | r, |
int | child_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().