|
Blender V5.3
|
Functions | |
| Vector< FCurve * > | get_property_drivers (PointerRNA *ptr, PropertyRNA *prop, bool get_all, int index, bool *r_is_array_prop) |
| int | paste_property_drivers (Span< FCurve * > src_drivers, bool is_array_prop, PointerRNA *dst_ptr, PropertyRNA *dst_prop) |
Functions in this namespace are only exposed for unit testing purposes, and should not be used outside of the files where they are defined.
| Vector< FCurve * > blender::ui::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.
| 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 1676 of file interface_ops.cc.
References blender::blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_animdata_from_id(), blender::BKE_fcurve_find(), blender::BLI_assert(), blender::AnimData::drivers, get_property_drivers(), blender::PointerRNA::owner_id, blender::blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::RNA_path_from_ID_to_property(), blender::RNA_property_array_check(), blender::RNA_property_array_length(), and blender::blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::ui::copy_driver_to_selected_button(), get_property_drivers(), blender::ui::tests::TEST_F(), and blender::ui::tests::TEST_F().
| int blender::ui::internal::paste_property_drivers | ( | 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.
| 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. |
| dst_prop | The destination property RNA. |
Definition at line 1730 of file interface_ops.cc.
References blender::BKE_animdata_ensure_id(), blender::BKE_fcurve_copy(), blender::BKE_fcurve_find(), blender::BKE_fcurve_find_by_rna(), blender::BKE_fcurve_free(), blender::BLI_addtail(), blender::BLI_assert(), blender::BLI_remlink(), blender::AnimData::drivers, blender::PointerRNA::owner_id, paste_property_drivers(), blender::RNA_path_from_ID_to_property(), and blender::Span< T >::size().
Referenced by blender::ui::copy_driver_to_selected_button(), paste_property_drivers(), and blender::ui::tests::TEST_F().