Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-04-05 17:27:15 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-04-05 17:50:23 +0300
commitb0a767b85b0acacc40a414dd3f961b206a6b22f0 (patch)
treed26a65ede1ec7d0e20ec45838af8a3a78586e271 /source/blender/editors/screen
parentf0f6c96a9204419c429c38915d9340d092b570c4 (diff)
IMB_metadata improvements
- Metadata handling is now separate from `ImBuf *`, allowing it to be used with a generic `IDProperty *`. - Merged `IMB_metadata_add_field()` and `IMB_metadata_change_field()` into a more robust `IMB_metadata_set_field()`. This new function doesn't return any status (it now always succeeds, and the previously existing return value was never checked anyway). - Removed `IMB_metadata_del_field()` as it was never actually used anywhere. - Use `IMB_metadata_ensure()` instead of having `IMB_metadata_set_field()` create the containing `IDProperty` for you. - Deduplicated function declarations, moved `intern/IMB_metadata.h` out of `intern/`. Note that this does mean that we have some extra `#include "IMB_metadata.h"` lines now, as the metadata functions are no longer declared in `IMB_imbuf.h`. - Deduplicated function declarations, all metadata-related declarations are now in imbuf/IMB_metadata.h. Part of: https://developer.blender.org/D2273 Reviewed by: @campbellbarton
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index fc0922c7b7c..caae803100b 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -63,6 +63,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
+#include "IMB_metadata.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
@@ -2138,7 +2139,7 @@ static const char *meta_data_list[] =
BLI_INLINE bool metadata_is_valid(ImBuf *ibuf, char *r_str, short index, int offset)
{
- return (IMB_metadata_get_field(ibuf, meta_data_list[index], r_str + offset, MAX_METADATA_STR - offset) && r_str[0]);
+ return (IMB_metadata_get_field(ibuf->metadata, meta_data_list[index], r_str + offset, MAX_METADATA_STR - offset) && r_str[0]);
}
static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const bool is_top)