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:
authorCampbell Barton <ideasman42@gmail.com>2018-11-14 09:12:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-14 09:21:34 +0300
commit55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch)
tree563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors/space_nla
parentc279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff)
parentd7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c4
-rw-r--r--source/blender/editors/space_nla/nla_channels.c6
-rw-r--r--source/blender/editors/space_nla/nla_draw.c44
-rw-r--r--source/blender/editors/space_nla/nla_edit.c20
-rw-r--r--source/blender/editors/space_nla/nla_ops.c27
-rw-r--r--source/blender/editors/space_nla/nla_select.c28
6 files changed, 65 insertions, 64 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index d3964698fa3..d5d50c86851 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -95,7 +95,7 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p
return false;
/* extract list of active channel(s), of which we should only take the first one
- * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
+ * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
*/
// XXX: double-check active!
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_LIST_CHANNELS);
@@ -367,7 +367,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
/* blend in/out + autoblending
- * - blend in/out can only be set when autoblending is off
+ * - blend in/out can only be set when autoblending is off
*/
column = uiLayoutColumn(layout, true);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 132a296d5a3..9f634851c81 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -75,7 +75,7 @@
* part of the channel is relevant.
*
* NOTE: eventually, this should probably be phased out when many of these things are replaced with buttons
- * --> Most channels are now selection only...
+ * --> Most channels are now selection only...
*/
static int mouse_nla_channels(bContext *C, bAnimContext *ac, float x, int channel_index, short selectmode)
@@ -375,8 +375,8 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmEv
/* figure out which channel user clicked in
* Note: although channels technically start at y= NLACHANNEL_FIRST, we need to adjust by half a channel's height
- * so that the tops of channels get caught ok. Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use
- * NLACHANNEL_HEIGHT_HALF.
+ * so that the tops of channels get caught ok. Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use
+ * NLACHANNEL_HEIGHT_HALF.
*/
UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y);
UI_view2d_listview_view_to_cell(v2d, NLACHANNEL_NAMEWIDTH, NLACHANNEL_STEP(snla), 0, (float)NLACHANNEL_HEIGHT_HALF(snla), x, y, NULL, &channel_index);
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 15a66b225c9..2cba6cf2fb2 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -112,8 +112,8 @@ static void nla_action_draw_keyframes(View2D *v2d, AnimData *adt, bAction *act,
return;
/* draw a darkened region behind the strips
- * - get and reset the background color, this time without the alpha to stand out better
- * (amplified alpha is used instead)
+ * - get and reset the background color, this time without the alpha to stand out better
+ * (amplified alpha is used instead)
*/
float color[4];
nla_action_get_color(adt, act, color);
@@ -126,8 +126,8 @@ static void nla_action_draw_keyframes(View2D *v2d, AnimData *adt, bAction *act,
immUniformColor4fv(color);
- /* - draw a rect from the first to the last frame (no extra overlaps for now)
- * that is slightly stumpier than the track background (hardcoded 2-units here)
+ /* - draw a rect from the first to the last frame (no extra overlaps for now)
+ * that is slightly stumpier than the track background (hardcoded 2-units here)
*/
float f1 = ((ActKeyColumn *)keys.first)->cfra;
float f2 = ((ActKeyColumn *)keys.last)->cfra;
@@ -152,7 +152,7 @@ static void nla_action_draw_keyframes(View2D *v2d, AnimData *adt, bAction *act,
immBegin(GPU_PRIM_POINTS, key_len);
/* - disregard the selection status of keyframes so they draw a certain way
- * - size is 6.0f which is smaller than the editable keyframes, so that there is a distinction
+ * - size is 6.0f which is smaller than the editable keyframes, so that there is a distinction
*/
for (ActKeyColumn *ak = keys.first; ak; ak = ak->next) {
draw_keyframe_shape(ak->cfra, y, 6.0f, false, ak->key_type, KEYFRAME_SHAPE_FRAME, 1.0f,
@@ -323,7 +323,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uns
immBegin(GPU_PRIM_LINE_STRIP, abs((int)(strip->end - strip->start) + 1));
/* sample at 1 frame intervals, and draw
- * - min y-val is yminc, max is y-maxc, so clamp in those regions
+ * - min y-val is yminc, max is y-maxc, so clamp in those regions
*/
for (cfra = strip->start; cfra <= strip->end; cfra += 1.0f) {
float y = evaluate_fcurve(fcu, cfra); /* assume this to be in 0-1 range */
@@ -409,7 +409,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
/* draw extrapolation info first (as backdrop)
- * - but this should only be drawn if track has some contribution
+ * - but this should only be drawn if track has some contribution
*/
if ((strip->extendmode != NLASTRIP_EXTEND_NOTHING) && (non_solo == 0)) {
/* enable transparency... */
@@ -472,7 +472,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
/* draw strip's control 'curves'
- * - only if user hasn't hidden them...
+ * - only if user hasn't hidden them...
*/
if ((snla->flag & SNLA_NOSTRIPCURVES) == 0)
nla_draw_strip_curves(strip, yminc, ymaxc, shdr_pos);
@@ -484,7 +484,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
nla_strip_draw_markers(strip, yminc, ymaxc);
/* draw strip outline
- * - color used here is to indicate active vs non-active
+ * - color used here is to indicate active vs non-active
*/
if (strip->flag & NLASTRIP_FLAG_ACTIVE) {
/* strip should appear 'sunken', so draw a light border around it */
@@ -541,7 +541,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
/* only draw first-level of child-strips, but don't draw any lines on the endpoints */
for (NlaStrip *cs = strip->strips.first; cs; cs = cs->next) {
/* draw start-line if not same as end of previous (and only if not the first strip)
- * - on upper half of strip
+ * - on upper half of strip
*/
if ((cs->prev) && IS_EQF(cs->prev->end, cs->start) == 0) {
immVertex2f(shdr_pos, cs->start, y);
@@ -549,7 +549,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
}
/* draw end-line if not the last strip
- * - on lower half of strip
+ * - on lower half of strip
*/
if (cs->next) {
immVertex2f(shdr_pos, cs->end, yminc);
@@ -596,7 +596,7 @@ static void nla_draw_strip_text(
col[3] = 128;
/* set bounding-box for text
- * - padding of 2 'units' on either side
+ * - padding of 2 'units' on either side
*/
/* TODO: make this centered? */
rctf rect = {
@@ -623,8 +623,8 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V
/* Always draw times above the strip, whereas sequencer drew below + above.
* However, we should be fine having everything on top, since these tend to be
* quite spaced out.
- * - 1 dp is compromise between lack of precision (ints only, as per sequencer)
- * while also preserving some accuracy, since we do use floats
+ * - 1 dp is compromise between lack of precision (ints only, as per sequencer)
+ * while also preserving some accuracy, since we do use floats
*/
/* start frame */
numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%.1f", strip->start);
@@ -649,10 +649,10 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar)
size_t items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
- * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
- * start of list offset, and the second is as a correction for the scrollers.
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
*/
int height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2));
@@ -788,10 +788,10 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *ar)
items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
- * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
- * start of list offset, and the second is as a correction for the scrollers.
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
*/
int height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2));
/* don't use totrect set, as the width stays the same
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 387560c3f6c..3cab4cfefca 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -628,7 +628,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op)
nlaedit_add_tracks_empty(&ac);
/* get a list of the editable tracks being shown in the NLA
- * - this is limited to active ones for now, but could be expanded to
+ * - this is limited to active ones for now, but could be expanded to
*/
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_FOREDIT);
items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
@@ -758,8 +758,8 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
if (IS_EQF(s1->end, s2->start))
continue;
/* make sure neither one is a transition
- * - although this is impossible to create with the standard tools,
- * the user may have altered the settings
+ * - although this is impossible to create with the standard tools,
+ * the user may have altered the settings
*/
if (ELEM(NLASTRIP_TYPE_TRANSITION, s1->type, s2->type))
continue;
@@ -775,9 +775,9 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
strip->type = NLASTRIP_TYPE_TRANSITION;
/* generic settings
- * - selected flag to highlight this to the user
- * - auto-blends to ensure that blend in/out values are automatically
- * determined by overlaps of strips
+ * - selected flag to highlight this to the user
+ * - auto-blends to ensure that blend in/out values are automatically
+ * determined by overlaps of strips
*/
strip->flag = NLASTRIP_FLAG_SELECT | NLASTRIP_FLAG_AUTO_BLENDS;
@@ -1081,8 +1081,8 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op)
/* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */
if (BKE_nlatrack_add_strip(nlt->next, nstrip) == 0) {
/* need to add a new track above the one above the current one
- * - if the current one is the last one, nlt->next will be NULL, which defaults to adding
- * at the top of the stack anyway...
+ * - if the current one is the last one, nlt->next will be NULL, which defaults to adding
+ * at the top of the stack anyway...
*/
track = BKE_nlatrack_add(adt, nlt->next);
BKE_nlatrack_add_strip(track, nstrip);
@@ -1238,7 +1238,7 @@ static void nlaedit_split_strip_actclip(Main *bmain, AnimData *adt, NlaTrack *nl
float splitframe, splitaframe;
/* calculate the frames to do the splitting at
- * - use current frame if within extents of strip
+ * - use current frame if within extents of strip
*/
if ((cfra > strip->start) && (cfra < strip->end)) {
/* use the current frame */
@@ -1480,7 +1480,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
}
/* get two selected strips only (these will be metas due to prev step) to operate on
- * - only allow swapping 2, as with more the context becomes unclear
+ * - only allow swapping 2, as with more the context becomes unclear
*/
for (strip = nlt->strips.first; strip; strip = stripN) {
stripN = strip->next;
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index abe99eca381..0122306f709 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -58,11 +58,11 @@ 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
- * so that it will affect entire NLA data-sets,
- * but not all AnimData blocks will be in tweakmode for
- * various reasons
+ * 1) active editor must be NLA
+ * 2) tweakmode 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
*/
if (ED_operator_nla_active(C) == 0)
return 0;
@@ -80,11 +80,11 @@ 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
- * so that it will affect entire NLA data-sets,
- * but not all AnimData blocks will be in tweakmode for
- * various reasons
+ * 1) active editor must be NLA
+ * 2) tweakmode 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
*/
if (ED_operator_nla_active(C) == 0)
return 0;
@@ -179,10 +179,11 @@ void nla_keymap(wmKeyConfig *keyconf)
/* channels ---------------------------------------------------------- */
/* Channels are not directly handled by the NLA Editor module, but are inherited from the Animation module.
- * Most of the relevant operations, keymaps, drawing, etc. can therefore all be found in that module instead, as there
- * are many similarities with the other Animation Editors.
+ * Most of the relevant operations, keymaps, drawing, etc. can therefore all
+ * be found in that module instead, as there are many similarities with the other Animation Editors.
*
- * However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead
+ * However, those operations which involve clicking on channels and/or
+ * the placement of them in the view are implemented here instead
*/
WM_keymap_ensure(keyconf, "NLA Channels", SPACE_NLA, 0);
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index 0df5df2f31d..db7f5d707d2 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -80,9 +80,9 @@ static short selmodes_to_flagmodes(short sel)
/* ******************** Deselect All Operator ***************************** */
/* This operator works in one of three ways:
- * 1) (de)select all (AKEY) - test if select all or deselect all
- * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
- * 3) (de)select all - no testing is done; only for use internal tools as normal function...
+ * 1) (de)select all (AKEY) - test if select all or deselect all
+ * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
+ * 3) (de)select all - no testing is done; only for use internal tools as normal function...
*/
enum {
@@ -92,13 +92,13 @@ enum {
} /*eDeselectNlaStrips*/;
/* Deselects strips in the NLA Editor
- * - This is called by the deselect all operator, as well as other ones!
+ * - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all (1) or clear all active (2)
- * - sel: how to select keyframes
- * 0 = deselect
- * 1 = select
- * 2 = invert
+ * - test: check if select or deselect all (1) or clear all active (2)
+ * - sel: how to select keyframes
+ * 0 = deselect
+ * 1 = select
+ * 2 = invert
*/
static void deselect_nla_strips(bAnimContext *ac, short test, short sel)
{
@@ -317,9 +317,9 @@ static int nlaedit_box_select_exec(bContext *C, wmOperator *op)
/* selection 'mode' depends on whether box_select region only matters on one axis */
if (RNA_boolean_get(op->ptr, "axis_range")) {
/* mode depends on which axis of the range is larger to determine which axis to use
- * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
- * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
- * used for tweaking timing when "blocking", while channels is not that useful...
+ * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
+ * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
+ * used for tweaking timing when "blocking", while channels is not that useful...
*/
if (BLI_rcti_size_x(&rect) >= BLI_rcti_size_y(&rect))
mode = NLA_BOXSEL_FRAMERANGE;
@@ -603,8 +603,8 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s
ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT);
/* if we selected it, we can make it active too
- * - we always need to clear the active strip flag though...
- * - as well as selecting its track...
+ * - we always need to clear the active strip flag though...
+ * - as well as selecting its track...
*/
deselect_nla_strips(ac, DESELECT_STRIPS_CLEARACTIVE, 0);