|
Blender V4.3
|
Functions | |
| blender::Vector< FCurve * > | get_property_drivers (PointerRNA *ptr, PropertyRNA *prop, bool get_all, int index, bool *r_is_array_prop) |
| int | paste_property_drivers (blender::Span< FCurve * > src_drivers, bool is_array_prop, PointerRNA *dst_ptr, PropertyRNA *dst_prop) |
| blender::Vector< FCurve * > blender::interface::internal::get_property_drivers | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| bool | get_all, | ||
| int | index, | ||
| bool * | r_is_array_prop ) |
Get the driver(s) of the given property.
paste_property_drivers() below.| ptr | The RNA pointer of the property. |
| prop | The property RNA of the property. |
| get_all | Whether to get all drivers of an array property, or just the one specified by index. Ignored if the property is not an array property. |
| index | Which element of an array property to get. Ignored if get_all is true or if the property is not an array properly. |
| r_is_array_prop | Output parameter, that stores whether the passed property is an array property or not. |
Definition at line 1579 of file interface_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_animdata_from_id(), BKE_fcurve_find(), BLI_assert, AnimData::drivers, PointerRNA::owner_id, ptr, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), RNA_path_from_ID_to_property(), RNA_property_array_check(), RNA_property_array_length(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::interface::tests::TEST_F(), and blender::interface::tests::TEST_F().
| int blender::interface::internal::paste_property_drivers | ( | blender::Span< FCurve * > | src_drivers, |
| bool | is_array_prop, | ||
| PointerRNA * | dst_ptr, | ||
| PropertyRNA * | dst_prop ) |
Paste the drivers from src_drivers to the destination property.
This function can be used for pasting drivers for all elements of an array property, just some elements of an array property, or a single driver for a non-array property.
get_property_drivers() above. The destination property should have the same type and (if an array property) length as the source property passed to get_property_drivers().| src_drivers | The span of drivers to paste. If is_array_prop is false, this must be a single element. If is_array_prop is true then this should have the same length as the destination array property. Nullptr elements are skipped when pasting. |
| is_array_prop | Whether src_drivers are drivers for the elements of an array property. |
| dst_ptr | The RNA pointer for the destination property. |
| dist_prop | The destination property RNA. |
Definition at line 1633 of file interface_ops.cc.
References BKE_animdata_ensure_id(), BKE_fcurve_copy(), BKE_fcurve_find(), BKE_fcurve_find_by_rna(), BKE_fcurve_free(), BKE_fcurve_rnapath_set(), BLI_addtail(), BLI_assert, BLI_remlink(), AnimData::drivers, PointerRNA::owner_id, RNA_path_from_ID_to_property(), and blender::Span< T >::size().
Referenced by blender::interface::tests::TEST_F().