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:
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c32
-rw-r--r--source/blender/editors/animation/anim_deps.c3
-rw-r--r--source/blender/editors/animation/anim_filter.c3
-rw-r--r--source/blender/editors/animation/anim_ops.c3
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c20
-rw-r--r--source/blender/editors/animation/keyframing.c2
6 files changed, 25 insertions, 38 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 338cbf2cded..c70a86eab1d 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -54,6 +54,7 @@
#include "DNA_simulation_types.h"
#include "DNA_space_types.h"
#include "DNA_speaker_types.h"
+#include "DNA_userdef_types.h"
#include "DNA_volume_types.h"
#include "DNA_world_types.h"
@@ -170,28 +171,9 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac,
}
/* helper method to test if group colors should be drawn */
-static bool acf_show_channel_colors(bAnimContext *ac)
+static bool acf_show_channel_colors(void)
{
- bool showGroupColors = false;
-
- if (ac->sl) {
- switch (ac->spacetype) {
- case SPACE_ACTION: {
- SpaceAction *saction = (SpaceAction *)ac->sl;
- showGroupColors = !(saction->flag & SACTION_NODRAWGCOLORS);
-
- break;
- }
- case SPACE_GRAPH: {
- SpaceGraph *sipo = (SpaceGraph *)ac->sl;
- showGroupColors = !(sipo->flag & SIPO_NODRAWGCOLORS);
-
- break;
- }
- }
- }
-
- return showGroupColors;
+ return (U.animation_flag & USER_ANIM_SHOW_CHANNEL_GROUP_COLORS) != 0;
}
/* get backdrop color for generic channels */
@@ -200,7 +182,7 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
bActionGroup *grp = NULL;
short indent = (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
- bool showGroupColors = acf_show_channel_colors(ac);
+ bool showGroupColors = acf_show_channel_colors();
if (ale->type == ANIMTYPE_FCURVE) {
FCurve *fcu = (FCurve *)ale->data;
@@ -240,7 +222,7 @@ static void acf_gpencil_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
{
const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
short indent = (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
- bool showGroupColors = acf_show_channel_colors(ac);
+ bool showGroupColors = acf_show_channel_colors();
if ((showGroupColors) && (ale->type == ANIMTYPE_GPLAYER)) {
bGPDlayer *gpl = (bGPDlayer *)ale->data;
@@ -848,10 +830,10 @@ static bAnimChannelType ACF_OBJECT = {
/* Group ------------------------------------------- */
/* get backdrop color for group widget */
-static void acf_group_color(bAnimContext *ac, bAnimListElem *ale, float r_color[3])
+static void acf_group_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, float r_color[3])
{
bActionGroup *agrp = (bActionGroup *)ale->data;
- bool showGroupColors = acf_show_channel_colors(ac);
+ bool showGroupColors = acf_show_channel_colors();
if (showGroupColors && agrp->customCol) {
uchar cp[3];
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index b2225ec138f..e552a321bca 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -44,12 +44,13 @@
#include "BKE_gpencil.h"
#include "BKE_main.h"
#include "BKE_node.h"
-#include "BKE_sequencer.h"
#include "DEG_depsgraph.h"
#include "RNA_access.h"
+#include "SEQ_sequencer.h"
+
#include "ED_anim_api.h"
/* **************************** depsgraph tagging ******************************** */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 5dff62459ac..2e65fff69f1 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -96,11 +96,12 @@
#include "BKE_material.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
-#include "BKE_sequencer.h"
#include "ED_anim_api.h"
#include "ED_markers.h"
+#include "SEQ_sequencer.h"
+
#include "UI_resources.h" /* for TH_KEYFRAME_SCALE lookup */
/* ************************************************************ */
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index b52ff131b43..9e622aea6ab 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -37,7 +37,6 @@
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_sequencer.h"
#include "UI_view2d.h"
@@ -56,6 +55,8 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
+#include "SEQ_sequencer.h"
+
#include "anim_intern.h"
/* ********************** frame change operator ***************************/
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index fc622c7a52e..deebf1d1efc 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -21,13 +21,11 @@
* \ingroup edanimation
*/
-/* User-Interface Stuff for F-Modifiers:
- * This file defines the (C-Coded) templates + editing callbacks needed
- * by the interface stuff or F-Modifiers, as used by F-Curves in the Graph Editor,
- * and NLA-Strips in the NLA Editor.
+/**
+ * User Interface for F-Modifiers
*
- * Copy/Paste Buffer for F-Modifiers:
- * For now, this is also defined in this file so that it can be shared between the
+ * This file defines templates and some editing callbacks needed by the interface for
+ * F-Modifiers, as used by F-Curves in the Graph Editor and NLA-Strips in the NLA Editor.
*/
#include <string.h>
@@ -1047,8 +1045,12 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout,
}
}
-/* ********************************************** */
-/* COPY/PASTE BUFFER STUFF */
+/* -------------------------------------------------------------------- */
+/** \name Copy / Paste Buffer Code
+ *
+ * For now, this is also defined in this file so that it can be shared between the graph editor
+ * and the NLA editor.
+ * \{ */
/* Copy/Paste Buffer itself (list of FModifier 's) */
static ListBase fmodifier_copypaste_buf = {NULL, NULL};
@@ -1139,4 +1141,4 @@ bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *c
return ok;
}
-/* ********************************************** */
+/** \} */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 3fb707078b8..09c33c48170 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -430,7 +430,7 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
}
}
}
- /* keyframing modes allow to not replace keyframe */
+ /* Keyframing modes allow not replacing the keyframe. */
else if ((flag & INSERTKEY_REPLACE) == 0) {
/* insert new - if we're not restricted to replacing keyframes only */
BezTriple *newb = MEM_callocN((fcu->totvert + 1) * sizeof(BezTriple), "beztriple");