2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2016-04-24 22:42:41 +10:00
|
|
|
#pragma once
|
|
|
|
|
|
2023-07-23 20:29:29 +02:00
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
|
2020-05-08 18:16:39 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup bke
|
2016-04-24 22:42:41 +10:00
|
|
|
*/
|
|
|
|
|
|
2019-04-14 10:48:42 +02:00
|
|
|
/**
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
2016-04-24 22:42:41 +10:00
|
|
|
|
2023-07-31 10:15:30 +10:00
|
|
|
/** Blender major and minor version. */
|
2023-09-27 12:49:46 +02:00
|
|
|
#define BLENDER_VERSION 401
|
2023-07-31 10:15:30 +10:00
|
|
|
/** Blender patch version for bug-fix releases. */
|
2023-03-13 08:38:04 +01:00
|
|
|
#define BLENDER_VERSION_PATCH 0
|
Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.
User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".
Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility
This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.
Fixes T76058.
Differential Revision: https://developer.blender.org/D7748
2020-05-25 10:49:04 +02:00
|
|
|
/** Blender release cycle stage: alpha/beta/rc/release. */
|
2023-09-27 12:53:52 +02:00
|
|
|
#define BLENDER_VERSION_CYCLE alpha
|
2023-02-15 12:47:47 +01:00
|
|
|
|
Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.
User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".
Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility
This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.
Fixes T76058.
Differential Revision: https://developer.blender.org/D7748
2020-05-25 10:49:04 +02:00
|
|
|
/* Blender file format version. */
|
|
|
|
|
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
2024-01-18 14:39:23 +02:00
|
|
|
#define BLENDER_FILE_SUBVERSION 12
|
Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.
User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".
Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility
This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.
Fixes T76058.
Differential Revision: https://developer.blender.org/D7748
2020-05-25 10:49:04 +02:00
|
|
|
|
|
|
|
|
/* Minimum Blender version that supports reading file written with the current
|
2023-07-24 11:21:20 +02:00
|
|
|
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
|
|
|
|
* the user.
|
|
|
|
|
*
|
2024-01-18 16:10:52 +01:00
|
|
|
* See https://developer.blender.org/docs/handbook/guidelines/compatibility_handling_for_blend_files/ for details. */
|
2023-07-24 11:21:20 +02:00
|
|
|
#define BLENDER_FILE_MIN_VERSION 306
|
2023-09-11 18:40:31 +02:00
|
|
|
#define BLENDER_FILE_MIN_SUBVERSION 13
|
Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.
User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".
Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility
This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.
Fixes T76058.
Differential Revision: https://developer.blender.org/D7748
2020-05-25 10:49:04 +02:00
|
|
|
|
|
|
|
|
/** User readable version string. */
|
|
|
|
|
const char *BKE_blender_version_string(void);
|
2016-04-24 22:42:41 +10:00
|
|
|
|
2023-09-16 02:37:06 +02:00
|
|
|
/** As above but does not show patch version. */
|
|
|
|
|
const char *BKE_blender_version_string_compact(void);
|
|
|
|
|
|
2023-07-31 10:15:30 +10:00
|
|
|
/** Returns true when version cycle is alpha, otherwise (beta, rc) returns false. */
|
2020-08-17 19:50:35 +02:00
|
|
|
bool BKE_blender_version_is_alpha(void);
|
|
|
|
|
|
2023-07-31 10:15:30 +10:00
|
|
|
/**
|
|
|
|
|
* Fill in given string buffer with user-readable formatted file version and subversion (if
|
2023-07-23 20:29:29 +02:00
|
|
|
* provided).
|
|
|
|
|
*
|
2023-09-08 16:53:30 +10:00
|
|
|
* \param str_buff: a char buffer where the formatted string is written,
|
|
|
|
|
* minimal recommended size is 8, or 16 if subversion is provided.
|
2023-07-23 20:29:29 +02:00
|
|
|
*
|
2023-09-08 16:53:30 +10:00
|
|
|
* \param file_subversion: the file subversion, if given value < 0, it is ignored, and only the
|
2023-07-31 10:15:30 +10:00
|
|
|
* `file_version` is used.
|
|
|
|
|
*/
|
2023-07-23 20:29:29 +02:00
|
|
|
void BKE_blender_version_blendfile_string_from_values(char *str_buff,
|
2023-08-06 16:03:10 +10:00
|
|
|
const size_t str_buff_maxncpy,
|
2023-07-23 20:29:29 +02:00
|
|
|
const short file_version,
|
|
|
|
|
const short file_subversion);
|
|
|
|
|
|
2020-05-08 18:16:39 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|