Blender
V5.3
source
blender
io
otio
importer
otio_import_kdenlive.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#include "opentimelineio/clip.h"
10
11
#include "
otio_import_kdenlive.hh
"
12
#include "
otio_metadata.hh
"
13
14
namespace
blender::io::otio
{
15
16
std::optional<StripType>
kdenlive_generator_type
(
const
GeneratorReference &generator)
17
{
18
if
(generator.generator_kind() ==
"kdenlive:SolidColor"
) {
19
return
STRIP_TYPE_COLOR
;
20
}
21
return
std::nullopt;
22
}
23
24
AnyDictionary
kdenlive_strip_properties
(SerializableObjectWithMetadata &
object
)
25
{
26
AnyDictionary properties;
27
auto
*clip =
dynamic_cast<
Clip *
>
(&
object
);
28
auto
*generator = clip ?
dynamic_cast<
GeneratorReference *
>
(clip->media_reference()) :
nullptr
;
29
const
AnyDictionary *kdenlive = generator ?
30
find<AnyDictionary>
(generator->parameters(),
"kdenlive"
) :
31
nullptr
;
32
const
std::string *
color
= kdenlive ?
find<std::string>
(*kdenlive,
"color"
) :
nullptr
;
33
if
(
color
&&
color
->starts_with(
"0x"
)) {
34
properties[
"color"
] =
hex_to_color
(
color
->substr(2));
35
}
36
return
properties;
37
}
38
39
}
// namespace blender::io::otio
blender::bke::object
Definition
BKE_paint.hh:602
blender::color
Definition
BLI_color.hh:32
blender::io::otio
Definition
otio_export.cc:58
blender::io::otio::kdenlive_generator_type
std::optional< StripType > kdenlive_generator_type(const GeneratorReference &generator)
Definition
otio_import_kdenlive.cc:16
blender::io::otio::hex_to_color
AnyVector hex_to_color(const std::string &hex)
Definition
otio_metadata.cc:208
blender::io::otio::kdenlive_strip_properties
AnyDictionary kdenlive_strip_properties(SerializableObjectWithMetadata &object)
Definition
otio_import_kdenlive.cc:24
blender::io::otio::find
const std::any * find(const AnyDictionary &dictionary, const std::string &key)
Definition
otio_metadata.cc:202
blender::STRIP_TYPE_COLOR
@ STRIP_TYPE_COLOR
Definition
DNA_sequence_types.h:148
otio_import_kdenlive.hh
otio_metadata.hh
Generated on
for Blender by
doxygen
1.18.0