Blender  V3.3
Classes | Macros | Enumerations | Functions | Variables
scene.cc File Reference
#include <cstddef>
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_collection_types.h"
#include "DNA_curveprofile_types.h"
#include "DNA_defaults.h"
#include "DNA_gpencil_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_mask_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_sequence_types.h"
#include "DNA_sound_types.h"
#include "DNA_space_types.h"
#include "DNA_text_types.h"
#include "DNA_vfont_types.h"
#include "DNA_view3d_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_workspace_types.h"
#include "DNA_world_types.h"
#include "BKE_callbacks.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_string_utils.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLO_readfile.h"
#include "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_bpath.h"
#include "BKE_cachefile.h"
#include "BKE_collection.h"
#include "BKE_colortools.h"
#include "BKE_curveprofile.h"
#include "BKE_duplilist.h"
#include "BKE_editmesh.h"
#include "BKE_effect.h"
#include "BKE_fcurve.h"
#include "BKE_freestyle.h"
#include "BKE_gpencil.h"
#include "BKE_icons.h"
#include "BKE_idprop.h"
#include "BKE_idtype.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_lib_remap.h"
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_mask.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pointcache.h"
#include "BKE_rigidbody.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_sound.h"
#include "BKE_unit.h"
#include "BKE_workspace.h"
#include "BKE_world.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_debug.h"
#include "DEG_depsgraph_query.h"
#include "RE_engine.h"
#include "RNA_access.h"
#include "SEQ_edit.h"
#include "SEQ_iterator.h"
#include "SEQ_sequencer.h"
#include "BLO_read_write.h"
#include "engines/eevee/eevee_lightcache.h"
#include "PIL_time.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "bmesh.h"

Go to the source code of this file.

Classes

struct  DepsgraphKey
 

Macros

#define DNA_DEPRECATED_ALLOW
 
#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER(__data, __id, __do_undo_restore, __action, __reader, __id_old, __cb_flag)
 
#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_FUNCTION_CALL(__data, __do_undo_restore, __func_call)
 
#define FOREACHID_PROCESS_IDSUPER(_data, _id_super, _cb_flag)
 

Enumerations

enum  eSceneForeachUndoPreserveProcess { SCENE_FOREACH_UNDO_RESTORE , SCENE_FOREACH_UNDO_NO_RESTORE }
 
enum  eCyclesFeatureSet { CYCLES_FEATURES_SUPPORTED = 0 , CYCLES_FEATURES_EXPERIMENTAL = 1 }
 

Functions

static void scene_init_data (ID *id)
 
static void scene_copy_markers (Scene *scene_dst, const Scene *scene_src, const int flag)
 
static void scene_copy_data (Main *bmain, ID *id_dst, const ID *id_src, const int flag)
 
static void scene_free_markers (Scene *scene, bool do_id_user)
 
static void scene_free_data (ID *id)
 
static void scene_foreach_rigidbodyworldSceneLooper (struct RigidBodyWorld *UNUSED(rbw), ID **id_pointer, void *user_data, int cb_flag)
 
static void scene_foreach_toolsettings_id_pointer_process (ID **id_p, const eSceneForeachUndoPreserveProcess action, BlendLibReader *reader, ID **id_old_p, const uint cb_flag)
 
static void scene_foreach_paint (LibraryForeachIDData *data, Paint *paint, const bool do_undo_restore, BlendLibReader *reader, Paint *paint_old)
 
static void scene_foreach_toolsettings (LibraryForeachIDData *data, ToolSettings *toolsett, const bool do_undo_restore, BlendLibReader *reader, ToolSettings *toolsett_old)
 
static void scene_foreach_layer_collection (LibraryForeachIDData *data, ListBase *lb)
 
static bool seq_foreach_member_id_cb (Sequence *seq, void *user_data)
 
static void scene_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void scene_foreach_cache (ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)
 
static bool seq_foreach_path_callback (Sequence *seq, void *user_data)
 
static void scene_foreach_path (ID *id, BPathForeachPathData *bpath_data)
 
static void scene_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void direct_link_paint_helper (BlendDataReader *reader, const Scene *scene, Paint **paint)
 
static void link_recurs_seq (BlendDataReader *reader, ListBase *lb)
 
static void scene_blend_read_data (BlendDataReader *reader, ID *id)
 
static void composite_patch (bNodeTree *ntree, Scene *scene)
 
static void scene_blend_read_lib (BlendLibReader *reader, ID *id)
 
static void scene_blend_read_expand (BlendExpander *expander, ID *id)
 
static void scene_undo_preserve (BlendLibReader *reader, ID *id_new, ID *id_old)
 
static void scene_lib_override_apply_post (ID *id_dst, ID *UNUSED(id_src))
 
constexpr IDTypeInfo get_type_info ()
 
void free_avicodecdata (AviCodecData *acd)
 
static void remove_sequencer_fcurves (Scene *sce)
 
ToolSettingsBKE_toolsettings_copy (ToolSettings *toolsettings, const int flag)
 
void BKE_toolsettings_free (ToolSettings *toolsettings)
 
void BKE_scene_copy_data_eevee (Scene *sce_dst, const Scene *sce_src)
 
SceneBKE_scene_duplicate (Main *bmain, Scene *sce, eSceneCopyMethod type)
 
void BKE_scene_groups_relink (Scene *sce)
 
bool BKE_scene_can_be_removed (const Main *bmain, const Scene *scene)
 
SceneBKE_scene_add (Main *bmain, const char *name)
 
bool BKE_scene_object_find (Scene *scene, Object *ob)
 
ObjectBKE_scene_object_find_by_name (const Scene *scene, const char *name)
 
void BKE_scene_set_background (Main *bmain, Scene *scene)
 
SceneBKE_scene_set_name (Main *bmain, const char *name)
 
int BKE_scene_base_iter_next (Depsgraph *depsgraph, SceneBaseIter *iter, Scene **scene, int val, Base **base, Object **ob)
 
bool BKE_scene_has_view_layer (const Scene *scene, const ViewLayer *layer)
 
SceneBKE_scene_find_from_collection (const Main *bmain, const Collection *collection)
 
bool BKE_scene_camera_switch_update (Scene *scene)
 
const char * BKE_scene_find_marker_name (const Scene *scene, int frame)
 
const char * BKE_scene_find_last_marker_name (const Scene *scene, int frame)
 
int BKE_scene_frame_snap_by_seconds (Scene *scene, double interval_in_seconds, int frame)
 
void BKE_scene_remove_rigidbody_object (struct Main *bmain, Scene *scene, Object *ob, const bool free_us)
 
bool BKE_scene_validate_setscene (Main *bmain, Scene *sce)
 
float BKE_scene_ctime_get (const Scene *scene)
 
float BKE_scene_frame_to_ctime (const Scene *scene, const int frame)
 
float BKE_scene_frame_get (const Scene *scene)
 
void BKE_scene_frame_set (Scene *scene, float frame)
 
static bool check_rendered_viewport_visible (Main *bmain)
 
static void prepare_mesh_for_viewport_render (Main *bmain, const ViewLayer *view_layer)
 
void BKE_scene_update_sound (Depsgraph *depsgraph, Main *bmain)
 
void BKE_scene_update_tag_audio_volume (Depsgraph *UNUSED(depsgraph), Scene *scene)
 
static void scene_graph_update_tagged (Depsgraph *depsgraph, Main *bmain, bool only_if_tagged)
 
void BKE_scene_graph_update_tagged (Depsgraph *depsgraph, Main *bmain)
 
void BKE_scene_graph_evaluated_ensure (Depsgraph *depsgraph, Main *bmain)
 
void BKE_scene_graph_update_for_newframe_ex (Depsgraph *depsgraph, const bool clear_recalc)
 
void BKE_scene_graph_update_for_newframe (Depsgraph *depsgraph)
 
void BKE_scene_view_layer_graph_evaluated_ensure (Main *bmain, Scene *scene, ViewLayer *view_layer)
 
SceneRenderViewBKE_scene_add_render_view (Scene *sce, const char *name)
 
bool BKE_scene_remove_render_view (Scene *scene, SceneRenderView *srv)
 
int get_render_subsurf_level (const RenderData *r, int lvl, bool for_render)
 
int get_render_child_particle_number (const RenderData *r, int child_num, bool for_render)
 
Base_setlooper_base_step (Scene **sce_iter, ViewLayer *view_layer, Base *base)
 
bool BKE_scene_use_shading_nodes_custom (Scene *scene)
 
bool BKE_scene_use_spherical_stereo (Scene *scene)
 
bool BKE_scene_uses_blender_eevee (const Scene *scene)
 
bool BKE_scene_uses_blender_workbench (const Scene *scene)
 
bool BKE_scene_uses_cycles (const Scene *scene)
 
bool BKE_scene_uses_cycles_experimental_features (Scene *scene)
 
void BKE_scene_base_flag_to_objects (ViewLayer *view_layer)
 
void BKE_scene_object_base_flag_sync_from_base (Base *base)
 
void BKE_scene_disable_color_management (Scene *scene)
 
bool BKE_scene_check_color_management_enabled (const Scene *scene)
 
bool BKE_scene_check_rigidbody_active (const Scene *scene)
 
int BKE_render_num_threads (const RenderData *rd)
 
int BKE_scene_num_threads (const Scene *scene)
 
void BKE_render_resolution (const struct RenderData *r, const bool use_crop, int *r_width, int *r_height)
 
int BKE_render_preview_pixel_size (const RenderData *r)
 
double BKE_scene_unit_scale (const UnitSettings *unit, const int unit_type, double value)
 
int BKE_scene_multiview_num_views_get (const RenderData *rd)
 
bool BKE_scene_multiview_is_stereo3d (const RenderData *rd)
 
bool BKE_scene_multiview_is_render_view_active (const RenderData *rd, const SceneRenderView *srv)
 
bool BKE_scene_multiview_is_render_view_first (const RenderData *rd, const char *viewname)
 
bool BKE_scene_multiview_is_render_view_last (const RenderData *rd, const char *viewname)
 
SceneRenderViewBKE_scene_multiview_render_view_findindex (const RenderData *rd, const int view_id)
 
const char * BKE_scene_multiview_render_view_name_get (const RenderData *rd, const int view_id)
 
int BKE_scene_multiview_view_id_get (const RenderData *rd, const char *viewname)
 
void BKE_scene_multiview_filepath_get (const SceneRenderView *srv, const char *filepath, char *r_filepath)
 
void BKE_scene_multiview_view_filepath_get (const RenderData *rd, const char *filepath, const char *viewname, char *r_filepath)
 
const char * BKE_scene_multiview_view_suffix_get (const RenderData *rd, const char *viewname)
 
const char * BKE_scene_multiview_view_id_suffix_get (const RenderData *rd, const int view_id)
 
void BKE_scene_multiview_view_prefix_get (Scene *scene, const char *name, char *r_prefix, const char **r_ext)
 
void BKE_scene_multiview_videos_dimensions_get (const RenderData *rd, const size_t width, const size_t height, size_t *r_width, size_t *r_height)
 
int BKE_scene_multiview_num_videos_get (const RenderData *rd)
 
static unsigned int depsgraph_key_hash (const void *key_v)
 
static bool depsgraph_key_compare (const void *key_a_v, const void *key_b_v)
 
static void depsgraph_key_free (void *key_v)
 
static void depsgraph_key_value_free (void *value)
 
void BKE_scene_allocate_depsgraph_hash (Scene *scene)
 
void BKE_scene_ensure_depsgraph_hash (Scene *scene)
 
void BKE_scene_free_depsgraph_hash (Scene *scene)
 
void BKE_scene_free_view_layer_depsgraph (Scene *scene, ViewLayer *view_layer)
 
static Depsgraph ** scene_get_depsgraph_p (Scene *scene, ViewLayer *view_layer, const bool allocate_ghash_entry)
 
static Depsgraph ** scene_ensure_depsgraph_p (Main *bmain, Scene *scene, ViewLayer *view_layer)
 
DepsgraphBKE_scene_get_depsgraph (const Scene *scene, const ViewLayer *view_layer)
 
DepsgraphBKE_scene_ensure_depsgraph (Main *bmain, Scene *scene, ViewLayer *view_layer)
 
static char * scene_undo_depsgraph_gen_key (Scene *scene, ViewLayer *view_layer, char *key_full)
 
GHashBKE_scene_undo_depsgraphs_extract (Main *bmain)
 
void BKE_scene_undo_depsgraphs_restore (Main *bmain, GHash *depsgraph_extract)
 
Scene Orientation Slots
TransformOrientationSlotBKE_scene_orientation_slot_get (Scene *scene, int slot_index)
 
TransformOrientationSlotBKE_scene_orientation_slot_get_from_flag (Scene *scene, int flag)
 
void BKE_scene_orientation_slot_set_index (TransformOrientationSlot *orient_slot, int orientation)
 
int BKE_scene_orientation_slot_get_index (const TransformOrientationSlot *orient_slot)
 
int BKE_scene_orientation_get_index (Scene *scene, int slot_index)
 
int BKE_scene_orientation_get_index_from_flag (Scene *scene, int flag)
 
Scene Orientation
void BKE_scene_transform_orientation_remove (Scene *scene, TransformOrientation *orientation)
 
TransformOrientationBKE_scene_transform_orientation_find (const Scene *scene, const int index)
 
int BKE_scene_transform_orientation_get_index (const Scene *scene, const TransformOrientation *orientation)
 
Scene Cursor Rotation
void BKE_scene_cursor_rot_to_mat3 (const View3DCursor *cursor, float mat[3][3])
 
void BKE_scene_cursor_rot_to_quat (const View3DCursor *cursor, float quat[4])
 
void BKE_scene_cursor_mat3_to_rot (View3DCursor *cursor, const float mat[3][3], bool use_compat)
 
void BKE_scene_cursor_quat_to_rot (View3DCursor *cursor, const float quat[4], bool use_compat)
 
void BKE_scene_cursor_to_mat4 (const View3DCursor *cursor, float mat[4][4])
 
void BKE_scene_cursor_from_mat4 (View3DCursor *cursor, const float mat[4][4], bool use_compat)
 

Variables

IDTypeInfo IDType_ID_SCE = get_type_info()
 
const char * RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE"
 
const char * RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH"
 
const char * RE_engine_id_CYCLES = "CYCLES"
 

Macro Definition Documentation

◆ BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_FUNCTION_CALL

#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_FUNCTION_CALL (   __data,
  __do_undo_restore,
  __func_call 
)
Value:
{ \
if (__do_undo_restore) { \
__func_call; \
} \
else { \
BLI_assert((__data) != nullptr); \
BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(__data, __func_call); \
} \
} \
(void)0
SyclQueue void void size_t num_bytes void

Definition at line 508 of file scene.cc.

◆ BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER

#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS_IDSUPER (   __data,
  __id,
  __do_undo_restore,
  __action,
  __reader,
  __id_old,
  __cb_flag 
)
Value:
{ \
if (__do_undo_restore) { \
scene_foreach_toolsettings_id_pointer_process( \
(ID **)&(__id), __action, __reader, (ID **)&(__id_old), __cb_flag); \
} \
else { \
BLI_assert((__data) != nullptr); \
BKE_LIB_FOREACHID_PROCESS_IDSUPER(__data, __id, __cb_flag); \
} \
} \
(void)0
Definition: DNA_ID.h:368

Definition at line 494 of file scene.cc.

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 9 of file scene.cc.

◆ FOREACHID_PROCESS_IDSUPER

#define FOREACHID_PROCESS_IDSUPER (   _data,
  _id_super,
  _cb_flag 
)
Value:
{ \
CHECK_TYPE(&((_id_super)->id), ID *); \
BKE_lib_query_foreachid_process((_data), (ID **)&(_id_super), (_cb_flag)); \
return false; \
} \
} \
((void)0)
bool BKE_lib_query_foreachid_iter_stop(struct LibraryForeachIDData *data)
Definition: lib_query.c:63

Enumeration Type Documentation

◆ eCyclesFeatureSet

Enumerator
CYCLES_FEATURES_SUPPORTED 
CYCLES_FEATURES_EXPERIMENTAL 

Definition at line 2866 of file scene.cc.

◆ eSceneForeachUndoPreserveProcess

This code is shared by both the regular foreach_id looper, and the code trying to restore or preserve ID pointers like brushes across undo-steps.

Enumerator
SCENE_FOREACH_UNDO_RESTORE 
SCENE_FOREACH_UNDO_NO_RESTORE 

Definition at line 446 of file scene.cc.

Function Documentation

◆ _setlooper_base_step()

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.

◆ BKE_render_num_threads()

int BKE_render_num_threads ( const RenderData rd)

◆ BKE_render_preview_pixel_size()

int BKE_render_preview_pixel_size ( const RenderData r)

Definition at line 2974 of file scene.cc.

References r.

◆ BKE_render_resolution()

void BKE_render_resolution ( const struct RenderData r,
const bool  use_crop,
int *  r_width,
int *  r_height 
)

◆ BKE_scene_add()

Scene* BKE_scene_add ( Main bmain,
const char *  name 
)

◆ BKE_scene_add_render_view()

SceneRenderView* BKE_scene_add_render_view ( struct Scene sce,
const char *  name 
)

◆ BKE_scene_allocate_depsgraph_hash()

void BKE_scene_allocate_depsgraph_hash ( Scene scene)

◆ BKE_scene_base_flag_to_objects()

void BKE_scene_base_flag_to_objects ( ViewLayer view_layer)

◆ BKE_scene_base_iter_next()

int BKE_scene_base_iter_next ( struct Depsgraph depsgraph,
struct SceneBaseIter iter,
struct Scene **  scene,
int  val,
struct Base **  base,
struct Object **  ob 
)

◆ BKE_scene_camera_switch_update()

bool BKE_scene_camera_switch_update ( Scene scene)

◆ BKE_scene_can_be_removed()

bool BKE_scene_can_be_removed ( const Main bmain,
const Scene scene 
)

Definition at line 2029 of file scene.cc.

References ID_IS_LINKED, LISTBASE_FOREACH, scene, and Main::scenes.

◆ BKE_scene_check_color_management_enabled()

bool BKE_scene_check_color_management_enabled ( const Scene scene)

◆ BKE_scene_check_rigidbody_active()

bool BKE_scene_check_rigidbody_active ( const Scene scene)

◆ BKE_scene_copy_data_eevee()

void BKE_scene_copy_data_eevee ( Scene sce_dst,
const Scene sce_src 
)

◆ BKE_scene_ctime_get()

float BKE_scene_ctime_get ( const Scene scene)

Definition at line 2401 of file scene.cc.

References BKE_scene_frame_to_ctime(), RenderData::cfra, Scene::r, and scene.

◆ BKE_scene_cursor_from_mat4()

void BKE_scene_cursor_from_mat4 ( View3DCursor cursor,
const float  mat[4][4],
bool  use_compat 
)

◆ BKE_scene_cursor_mat3_to_rot()

void BKE_scene_cursor_mat3_to_rot ( View3DCursor cursor,
const float  mat[3][3],
bool  use_compat 
)

◆ BKE_scene_cursor_quat_to_rot()

void BKE_scene_cursor_quat_to_rot ( View3DCursor cursor,
const float  quat[4],
bool  use_compat 
)

◆ BKE_scene_cursor_rot_to_mat3()

void BKE_scene_cursor_rot_to_mat3 ( const View3DCursor cursor,
float  mat[3][3] 
)

◆ BKE_scene_cursor_rot_to_quat()

void BKE_scene_cursor_rot_to_quat ( const View3DCursor cursor,
float  quat[4] 
)

◆ BKE_scene_cursor_to_mat4()

void BKE_scene_cursor_to_mat4 ( const View3DCursor cursor,
float  mat[4][4] 
)

◆ BKE_scene_disable_color_management()

void BKE_scene_disable_color_management ( Scene scene)

◆ BKE_scene_duplicate()

Scene* BKE_scene_duplicate ( Main bmain,
Scene sce,
eSceneCopyMethod  type 
)

Definition at line 1864 of file scene.cc.

References Scene::audio, RenderData::avicodecdata, RenderData::bake, BKE_animdata_duplicate_id_action(), BKE_collection_duplicate(), BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_display_settings_copy(), BKE_color_managed_view_settings_copy(), BKE_curvemapping_copy_data(), BKE_curvemapping_free_data(), BKE_id_copy(), BKE_id_copy_for_duplicate(), BKE_image_format_copy(), BKE_libblock_relink_to_newid(), BKE_main_collection_sync(), BKE_main_id_newptr_and_tag_clear(), BKE_scene_add(), BKE_scene_copy_data_eevee(), BKE_sound_destroy_scene(), BKE_sound_reset_scene_runtime(), BKE_toolsettings_copy(), BKE_toolsettings_free(), BLI_assert, RigidBodyWorld::constraints, Scene::display, Scene::display_settings, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Scene::gpd, RigidBodyWorld::group, Scene::id, ID_IS_LINKED, id_us_ensure_real(), id_us_min(), IDP_CopyProperty(), BakeData::im_format, RenderData::im_format, LIB_ID_COPY_DEFAULT, LIB_ID_DUPLICATE_IS_SUBPROCESS, LIB_TAG_NEW, LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::master_collection, RenderData::mblur_shutter_curve, MEM_dupallocN, ID::name, Scene::physics_settings, Scene::preview, ID::properties, Scene::r, remove_sequencer_fcurves(), Scene::rigidbody_world, SCE_COPY_EMPTY, SCE_COPY_FULL, SEQ_editing_free(), Scene::sequencer_colorspace_settings, ID::tag, Scene::toolsettings, type, Scene::unit, USER_DUP_LINKED_ID, USER_DUP_OBJECT, Scene::view_layers, Scene::view_settings, RenderData::views, and Scene::world.

Referenced by scene_add().

◆ BKE_scene_ensure_depsgraph()

Depsgraph* BKE_scene_ensure_depsgraph ( struct Main bmain,
struct Scene scene,
struct ViewLayer view_layer 
)

◆ BKE_scene_ensure_depsgraph_hash()

void BKE_scene_ensure_depsgraph_hash ( Scene scene)

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().

◆ BKE_scene_find_from_collection()

Scene* BKE_scene_find_from_collection ( const Main bmain,
const Collection collection 
)

◆ BKE_scene_find_last_marker_name()

const char* BKE_scene_find_last_marker_name ( const Scene scene,
int  frame 
)

◆ BKE_scene_find_marker_name()

const char* BKE_scene_find_marker_name ( const Scene scene,
int  frame 
)

◆ BKE_scene_frame_get()

float BKE_scene_frame_get ( const Scene scene)

Definition at line 2415 of file scene.cc.

References RenderData::cfra, Scene::r, scene, and RenderData::subframe.

Referenced by BKE_scene_graph_update_for_newframe_ex().

◆ BKE_scene_frame_set()

void BKE_scene_frame_set ( struct Scene scene,
float  frame 
)

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().

◆ BKE_scene_frame_snap_by_seconds()

int BKE_scene_frame_snap_by_seconds ( Scene scene,
double  interval_in_seconds,
int  frame 
)

Definition at line 2354 of file scene.cc.

References FPS, mod_i(), and round_db_to_int().

Referenced by change_frame_apply().

◆ BKE_scene_frame_to_ctime()

float BKE_scene_frame_to_ctime ( const Scene scene,
const int  frame 
)

Definition at line 2406 of file scene.cc.

References RenderData::framelen, Scene::r, scene, and RenderData::subframe.

Referenced by BKE_scene_ctime_get().

◆ BKE_scene_free_depsgraph_hash()

void BKE_scene_free_depsgraph_hash ( Scene scene)

◆ BKE_scene_free_view_layer_depsgraph()

void BKE_scene_free_view_layer_depsgraph ( Scene scene,
ViewLayer view_layer 
)

◆ BKE_scene_get_depsgraph()

Depsgraph* BKE_scene_get_depsgraph ( const Scene scene,
const ViewLayer view_layer 
)

◆ BKE_scene_graph_evaluated_ensure()

void BKE_scene_graph_evaluated_ensure ( Depsgraph depsgraph,
Main bmain 
)

◆ BKE_scene_graph_update_for_newframe()

void BKE_scene_graph_update_for_newframe ( Depsgraph depsgraph)

◆ BKE_scene_graph_update_for_newframe_ex()

void BKE_scene_graph_update_for_newframe_ex ( struct Depsgraph depsgraph,
bool  clear_recalc 
)

◆ BKE_scene_graph_update_tagged()

void BKE_scene_graph_update_tagged ( Depsgraph depsgraph,
Main bmain 
)

◆ BKE_scene_groups_relink()

void BKE_scene_groups_relink ( Scene sce)

Definition at line 2022 of file scene.cc.

References BKE_rigidbody_world_groups_relink(), and Scene::rigidbody_world.

◆ BKE_scene_has_view_layer()

bool BKE_scene_has_view_layer ( const Scene scene,
const ViewLayer layer 
)

Definition at line 2234 of file scene.cc.

References BLI_findindex(), scene, and Scene::view_layers.

Referenced by BKE_scene_get_depsgraph(), and scene_get_depsgraph_p().

◆ BKE_scene_multiview_filepath_get()

void BKE_scene_multiview_filepath_get ( const SceneRenderView srv,
const char *  filepath,
char *  r_filepath 
)

Definition at line 3177 of file scene.cc.

References BLI_path_suffix(), BLI_strncpy(), FILE_MAX, and SceneRenderView::suffix.

◆ BKE_scene_multiview_is_render_view_active()

bool BKE_scene_multiview_is_render_view_active ( const RenderData rd,
const SceneRenderView srv 
)

◆ BKE_scene_multiview_is_render_view_first()

bool BKE_scene_multiview_is_render_view_first ( const RenderData rd,
const char *  viewname 
)

◆ BKE_scene_multiview_is_render_view_last()

bool BKE_scene_multiview_is_render_view_last ( const RenderData rd,
const char *  viewname 
)

◆ BKE_scene_multiview_is_stereo3d()

bool BKE_scene_multiview_is_stereo3d ( const RenderData rd)

◆ BKE_scene_multiview_num_videos_get()

int BKE_scene_multiview_num_videos_get ( const RenderData rd)

◆ BKE_scene_multiview_num_views_get()

int BKE_scene_multiview_num_views_get ( const RenderData rd)

◆ BKE_scene_multiview_render_view_findindex()

SceneRenderView* BKE_scene_multiview_render_view_findindex ( const RenderData rd,
const int  view_id 
)

◆ BKE_scene_multiview_render_view_name_get()

const char* BKE_scene_multiview_render_view_name_get ( const RenderData rd,
const int  view_id 
)

◆ BKE_scene_multiview_videos_dimensions_get()

void BKE_scene_multiview_videos_dimensions_get ( const RenderData rd,
const size_t  width,
const size_t  height,
size_t *  r_width,
size_t *  r_height 
)

◆ BKE_scene_multiview_view_filepath_get()

void BKE_scene_multiview_view_filepath_get ( const RenderData rd,
const char *  filepath,
const char *  viewname,
char *  r_filepath 
)

◆ BKE_scene_multiview_view_id_get()

int BKE_scene_multiview_view_id_get ( const RenderData rd,
const char *  viewname 
)

◆ BKE_scene_multiview_view_id_suffix_get()

const char* BKE_scene_multiview_view_id_suffix_get ( const RenderData rd,
const int  view_id 
)

◆ BKE_scene_multiview_view_prefix_get()

void BKE_scene_multiview_view_prefix_get ( Scene scene,
const char *  name,
char *  r_prefix,
const char **  r_ext 
)

◆ BKE_scene_multiview_view_suffix_get()

const char* BKE_scene_multiview_view_suffix_get ( const RenderData rd,
const char *  viewname 
)

◆ BKE_scene_num_threads()

int BKE_scene_num_threads ( const Scene scene)

Definition at line 2955 of file scene.cc.

References BKE_render_num_threads(), Scene::r, and scene.

◆ BKE_scene_object_base_flag_sync_from_base()

void BKE_scene_object_base_flag_sync_from_base ( struct 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 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().

◆ BKE_scene_object_find()

bool BKE_scene_object_find ( struct Scene scene,
struct Object ob 
)

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.

◆ BKE_scene_object_find_by_name()

Object* BKE_scene_object_find_by_name ( const Scene scene,
const char *  name 
)

Definition at line 2063 of file scene.cc.

References LISTBASE_FOREACH, scene, STREQ, and Scene::view_layers.

◆ BKE_scene_orientation_get_index()

int BKE_scene_orientation_get_index ( Scene scene,
int  slot_index 
)

◆ BKE_scene_orientation_get_index_from_flag()

int BKE_scene_orientation_get_index_from_flag ( Scene scene,
int  flag 
)

◆ BKE_scene_orientation_slot_get()

TransformOrientationSlot* BKE_scene_orientation_slot_get ( Scene scene,
int  slot_index 
)

◆ BKE_scene_orientation_slot_get_from_flag()

TransformOrientationSlot* BKE_scene_orientation_slot_get_from_flag ( Scene scene,
int  flag 
)

◆ BKE_scene_orientation_slot_get_index()

int BKE_scene_orientation_slot_get_index ( const TransformOrientationSlot orient_slot)

◆ BKE_scene_orientation_slot_set_index()

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.

Parameters
orientationIf 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().

◆ BKE_scene_remove_render_view()

bool BKE_scene_remove_render_view ( Scene scene,
SceneRenderView srv 
)

◆ BKE_scene_remove_rigidbody_object()

void BKE_scene_remove_rigidbody_object ( struct Main bmain,
Scene scene,
Object ob,
const bool  free_us 
)

◆ BKE_scene_set_background()

void BKE_scene_set_background ( struct Main bmain,
struct Scene sce 
)

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().

◆ BKE_scene_set_name()

Scene* BKE_scene_set_name ( struct Main bmain,
const char *  name 
)

◆ BKE_scene_transform_orientation_find()

TransformOrientation* BKE_scene_transform_orientation_find ( const Scene scene,
const int  index 
)

Definition at line 3565 of file scene.cc.

References BLI_findlink(), scene, and Scene::transform_spaces.

◆ BKE_scene_transform_orientation_get_index()

int BKE_scene_transform_orientation_get_index ( const Scene scene,
const TransformOrientation orientation 
)

Definition at line 3570 of file scene.cc.

References BLI_findindex(), scene, and Scene::transform_spaces.

Referenced by BKE_scene_transform_orientation_remove().

◆ BKE_scene_transform_orientation_remove()

void BKE_scene_transform_orientation_remove ( Scene scene,
TransformOrientation orientation 
)

◆ BKE_scene_undo_depsgraphs_extract()

GHash* BKE_scene_undo_depsgraphs_extract ( Main bmain)

◆ BKE_scene_undo_depsgraphs_restore()

void BKE_scene_undo_depsgraphs_restore ( Main bmain,
GHash depsgraph_extract 
)

◆ BKE_scene_unit_scale()

double BKE_scene_unit_scale ( const UnitSettings unit,
const int  unit_type,
double  value 
)

◆ BKE_scene_update_sound()

void BKE_scene_update_sound ( Depsgraph depsgraph,
Main bmain 
)

◆ BKE_scene_update_tag_audio_volume()

void BKE_scene_update_tag_audio_volume ( Depsgraph UNUSEDdepsgraph,
Scene scene 
)

◆ BKE_scene_use_shading_nodes_custom()

bool BKE_scene_use_shading_nodes_custom ( Scene scene)

Definition at line 2838 of file scene.cc.

References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SHADING_NODES_CUSTOM, scene, and type.

Referenced by shader_tree_poll().

◆ BKE_scene_use_spherical_stereo()

bool BKE_scene_use_spherical_stereo ( Scene scene)

Definition at line 2844 of file scene.cc.

References RenderData::engine, Scene::r, RE_engines_find(), RE_USE_SPHERICAL_STEREO, scene, and type.

◆ BKE_scene_uses_blender_eevee()

bool BKE_scene_uses_blender_eevee ( const Scene scene)

Definition at line 2850 of file scene.cc.

References RenderData::engine, Scene::r, RE_engine_id_BLENDER_EEVEE, scene, and STREQ.

◆ BKE_scene_uses_blender_workbench()

bool BKE_scene_uses_blender_workbench ( const Scene scene)

Definition at line 2855 of file scene.cc.

References RenderData::engine, Scene::r, RE_engine_id_BLENDER_WORKBENCH, scene, and STREQ.

◆ BKE_scene_uses_cycles()

bool BKE_scene_uses_cycles ( const Scene scene)

◆ BKE_scene_uses_cycles_experimental_features()

bool BKE_scene_uses_cycles_experimental_features ( struct 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).

Note
We cannot use 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().

◆ BKE_scene_validate_setscene()

bool BKE_scene_validate_setscene ( struct Main bmain,
struct Scene sce 
)

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().

◆ BKE_scene_view_layer_graph_evaluated_ensure()

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.

Warning
Sets matching depsgraph as active, so should only be called from the active editing context (usually, from operators).

Definition at line 2733 of file scene.cc.

References BKE_scene_ensure_depsgraph(), BKE_scene_graph_update_tagged(), DEG_make_active(), depsgraph, and scene.

◆ BKE_toolsettings_copy()

ToolSettings* BKE_toolsettings_copy ( struct ToolSettings toolsettings,
int  flag 
)

◆ BKE_toolsettings_free()

void BKE_toolsettings_free ( ToolSettings toolsettings)

◆ check_rendered_viewport_visible()

static bool check_rendered_viewport_visible ( Main bmain)
static

◆ composite_patch()

static void composite_patch ( bNodeTree ntree,
Scene scene 
)
static

◆ depsgraph_key_compare()

static bool depsgraph_key_compare ( const void key_a_v,
const void key_b_v 
)
static

Definition at line 3319 of file scene.cc.

References DepsgraphKey::view_layer.

Referenced by BKE_scene_allocate_depsgraph_hash().

◆ depsgraph_key_free()

static void depsgraph_key_free ( void key_v)
static

Definition at line 3327 of file scene.cc.

References MEM_freeN.

Referenced by BKE_scene_free_depsgraph_hash(), and BKE_scene_free_view_layer_depsgraph().

◆ depsgraph_key_hash()

static unsigned int depsgraph_key_hash ( const void key_v)
static

Definition at line 3311 of file scene.cc.

References BLI_ghashutil_ptrhash(), hash, and DepsgraphKey::view_layer.

Referenced by BKE_scene_allocate_depsgraph_hash().

◆ depsgraph_key_value_free()

static void depsgraph_key_value_free ( void value)
static

◆ direct_link_paint_helper()

static void direct_link_paint_helper ( BlendDataReader reader,
const Scene scene,
Paint **  paint 
)
static

Definition at line 1082 of file scene.cc.

References BKE_paint_blend_read_data(), BLO_read_data_address, and scene.

Referenced by scene_blend_read_data().

◆ free_avicodecdata()

void free_avicodecdata ( AviCodecData acd)

◆ get_render_child_particle_number()

int get_render_child_particle_number ( const RenderData r,
int  child_num,
bool  for_render 
)

Definition at line 2794 of file scene.cc.

References r, and R_SIMPLIFY.

◆ get_render_subsurf_level()

int get_render_subsurf_level ( const RenderData r,
int  lvl,
bool  for_render 
)

Definition at line 2781 of file scene.cc.

References min_ii(), r, and R_SIMPLIFY.

◆ get_type_info()

constexpr IDTypeInfo get_type_info ( )
constexpr

◆ link_recurs_seq()

static void link_recurs_seq ( BlendDataReader reader,
ListBase lb 
)
static

◆ prepare_mesh_for_viewport_render()

static void prepare_mesh_for_viewport_render ( Main bmain,
const ViewLayer view_layer 
)
static

◆ remove_sequencer_fcurves()

static void remove_sequencer_fcurves ( Scene sce)
static

◆ scene_blend_read_data()

static void scene_blend_read_data ( BlendDataReader reader,
ID id 
)
static

Definition at line 1108 of file scene.cc.

References Editing::act_seq, Scene::adt, RenderData::avicodecdata, RenderData::bake, BKE_animdata_blend_read_data(), BKE_collection_compat_blend_read_data(), BKE_color_managed_view_settings_blend_read_data(), BKE_curvemapping_blend_read(), BKE_curveprofile_blend_read(), BKE_effector_add_weights(), BKE_image_format_blend_read_data(), BKE_keyingsets_blend_read_data(), BKE_paint_blend_read_data(), BKE_previewimg_blend_read(), BKE_ptcache_blend_read_data(), BKE_screen_view3d_shading_blend_read_data(), BKE_sound_reset_scene_runtime(), BKE_view_layer_blend_read_data(), BLO_read_data_address, BLO_read_data_is_undo(), BLO_read_get_new_data_address(), BLO_read_glob_list(), BLO_read_list(), Editing::cache, PaintModeSettings::canvas_image, Sequence::channels, Editing::channels, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, ToolSettings::curves_sculpt, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, Scene::customdata_mask, Scene::customdata_mask_modal, Scene::depsgraph_hash, direct_link_paint_helper(), Scene::display, Editing::displayed_channels, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_read_data(), EEVEE_lightcache_info_update(), RigidBodyWorld::effector_weights, float(), Scene::fps_info, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::id, id_us_ensure_real(), IDP_BlendDataRead, BakeData::im_format, RenderData::im_format, ToolSettings::imapaint, Scene::keyingsets, UnifiedPaintSettings::last_hit, UnifiedPaintSettings::last_location, Scene::layer_properties, SceneEEVEE::light_cache_data, link_recurs_seq(), LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, RigidBodyWorld::ltime, Scene::markers, RenderData::mblur_shutter_curve, Editing::metastack, RenderData::mode, RigidBodyWorld::numbodies, ParticleEditSettings::object, RigidBodyWorld::objects, ImagePaintSettings::paint, ToolSettings::paint_mode, ParticleEditSettings::paintcursor, GP_Sculpt_Settings::paintcursor, ToolSettings::particle, RigidBodyWorld_Shared::physics_world, RigidBodyWorld_Shared::pointcache, POINTER_OFFSET, Editing::prefetch_job, Scene::preview, RigidBodyWorld_Shared::ptcaches, Scene::r, R_NO_CAMERA_SWITCH, Scene::rigidbody_world, Editing::runtime, ParticleEditSettings::scene, ToolSettings::sculpt, SEQ_blend_read(), Sequence::seqbase, Editing::seqbase, Editing::seqbasep, EditingRuntime::sequence_lookup, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, srl(), PointCache::startframe, Scene::toolsettings, Scene::transform_spaces, ToolSettings::unified_paint_settings, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, ToolSettings::wpaint, and zero_v3().

Referenced by get_type_info().

◆ scene_blend_read_expand()

static void scene_blend_read_expand ( BlendExpander expander,
ID id 
)
static

◆ scene_blend_read_lib()

static void scene_blend_read_lib ( BlendLibReader reader,
ID id 
)
static

Definition at line 1408 of file scene.cc.

References RenderData::bake, BKE_collection_compat_blend_read_lib(), BKE_keyingsets_blend_read_lib(), BKE_paint_blend_read_lib(), BKE_view_layer_blend_read_lib(), BLI_remlink(), BLO_read_id_address, BLO_read_lib_reports(), BLO_reportf_wrap(), BakeData::cage_object, Scene::camera, ImagePaintSettings::canvas, Scene::clip, ImagePaintSettings::clone, composite_patch(), RigidBodyWorld::constraints, ToolSettings::curves_sculpt, Scene::ed, RigidBodyWorld::effector_weights, Scene::flag, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::gpd, Sculpt::gravity_object, EffectorWeights::group, RigidBodyWorld::group, GP_Sculpt_Settings::guide, Scene::id, IDP_BlendReadLib(), ToolSettings::imapaint, Scene::keyingsets, ID::lib, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, Scene::markers, MEM_freeN, ID::name, Scene::nodetree, ImagePaintSettings::paint, Sculpt::paint, CurvesSculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::particle, Scene::r, GP_Sculpt_Guide::reference_object, Scene::rigidbody_world, RPT_WARNING, SCE_READFILE_LIBLINK_NEED_SETSCENE_CHECK, ToolSettings::sculpt, SEQ_blend_read_lib(), Editing::seqbase, Scene::set, ParticleEditSettings::shape_object, srl(), ImagePaintSettings::stencil, TIP_, Scene::toolsettings, ToolSettings::uvsculpt, Scene::view_layers, ToolSettings::vpaint, Scene::world, and ToolSettings::wpaint.

Referenced by get_type_info().

◆ scene_blend_write()

static void scene_blend_write ( BlendWriter writer,
ID id,
const void id_address 
)
static

Definition at line 914 of file scene.cc.

References Scene::adt, RenderData::avicodecdata, RenderData::bake, BKE_animdata_blend_write(), BKE_collection_blend_write_nolib(), BKE_color_managed_view_settings_blend_write(), BKE_curvemapping_blend_write(), BKE_curvemapping_curves_blend_write(), BKE_curveprofile_blend_write(), BKE_id_blend_write(), BKE_image_format_blend_write(), BKE_keyingsets_blend_write(), BKE_paint_blend_write(), BKE_previewimg_blend_write(), BKE_ptcache_blend_write(), BKE_screen_view3d_shading_blend_write(), BKE_view_layer_blend_write(), BLI_assert, BLO_write_id_struct, BLO_write_is_undo(), BLO_write_raw(), BLO_write_struct, AviCodecData::cbFormat, AviCodecData::cbParms, Editing::channels, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, Scene::cursor, ToolSettings::curves_sculpt, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, Scene::display, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_write(), RigidBodyWorld::effector_weights, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::id, IDP_BlendWrite(), BakeData::im_format, RenderData::im_format, ToolSettings::imapaint, Scene::keyingsets, Scene::layer_properties, SceneEEVEE::light_cache_data, LISTBASE_FOREACH, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::markers, Scene::master_collection, RenderData::mblur_shutter_curve, Editing::metastack, Scene::nodetree, ntreeBlendWrite(), ImagePaintSettings::paint, Sculpt::paint, CurvesSculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, RigidBodyWorld_Shared::pointcache, Scene::preview, RigidBodyWorld_Shared::ptcaches, Scene::r, Scene::rigidbody_world, ToolSettings::sculpt, SEQ_blend_write(), Editing::seqbase, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, Scene::toolsettings, Scene::transform_spaces, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, and ToolSettings::wpaint.

Referenced by get_type_info().

◆ scene_copy_data()

static void scene_copy_data ( Main bmain,
ID id_dst,
const ID id_src,
const int  flag 
)
static

◆ scene_copy_markers()

static void scene_copy_markers ( Scene scene_dst,
const Scene scene_src,
const int  flag 
)
static

Definition at line 224 of file scene.cc.

References BLI_duplicatelist(), IDP_CopyProperty_ex(), LISTBASE_FOREACH, and Scene::markers.

Referenced by scene_copy_data().

◆ scene_ensure_depsgraph_p()

static Depsgraph** scene_ensure_depsgraph_p ( Main bmain,
Scene scene,
ViewLayer view_layer 
)
static

◆ scene_foreach_cache()

static void scene_foreach_cache ( ID id,
IDTypeForeachCacheFunctionCallback  function_callback,
void user_data 
)
static

◆ scene_foreach_id()

static void scene_foreach_id ( ID id,
LibraryForeachIDData data 
)
static

◆ scene_foreach_layer_collection()

static void scene_foreach_layer_collection ( LibraryForeachIDData data,
ListBase lb 
)
static

◆ scene_foreach_paint()

static void scene_foreach_paint ( LibraryForeachIDData data,
Paint paint,
const bool  do_undo_restore,
BlendLibReader reader,
Paint paint_old 
)
static

◆ scene_foreach_path()

static void scene_foreach_path ( ID id,
BPathForeachPathData bpath_data 
)
static

Definition at line 906 of file scene.cc.

References Scene::ed, scene, SEQ_for_each_callback(), seq_foreach_path_callback(), and Editing::seqbase.

Referenced by get_type_info().

◆ scene_foreach_rigidbodyworldSceneLooper()

static void scene_foreach_rigidbodyworldSceneLooper ( struct RigidBodyWorld UNUSEDrbw,
ID **  id_pointer,
void user_data,
int  cb_flag 
)
static

◆ scene_foreach_toolsettings()

static void scene_foreach_toolsettings ( LibraryForeachIDData data,
ToolSettings toolsett,
const bool  do_undo_restore,
BlendLibReader reader,
ToolSettings toolsett_old 
)
static

◆ scene_foreach_toolsettings_id_pointer_process()

static void scene_foreach_toolsettings_id_pointer_process ( ID **  id_p,
const eSceneForeachUndoPreserveProcess  action,
BlendLibReader reader,
ID **  id_old_p,
const uint  cb_flag 
)
static

◆ scene_free_data()

static void scene_free_data ( ID id)
static

◆ scene_free_markers()

static void scene_free_markers ( Scene scene,
bool  do_id_user 
)
static

Definition at line 338 of file scene.cc.

References IDP_FreePropertyContent_ex(), LISTBASE_FOREACH_MUTABLE, Scene::markers, MEM_freeN, and scene.

Referenced by scene_free_data().

◆ scene_get_depsgraph_p()

static Depsgraph** scene_get_depsgraph_p ( Scene scene,
ViewLayer view_layer,
const bool  allocate_ghash_entry 
)
static

◆ scene_graph_update_tagged()

static void scene_graph_update_tagged ( Depsgraph depsgraph,
Main bmain,
bool  only_if_tagged 
)
static

◆ scene_init_data()

static void scene_init_data ( ID id)
static

Definition at line 117 of file scene.cc.

References ARRAY_SIZE, ToolSettings::autokey_mode, B_UNIT_LENGTH, B_UNIT_MASS, B_UNIT_TEMPERATURE, B_UNIT_TIME, RenderData::bake, BKE_collection_master_add(), BKE_color_managed_display_settings_init(), BKE_color_managed_view_settings_init_render(), BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_curvemapping_set_defaults(), BKE_curveprofile_add(), BKE_image_format_init(), BKE_scene_add_render_view(), BKE_sound_reset_scene_runtime(), BKE_unit_base_of_type_get(), BKE_view_layer_add(), BLI_assert, BLI_strncpy(), ParticleEditSettings::brush, CurveMapping::clipr, CurveMapping::cm, COLOR_ROLE_DEFAULT_SEQUENCER, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, CURVE_PRESET_BELL, CURVE_PRESET_GAUSS, CURVE_PRESET_MAX, CURVEMAP_SLOPE_POS_NEG, CURVEMAP_SLOPE_POSITIVE, ToolSettings::custom_bevel_profile_preset, Scene::display_settings, DNA_struct_default_alloc, DNA_struct_default_get, RenderData::engine, BakeData::filepath, ListBase::first, ToolSettings::gp_sculpt, Scene::grease_pencil_settings, BakeData::im_format, RenderData::im_format, IMB_colormanagement_role_colorspace_name_get(), TransformOrientationSlot::index_custom, ListBase::last, UnitSettings::length_unit, UnitSettings::mass_unit, Scene::master_collection, RenderData::mblur_shutter_curve, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, ColorManagedColorspaceSettings::name, Scene::orientation_slots, ToolSettings::particle, PE_BRUSH_CUT, RenderData::pic, PROF_PRESET_LINE, Scene::r, RE_engine_id_BLENDER_EEVEE, UnitSettings::scale_length, scene, SEQ_tool_settings_init(), Scene::sequencer_colorspace_settings, ToolSettings::sequencer_tool_settings, SceneGpencil::smaa_threshold, STEREO_LEFT_NAME, STEREO_LEFT_SUFFIX, STEREO_RIGHT_NAME, STEREO_RIGHT_SUFFIX, ParticleBrushData::strength, SceneRenderView::suffix, UnitSettings::system, UnitSettings::temperature_unit, UnitSettings::time_unit, Scene::toolsettings, Scene::unit, USER_UNIT_METRIC, Scene::view_settings, VIEWLAYER_ADD_NEW, and RenderData::views.

Referenced by get_type_info().

◆ scene_lib_override_apply_post()

static void scene_lib_override_apply_post ( ID id_dst,
ID UNUSEDid_src 
)
static

◆ scene_undo_depsgraph_gen_key()

static char* scene_undo_depsgraph_gen_key ( Scene scene,
ViewLayer view_layer,
char *  key_full 
)
static

◆ scene_undo_preserve()

static void scene_undo_preserve ( BlendLibReader reader,
ID id_new,
ID id_old 
)
static

Definition at line 1630 of file scene.cc.

References Scene::cursor, scene_foreach_toolsettings(), SWAP, and Scene::toolsettings.

Referenced by get_type_info().

◆ seq_foreach_member_id_cb()

static bool seq_foreach_member_id_cb ( Sequence seq,
void user_data 
)
static

◆ seq_foreach_path_callback()

static bool seq_foreach_path_callback ( Sequence seq,
void user_data 
)
static

Variable Documentation

◆ IDType_ID_SCE

IDTypeInfo IDType_ID_SCE = get_type_info()

Definition at line 1693 of file scene.cc.

Referenced by blender::bke::tests::TEST().

◆ RE_engine_id_BLENDER_EEVEE

const char* RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE"

◆ RE_engine_id_BLENDER_WORKBENCH

const char* RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH"

◆ RE_engine_id_CYCLES

const char* RE_engine_id_CYCLES = "CYCLES"