Blender  V3.3
scene_edit.c File Reference
#include <stdio.h>
#include <string.h>
#include "BLI_compiler_attrs.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "DNA_sequence_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "BLT_translation.h"
#include "ED_object.h"
#include "ED_render.h"
#include "ED_scene.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "SEQ_relations.h"
#include "SEQ_select.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"

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 *UNUSED(ptr), PropertyRNA *UNUSED(prop), 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 *UNUSED(op))
 
static void SCENE_OT_delete (wmOperatorType *ot)
 
Registration
void ED_operatortypes_scene (void)
 

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

◆ ED_scene_add()

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

◆ ED_scene_change_update()

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

◆ ED_scene_delete()

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

Definition at line 128 of file scene_edit.c.

References BKE_id_delete(), C, ListBase::first, Scene::id, LISTBASE_FOREACH, ID::next, NULL, ID::prev, scene, wmWindowManager::windows, Main::wm, WM_JOB_TYPE_ANY, WM_jobs_kill_type(), and WM_window_set_active_scene().

Referenced by scene_delete_exec(), scene_fn(), and sequencer_delete_strip_data().

◆ ED_scene_sequencer_add()

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

◆ ED_scene_view_layer_delete()

bool ED_scene_view_layer_delete ( Main bmain,
Scene scene,
ViewLayer layer,
ReportList reports 
)

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

◆ scene_delete_poll()

static bool scene_delete_poll ( bContext C)
static

Definition at line 382 of file scene_edit.c.

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

Referenced by SCENE_OT_delete().

◆ scene_new_exec()

static int scene_new_exec ( bContext C,
wmOperator op 
)
static

◆ scene_new_sequencer_enum_itemf()

static const EnumPropertyItem* scene_new_sequencer_enum_itemf ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
bool r_free 
)
static

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

static void SCENE_OT_delete ( wmOperatorType ot)
static

◆ SCENE_OT_new()

static void SCENE_OT_new ( wmOperatorType ot)
static

◆ SCENE_OT_new_sequencer()

static void SCENE_OT_new_sequencer ( wmOperatorType ot)
static

◆ view_layer_remove_poll()

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

◆ 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, NULL, 0, NULL, NULL},
}
@ SCE_COPY_EMPTY
Definition: BKE_scene.h:30
@ SCE_COPY_NEW
Definition: BKE_scene.h:29
@ SCE_COPY_FULL
Definition: BKE_scene.h:32
@ SCE_COPY_LINK_COLLECTION
Definition: BKE_scene.h:31

Definition at line 256 of file scene_edit.c.

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