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/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_channels.c14
-rw-r--r--source/blender/editors/space_nla/nla_draw.c4
-rw-r--r--source/blender/editors/space_nla/nla_edit.c19
-rw-r--r--source/blender/editors/space_nla/nla_ops.c16
-rw-r--r--source/blender/editors/space_nla/nla_select.c4
5 files changed, 27 insertions, 30 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index f2cea23af76..0498964c549 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -288,14 +288,14 @@ static int mouse_nla_channels(
/* button region... */
if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) {
if (nlaedit_is_tweakmode_on(ac) == 0) {
- /* 'push-down' action - only usable when not in TweakMode */
+ /* 'push-down' action - only usable when not in tweak-mode */
/* TODO: make this use the operator instead of calling the function directly
* however, calling the operator requires that we supply the args,
* and that works with proper buttons only */
BKE_nla_action_pushdown(adt, ID_IS_OVERRIDE_LIBRARY(ale->id));
}
else {
- /* when in tweakmode, this button becomes the toggle for mapped editing */
+ /* When in tweak-mode, this button becomes the toggle for mapped editing. */
adt->flag ^= ADT_NLA_EDIT_NOMAP;
}
@@ -308,13 +308,13 @@ static int mouse_nla_channels(
/* NOTE: rest of NLA-Action name doubles for operating on the AnimData block
* - this is useful when there's no clear divider, and makes more sense in
* the case of users trying to use this to change actions
- * - in tweakmode, clicking here gets us out of tweakmode, as changing selection
- * while in tweakmode is really evil!
+ * - in tweak-mode, clicking here gets us out of tweak-mode, as changing selection
+ * while in tweak-mode is really evil!
* - we disable "solo" flags too, to make it easier to work with stashed actions
* with less trouble
*/
if (nlaedit_is_tweakmode_on(ac)) {
- /* exit tweakmode immediately */
+ /* Exit tweak-mode immediately. */
nlaedit_disable_tweakmode(ac, true);
/* changes to NLA-Action occurred */
@@ -515,7 +515,7 @@ static int nlachannels_pushdown_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- /* 'push-down' action - only usable when not in TweakMode */
+ /* 'push-down' action - only usable when not in Tweak-mode. */
BKE_nla_action_pushdown(adt, ID_IS_OVERRIDE_LIBRARY(id));
struct Main *bmain = CTX_data_main(C);
@@ -874,7 +874,7 @@ static int nlaedit_objects_add_exec(bContext *C, wmOperator *UNUSED(op))
/* operate on selected objects... */
CTX_DATA_BEGIN (C, Object *, ob, selected_objects) {
/* ensure that object has AnimData... that's all */
- BKE_animdata_add_id(&ob->id);
+ BKE_animdata_ensure_id(&ob->id);
}
CTX_DATA_END;
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 0fd1a1318e8..f9fb386095d 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -127,8 +127,8 @@ static void nla_action_draw_keyframes(
immRectf(pos_id, f1, ymin + 2, f2, ymax - 2);
immUnbindProgram();
- /* count keys before drawing */
- /* Note: It's safe to cast DLRBT_Tree, as it's designed to degrade down to a ListBase */
+ /* Count keys before drawing. */
+ /* NOTE: It's safe to cast #DLRBT_Tree, as it's designed to degrade down to a #ListBase. */
uint key_len = BLI_listbase_count((ListBase *)&keys);
if (key_len > 0) {
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 3ca3aa15cd3..56efcd8571f 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -65,7 +65,7 @@
#include "UI_view2d.h"
#include "nla_intern.h" /* own include */
-#include "nla_private.h" /* FIXME... maybe this shouldn't be included? */
+#include "nla_private.h" /* FIXME: maybe this shouldn't be included? */
/* -------------------------------------------------------------------- */
/** \name Public Utilities
@@ -135,7 +135,7 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
for (ale = anim_data.first; ale; ale = ale->next) {
AnimData *adt = ale->data;
- /* try entering tweakmode if valid */
+ /* Try entering tweak-mode if valid. */
ok |= BKE_nla_tweakmode_enter(adt);
/* mark the active track as being "solo"? */
@@ -154,9 +154,8 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
ANIM_animdata_update(&ac, &anim_data);
ANIM_animdata_freelist(&anim_data);
- /* if we managed to enter tweakmode on at least one AnimData block,
- * set the flag for this in the active scene and send notifiers
- */
+ /* If we managed to enter tweak-mode on at least one AnimData block,
+ * set the flag for this in the active scene and send notifiers. */
if (ac.scene && ok) {
/* set editing flag */
ac.scene->flag |= SCE_NLA_EDIT_ON;
@@ -206,7 +205,7 @@ void NLA_OT_tweakmode_enter(wmOperatorType *ot)
/** \name Disable Tweak-Mode Operator
* \{ */
-/* NLA Editor internal API function for exiting tweakmode */
+/* NLA Editor internal API function for exiting tweak-mode. */
bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
{
ListBase anim_data = {NULL, NULL};
@@ -232,7 +231,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
BKE_nlatrack_solo_toggle(adt, NULL);
}
- /* to be sure that we're doing everything right, just exit tweakmode... */
+ /* To be sure that we're doing everything right, just exit tweak-mode. */
BKE_nla_tweakmode_exit(adt);
ale->update |= ANIM_UPDATE_DEPS;
@@ -242,7 +241,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
ANIM_animdata_update(ac, &anim_data);
ANIM_animdata_freelist(&anim_data);
- /* if we managed to enter tweakmode on at least one AnimData block,
+ /* if we managed to enter tweak-mode on at least one AnimData block,
* set the flag for this in the active scene and send notifiers
*/
if (ac->scene) {
@@ -257,7 +256,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
return true;
}
-/* exit tweakmode operator callback */
+/* Exit tweak-mode operator callback. */
static int nlaedit_disable_tweakmode_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -1157,7 +1156,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op)
NlaStrip *strip, *nstrip, *next;
NlaTrack *track;
- /* Note: We allow this operator in override context because it is almost always (from possible
+ /* NOTE: We allow this operator in override context because it is almost always (from possible
* default user interactions) paired with the transform one, which will ensure that the new
* strip ends up in a valid (local) track. */
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 631dc2e550c..28f194877fa 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -39,17 +39,16 @@
/* ************************** poll callbacks for operators **********************************/
-/* tweakmode is NOT enabled */
+/* Tweak-mode is NOT enabled. */
bool nlaop_poll_tweakmode_off(bContext *C)
{
Scene *scene;
/* for now, we check 2 things:
* 1) active editor must be NLA
- * 2) tweakmode is currently set as a 'per-scene' flag
+ * 2) tweak-mode is currently set as a 'per-scene' flag
* so that it will affect entire NLA data-sets,
- * but not all AnimData blocks will be in tweakmode for
- * various reasons
+ * but not all AnimData blocks will be in tweak-mode for various reasons.
*/
if (ED_operator_nla_active(C) == 0) {
return 0;
@@ -63,17 +62,16 @@ bool nlaop_poll_tweakmode_off(bContext *C)
return 1;
}
-/* tweakmode IS enabled */
+/* Tweak-mode IS enabled. */
bool nlaop_poll_tweakmode_on(bContext *C)
{
Scene *scene;
/* for now, we check 2 things:
* 1) active editor must be NLA
- * 2) tweakmode is currently set as a 'per-scene' flag
+ * 2) tweak-mode is currently set as a 'per-scene' flag
* so that it will affect entire NLA data-sets,
- * but not all AnimData blocks will be in tweakmode for
- * various reasons
+ * but not all AnimData blocks will be in tweak-mode for various reasons.
*/
if (ED_operator_nla_active(C) == 0) {
return 0;
@@ -87,7 +85,7 @@ bool nlaop_poll_tweakmode_on(bContext *C)
return 1;
}
-/* is tweakmode enabled - for use in NLA operator code */
+/* is tweak-mode enabled - for use in NLA operator code */
bool nlaedit_is_tweakmode_on(bAnimContext *ac)
{
if (ac && ac->scene) {
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index dc95a01a021..246c3e0156a 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -453,7 +453,7 @@ static void nlaedit_select_leftright(bContext *C,
Scene *scene = ac->scene;
float xmin, xmax;
- /* if currently in tweakmode, exit tweakmode first */
+ /* if currently in tweak-mode, exit tweak-mode first */
if (scene->flag & SCE_NLA_EDIT_ON) {
WM_operator_name_call(C, "NLA_OT_tweakmode_exit", WM_OP_EXEC_DEFAULT, NULL);
}
@@ -612,7 +612,7 @@ static int mouse_nla_strips(bContext *C,
nlaedit_strip_at_region_position(ac, mval[0], mval[1], &ale, &strip);
- /* if currently in tweakmode, exit tweakmode before changing selection states
+ /* if currently in tweak-mode, exit tweak-mode before changing selection states
* now that we've found our target...
*/
if (scene->flag & SCE_NLA_EDIT_ON) {