Blender  V2.93
Classes | Macros | Typedefs | Enumerations | Functions | Variables
scene.c File Reference
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#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 "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_armature.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_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 "SEQ_edit.h"
#include "SEQ_iterator.h"
#include "SEQ_modifier.h"
#include "SEQ_proxy.h"
#include "SEQ_relations.h"
#include "SEQ_sequencer.h"
#include "SEQ_sound.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(__data, __id, __do_undo_restore, __action, __reader, __id_old, __cb_flag)
 

Typedefs

typedef enum eSceneForeachUndoPreserveProcess eSceneForeachUndoPreserveProcess
 
typedef struct DepsgraphKey DepsgraphKey
 

Enumerations

enum  eSceneForeachUndoPreserveProcess { SCENE_FOREACH_UNDO_RESTORE , SCENE_FOREACH_UNDO_NO_RESTORE }
 

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 void scene_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void scene_foreach_cache (ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_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))
 
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 cfra)
 
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_frame_get (const Scene *scene)
 
float BKE_scene_frame_to_ctime (const Scene *scene, const float frame)
 
void BKE_scene_frame_set (struct Scene *scene, double cfra)
 
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 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)
 
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)
 
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 (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)
 
static void scene_sequencer_disable_sound_strips (Scene *scene)
 
void BKE_scene_eval_sequencer_sequences (Depsgraph *depsgraph, Scene *scene)
 
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
 
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

#define BKE_LIB_FOREACHID_UNDO_PRESERVE_PROCESS (   __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 { \
BKE_LIB_FOREACHID_PROCESS(__data, __id, __cb_flag); \
} \
} \
(void)0
Definition: DNA_ID.h:273

Definition at line 523 of file scene.c.

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 25 of file scene.c.

Typedef Documentation

◆ DepsgraphKey

typedef struct DepsgraphKey DepsgraphKey

◆ 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.

Enumeration Type Documentation

◆ 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 479 of file scene.c.

Function Documentation

◆ _setlooper_base_step()

Base* _setlooper_base_step ( Scene **  sce_iter,
ViewLayer view_layer,
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 2888 of file scene.c.

References BKE_view_layer_default_render(), ListBase::first, if(), Base::next, NULL, 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 3030 of file scene.c.

References r.

◆ BKE_scene_add()

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

◆ BKE_scene_add_render_view()

SceneRenderView* BKE_scene_add_render_view ( 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 ( Depsgraph depsgraph,
SceneBaseIter iter,
Scene **  scene,
int  val,
Base **  base,
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 2063 of file scene.c.

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

◆ BKE_scene_ensure_depsgraph()

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

◆ BKE_scene_ensure_depsgraph_hash()

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

◆ BKE_scene_eval_sequencer_sequences()

void BKE_scene_eval_sequencer_sequences ( Depsgraph depsgraph,
Scene scene 
)

◆ 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)

This function is needed to cope with fractional frames, needed for motion blur & physics.

Definition at line 2458 of file scene.c.

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

Referenced by BKE_scene_graph_update_for_newframe_ex().

◆ BKE_scene_frame_set()

void BKE_scene_frame_set ( struct Scene scene,
double  cfra 
)

◆ BKE_scene_frame_snap_by_seconds()

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

Definition at line 2407 of file scene.c.

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 float  frame 
)

Definition at line 2464 of file scene.c.

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

Referenced by BKE_scene_frame_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 ( Depsgraph depsgraph,
const 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 2056 of file scene.c.

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 2285 of file scene.c.

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

◆ 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 
)

When multiview is not used the filepath is as usual (e.g., Image.jpg). When multiview is on, even if only one view is enabled the view is incorporated into the file name (e.g., Image_L.jpg). That allows for the user to re-render individual views.

Definition at line 3255 of file scene.c.

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

◆ 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 3025 of file scene.c.

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

◆ BKE_scene_object_find()

bool BKE_scene_object_find ( Scene scene,
Object ob 
)

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

◆ BKE_scene_object_find_by_name()

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

Definition at line 2102 of file scene.c.

References LISTBASE_FOREACH, NULL, 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 ( 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 2517 of file scene.c.

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 ( Main bmain,
Scene scene 
)

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

◆ BKE_scene_set_name()

Scene* BKE_scene_set_name ( 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 3637 of file scene.c.

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 
)
Returns
the index that orientation has within scene's transform-orientation list or -1 if not found.

Definition at line 3646 of file scene.c.

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 
)

Apply the needed correction factor to value, based on unit_type (only length-related are affected currently) and unit->scale_length.

Definition at line 3042 of file scene.c.

References B_UNIT_ACCELERATION, B_UNIT_AREA, B_UNIT_CAMERA, B_UNIT_LENGTH, B_UNIT_MASS, B_UNIT_POWER, B_UNIT_VELOCITY, B_UNIT_VOLUME, double(), KDL::pow(), UnitSettings::scale_length, UnitSettings::system, and USER_UNIT_NONE.

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

◆ BKE_scene_use_spherical_stereo()

bool BKE_scene_use_spherical_stereo ( 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.

◆ BKE_scene_uses_blender_eevee()

bool BKE_scene_uses_blender_eevee ( const Scene scene)

Definition at line 2931 of file scene.c.

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 2936 of file scene.c.

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)

Definition at line 2941 of file scene.c.

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

◆ BKE_scene_validate_setscene()

bool BKE_scene_validate_setscene ( Main bmain,
Scene sce 
)

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

◆ BKE_scene_view_layer_graph_evaluated_ensure()

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.

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

Definition at line 2805 of file scene.c.

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

◆ BKE_toolsettings_copy()

ToolSettings* BKE_toolsettings_copy ( ToolSettings toolsettings,
const 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 3389 of file scene.c.

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 3397 of file scene.c.

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 3381 of file scene.c.

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 1046 of file scene.c.

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  num,
bool  for_render 
)

Definition at line 2869 of file scene.c.

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 2856 of file scene.c.

References min_ii(), r, and R_SIMPLIFY.

◆ link_recurs_seq()

static void link_recurs_seq ( BlendDataReader reader,
ListBase lb 
)
static

Definition at line 1056 of file scene.c.

References BLI_freelinkN(), BLO_read_list(), LISTBASE_FOREACH_MUTABLE, and MAXSEQ.

Referenced by scene_blend_read_data().

◆ 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 1071 of file scene.c.

References Editing::act_seq, Scene::adt, StripProxy::anim, RenderData::avicodecdata, 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_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, Strip::crop, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, 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, Strip::done, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_read_data(), EEVEE_lightcache_info_update(), Sequence::effectdata, RigidBodyWorld::effector_weights, ELEM, RenderData::ffcodecdata, Sequence::flag, float(), Scene::fps_info, SpeedControlVars::frameMap, 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, 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, Sequence::modifiers, NULL, RigidBodyWorld::numbodies, ParticleEditSettings::object, RigidBodyWorld::objects, ImagePaintSettings::paint, ParticleEditSettings::paintcursor, GP_Sculpt_Settings::paintcursor, ToolSettings::particle, RigidBodyWorld_Shared::physics_world, RigidBodyWorld_Shared::pointcache, POINTER_OFFSET, Editing::prefetch_job, Scene::preview, Sequence::prop, FFMpegCodecData::properties, Strip::proxy, RigidBodyWorld_Shared::ptcaches, Scene::r, R_NO_CAMERA_SWITCH, Scene::rigidbody_world, ParticleEditSettings::scene, ToolSettings::sculpt, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_EFFECT_NOT_LOADED, SEQ_FONT_NOT_LOADED, SEQ_modifier_blend_read_data(), SEQ_proxy_set(), SEQ_relations_session_uuid_generate(), SEQ_TYPE_EFFECT, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_HD, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SPEED, SEQ_TYPE_TEXT, SEQ_USE_PROXY, Sequence::seqbase, Editing::seqbase, Editing::seqbasep, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, srl(), PointCache::startframe, Sequence::stereo3d_format, Sequence::strip, Strip::stripdata, t, Scene::toolsettings, Strip::transform, Scene::transform_spaces, Sequence::type, ToolSettings::unified_paint_settings, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, ToolSettings::wpaint, and zero_v3().

◆ 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 1397 of file scene.c.

References Sequence::anims, 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_listbase_clear(), BLI_remlink(), BLO_read_id_address, BLO_read_lib_reports(), BLO_reportf_wrap(), BakeData::cage_object, Scene::camera, ImagePaintSettings::canvas, Scene::clip, Sequence::clip, ImagePaintSettings::clone, composite_patch(), RigidBodyWorld::constraints, Scene::ed, Sequence::effectdata, 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, id_us_plus_no_lib(), IDP_BlendReadLib(), ToolSettings::imapaint, Scene::keyingsets, ID::lib, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, Scene::markers, Sequence::mask, MEM_freeN, Sequence::modifiers, ID::name, Scene::nodetree, NULL, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, ToolSettings::particle, Sequence::prop, Scene::r, GP_Sculpt_Guide::reference_object, Scene::rigidbody_world, RPT_WARNING, SCE_READFILE_LIBLINK_NEED_SETSCENE_CHECK, Sequence::scene, Sequence::scene_camera, Sequence::scene_sound, ToolSettings::sculpt, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_modifier_blend_read_lib(), SEQ_TYPE_SOUND_HD, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_TEXT, Scene::set, ParticleEditSettings::shape_object, Sequence::sound, srl(), ImagePaintSettings::stencil, t, TIP_, Scene::toolsettings, Sequence::type, ToolSettings::uvsculpt, Scene::view_layers, ToolSettings::vpaint, Scene::world, and ToolSettings::wpaint.

◆ scene_blend_write()

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

Definition at line 806 of file scene.c.

References Scene::adt, RenderData::avicodecdata, 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_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, BLO_write_struct_array, AviCodecData::cbFormat, AviCodecData::cbParms, Strip::crop, GP_Sculpt_Settings::cur_falloff, GP_Sculpt_Settings::cur_primitive, Scene::cursor, ToolSettings::custom_bevel_profile_preset, GP_Interpolate_Settings::custom_ipo, Scene::display, Strip::done, Scene::ed, Scene::eevee, EEVEE_lightcache_blend_write(), Sequence::effectdata, RigidBodyWorld::effector_weights, ELEM, RenderData::ffcodecdata, ToolSettings::gp_interpolate, ToolSettings::gp_paint, ToolSettings::gp_sculpt, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, Scene::id, IDP_BlendWrite(), 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, MEM_allocN_len, Editing::metastack, Sequence::modifiers, Scene::nodetree, ntreeBlendWrite(), NULL, ImagePaintSettings::paint, Sculpt::paint, UvSculpt::paint, GpPaint::paint, GpVertexPaint::paint, GpSculptPaint::paint, GpWeightPaint::paint, VPaint::paint, RigidBodyWorld_Shared::pointcache, Scene::preview, Sequence::prop, FFMpegCodecData::properties, Strip::proxy, RigidBodyWorld_Shared::ptcaches, Scene::r, Scene::rigidbody_world, ToolSettings::sculpt, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_modifier_blend_write(), SEQ_TYPE_COLOR, SEQ_TYPE_COLORMIX, SEQ_TYPE_GAUSSIAN_BLUR, SEQ_TYPE_GLOW, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_HD, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SPEED, SEQ_TYPE_TEXT, SEQ_TYPE_TRANSFORM, SEQ_TYPE_WIPE, ToolSettings::sequencer_tool_settings, SceneDisplay::shading, RigidBodyWorld::shared, Sequence::stereo3d_format, Sequence::strip, Strip::stripdata, Scene::toolsettings, Strip::transform, Scene::transform_spaces, Sequence::type, ToolSettings::uvsculpt, Scene::view_layers, Scene::view_settings, RenderData::views, ToolSettings::vpaint, and ToolSettings::wpaint.

◆ 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 243 of file scene.c.

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

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

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

Definition at line 466 of file scene.c.

References BKE_lib_query_foreachid_process(), data, and user_data.

Referenced by scene_foreach_id().

◆ 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 367 of file scene.c.

References IDP_FreePropertyContent_ex(), LISTBASE_FOREACH_MUTABLE, Scene::markers, MEM_freeN, NULL, 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 131 of file scene.c.

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_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, ImageFormatData::display_settings, 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, NULL, 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, ImageFormatData::view_settings, Scene::view_settings, VIEWLAYER_ADD_NEW, and RenderData::views.

◆ scene_lib_override_apply_post()

static void scene_lib_override_apply_post ( ID id_dst,
ID UNUSEDid_src 
)
static

◆ scene_sequencer_disable_sound_strips()

static void scene_sequencer_disable_sound_strips ( Scene scene)
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 1683 of file scene.c.

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

Variable Documentation

◆ IDType_ID_SCE

IDTypeInfo IDType_ID_SCE
Initial value:
= {
.id_code = ID_SCE,
.id_filter = FILTER_ID_SCE,
.main_listbase_index = INDEX_ID_SCE,
.struct_size = sizeof(Scene),
.name = "Scene",
.name_plural = "scenes",
.translation_context = BLT_I18NCONTEXT_ID_SCENE,
.flags = 0,
.copy_data = scene_copy_data,
.free_data = scene_free_data,
.make_local = NULL,
.foreach_id = scene_foreach_id,
.foreach_cache = scene_foreach_cache,
.owner_get = NULL,
.blend_write = scene_blend_write,
.blend_read_data = scene_blend_read_data,
.blend_read_lib = scene_blend_read_lib,
.blend_read_expand = scene_blend_read_expand,
.blend_read_undo_preserve = scene_undo_preserve,
.lib_override_apply_post = scene_lib_override_apply_post,
}
#define BLT_I18NCONTEXT_ID_SCENE
#define FILTER_ID_SCE
Definition: DNA_ID.h:725
@ INDEX_ID_SCE
Definition: DNA_ID.h:850
@ ID_SCE
Definition: DNA_ID_enums.h:57
struct Scene Scene
static void init_data(ModifierData *md)
static void scene_blend_read_lib(BlendLibReader *reader, ID *id)
Definition: scene.c:1397
static void scene_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old)
Definition: scene.c:1683
static void scene_lib_override_apply_post(ID *id_dst, ID *UNUSED(id_src))
Definition: scene.c:1699
static void scene_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag)
Definition: scene.c:253
static void scene_blend_read_data(BlendDataReader *reader, ID *id)
Definition: scene.c:1071
static void scene_blend_read_expand(BlendExpander *expander, ID *id)
Definition: scene.c:1575
static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition: scene.c:806
static void scene_init_data(ID *id)
Definition: scene.c:131
static void scene_foreach_id(ID *id, LibraryForeachIDData *data)
Definition: scene.c:701
static void scene_free_data(ID *id)
Definition: scene.c:378
static void scene_foreach_cache(ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)
Definition: scene.c:788

Definition at line 1712 of file scene.c.

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"