Blender V4.3
scene_edit.cc File Reference
#include <cstdio>
#include <cstring>
#include "BLI_compiler_attrs.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "DNA_sequence_types.h"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_main.hh"
#include "BKE_node.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "BLT_translation.hh"
#include "ED_render.hh"
#include "ED_scene.hh"
#include "ED_screen.hh"
#include "ED_util.hh"
#include "SEQ_relations.hh"
#include "SEQ_select.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "WM_api.hh"
#include "WM_types.hh"

Go to the source code of this file.

Functions

Scene Utilities
static Scenescene_add (Main *bmain, Scene *scene_old, eSceneCopyMethod method)
 
SceneED_scene_sequencer_add (Main *bmain, bContext *C, eSceneCopyMethod method, const bool assign_strip)
 
SceneED_scene_add (Main *bmain, bContext *C, wmWindow *win, eSceneCopyMethod method)
 
bool ED_scene_delete (bContext *C, Main *bmain, Scene *scene)
 
void ED_scene_change_update (Main *bmain, Scene *scene, ViewLayer *layer)
 
static bool view_layer_remove_poll (const Scene *scene, const ViewLayer *layer)
 
static void view_layer_remove_unset_nodetrees (const Main *bmain, Scene *scene, ViewLayer *layer)
 
bool ED_scene_view_layer_delete (Main *bmain, Scene *scene, ViewLayer *layer, ReportList *reports)
 
Scene New Sequencer Operator
static int scene_new_sequencer_exec (bContext *C, wmOperator *op)
 
static bool scene_new_sequencer_poll (bContext *C)
 
static const EnumPropertyItemscene_new_sequencer_enum_itemf (bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
 
static void SCENE_OT_new_sequencer (wmOperatorType *ot)
 
Scene Delete Operator
static bool scene_delete_poll (bContext *C)
 
static int scene_delete_exec (bContext *C, wmOperator *)
 
static void SCENE_OT_delete (wmOperatorType *ot)
 
Registration
void ED_operatortypes_scene ()
 

Scene New Operator

static EnumPropertyItem scene_new_items []
 
static int scene_new_exec (bContext *C, wmOperator *op)
 
static void SCENE_OT_new (wmOperatorType *ot)
 

Function Documentation

◆ ED_operatortypes_scene()

void ED_operatortypes_scene ( )

◆ ED_scene_add()

Scene * ED_scene_add ( Main * bmain,
bContext * C,
wmWindow * win,
eSceneCopyMethod method )

◆ ED_scene_change_update()

void ED_scene_change_update ( Main * bmain,
Scene * scene,
ViewLayer * layer )

◆ ED_scene_delete()

bool ED_scene_delete ( bContext * C,
Main * bmain,
Scene * scene )
Note
Only call outside of area/region loops.
Returns
true if successful.

Definition at line 127 of file scene_edit.cc.

References BKE_id_delete(), ListBase::first, LISTBASE_FOREACH, wmWindowManager::windows, Main::wm, WM_jobs_kill_all_from_owner(), and WM_window_set_active_scene().

Referenced by scene_delete_exec(), blender::ed::outliner::scene_fn(), and sequencer_delete_strip_data().

◆ ED_scene_sequencer_add()

Scene * ED_scene_sequencer_add ( Main * bmain,
bContext * C,
eSceneCopyMethod method,
bool assign_strip )

◆ ED_scene_view_layer_delete()

◆ scene_add()

static Scene * scene_add ( Main * bmain,
Scene * scene_old,
eSceneCopyMethod method )
static

◆ scene_delete_exec()

static int scene_delete_exec ( bContext * C,
wmOperator *  )
static

◆ scene_delete_poll()

static bool scene_delete_poll ( bContext * C)
static

Definition at line 384 of file scene_edit.cc.

References BKE_scene_can_be_removed(), CTX_data_main(), and CTX_data_scene().

Referenced by SCENE_OT_delete().

◆ scene_new_exec()

static int scene_new_exec ( bContext * C,
wmOperator * op )
static

◆ scene_new_sequencer_enum_itemf()

◆ scene_new_sequencer_exec()

static int scene_new_sequencer_exec ( bContext * C,
wmOperator * op )
static

◆ scene_new_sequencer_poll()

static bool scene_new_sequencer_poll ( bContext * C)
static

◆ SCENE_OT_delete()

◆ SCENE_OT_new()

◆ SCENE_OT_new_sequencer()

◆ view_layer_remove_poll()

static bool view_layer_remove_poll ( const Scene * scene,
const ViewLayer * layer )
static

Definition at line 171 of file scene_edit.cc.

References BLI_findindex().

Referenced by ED_scene_view_layer_delete().

◆ view_layer_remove_unset_nodetrees()

static void view_layer_remove_unset_nodetrees ( const Main * bmain,
Scene * scene,
ViewLayer * layer )
static

Variable Documentation

◆ scene_new_items

EnumPropertyItem scene_new_items[]
static
Initial value:
= {
{SCE_COPY_NEW, "NEW", 0, "New", "Add a new, empty scene with default settings"},
"EMPTY",
0,
"Copy Settings",
"Add a new, empty scene, and copy settings from the current scene"},
"LINK_COPY",
0,
"Linked Copy",
"Link in the collections from the current scene (shallow copy)"},
{SCE_COPY_FULL, "FULL_COPY", 0, "Full Copy", "Make a full copy of the current scene"},
{0, nullptr, 0, nullptr, nullptr},
}
@ SCE_COPY_EMPTY
Definition BKE_scene.hh:31
@ SCE_COPY_NEW
Definition BKE_scene.hh:30
@ SCE_COPY_FULL
Definition BKE_scene.hh:33
@ SCE_COPY_LINK_COLLECTION
Definition BKE_scene.hh:32

Definition at line 257 of file scene_edit.cc.

Referenced by scene_new_sequencer_enum_itemf(), SCENE_OT_new(), and SCENE_OT_new_sequencer().