73 const bool assign_strip)
82 if (seq && seq->
scene) {
83 scene_strip = seq->
scene;
88 if (scene_strip ==
NULL) {
102 if (scene_new && seq) {
103 seq->
scene = scene_new;
147 if (win->parent !=
NULL) {
150 if (win->scene ==
scene) {
205 "View layer '%s' could not be removed from scene '%s'",
222 if (win->scene ==
scene &&
STREQ(win->view_layer_name, layer->
name)) {
257 {
SCE_COPY_NEW,
"NEW", 0,
"New",
"Add a new, empty scene with default settings"},
262 "Add a new, empty scene, and copy settings from the current scene"},
267 "Link in the collections from the current scene (shallow copy)"},
268 {
SCE_COPY_FULL,
"FULL_COPY", 0,
"Full Copy",
"Make a full copy of the current scene"},
328 bool has_scene_or_no_context =
false;
331 has_scene_or_no_context =
true;
337 has_scene_or_no_context =
true;
341 if (has_scene_or_no_context) {
343 for (
int i = 0; i <
ARRAY_SIZE(values); i++) {
359 ot->
description =
"Add new scene by type in the sequence editor and assign to active strip";
360 ot->
idname =
"SCENE_OT_new_sequencer";
398 printf(
"scene delete %p\n",
scene);
409 ot->
name =
"Delete Scene";
struct Scene * CTX_data_scene(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_view_layer_free(struct ViewLayer *view_layer)
struct ViewLayer * BKE_view_layer_default_view(const struct Scene *scene)
void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL()
void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, int layer_index)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
@ SCE_COPY_LINK_COLLECTION
void BKE_scene_set_background(struct Main *bmain, struct Scene *sce)
bool BKE_scene_can_be_removed(const struct Main *bmain, const struct Scene *scene)
struct Scene * BKE_scene_duplicate(struct Main *bmain, struct Scene *sce, eSceneCopyMethod type)
void BKE_scene_free_view_layer_depsgraph(struct Scene *scene, struct ViewLayer *view_layer)
struct Scene * BKE_scene_add(struct Main *bmain, const char *name)
struct Depsgraph * BKE_scene_ensure_depsgraph(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define STRNCPY(dst, src)
struct Depsgraph Depsgraph
void DEG_tag_on_visible_update(struct Main *bmain, bool do_time)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
void DEG_graph_relations_update(struct Depsgraph *graph)
@ ID_RECALC_SEQUENCER_STRIPS
void ED_render_engine_changed(struct Main *bmain, bool update_scene_data)
void ED_update_for_newframe(struct Main *bmain, struct Depsgraph *depsgraph)
bool ED_editors_flush_edits(struct Main *bmain)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
const Depsgraph * depsgraph
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Scene * ED_scene_add(Main *bmain, bContext *C, wmWindow *win, eSceneCopyMethod method)
static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op))
static void view_layer_remove_unset_nodetrees(const Main *bmain, Scene *scene, ViewLayer *layer)
bool ED_scene_delete(bContext *C, Main *bmain, Scene *scene)
static void SCENE_OT_new(wmOperatorType *ot)
static void SCENE_OT_new_sequencer(wmOperatorType *ot)
static int scene_new_sequencer_exec(bContext *C, wmOperator *op)
void ED_operatortypes_scene(void)
bool ED_scene_view_layer_delete(Main *bmain, Scene *scene, ViewLayer *layer, ReportList *reports)
static int scene_new_exec(bContext *C, wmOperator *op)
static bool scene_delete_poll(bContext *C)
static bool scene_new_sequencer_poll(bContext *C)
Scene * ED_scene_sequencer_add(Main *bmain, bContext *C, eSceneCopyMethod method, const bool assign_strip)
static Scene * scene_add(Main *bmain, Scene *scene_old, eSceneCopyMethod method)
static bool view_layer_remove_poll(const Scene *scene, const ViewLayer *layer)
static void SCENE_OT_delete(wmOperatorType *ot)
static const EnumPropertyItem * scene_new_sequencer_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
void ED_scene_change_update(Main *bmain, Scene *scene, ViewLayer *layer)
static EnumPropertyItem scene_new_items[]
void SEQ_relations_invalidate_cache_raw(Scene *scene, Sequence *seq)
Sequence * SEQ_select_active_get(Scene *scene)
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_jobs_kill_type(struct wmWindowManager *wm, const void *owner, int job_type)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
Scene * WM_window_get_active_scene(const wmWindow *win)