Blender V5.3
otio_metadata.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 "MEM_guardedalloc.h"
10
11#include "ANIM_action.hh"
12#include "ANIM_animdata.hh"
13#include "ANIM_fcurve.hh"
14
15#include "BKE_colortools.hh"
16#include "BKE_idprop.hh"
17#include "BKE_layer.hh"
18#include "BKE_lib_id.hh"
19
20#include "BLI_array.hh"
21#include "BLI_index_range.hh"
22#include "BLI_math_color_c.hh"
23#include "BLI_set.hh"
24#include "BLI_string_ref.hh"
25
26#include "DNA_ID.h"
27#include "DNA_color_types.h"
28#include "DNA_layer_types.h"
29#include "DNA_sequence_types.h"
30
31#include "RNA_access.hh"
32#include "RNA_enum_types.hh"
33#include "RNA_path.hh"
34#include "RNA_prototypes.hh"
35
36#include "SEQ_modifier.hh"
37#include "SEQ_sequencer.hh"
38#include "SEQ_sound.hh"
39
40#include "opentimelineio/anyVector.h"
41#include "opentimelineio/deserialization.h"
42#include "opentimelineio/serialization.h"
43
44#include "otio_metadata.hh"
45
46namespace blender::io::otio {
47
48static bool skip_property(PointerRNA &ptr, PropertyRNA *prop)
49{
50 static const Set<StringRef> properties_stored_by_otio = {
51 "name",
52 "channel",
53 "mute",
54 "select",
55 "select_left_handle",
56 "select_right_handle",
57 "left_handle",
58 "right_handle",
59 "left_handle_offset",
60 "right_handle_offset",
61 "content_start",
62 "content_trim_start",
63 "content_trim_end",
64 "sound_offset",
65 "duration",
66 "filepath",
67 "directory",
68 "sound",
69 "elements",
70 "strips",
71 "channels",
72 "connections",
73 };
74
75 const StringRef identifier = RNA_property_identifier(prop);
76 if (RNA_property_deprecated(prop)) {
77 return true;
78 }
79 if (RNA_struct_is_a(ptr.type, RNA_Strip) && properties_stored_by_otio.contains(identifier)) {
80 return true;
81 }
83 return false;
84 }
85 return !RNA_property_editable_flag(&ptr, prop) && identifier != "type";
86}
87
88static std::any pointer_value(PointerRNA &ptr)
89{
90 if (!ptr.data) {
91 return {};
92 }
93 if (RNA_struct_is_ID(ptr.type)) {
94 return std::string(static_cast<ID *>(ptr.data)->name + 2);
95 }
96 if (RNA_struct_is_a(ptr.type, RNA_Strip)) {
97 return std::string(static_cast<Strip *>(ptr.data)->name + 2);
98 }
99 if (RNA_struct_is_a(ptr.type, RNA_ViewLayer)) {
100 return std::string(static_cast<ViewLayer *>(ptr.data)->name);
101 }
102 return rna_to_dictionary(ptr);
103}
104
105static std::any property_value(PointerRNA &ptr, PropertyRNA *prop)
106{
107 const int length = RNA_property_array_length(&ptr, prop);
108
109 switch (RNA_property_type(prop)) {
110 case PROP_BOOLEAN: {
111 if (length == 0) {
112 return RNA_property_boolean_get(&ptr, prop);
113 }
114 Array<bool> values(length);
115 RNA_property_boolean_get_array(&ptr, prop, values.data());
116 return AnyVector(values.begin(), values.end());
117 }
118 case PROP_INT: {
119 if (length == 0) {
120 return int64_t(RNA_property_int_get(&ptr, prop));
121 }
122 Array<int> values(length);
123 RNA_property_int_get_array(&ptr, prop, values.data());
124 AnyVector vector;
125 for (const int value : values) {
126 vector.push_back(int64_t(value));
127 }
128 return vector;
129 }
130 case PROP_FLOAT: {
131 if (length == 0) {
132 return double(RNA_property_float_get(&ptr, prop));
133 }
134 Array<float> values(length);
135 RNA_property_float_get_array(&ptr, prop, values.data());
136 AnyVector vector;
137 for (const float value : values) {
138 vector.push_back(double(value));
139 }
140 return vector;
141 }
142 case PROP_STRING:
143 return RNA_property_string_get(&ptr, prop);
144 case PROP_ENUM: {
145 const char *identifier;
147 nullptr, &ptr, prop, RNA_property_enum_get(&ptr, prop), &identifier))
148 {
149 return {};
150 }
151 return std::string(identifier);
152 }
153 case PROP_POINTER: {
154 PointerRNA pointer = RNA_property_pointer_get(&ptr, prop);
155 return pointer_value(pointer);
156 }
157 case PROP_COLLECTION: {
158 AnyVector vector;
159 RNA_PROP_BEGIN (&ptr, item, prop) {
160 std::any value = pointer_value(item);
161 if (value.has_value()) {
162 vector.push_back(value);
163 }
164 }
166 return vector;
167 }
168 }
169 return {};
170}
171
172AnyDictionary rna_to_dictionary(PointerRNA &ptr)
173{
174 AnyDictionary dictionary;
175 RNA_STRUCT_BEGIN_SKIP_RNA_TYPE (&ptr, prop) {
176 if (skip_property(ptr, prop)) {
177 continue;
178 }
179 std::any value = property_value(ptr, prop);
180 if (value.has_value()) {
181 dictionary[RNA_property_identifier(prop)] = value;
182 }
183 }
185 return dictionary;
186}
187
188std::optional<double> to_number(const std::any &value)
189{
190 if (const double *number = std::any_cast<double>(&value)) {
191 return *number;
192 }
193 if (const int64_t *number = std::any_cast<int64_t>(&value)) {
194 return double(*number);
195 }
196 if (const bool *number = std::any_cast<bool>(&value)) {
197 return double(*number);
198 }
199 return std::nullopt;
200}
201
202const std::any *find(const AnyDictionary &dictionary, const std::string &key)
203{
204 auto it = dictionary.find(key);
205 return it != dictionary.end() ? &it->second : nullptr;
206}
207
208AnyVector hex_to_color(const std::string &hex)
209{
210 float3 color(0.0f);
211 hex_to_rgb(hex.c_str(), &color.x, &color.y, &color.z);
212 return AnyVector{double(color.x), double(color.y), double(color.z)};
213}
214
215static void set_number(PointerRNA &ptr, PropertyRNA *prop, const int index, const double value)
216{
217 const bool is_array = index >= 0;
218 switch (RNA_property_type(prop)) {
219 case PROP_BOOLEAN:
220 is_array ? RNA_property_boolean_set_index(&ptr, prop, index, value != 0.0) :
221 RNA_property_boolean_set(&ptr, prop, value != 0.0);
222 break;
223 case PROP_INT:
224 is_array ? RNA_property_int_set_index(&ptr, prop, index, int(value)) :
225 RNA_property_int_set(&ptr, prop, int(value));
226 break;
227 case PROP_FLOAT:
228 is_array ? RNA_property_float_set_index(&ptr, prop, index, float(value)) :
229 RNA_property_float_set(&ptr, prop, float(value));
230 break;
231 default:
232 break;
233 }
234}
235
236static void insert_keyframes(Main *bmain,
237 PointerRNA &ptr,
238 PropertyRNA *prop,
239 const AnyVector &keyframes)
240{
241 const std::optional<std::string> path = RNA_path_from_ID_to_property(&ptr, prop);
242 if (!path || RNA_property_array_check(prop)) {
243 return;
244 }
245 bAction *action = animrig::id_action_ensure(bmain, ptr.owner_id);
246 if (!action) {
247 return;
248 }
249 FCurve &fcurve = animrig::action_fcurve_ensure(bmain, *action, *ptr.owner_id, {*path, 0});
251 settings.interpolation = BEZT_IPO_LIN;
252 for (const std::any &item : keyframes) {
253 const AnyVector *keyframe = std::any_cast<AnyVector>(&item);
254 if (!keyframe || keyframe->size() != 2) {
255 continue;
256 }
257 const std::optional<double> frame = to_number((*keyframe)[0]);
258 const std::optional<double> value = to_number((*keyframe)[1]);
259 if (frame && value) {
260 animrig::insert_vert_fcurve(&fcurve, float2(*frame, *value), settings, INSERTKEY_NOFLAGS);
261 }
262 }
263}
264
266 Main *bmain, Editing *editing, PointerRNA &owner, StructRNA *type, const std::string &name)
267{
268 if (RNA_struct_is_ID(type)) {
269 ID *id = BKE_libblock_find_name(bmain, RNA_type_to_ID_code(type), name.c_str());
270 return RNA_id_pointer_create(id);
271 }
272 if (RNA_struct_is_a(type, RNA_Strip) && editing) {
273 Strip *strip = seq::lookup_strip_by_name(editing, name.c_str());
274 return RNA_pointer_create_discrete(owner.owner_id, RNA_Strip, strip);
275 }
276 if (RNA_struct_is_a(type, RNA_ViewLayer) && RNA_struct_is_a(owner.type, RNA_SceneStrip)) {
277 Scene *scene = static_cast<Strip *>(owner.data)->scene;
278 if (ViewLayer *view_layer = scene ? BKE_view_layer_find(scene, name.c_str()) : nullptr) {
279 return RNA_pointer_create_id_subdata(scene->id, RNA_ViewLayer, view_layer);
280 }
281 }
282 return {};
283}
284
285static void add_modifiers(Main *bmain, Editing *editing, PointerRNA &ptr, const AnyVector &items)
286{
287 Strip *strip = static_cast<Strip *>(ptr.data);
288 for (const std::any &item : items) {
289 const AnyDictionary *dictionary = std::any_cast<AnyDictionary>(&item);
290 const std::string *type_name = dictionary && dictionary->has_key("type") ?
291 std::any_cast<std::string>(&dictionary->at("type")) :
292 nullptr;
293 int type;
294 if (!type_name ||
296 {
297 continue;
298 }
299 StripModifierData *smd = seq::modifier_new(strip, nullptr, eStripModifierType(type));
301 PointerRNA modifier_ptr = RNA_pointer_create_discrete(ptr.owner_id, RNA_StripModifier, smd);
302 rna_from_dictionary(bmain, editing, *dictionary, modifier_ptr);
303 }
304}
305
306static void resize_collection(PointerRNA &ptr, const StringRef name, const int size)
307{
308 if (RNA_struct_is_a(ptr.type, RNA_CurveMap) && name == "points") {
309 CurveMap *curve_map = static_cast<CurveMap *>(ptr.data);
310 MEM_SAFE_DELETE(curve_map->curve);
311 curve_map->curve = MEM_new_array<CurveMapPoint>(size, __func__);
312 curve_map->totpoint = size;
313 }
314 else if (RNA_struct_is_a(ptr.type, RNA_SoundEqualizerModifier) && name == "graphics") {
315 StripModifierData *smd = static_cast<StripModifierData *>(ptr.data);
317 for ([[maybe_unused]] const int i : IndexRange(size)) {
321 }
322 }
323}
324
325static float *curve_mapping_clip(PointerRNA &ptr, const StringRef name)
326{
327 if (!RNA_struct_is_a(ptr.type, RNA_CurveMapping)) {
328 return nullptr;
329 }
330 rctf &clip = static_cast<CurveMapping *>(ptr.data)->clipr;
331 if (name == "clip_min_x") {
332 return &clip.xmin;
333 }
334 if (name == "clip_max_x") {
335 return &clip.xmax;
336 }
337 if (name == "clip_min_y") {
338 return &clip.ymin;
339 }
340 if (name == "clip_max_y") {
341 return &clip.ymax;
342 }
343 return nullptr;
344}
345
346static void set_property(
347 Main *bmain, Editing *editing, PointerRNA &ptr, PropertyRNA *prop, const std::any &value)
348{
349 const StringRef name = RNA_property_identifier(prop);
350
351 switch (RNA_property_type(prop)) {
352 case PROP_BOOLEAN:
353 case PROP_INT:
354 case PROP_FLOAT: {
355 if (float *clip = curve_mapping_clip(ptr, name)) {
356 if (const std::optional<double> number = to_number(value)) {
357 *clip = float(*number);
358 }
359 }
360 else if (const AnyDictionary *animation = std::any_cast<AnyDictionary>(&value)) {
361 if (const AnyVector *keyframes = find<AnyVector>(*animation, "keyframes")) {
362 insert_keyframes(bmain, ptr, prop, *keyframes);
363 }
364 }
365 else if (const AnyVector *values = std::any_cast<AnyVector>(&value)) {
366 const int length = std::min<int>(RNA_property_array_length(&ptr, prop), values->size());
367 for (const int i : IndexRange(length)) {
368 if (const std::optional<double> number = to_number((*values)[i])) {
369 set_number(ptr, prop, i, *number);
370 }
371 }
372 }
373 else if (const std::optional<double> number = to_number(value)) {
374 set_number(ptr, prop, -1, *number);
375 }
376 break;
377 }
378 case PROP_STRING:
379 if (const std::string *string = std::any_cast<std::string>(&value)) {
380 RNA_property_string_set(&ptr, prop, string->c_str());
381 }
382 break;
383 case PROP_ENUM: {
384 const std::string *identifier = std::any_cast<std::string>(&value);
385 int enum_value;
386 if (identifier &&
387 RNA_property_enum_value(nullptr, &ptr, prop, identifier->c_str(), &enum_value))
388 {
389 RNA_property_enum_set(&ptr, prop, enum_value);
390 }
391 break;
392 }
393 case PROP_POINTER: {
394 if (const std::string *target_name = std::any_cast<std::string>(&value)) {
395 PointerRNA target = find_by_name(
396 bmain, editing, ptr, RNA_property_pointer_type(&ptr, prop), *target_name);
397 if (target.data && RNA_property_editable_flag(&ptr, prop)) {
398 RNA_property_pointer_set(&ptr, prop, target, nullptr);
399 }
400 }
401 else if (const AnyDictionary *dictionary = std::any_cast<AnyDictionary>(&value)) {
402 PointerRNA child = RNA_property_pointer_get(&ptr, prop);
403 if (child.data) {
404 rna_from_dictionary(bmain, editing, *dictionary, child);
405 if (RNA_struct_is_a(child.type, RNA_CurveMapping)) {
406 BKE_curvemapping_changed_all(static_cast<CurveMapping *>(child.data));
407 }
408 }
409 }
410 break;
411 }
412 case PROP_COLLECTION: {
413 const AnyVector *items = std::any_cast<AnyVector>(&value);
414 if (!items) {
415 break;
416 }
417 if (RNA_struct_is_a(ptr.type, RNA_Strip) && name == "modifiers") {
418 add_modifiers(bmain, editing, ptr, *items);
419 break;
420 }
421 resize_collection(ptr, name, items->size());
422 int i = 0;
423 RNA_PROP_BEGIN (&ptr, item, prop) {
424 if (i < items->size()) {
425 if (const AnyDictionary *dictionary = std::any_cast<AnyDictionary>(&(*items)[i])) {
426 rna_from_dictionary(bmain, editing, *dictionary, item);
427 }
428 }
429 i++;
430 }
432 break;
433 }
434 }
435}
436
438 Editing *editing,
439 const AnyDictionary &dictionary,
440 PointerRNA &ptr)
441{
442 for (const auto &[key, value] : dictionary) {
443 PropertyRNA *prop = RNA_struct_find_property(&ptr, key.c_str());
444 if (!prop || skip_property(ptr, prop)) {
445 continue;
446 }
448 RNA_property_editable_flag(&ptr, prop))
449 {
450 set_property(bmain, editing, ptr, prop, value);
451 }
452 }
453}
454
455void add_foreign_metadata(IDProperty *properties, SerializableObjectWithMetadata &object)
456{
457 IDProperty *otio_metadata = properties ? IDP_GetPropertyFromGroup(properties, "otio_metadata") :
458 nullptr;
459 if (!otio_metadata) {
460 return;
461 }
462
463 /* Any data we imported from other video editors was converted to custom properties stored under
464 * #otio_metadata. Here, on export, we convert those properties back to metadata. */
465 IDP_foreach_property(otio_metadata, IDP_TYPE_FILTER_STRING, [&](IDProperty *prop) {
466 std::any value;
467 if (!STREQ(prop->name, "blender") &&
468 deserialize_json_from_string(IDP_string_get(prop), &value, nullptr))
469 {
470 object.metadata()[prop->name] = value;
471 }
472 });
473}
474
475void store_foreign_metadata(const SerializableObjectWithMetadata &object, IDProperty *&properties)
476{
477 for (const auto &[key, value] : object.metadata()) {
478 if (key == "blender") {
479 continue;
480 }
481 if (!properties) {
482 properties = bke::idprop::create_group("").release();
483 }
484 IDProperty *otio_metadata = IDP_GetPropertyFromGroup(properties, "otio_metadata");
485 if (!otio_metadata) {
486 otio_metadata = bke::idprop::create_group("otio_metadata").release();
487 IDP_AddToGroup(properties, otio_metadata);
488 }
490 otio_metadata,
491 bke::idprop::create(key, serialize_json_to_string(value, nullptr, nullptr, 0)).release());
492 }
493}
494
495} // namespace blender::io::otio
Functions and classes to work with Actions.
Functions to work with AnimData.
Functions to modify FCurves.
#define IDP_string_get(prop)
ID and Library types, which are fundamental for SDNA.
Read Blender memory allocation and freeing.
#define RNA_PROP_END
#define RNA_STRUCT_END
#define RNA_STRUCT_BEGIN_SKIP_RNA_TYPE(sptr, prop)
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
#define SOUND_EQUALIZER_DEFAULT_MAX_FREQ
Definition SEQ_sound.hh:38
#define SOUND_EQUALIZER_DEFAULT_MIN_FREQ
Definition SEQ_sound.hh:37
#define ELEM(...)
#define STREQ(a, b)
const T * end() const
Definition BLI_array.hh:336
const T * data() const
Definition BLI_array.hh:323
const T * begin() const
Definition BLI_array.hh:332
constexpr IndexRange()=default
bool contains(const Key &key) const
Definition BLI_set.hh:310
constexpr int64_t size() const
float length(VecOp< float, D >) RET
KeyframeSettings get_keyframe_settings(bool from_userprefs)
bAction * id_action_ensure(Main *bmain, ID *id)
Definition animdata.cc:195
SingleKeyingResult insert_vert_fcurve(FCurve *fcu, const float2 position, const KeyframeSettings &settings, eInsertKeyFlags flag)
Main Key-framing API call.
FCurve & action_fcurve_ensure(Main *bmain, bAction &action, ID &animated_id, const FCurveDescriptor &fcurve_descriptor)
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRef prop_name, int32_t value, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_INT, set its name and value.
std::unique_ptr< IDProperty, IDPropertyDeleter > create_group(StringRef prop_name, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_GROUP.
static void add_modifiers(Main *bmain, Editing *editing, PointerRNA &ptr, const AnyVector &items)
static std::any pointer_value(PointerRNA &ptr)
static PointerRNA find_by_name(Main *bmain, Editing *editing, PointerRNA &owner, StructRNA *type, const std::string &name)
AnyDictionary rna_to_dictionary(PointerRNA &ptr)
AnyVector hex_to_color(const std::string &hex)
static float * curve_mapping_clip(PointerRNA &ptr, const StringRef name)
static std::any property_value(PointerRNA &ptr, PropertyRNA *prop)
static void set_property(Main *bmain, Editing *editing, PointerRNA &ptr, PropertyRNA *prop, const std::any &value)
static void set_number(PointerRNA &ptr, PropertyRNA *prop, const int index, const double value)
std::optional< double > to_number(const std::any &value)
void store_foreign_metadata(const SerializableObjectWithMetadata &object, IDProperty *&properties)
static void insert_keyframes(Main *bmain, PointerRNA &ptr, PropertyRNA *prop, const AnyVector &keyframes)
void rna_from_dictionary(Main *bmain, Editing *editing, const AnyDictionary &dictionary, PointerRNA &ptr)
const std::any * find(const AnyDictionary &dictionary, const std::string &key)
static void resize_collection(PointerRNA &ptr, const StringRef name, const int size)
static bool skip_property(PointerRNA &ptr, PropertyRNA *prop)
void add_foreign_metadata(IDProperty *properties, SerializableObjectWithMetadata &object)
static std::optional< double > number(const std::any *value)
Strip * lookup_strip_by_name(Editing *ed, const char *key)
void modifier_persistent_uid_init(const Strip &strip, StripModifierData &smd)
void sound_equalizermodifier_free(StripModifierData *smd)
EQCurveMappingData * sound_equalizermodifier_add_graph(SoundEqualizerModifierData *semd, float min_freq, float max_freq)
StripModifierData * modifier_new(Strip *strip, const char *name, eStripModifierType type)
const EnumPropertyItem rna_enum_strip_modifier_type_items[]
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
__int64 int64_t
Definition BKE_text.h:90
void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
Definition idprop.cc:737
ID * BKE_libblock_find_name(Main *bmain, short type, const char *name, const std::optional< Library * > lib=std::nullopt) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition lib_id.cc:1808
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
bool RNA_property_editable_flag(const PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_identifier)
PointerRNA RNA_id_pointer_create(ID *id)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
Definition rna_path.cc:1237
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
bool IDP_AddToGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
Definition idprop.cc:788
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, StringRef name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition idprop.cc:818
void IDP_foreach_property(IDProperty *id_property_root, int type_filter, FunctionRef< void(IDProperty *id_property)> callback)
short RNA_type_to_ID_code(const StructRNA *type)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PropertyType RNA_property_type(PropertyRNA *prop)
VecBase< float, 2 > float2
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
@ PROP_BOOLEAN
Definition RNA_types.hh:210
@ PROP_POINTER
Definition RNA_types.hh:215
@ PROP_STRING
Definition RNA_types.hh:213
@ PROP_COLLECTION
Definition RNA_types.hh:216
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void BKE_curvemapping_changed_all(CurveMapping *cumap)
bool RNA_struct_is_ID(const StructRNA *type)
const DeprecatedRNA * RNA_property_deprecated(const PropertyRNA *prop)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
ViewLayer * BKE_view_layer_find(const Scene *scene, const char *layer_name)
void hex_to_rgb(const char *hexcol, float *r_r, float *r_g, float *r_b)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PointerRNA RNA_pointer_create_id_subdata(ID &id, StructRNA *type, void *data)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
VecBase< float, 3 > float3
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, bool value)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
@ IDP_TYPE_FILTER_STRING
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
CurveMapPoint * curve
char name[258]
Definition DNA_ID.h:433
StructRNA * type
Definition RNA_types.hh:63
eBezTriple_Interpolation interpolation