Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in>2021-12-17 16:01:32 +0300
committerSiddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in>2021-12-17 16:01:32 +0300
commitdbc41b30f88b96f7d8c6e995b17f5930eb55cc77 (patch)
treec6c495328443ea3621e5df2ef483b0e0dd504496 /source/blender/editors/animation/anim_channels_defines.c
parent99a2af76d10e05a18987be5d554ada197b1ca086 (diff)
parent7c9e4099854a4fc8eab4db97173c1aacd25f9e08 (diff)
Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-support
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 9f2681fbf7a..2eaa42ee578 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -4158,7 +4158,6 @@ static void ANIM_init_channel_typeinfo_data(void)
}
}
-/* Get type info from given channel type */
const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale)
{
/* Sanity checks. */
@@ -4179,7 +4178,6 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale)
/* --------------------------- */
-/* Print debug info string for the given channel */
void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
{
const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
@@ -4212,11 +4210,25 @@ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
}
}
+bAction *ANIM_channel_action_get(const bAnimListElem *ale)
+{
+ if (ale->datatype == ALE_ACT) {
+ return (bAction *)ale->key_data;
+ }
+
+ if (ELEM(ale->type, ANIMTYPE_GROUP, ANIMTYPE_FCURVE)) {
+ ID *owner = ale->fcurve_owner_id;
+
+ if (owner && GS(owner->name) == ID_AC) {
+ return (bAction *)owner;
+ }
+ }
+
+ return NULL;
+}
+
/* --------------------------- */
-/* Check if some setting for a channel is enabled
- * Returns: 1 = On, 0 = Off, -1 = Invalid
- */
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
{
const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
@@ -4299,10 +4311,6 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
} \
(void)0
-/* Change value of some setting for a channel
- * - setting: eAnimChannel_Settings
- * - mode: eAnimChannels_SetFlag
- */
void ANIM_channel_setting_set(bAnimContext *ac,
bAnimListElem *ale,
eAnimChannel_Settings setting,
@@ -4376,7 +4384,6 @@ static bool achannel_is_being_renamed(const bAnimContext *ac,
return false;
}
-/* Draw the given channel */
void ANIM_channel_draw(
bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index)
{
@@ -5132,7 +5139,6 @@ static void draw_setting_widget(bAnimContext *ac,
}
}
-/* Draw UI widgets the given channel */
void ANIM_channel_draw_widgets(const bContext *C,
bAnimContext *ac,
bAnimListElem *ale,