Merge remote-tracking branch 'origin/blender-v4.4-release'
This commit is contained in:
@@ -1052,7 +1052,7 @@ class StripKeyframeData : public ::ActionStripKeyframeData {
|
||||
|
||||
SingleKeyingResult keyframe_insert(Main *bmain,
|
||||
const Slot &slot,
|
||||
FCurveDescriptor fcurve_descriptor,
|
||||
const FCurveDescriptor &fcurve_descriptor,
|
||||
float2 time_value,
|
||||
const KeyframeSettings &settings,
|
||||
eInsertKeyFlags insert_key_flags = INSERTKEY_NOFLAGS,
|
||||
@@ -1087,8 +1087,8 @@ class Channelbag : public ::ActionChannelbag {
|
||||
*
|
||||
* If it cannot be found, `nullptr` is returned.
|
||||
*/
|
||||
const FCurve *fcurve_find(FCurveDescriptor fcurve_descriptor) const;
|
||||
FCurve *fcurve_find(FCurveDescriptor fcurve_descriptor);
|
||||
const FCurve *fcurve_find(const FCurveDescriptor &fcurve_descriptor) const;
|
||||
FCurve *fcurve_find(const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Find an FCurve matching the fcurve descriptor, or create one if it doesn't
|
||||
@@ -1100,7 +1100,7 @@ class Channelbag : public ::ActionChannelbag {
|
||||
* nullptr, in which case the tagging is skipped and is left as the
|
||||
* responsibility of the caller.
|
||||
*/
|
||||
FCurve &fcurve_ensure(Main *bmain, FCurveDescriptor fcurve_descriptor);
|
||||
FCurve &fcurve_ensure(Main *bmain, const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Create an F-Curve, but only if it doesn't exist yet in this Channelbag.
|
||||
@@ -1113,7 +1113,7 @@ class Channelbag : public ::ActionChannelbag {
|
||||
* nullptr, in which case the tagging is skipped and is left as the
|
||||
* responsibility of the caller.
|
||||
*/
|
||||
FCurve *fcurve_create_unique(Main *bmain, FCurveDescriptor fcurve_descriptor);
|
||||
FCurve *fcurve_create_unique(Main *bmain, const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Append an F-Curve to this Channelbag.
|
||||
@@ -1307,7 +1307,7 @@ class Channelbag : public ::ActionChannelbag {
|
||||
* nullptr, in which case the tagging is skipped and is left as the
|
||||
* responsibility of the caller.
|
||||
*/
|
||||
FCurve &fcurve_create(Main *bmain, FCurveDescriptor fcurve_descriptor);
|
||||
FCurve &fcurve_create(Main *bmain, const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -1660,7 +1660,7 @@ Channelbag *action_channelbag_ensure(bAction &dna_action, ID &animated_id);
|
||||
FCurve *action_fcurve_ensure(Main *bmain,
|
||||
bAction &action,
|
||||
ID &animated_id,
|
||||
FCurveDescriptor fcurve_descriptor);
|
||||
const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Find or create an F-Curve on the given action that matches the given fcurve
|
||||
@@ -1691,7 +1691,7 @@ FCurve *action_fcurve_ensure_ex(Main *bmain,
|
||||
bAction *act,
|
||||
const char group[],
|
||||
PointerRNA *ptr,
|
||||
FCurveDescriptor fcurve_descriptor);
|
||||
const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Same as above, but creates a legacy Action.
|
||||
@@ -1706,7 +1706,7 @@ FCurve *action_fcurve_ensure_legacy(Main *bmain,
|
||||
bAction *act,
|
||||
const char group[],
|
||||
PointerRNA *ptr,
|
||||
FCurveDescriptor fcurve_descriptor);
|
||||
const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Find the F-Curve in the given Action.
|
||||
@@ -1716,7 +1716,7 @@ FCurve *action_fcurve_ensure_legacy(Main *bmain,
|
||||
*
|
||||
* \see #blender::animrig::fcurve_find_in_action_slot
|
||||
*/
|
||||
FCurve *fcurve_find_in_action(bAction *act, FCurveDescriptor fcurve_descriptor);
|
||||
FCurve *fcurve_find_in_action(bAction *act, const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Find the F-Curve in the given Action Slot.
|
||||
@@ -1725,14 +1725,14 @@ FCurve *fcurve_find_in_action(bAction *act, FCurveDescriptor fcurve_descriptor);
|
||||
*/
|
||||
FCurve *fcurve_find_in_action_slot(bAction *act,
|
||||
slot_handle_t slot_handle,
|
||||
FCurveDescriptor fcurve_descriptor);
|
||||
const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Find the F-Curve in the Action Slot assigned to this ADT.
|
||||
*
|
||||
* \see #blender::animrig::fcurve_find_in_action
|
||||
*/
|
||||
FCurve *fcurve_find_in_assigned_slot(AnimData &adt, FCurveDescriptor fcurve_descriptor);
|
||||
FCurve *fcurve_find_in_assigned_slot(AnimData &adt, const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Return whether `fcurve` targets the given collection path + data name.
|
||||
|
||||
@@ -49,8 +49,8 @@ KeyframeSettings get_keyframe_settings(bool from_userprefs);
|
||||
*
|
||||
* If no matching fcurve is found, returns nullptr.
|
||||
*/
|
||||
const FCurve *fcurve_find(Span<const FCurve *> fcurves, FCurveDescriptor fcurve_descriptor);
|
||||
FCurve *fcurve_find(Span<FCurve *> fcurves, FCurveDescriptor fcurve_descriptor);
|
||||
const FCurve *fcurve_find(Span<const FCurve *> fcurves, const FCurveDescriptor &fcurve_descriptor);
|
||||
FCurve *fcurve_find(Span<FCurve *> fcurves, const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/**
|
||||
* Create an fcurve for a specific channel, pre-set-up with default flags and
|
||||
@@ -59,7 +59,7 @@ FCurve *fcurve_find(Span<FCurve *> fcurves, FCurveDescriptor fcurve_descriptor);
|
||||
* If the channel's property subtype is provided, the fcurve will also be set to
|
||||
* the correct color mode based on user preferences.
|
||||
*/
|
||||
FCurve *create_fcurve_for_channel(FCurveDescriptor fcurve_descriptor);
|
||||
FCurve *create_fcurve_for_channel(const FCurveDescriptor &fcurve_descriptor);
|
||||
|
||||
/** Initialize the given BezTriple with default values. */
|
||||
void initialize_bezt(BezTriple *beztr,
|
||||
|
||||
@@ -1832,19 +1832,19 @@ void StripKeyframeData::slot_data_remove(const slot_handle_t slot_handle)
|
||||
this->channelbag_remove(*channelbag);
|
||||
}
|
||||
|
||||
const FCurve *Channelbag::fcurve_find(const FCurveDescriptor fcurve_descriptor) const
|
||||
const FCurve *Channelbag::fcurve_find(const FCurveDescriptor &fcurve_descriptor) const
|
||||
{
|
||||
return animrig::fcurve_find(this->fcurves(), fcurve_descriptor);
|
||||
}
|
||||
|
||||
FCurve *Channelbag::fcurve_find(const FCurveDescriptor fcurve_descriptor)
|
||||
FCurve *Channelbag::fcurve_find(const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
/* Intermediate variable needed to disambiguate const/non-const overloads. */
|
||||
Span<FCurve *> fcurves = this->fcurves();
|
||||
return animrig::fcurve_find(fcurves, fcurve_descriptor);
|
||||
}
|
||||
|
||||
FCurve &Channelbag::fcurve_ensure(Main *bmain, const FCurveDescriptor fcurve_descriptor)
|
||||
FCurve &Channelbag::fcurve_ensure(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
if (FCurve *existing_fcurve = this->fcurve_find(fcurve_descriptor)) {
|
||||
return *existing_fcurve;
|
||||
@@ -1852,7 +1852,7 @@ FCurve &Channelbag::fcurve_ensure(Main *bmain, const FCurveDescriptor fcurve_des
|
||||
return this->fcurve_create(bmain, fcurve_descriptor);
|
||||
}
|
||||
|
||||
FCurve *Channelbag::fcurve_create_unique(Main *bmain, FCurveDescriptor fcurve_descriptor)
|
||||
FCurve *Channelbag::fcurve_create_unique(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
if (this->fcurve_find(fcurve_descriptor)) {
|
||||
return nullptr;
|
||||
@@ -1860,7 +1860,7 @@ FCurve *Channelbag::fcurve_create_unique(Main *bmain, FCurveDescriptor fcurve_de
|
||||
return &this->fcurve_create(bmain, fcurve_descriptor);
|
||||
}
|
||||
|
||||
FCurve &Channelbag::fcurve_create(Main *bmain, FCurveDescriptor fcurve_descriptor)
|
||||
FCurve &Channelbag::fcurve_create(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
FCurve *new_fcurve = create_fcurve_for_channel(fcurve_descriptor);
|
||||
|
||||
@@ -2049,7 +2049,7 @@ static void cyclic_keying_ensure_cycle_range_exists(FCurve &fcurve, const float2
|
||||
|
||||
SingleKeyingResult StripKeyframeData::keyframe_insert(Main *bmain,
|
||||
const Slot &slot,
|
||||
const FCurveDescriptor fcurve_descriptor,
|
||||
const FCurveDescriptor &fcurve_descriptor,
|
||||
const float2 time_value,
|
||||
const KeyframeSettings &settings,
|
||||
const eInsertKeyFlags insert_key_flags,
|
||||
@@ -2466,7 +2466,7 @@ Span<const FCurve *> fcurves_for_action_slot(const Action &action, const slot_ha
|
||||
return bag->fcurves();
|
||||
}
|
||||
|
||||
FCurve *fcurve_find_in_action(bAction *act, FCurveDescriptor fcurve_descriptor)
|
||||
FCurve *fcurve_find_in_action(bAction *act, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
if (act == nullptr) {
|
||||
return nullptr;
|
||||
@@ -2500,14 +2500,14 @@ FCurve *fcurve_find_in_action(bAction *act, FCurveDescriptor fcurve_descriptor)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FCurve *fcurve_find_in_assigned_slot(AnimData &adt, FCurveDescriptor fcurve_descriptor)
|
||||
FCurve *fcurve_find_in_assigned_slot(AnimData &adt, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
return fcurve_find_in_action_slot(adt.action, adt.slot_handle, fcurve_descriptor);
|
||||
}
|
||||
|
||||
FCurve *fcurve_find_in_action_slot(bAction *act,
|
||||
const slot_handle_t slot_handle,
|
||||
FCurveDescriptor fcurve_descriptor)
|
||||
const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
if (act == nullptr) {
|
||||
return nullptr;
|
||||
@@ -2600,7 +2600,7 @@ FCurve *action_fcurve_ensure_ex(Main *bmain,
|
||||
bAction *act,
|
||||
const char group[],
|
||||
PointerRNA *ptr,
|
||||
FCurveDescriptor fcurve_descriptor)
|
||||
const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
if (act == nullptr) {
|
||||
return nullptr;
|
||||
@@ -2663,7 +2663,7 @@ Channelbag *action_channelbag_ensure(bAction &dna_action, ID &animated_id)
|
||||
FCurve *action_fcurve_ensure(Main *bmain,
|
||||
bAction &dna_action,
|
||||
ID &animated_id,
|
||||
FCurveDescriptor fcurve_descriptor)
|
||||
const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
Channelbag *channelbag = action_channelbag_ensure(dna_action, animated_id);
|
||||
BLI_assert(channelbag);
|
||||
@@ -2678,7 +2678,7 @@ FCurve *action_fcurve_ensure_legacy(Main *bmain,
|
||||
bAction *act,
|
||||
const char group[],
|
||||
PointerRNA *ptr,
|
||||
FCurveDescriptor fcurve_descriptor)
|
||||
const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
if (!act) {
|
||||
return nullptr;
|
||||
|
||||
@@ -35,7 +35,7 @@ KeyframeSettings get_keyframe_settings(const bool from_userprefs)
|
||||
return settings;
|
||||
}
|
||||
|
||||
const FCurve *fcurve_find(Span<const FCurve *> fcurves, const FCurveDescriptor fcurve_descriptor)
|
||||
const FCurve *fcurve_find(Span<const FCurve *> fcurves, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
for (const FCurve *fcurve : fcurves) {
|
||||
/* Check indices first, much cheaper than a string comparison. */
|
||||
@@ -47,13 +47,13 @@ const FCurve *fcurve_find(Span<const FCurve *> fcurves, const FCurveDescriptor f
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
FCurve *fcurve_find(Span<FCurve *> fcurves, const FCurveDescriptor fcurve_descriptor)
|
||||
FCurve *fcurve_find(Span<FCurve *> fcurves, const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
const FCurve *fcurve = fcurve_find(fcurves.cast<const FCurve *>(), fcurve_descriptor);
|
||||
return const_cast<FCurve *>(fcurve);
|
||||
}
|
||||
|
||||
FCurve *create_fcurve_for_channel(const FCurveDescriptor fcurve_descriptor)
|
||||
FCurve *create_fcurve_for_channel(const FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
FCurve *fcu = BKE_fcurve_create();
|
||||
fcu->rna_path = BLI_strdupn(fcurve_descriptor.rna_path.data(),
|
||||
|
||||
@@ -530,7 +530,7 @@ static inline void replace_pose_key(Main &bmain,
|
||||
blender::animrig::StripKeyframeData &strip_data,
|
||||
const blender::animrig::Slot &slot,
|
||||
const float2 time_value,
|
||||
const blender::animrig::FCurveDescriptor fcurve_descriptor)
|
||||
const blender::animrig::FCurveDescriptor &fcurve_descriptor)
|
||||
{
|
||||
using namespace blender::animrig;
|
||||
Channelbag &channelbag = strip_data.channelbag_for_slot_ensure(slot);
|
||||
|
||||
@@ -780,7 +780,7 @@ static void GREASE_PENCIL_OT_select_similar(wmOperatorType *ot)
|
||||
|
||||
ot->invoke = WM_menu_invoke;
|
||||
ot->exec = select_similar_exec;
|
||||
ot->poll = editable_grease_pencil_point_selection_poll;
|
||||
ot->poll = editable_grease_pencil_poll;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user