Blender V4.3
BKE_scene.hh File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

struct  SceneBaseIter
 

Macros

#define SETLOOPER(_sce_basis, _sce_iter, _base)
 
#define SETLOOPER_VIEW_LAYER(_sce_basis, _view_layer, _sce_iter, _base)
 
#define SETLOOPER_SET_ONLY(_sce_basis, _sce_iter, _base)
 

Enumerations

enum  eSceneCopyMethod { SCE_COPY_NEW = 0 , SCE_COPY_EMPTY = 1 , SCE_COPY_LINK_COLLECTION = 2 , SCE_COPY_FULL = 3 }
 

Functions

Base_setlooper_base_step (Scene **sce_iter, ViewLayer *view_layer, Base *base)
 
SceneBKE_scene_add (Main *bmain, const char *name)
 
void BKE_scene_remove_rigidbody_object (Main *bmain, Scene *scene, Object *ob, bool free_us)
 
bool BKE_scene_object_find (Scene *scene, Object *ob)
 
ObjectBKE_scene_object_find_by_name (const Scene *scene, const char *name)
 
int BKE_scene_base_iter_next (Depsgraph *depsgraph, SceneBaseIter *iter, Scene **scene, int val, Base **base, Object **ob)
 
void BKE_scene_base_flag_to_objects (const Scene *scene, ViewLayer *view_layer)
 
void BKE_scene_object_base_flag_sync_from_base (Base *base)
 
void BKE_scene_set_background (Main *bmain, Scene *sce)
 
SceneBKE_scene_set_name (Main *bmain, const char *name)
 
ToolSettingsBKE_toolsettings_copy (ToolSettings *toolsettings, int flag)
 
void BKE_toolsettings_free (ToolSettings *toolsettings)
 
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)
 
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)
 
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, int frame)
 
float BKE_scene_frame_get (const Scene *scene)
 
void BKE_scene_frame_set (Scene *scene, float frame)
 
TransformOrientationSlotBKE_scene_orientation_slot_get_from_flag (Scene *scene, int flag)
 
TransformOrientationSlotBKE_scene_orientation_slot_get (Scene *scene, int slot_index)
 
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)
 
void BKE_scene_update_sound (Depsgraph *depsgraph, Main *bmain)
 
void BKE_scene_update_tag_audio_volume (Depsgraph *, Scene *scene)
 
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 (Depsgraph *depsgraph)
 
void BKE_scene_graph_update_for_newframe_ex (Depsgraph *depsgraph, bool clear_recalc)
 
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)
 
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_shader_previews (const Scene *scene)
 
bool BKE_scene_uses_cycles_experimental_features (Scene *scene)
 
void BKE_scene_copy_data_eevee (Scene *sce_dst, const Scene *sce_src)
 
void BKE_scene_disable_color_management (Scene *scene)
 
bool BKE_scene_check_rigidbody_active (const Scene *scene)
 
int BKE_scene_num_threads (const Scene *scene)
 
int BKE_render_num_threads (const RenderData *r)
 
void BKE_render_resolution (const 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, int unit_type, double value)
 
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)
 
int BKE_scene_multiview_num_views_get (const RenderData *rd)
 
SceneRenderViewBKE_scene_multiview_render_view_findindex (const RenderData *rd, int view_id)
 
const char * BKE_scene_multiview_render_view_name_get (const RenderData *rd, 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 *view, 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, int view_id)
 
void BKE_scene_multiview_view_prefix_get (Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
 
void BKE_scene_multiview_videos_dimensions_get (const RenderData *rd, size_t width, size_t height, size_t *r_width, size_t *r_height)
 
int BKE_scene_multiview_num_videos_get (const RenderData *rd)
 
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)
 
Depsgraph * BKE_scene_get_depsgraph (const Scene *scene, const ViewLayer *view_layer)
 
Depsgraph * BKE_scene_ensure_depsgraph (Main *bmain, Scene *scene, ViewLayer *view_layer)
 
GHashBKE_scene_undo_depsgraphs_extract (Main *bmain)
 
void BKE_scene_undo_depsgraphs_restore (Main *bmain, GHash *depsgraph_extract)
 
void BKE_scene_transform_orientation_remove (Scene *scene, TransformOrientation *orientation)
 
TransformOrientationBKE_scene_transform_orientation_find (const Scene *scene, int index)
 
int BKE_scene_transform_orientation_get_index (const Scene *scene, const TransformOrientation *orientation)
 

Macro Definition Documentation

◆ SETLOOPER

#define SETLOOPER ( _sce_basis,
_sce_iter,
_base )
Value:
_sce_iter = _sce_basis, \
&_sce_iter, BKE_view_layer_context_active_PLACEHOLDER(_sce_basis), NULL); \
_base; \
_base = _setlooper_base_step(&_sce_iter, NULL, _base)
ViewLayer * BKE_view_layer_context_active_PLACEHOLDER(const Scene *scene)
Base * _setlooper_base_step(Scene **sce_iter, ViewLayer *view_layer, Base *base)
Definition scene.cc:2726
#define NULL

Use as the contents of a 'for' loop: for (SETLOOPER(...)) { ... }.

Definition at line 37 of file BKE_scene.hh.

◆ SETLOOPER_SET_ONLY

#define SETLOOPER_SET_ONLY ( _sce_basis,
_sce_iter,
_base )
Value:
_sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, NULL, NULL); \
_base; \
_base = _setlooper_base_step(&_sce_iter, NULL, _base)

Definition at line 49 of file BKE_scene.hh.

Referenced by clean_viewport_memory().

◆ SETLOOPER_VIEW_LAYER

#define SETLOOPER_VIEW_LAYER ( _sce_basis,
_view_layer,
_sce_iter,
_base )
Value:
_sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, _view_layer, NULL); \
_base; \
_base = _setlooper_base_step(&_sce_iter, NULL, _base)

Definition at line 44 of file BKE_scene.hh.

Referenced by BKE_ptcache_bake().

Enumeration Type Documentation

◆ eSceneCopyMethod

Enumerator
SCE_COPY_NEW 
SCE_COPY_EMPTY 
SCE_COPY_LINK_COLLECTION 
SCE_COPY_FULL 

Definition at line 29 of file BKE_scene.hh.

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 2726 of file scene.cc.

References BKE_view_layer_default_render(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), ListBase::first, Base::next, and Scene::set.

◆ BKE_render_num_threads()

◆ BKE_render_preview_pixel_size()

int BKE_render_preview_pixel_size ( const RenderData * r)

◆ BKE_render_resolution()

◆ BKE_scene_add()

◆ 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 ( const Scene * scene,
ViewLayer * view_layer )

◆ BKE_scene_base_iter_next()

◆ BKE_scene_camera_switch_update()

◆ BKE_scene_can_be_removed()

bool BKE_scene_can_be_removed ( const Main * bmain,
const Scene * scene )

Definition at line 1939 of file scene.cc.

References ID_IS_LINKED, LISTBASE_FOREACH, and Main::scenes.

Referenced by scene_delete_poll().

◆ BKE_scene_check_rigidbody_active()

bool BKE_scene_check_rigidbody_active ( const Scene * scene)

Definition at line 2844 of file scene.cc.

References RBW_FLAG_MUTED.

Referenced by BKE_rigidbody_eval_simulation(), and BKE_rigidbody_rebuild_sim().

◆ BKE_scene_copy_data_eevee()

void BKE_scene_copy_data_eevee ( Scene * sce_dst,
const Scene * sce_src )

◆ BKE_scene_ctime_get()

◆ BKE_scene_disable_color_management()

◆ BKE_scene_duplicate()

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

◆ BKE_scene_ensure_depsgraph()

◆ BKE_scene_ensure_depsgraph_hash()

void BKE_scene_ensure_depsgraph_hash ( Scene * scene)

Definition at line 3265 of file scene.cc.

References BKE_scene_allocate_depsgraph_hash().

Referenced by scene_get_depsgraph_p().

◆ BKE_scene_find_from_collection()

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

Definition at line 2157 of file scene.cc.

References BKE_view_layer_has_collection(), LISTBASE_FOREACH, scene, and Main::scenes.

◆ BKE_scene_find_last_marker_name()

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

Return the current marker for this frame, we can have more than 1 marker per frame, this just returns the first (unfortunately).

Definition at line 2255 of file scene.cc.

References TimeMarker::frame, LISTBASE_FOREACH, MAXFRAME, and TimeMarker::name.

Referenced by stampdata().

◆ BKE_scene_find_marker_name()

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

Definition at line 2228 of file scene.cc.

References TimeMarker::frame, markers, TimeMarker::name, TimeMarker::next, and TimeMarker::prev.

Referenced by draw_selected_name().

◆ BKE_scene_frame_get()

◆ BKE_scene_frame_set()

void BKE_scene_frame_set ( Scene * scene,
float frame )

Set current frame and sub-frame based on a fractional frame.

Definition at line 2336 of file scene.cc.

References int.

Referenced by bc_update_scene(), deg_flush_updates_and_refresh(), keyframe_jump_exec(), keyframe_jump_exec(), lineart_bake_startjob(), RE_engine_frame_set(), and seq_render_scene_strip().

◆ BKE_scene_frame_snap_by_seconds()

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

Definition at line 2273 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,
int frame )

Convert integer frame number to fractional frame number taking into account sub-frames and time remapping.

Definition at line 2322 of file scene.cc.

Referenced by BKE_ptcache_id_time(), BKE_scene_ctime_get(), DEG_evaluate_on_framechange(), and object_add_or_copy_particle_system().

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

◆ BKE_scene_graph_evaluated_ensure()

◆ BKE_scene_graph_update_for_newframe()

◆ BKE_scene_graph_update_for_newframe_ex()

◆ BKE_scene_graph_update_tagged()

◆ BKE_scene_groups_relink()

void BKE_scene_groups_relink ( Scene * sce)

Definition at line 1932 of file scene.cc.

References BKE_rigidbody_world_groups_relink(), and Scene::rigidbody_world.

◆ BKE_scene_has_view_layer()

bool BKE_scene_has_view_layer ( const Scene * scene,
const ViewLayer * layer )

Definition at line 2152 of file scene.cc.

References BLI_findindex().

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 3096 of file scene.cc.

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

Referenced by RE_RenderAnim().

◆ BKE_scene_multiview_is_render_view_active()

◆ BKE_scene_multiview_is_render_view_first()

bool BKE_scene_multiview_is_render_view_first ( const RenderData * rd,
const char * viewname )
Returns
true if viewname is the first or if the name is NULL or not found.

Definition at line 3002 of file scene.cc.

References BKE_scene_multiview_is_render_view_active(), LISTBASE_FOREACH, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.

Referenced by blender::render::Context::viewer_output_to_viewer_image().

◆ BKE_scene_multiview_is_render_view_last()

bool BKE_scene_multiview_is_render_view_last ( const RenderData * rd,
const char * viewname )
Returns
true if viewname is the last or if the name is NULL or not found.

Definition at line 3021 of file scene.cc.

References BKE_scene_multiview_is_render_view_active(), LISTBASE_FOREACH_BACKWARD, R_MULTIVIEW, RenderData::scemode, STREQ, and RenderData::views.

◆ BKE_scene_multiview_is_stereo3d()

◆ BKE_scene_multiview_num_videos_get()

◆ BKE_scene_multiview_num_views_get()

◆ BKE_scene_multiview_render_view_findindex()

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

◆ BKE_scene_multiview_render_view_name_get()

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

◆ BKE_scene_multiview_videos_dimensions_get()

void BKE_scene_multiview_videos_dimensions_get ( const RenderData * rd,
size_t width,
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 * view,
char * r_filepath )

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

Definition at line 3104 of file scene.cc.

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

Referenced by BKE_image_render_write(), and image_save_single().

◆ BKE_scene_multiview_view_id_get()

◆ BKE_scene_multiview_view_id_suffix_get()

◆ BKE_scene_multiview_view_prefix_get()

◆ BKE_scene_multiview_view_suffix_get()

◆ BKE_scene_num_threads()

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

Definition at line 2820 of file scene.cc.

References Object::base_flag, Base::flag, and Base::object.

Referenced by blender::ed::object::base_select(), BKE_scene_base_flag_to_objects(), BKE_scene_set_background(), loose_data_instantiate_collection_process(), loose_data_instantiate_object_base_instance_init(), blender::ed::object::make_object_duplilist_real(), and blender::ed::object::object_hide_view_clear_exec().

◆ 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 1963 of file scene.cc.

References BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), BLI_findptr(), LISTBASE_FOREACH, and offsetof.

◆ BKE_scene_object_find_by_name()

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

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

◆ BKE_scene_orientation_slot_get_from_flag()

◆ BKE_scene_orientation_slot_get_index()

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

Definition at line 2678 of file scene.cc.

References BLI_findindex(), BLI_remlink(), and MEM_freeN().

Referenced by render_view_remove_exec().

◆ BKE_scene_remove_rigidbody_object()

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

◆ BKE_scene_set_background()

void BKE_scene_set_background ( Main * bmain,
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 1987 of file scene.cc.

References BKE_scene_object_base_flag_sync_from_base(), BKE_scene_validate_setscene(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), LISTBASE_FOREACH, and Main::objects.

Referenced by BKE_scene_set_name(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), ED_scene_change_update(), and setup_app_data().

◆ 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,
int index )

◆ 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 3491 of file scene.cc.

References BLI_findindex().

Referenced by BIF_selectTransformOrientation(), and BKE_scene_transform_orientation_remove().

◆ BKE_scene_transform_orientation_remove()

◆ BKE_scene_undo_depsgraphs_extract()

◆ BKE_scene_undo_depsgraphs_restore()

◆ BKE_scene_unit_scale()

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

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

Definition at line 2900 of file scene.cc.

References B_UNIT_ACCELERATION, B_UNIT_AREA, B_UNIT_CAMERA, B_UNIT_LENGTH, B_UNIT_MASS, B_UNIT_POWER, B_UNIT_VELOCITY, B_UNIT_VOLUME, B_UNIT_WAVELENGTH, double(), pow(), and USER_UNIT_NONE.

Referenced by outputNumInput(), ui_get_but_scale_unit(), and user_string_to_number().

◆ BKE_scene_update_sound()

◆ BKE_scene_update_tag_audio_volume()

void BKE_scene_update_tag_audio_volume ( Depsgraph * ,
Scene * scene )

Definition at line 2483 of file scene.cc.

References BLI_assert, DEG_is_evaluated_id(), and ID_RECALC_AUDIO_VOLUME.

◆ BKE_scene_use_shading_nodes_custom()

bool BKE_scene_use_shading_nodes_custom ( Scene * scene)

Definition at line 2759 of file scene.cc.

References RE_engines_find(), and RE_USE_SHADING_NODES_CUSTOM.

Referenced by shader_tree_poll().

◆ BKE_scene_use_spherical_stereo()

bool BKE_scene_use_spherical_stereo ( Scene * scene)

Definition at line 2765 of file scene.cc.

References RE_engines_find(), and RE_USE_SPHERICAL_STEREO.

◆ BKE_scene_uses_blender_eevee()

◆ BKE_scene_uses_blender_workbench()

◆ BKE_scene_uses_cycles()

◆ BKE_scene_uses_cycles_experimental_features()

bool BKE_scene_uses_cycles_experimental_features ( Scene * scene)

Return whether the Cycles experimental feature is enabled. It is invalid to call without first ensuring that Cycles is the active render engine (e.g. with BKE_scene_uses_cycles).

Note
We cannot use const as RNA_id_pointer_create is not using a const ID.

Definition at line 2798 of file scene.cc.

References BKE_scene_uses_cycles(), BLI_assert, CYCLES_FEATURES_EXPERIMENTAL, RNA_enum_get(), RNA_id_pointer_create(), RNA_pointer_get(), and RNA_pointer_is_null().

Referenced by RE_engine_supports_alembic_procedural(), and uiTemplateCacheFileProcedural().

◆ BKE_scene_uses_shader_previews()

bool BKE_scene_uses_shader_previews ( const Scene * scene)

◆ BKE_scene_validate_setscene()

bool BKE_scene_validate_setscene ( Main * bmain,
Scene * sce )

Checks for cycle, returns true if it's all OK.

Definition at line 2295 of file scene.cc.

References BLI_listbase_count(), Main::scenes, and Scene::set.

Referenced by BKE_scene_set_background().

◆ 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 2652 of file scene.cc.

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

◆ BKE_toolsettings_copy()

◆ BKE_toolsettings_free()

◆ get_render_child_particle_number()

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

◆ get_render_subsurf_level()