This avoids need to do special trickery detecting whether the principal point is to be changed when reloading movie clip. This also allows to transfer the optical center from high-res footage to possibly its lower resolution proxy without manual adjustment. On a user level the difference is that the principal point is exposed in the normalized coordinates: frame center has coordinate of (0, 0), left bottom corner of a frame has coordinate of (-1, -1) and the right top corner has coordinate of (1, 1). Another user-visible change is that there is no more operator for setting the principal point to center: use backspace on the center sliders will reset values to 0 which corresponds to the center. The code implements versioning in both directions, so it should be possible to open file in older Blender versions without loosing configuration. For the Python API there are two ways to access the property: - `tracking.camera.principal_point` which is measured in the normalized space. - `tracking.camera.principal_point_pixels` to access the pixel-space principal point. Both properties are not animatable, so there will by no conflict coming. Differential Revision: https://developer.blender.org/D16573
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** \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 305
|
|
/* Blender patch version for bugfix releases. */
|
|
#define BLENDER_VERSION_PATCH 0
|
|
/** Blender release cycle stage: alpha/beta/rc/release. */
|
|
#define BLENDER_VERSION_CYCLE alpha
|
|
|
|
/* Blender file format version. */
|
|
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
|
#define BLENDER_FILE_SUBVERSION 2
|
|
|
|
/* Minimum Blender version that supports reading file written with the current
|
|
* version. Older Blender versions will test this and show a warning if the file
|
|
* was written with too new a version. */
|
|
#define BLENDER_FILE_MIN_VERSION 304
|
|
#define BLENDER_FILE_MIN_SUBVERSION 3
|
|
|
|
/** User readable version string. */
|
|
const char *BKE_blender_version_string(void);
|
|
|
|
/* Returns true when version cycle is alpha, otherwise (beta, rc) returns false. */
|
|
bool BKE_blender_version_is_alpha(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|