diff options
author | Jeroen Bakker <jbakker> | 2021-08-03 09:10:07 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-08-03 09:10:21 +0300 |
commit | 6f50969406a751ac69d41e792d859d74410ebef6 (patch) | |
tree | 79caf3176af7b9947fd7919b8e7227858563448a /source/blender/blenlib | |
parent | ebd55b4acdc47ba2a412fd769aa6ab657abe97ca (diff) |
Cleanup: Hide implementation details for ED_keyframe_keylist.
For T78995 we want to change the data structure of keylists to
improve performance. (Probably a Vector with bin-search capabilities).
This patch hides the internal structure of the keylists behind `AnimKeylist`
structure. This allows us to change the internals without 'breaking' where it is
being used.
The change adds functions to create, free, find and walk over the
keylist.
Reviewed By: sybren
Maniphest Tasks: T78995
Differential Revision: https://developer.blender.org/D11974
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_range.h | 34 | ||||
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_range.h b/source/blender/blenlib/BLI_range.h new file mode 100644 index 00000000000..ad4cd6c162e --- /dev/null +++ b/source/blender/blenlib/BLI_range.h @@ -0,0 +1,34 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#pragma once + +/** \file + * \ingroup bli + */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct Range2f { + float min; + float max; +} Range2f; + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index ea5572f1c8a..b6603dce378 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -265,6 +265,7 @@ set(SRC BLI_quadric.h BLI_rand.h BLI_rand.hh + BLI_range.h BLI_rect.h BLI_resource_scope.hh BLI_scanfill.h |