Implements the proposed design (with some modifications) in #135058. ## Sequencer Scene This adds a new property called `sequencer_scene` to workspaces. This scene is used by the video sequence editors in the current workspace for their context. This is a first step towards "detaching" the VSE from the active scene in the window. Each sequencer timeline editor shows the sequencer scene that is being used. By default, when no sequencer scene is selected, the timeline and preview are empty. Pressing the "new" button will add a new scene and assign it to the sequencer scene for the current workspace. ## Contextual Playback Pressing `Space` (by default) for starting the animation playback is now contextual: depending on the context (where your mouse cursor is), the scene that is played back might be different. E.g. with a 3D Viewport and a Sequencer open, pressing "play" in the 3D Viewport will play the _active scene_ of the window, while pressing "play" in the sequencer will play the _sequencer scene_. ## Time & Scene Synchronization Additionally, this adds a toggle called "Sync Active Scene". With the property turned on, the active scene & scene time in the window will be synced with the time & scene of the current scene strip in the sequencer. Note that this is _not_ bi-directional. The sequencer can change the active scene and map time, but it's not possible the other way around since it one can have multiple strips using the same scene (+camera, and even time!). Currently this setting is exposed in the footer of the sequencer timeline as well as in the workspace settings. This allows for one of the core concepts that the story tools projects aims at: Working in a scene (e.g. in the 3D viewport) while also working with the edit (in the sequencer timeline). ## Some technical notes * Undoing while playback is running will now cancel playback. This is to avoid the timer, that points to the scene and viewlayer that are playing, to get de-synced after loading the memfile undo step. * When the sequencer scene is not the same as the active scene, we ensure it has a depsgraph. * Normally, when a `NC_SCENE` notifier points to a specific scene, the notifier is dropped if that scene doesn't match the active one in the window. We now also check that it doesn't match the sequencer scene in the active workspace. * When loading older files, we need to make sure that the active workspace in a window uses the active scene as the sequencer scene. This is to make sure that the file opens with the same sequences open. * Tool settings are stored per scene. To make sure the sequencer uses the tool settings for the sequencer scene, the "context.tool_settings" and `CTX_data_tool_settings` members are overridden in the sequence editors. Pull Request: https://projects.blender.org/blender/blender/pulls/140271
68 lines
2.3 KiB
C
68 lines
2.3 KiB
C
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#pragma once
|
|
|
|
#include <stddef.h>
|
|
|
|
/** \file
|
|
* \ingroup bke
|
|
*/
|
|
|
|
/**
|
|
* The lines below use regex from scripts to extract their values,
|
|
* Keep this in mind when modifying this file and keep this comment above the defines.
|
|
*
|
|
* \note Use #STRINGIFY() rather than defining with quotes.
|
|
*/
|
|
|
|
/** Blender major and minor version. */
|
|
#define BLENDER_VERSION 500
|
|
/** Blender patch version for bug-fix releases. */
|
|
#define BLENDER_VERSION_PATCH 0
|
|
/** Blender release cycle stage: alpha/beta/rc/release. */
|
|
#define BLENDER_VERSION_CYCLE alpha
|
|
/** Blender release type suffix. LTS or blank. */
|
|
#define BLENDER_VERSION_SUFFIX
|
|
|
|
/* Blender file format version. */
|
|
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
|
#define BLENDER_FILE_SUBVERSION 63
|
|
|
|
/* Minimum Blender version that supports reading file written with the current
|
|
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
|
* the user.
|
|
*
|
|
* See
|
|
* https://developer.blender.org/docs/handbook/guidelines/compatibility_handling_for_blend_files/
|
|
* for details. */
|
|
#define BLENDER_FILE_MIN_VERSION 405
|
|
#define BLENDER_FILE_MIN_SUBVERSION 85
|
|
|
|
/** User readable version string. */
|
|
const char *BKE_blender_version_string(void);
|
|
|
|
/** As above but does not show patch version. */
|
|
const char *BKE_blender_version_string_compact(void);
|
|
|
|
/** Returns true when version cycle is alpha, otherwise (beta, rc) returns false. */
|
|
bool BKE_blender_version_is_alpha(void);
|
|
|
|
/** Returns true when version suffix is LTS, otherwise returns false. */
|
|
bool BKE_blender_version_is_lts(void);
|
|
|
|
/**
|
|
* Fill in given string buffer with user-readable formatted file version and subversion (if
|
|
* provided).
|
|
*
|
|
* \param str_buff: a char buffer where the formatted string is written,
|
|
* minimal recommended size is 8, or 16 if subversion is provided.
|
|
*
|
|
* \param file_subversion: the file subversion, if given value < 0, it is ignored, and only the
|
|
* `file_version` is used.
|
|
*/
|
|
void BKE_blender_version_blendfile_string_from_values(char *str_buff,
|
|
const size_t str_buff_maxncpy,
|
|
const short file_version,
|
|
const short file_subversion);
|