diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:12:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:21:34 +0300 |
commit | 55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch) | |
tree | 563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors | |
parent | c279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff) | |
parent | d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors')
71 files changed, 804 insertions, 803 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index d6f52114708..8896de75472 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -202,8 +202,8 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa } /* set color for normal channels - * - use 3 shades of color group/standard color for 3 indention level - * - only use group colors if allowed to, and if actually feasible + * - use 3 shades of color group/standard color for 3 indention level + * - only use group colors if allowed to, and if actually feasible */ if (showGroupColors && (grp) && (grp->customCol)) { unsigned char cp[3]; @@ -440,8 +440,8 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi acf->get_backdrop_color(ac, ale, color); /* rounded corners on LHS only - * - top and bottom - * - special hack: make the top a bit higher, since we are first... + * - top and bottom + * - special hack: make the top a bit higher, since we are first... */ UI_draw_roundbox_corner_set(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT); UI_draw_roundbox_3fvAlpha(true, 0, yminc - 2, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8, color, 1.0f); @@ -488,7 +488,7 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings s bAnimContext *ac = (bAnimContext *)ale->data; /* if data is valid, return pointer to active dopesheet's relevant flag - * - this is restricted to DopeSheet/Action Editor only + * - this is restricted to DopeSheet/Action Editor only */ if ((ac->sl) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) { SpaceAction *saction = (SpaceAction *)ac->sl; @@ -3736,8 +3736,8 @@ 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 + * - setting: eAnimChannel_Settings + * - mode: eAnimChannels_SetFlag */ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode) { @@ -3859,9 +3859,9 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float GPU_blend(false); /* step 4) draw special toggles ................................. - * - in Graph Editor, checkboxes for visibility in curves area - * - in NLA Editor, glowing dots for solo/not solo... - * - in Grease Pencil mode, color swatches for layer color + * - in Graph Editor, checkboxes for visibility in curves area + * - in NLA Editor, glowing dots for solo/not solo... + * - in Grease Pencil mode, color swatches for layer color */ if (ac->sl) { if ((ac->spacetype == SPACE_IPO) && @@ -4005,9 +4005,9 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float } /* draw slider - * - even if we can draw sliders for this view, we must also check that the channel-type supports them - * (only only F-Curves really can support them for now) - * - slider should start before the toggles (if they're visible) to keep a clean line down the side + * - even if we can draw sliders for this view, we must also check that the channel-type supports them + * (only only F-Curves really can support them for now) + * - slider should start before the toggles (if they're visible) to keep a clean line down the side */ if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) { /* adjust offset */ @@ -4016,8 +4016,8 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float /* finally draw a backdrop rect behind these - * - starts from the point where the first toggle/slider starts, - * - ends past the space that might be reserved for a scroller + * - starts from the point where the first toggle/slider starts, + * - ends past the space that might be reserved for a scroller */ immRectf(pos, v2d->cur.xmax - (float)offset, yminc + ymin_ofs, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc); @@ -4448,9 +4448,9 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle } /* step 3) draw special toggles ................................. - * - in Graph Editor, checkboxes for visibility in curves area - * - in NLA Editor, glowing dots for solo/not solo... - * - in Grease Pencil mode, color swatches for layer color + * - in Graph Editor, checkboxes for visibility in curves area + * - in NLA Editor, glowing dots for solo/not solo... + * - in Grease Pencil mode, color swatches for layer color */ if (ac->sl) { if ((ac->spacetype == SPACE_IPO) && @@ -4618,12 +4618,12 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle } /* draw slider - * - even if we can draw sliders for this view, we must also check that the channel-type supports them - * (only only F-Curves really can support them for now) - * - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately, - * wherever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment, - * and wouldn't be able to auto-keyframe... - * - slider should start before the toggles (if they're visible) to keep a clean line down the side + * - even if we can draw sliders for this view, we must also check that the channel-type supports them + * (only only F-Curves really can support them for now) + * - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately, + * wherever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment, + * and wouldn't be able to auto-keyframe... + * - slider should start before the toggles (if they're visible) to keep a clean line down the side */ if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) { /* adjust offset */ diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 959dff28c18..2dec9c251f5 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -254,10 +254,10 @@ static void select_pchan_for_action_group(bAnimContext *ac, bActionGroup *agrp, } /* Deselect all animation channels - * - data: pointer to datatype, as contained in bAnimContext - * - datatype: the type of data that 'data' represents (eAnimCont_Types) - * - test: check if deselecting instead of selecting - * - sel: eAnimChannels_SetFlag; + * - data: pointer to datatype, as contained in bAnimContext + * - datatype: the type of data that 'data' represents (eAnimCont_Types) + * - test: check if deselecting instead of selecting + * - sel: eAnimChannels_SetFlag; */ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel) { @@ -453,13 +453,13 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d /* ---------------------------- Graph Editor ------------------------------------- */ /* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting - * - anim_data: list of the all the anim channels that can be chosen - * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too, - * then the channels under closed expanders get ignored... - * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there) - * with the new state of the setting that we want flushed up/down the hierarchy - * - setting: type of setting to set - * - on: whether the visibility setting has been enabled or disabled + * - anim_data: list of the all the anim channels that can be chosen + * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too, + * then the channels under closed expanders get ignored... + * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there) + * with the new state of the setting that we want flushed up/down the hierarchy + * - setting: type of setting to set + * - on: whether the visibility setting has been enabled or disabled */ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode) { @@ -508,12 +508,12 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn /* flush up? * * For Visibility: - * - only flush up if the current state is now enabled (positive 'on' state is default) - * (otherwise, it's too much work to force the parents to be inactive too) + * - only flush up if the current state is now enabled (positive 'on' state is default) + * (otherwise, it's too much work to force the parents to be inactive too) * * For everything else: - * - only flush up if the current state is now disabled (negative 'off' state is default) - * (otherwise, it's too much work to force the parents to be active too) + * - only flush up if the current state is now disabled (negative 'off' state is default) + * (otherwise, it's too much work to force the parents to be active too) */ if ( ((setting == ACHANNEL_SETTING_VISIBLE) && (mode != ACHANNEL_SETFLAG_CLEAR)) || ((setting != ACHANNEL_SETTING_VISIBLE) && (mode == ACHANNEL_SETFLAG_CLEAR))) @@ -600,17 +600,17 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu) { /* - if no AnimData, we've got nowhere to remove the F-Curve from - * (this doesn't guarantee that the F-Curve is in there, but at least we tried + * (this doesn't guarantee that the F-Curve is in there, but at least we tried * - if no F-Curve, there is nothing to remove */ if (ELEM(NULL, adt, fcu)) return; /* remove from whatever list it came from - * - Action Group - * - Action - * - Drivers - * - TODO... some others? + * - Action Group + * - Action + * - Drivers + * - TODO... some others? */ if ((ac) && (ac->datatype == ANIMCONT_DRIVERS)) { /* driver F-Curve */ @@ -1013,8 +1013,8 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re } /* perform moving of selected islands now, but only if there is more than one of 'em so that something will happen - * - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we - * shouldn't need to encounter items we've moved already + * - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we + * shouldn't need to encounter items we've moved already */ if (islands.first != islands.last) { tReorderChannelIsland *first = (mode > 0) ? islands.last : islands.first; @@ -1042,7 +1042,7 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re /* Change the order NLA Tracks within NLA Stack * ! NLA tracks are displayed in opposite order, so directions need care - * mode: REARRANGE_ANIMCHAN_* + * mode: REARRANGE_ANIMCHAN_* */ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAnimChan_Mode mode) { @@ -1070,7 +1070,7 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn /* Drivers Specific Stuff ------------------------------------------------- */ /* Change the order drivers within AnimData block - * mode: REARRANGE_ANIMCHAN_* + * mode: REARRANGE_ANIMCHAN_* */ static void rearrange_driver_channels(bAnimContext *ac, AnimData *adt, eRearrangeAnimChan_Mode mode) { @@ -1185,7 +1185,7 @@ static void join_groups_action_temp(bAction *act) } /* Change the order of anim-channels within action - * mode: REARRANGE_ANIMCHAN_* + * mode: REARRANGE_ANIMCHAN_* */ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrangeAnimChan_Mode mode) { @@ -1206,8 +1206,8 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_GROUP); /* rearrange groups first - * - the group's channels will only get considered if nothing happened when rearranging the groups - * i.e. the rearrange function returned 0 + * - the group's channels will only get considered if nothing happened when rearranging the groups + * i.e. the rearrange function returned 0 */ do_channels = (rearrange_animchannel_islands(&act->groups, rearrange_func, mode, ANIMTYPE_GROUP, &anim_data_visible) == 0); @@ -1792,9 +1792,9 @@ static const EnumPropertyItem prop_animchannel_settings_types[] = { /* ------------------- */ /* Set/clear a particular flag (setting) for all selected + visible channels - * setting: the setting to modify - * mode: eAnimChannels_SetFlag - * onlysel: only selected channels get the flag set + * setting: the setting to modify + * mode: eAnimChannels_SetFlag + * onlysel: only selected channels get the flag set */ // TODO: enable a setting which turns flushing on/off? static void setflag_anim_channels(bAnimContext *ac, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode, bool onlysel, bool flush) @@ -1887,7 +1887,7 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op) flush = false; /* modify setting - * - only selected channels are affected + * - only selected channels are affected */ setflag_anim_channels(&ac, setting, mode, true, flush); @@ -2583,8 +2583,8 @@ static int animchannels_channel_get(bAnimContext *ac, const int mval[2]) /* figure out which channel user clicked in * Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height - * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use - * ACHANNEL_HEIGHT_HALF. + * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use + * ACHANNEL_HEIGHT_HALF. */ UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); @@ -2910,7 +2910,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, bGPdata *gpd = (bGPdata *)ale->data; /* toggle expand - * - although the triangle widget already allows this, the whole channel can also be used for this purpose + * - although the triangle widget already allows this, the whole channel can also be used for this purpose */ gpd->flag ^= GP_DATA_EXPAND; @@ -2949,7 +2949,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, Mask *mask = (Mask *)ale->data; /* toggle expand - * - although the triangle widget already allows this, the whole channel can also be used for this purpose + * - although the triangle widget already allows this, the whole channel can also be used for this purpose */ mask->flag ^= MASK_ANIMF_EXPAND; @@ -3019,8 +3019,8 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmE /* figure out which channel user clicked in * Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height - * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use - * ACHANNEL_HEIGHT_HALF. + * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use + * ACHANNEL_HEIGHT_HALF. */ UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y); UI_view2d_listview_view_to_cell(v2d, ACHANNEL_NAMEWIDTH, ACHANNEL_STEP(&ac), 0, (float)ACHANNEL_HEIGHT_HALF(&ac), x, y, NULL, &channel_index); diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 2ed5d35b613..c9b393601b2 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -130,8 +130,8 @@ void ANIM_id_update(Main *bmain, ID *id) /* **************************** animation data <-> data syncing ******************************** */ /* This code here is used to synchronize the - * - selection (to find selected data easier) - * - ... (insert other relevant items here later) + * - selection (to find selected data easier) + * - ... (insert other relevant items here later) * status in relevant Blender data with the status stored in animation channels. * * This should be called in the refresh() callbacks for various editors in diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index a2046985a36..239ab5f8206 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -91,7 +91,7 @@ void ANIM_draw_cfra_number(const bContext *C, View2D *v2d, short flag) GPU_matrix_scale_2f(1.0f / xscale, 1.0f); /* get timecode string - * - padding on str-buf passed so that it doesn't sit on the frame indicator + * - padding on str-buf passed so that it doesn't sit on the frame indicator */ if (show_time) { BLI_timecode_string_from_time(&numstr[2], sizeof(numstr) - 2, 0, FRA2TIME(cfra), FPS, U.timecode_style); @@ -305,8 +305,8 @@ static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt) /* Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve - * - restore = whether to map points back to non-mapped time - * - only_keys = whether to only adjust the location of the center point of beztriples + * - restore = whether to map points back to non-mapped time + * - only_keys = whether to only adjust the location of the center point of beztriples */ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys) { @@ -314,8 +314,8 @@ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, boo KeyframeEditFunc map_cb; /* init edit data - * - AnimData is stored in 'data' - * - only_keys is stored in 'i1' + * - AnimData is stored in 'data' + * - only_keys is stored in 'i1' */ ked.data = (void *)adt; ked.i1 = (int)only_keys; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index e59f563c261..5f23762386e 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -348,8 +348,8 @@ static bool nlaedit_get_context(bAnimContext *ac, SpaceNla *snla) /* ----------- Public API --------------- */ /* Obtain current anim-data context, given that context info from Blender context has already been set - * - AnimContext to write to is provided as pointer to var on stack so that we don't have - * allocation/freeing costs (which are not that avoidable with channels). + * - AnimContext to write to is provided as pointer to var on stack so that we don't have + * allocation/freeing costs (which are not that avoidable with channels). */ bool ANIM_animdata_context_getdata(bAnimContext *ac) { @@ -385,9 +385,9 @@ bool ANIM_animdata_context_getdata(bAnimContext *ac) } /* Obtain current anim-data context from Blender Context info - * - AnimContext to write to is provided as pointer to var on stack so that we don't have - * allocation/freeing costs (which are not that avoidable with channels). - * - Clears data and sets the information from Blender Context which is useful + * - AnimContext to write to is provided as pointer to var on stack so that we don't have + * allocation/freeing costs (which are not that avoidable with channels). + * - Clears data and sets the information from Blender Context which is useful */ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) { @@ -431,12 +431,12 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) * to abstract away some of the tricky logic involved * * cases: - * 1) Graph Edit main area (just data) OR channels visible in Channel List - * 2) If not showing channels, we're only interested in the data (Action Editor's editing) - * 3) We don't care what data, we just care there is some (so that a collapsed - * channel can be kept around). No need to clear channels-flag in order to - * keep expander channels with no sub-data out, as those cases should get - * dealt with by the recursive detection idiom in place. + * 1) Graph Edit main area (just data) OR channels visible in Channel List + * 2) If not showing channels, we're only interested in the data (Action Editor's editing) + * 3) We don't care what data, we just care there is some (so that a collapsed + * channel can be kept around). No need to clear channels-flag in order to + * keep expander channels with no sub-data out, as those cases should get + * dealt with by the recursive detection idiom in place. * * Implementation Note: * YES the _doSubChannels variable is NOT read anywhere. BUT, this is NOT an excuse @@ -483,28 +483,28 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) * * For this to work correctly, a standard set of data needs to be available within the scope that this * gets called in: - * - ListBase anim_data; - * - bDopeSheet *ads; - * - bAnimListElem *ale; - * - size_t items; + * - ListBase anim_data; + * - bDopeSheet *ads; + * - bAnimListElem *ale; + * - size_t items; * - * - id: ID block which should have an AnimData pointer following it immediately, to use - * - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA) - * - nlaOk: line or block of code to execute for NLA tracks+strips case - * - driversOk: line or block of code to execute for Drivers case - * - nlaKeysOk: line or block of code for NLA Strip Keyframes case - * - keysOk: line or block of code for Keyframes case + * - id: ID block which should have an AnimData pointer following it immediately, to use + * - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA) + * - nlaOk: line or block of code to execute for NLA tracks+strips case + * - driversOk: line or block of code to execute for Drivers case + * - nlaKeysOk: line or block of code for NLA Strip Keyframes case + * - keysOk: line or block of code for Keyframes case * * The checks for the various cases are as follows: - * 0) top level: checks for animdata and also that all the F-Curves for the block will be visible - * 1) animdata check: for filtering animdata blocks only - * 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there - * 2B) actions to convert to nla: include animdata block's data as there is an action that can be - * converted to a new NLA strip, and the filtering options allow this - * 2C) allow non-animated datablocks to be included so that datablocks can be added - * 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor) - * 4A) nla strip keyframes: these are the per-strip controls for time and influence - * 4B) normal keyframes: only when there is an active action + * 0) top level: checks for animdata and also that all the F-Curves for the block will be visible + * 1) animdata check: for filtering animdata blocks only + * 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there + * 2B) actions to convert to nla: include animdata block's data as there is an action that can be + * converted to a new NLA strip, and the filtering options allow this + * 2C) allow non-animated datablocks to be included so that datablocks can be added + * 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor) + * 4A) nla strip keyframes: these are the per-strip controls for time and influence + * 4B) normal keyframes: only when there is an active action */ #define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \ { \ @@ -574,12 +574,12 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) ((filter_mode & ANIMFILTER_UNSEL) && test_func == 0) ) /* quick macro to test if an anim-channel (F-Curve) is selected ok for editing purposes - * - _SELEDIT means that only selected curves will have visible+editable keyframes + * - _SELEDIT means that only selected curves will have visible+editable keyframes * * checks here work as follows: - * 1) seledit off - don't need to consider the implications of this option - * 2) foredit off - we're not considering editing, so channel is ok still - * 3) test_func (i.e. selection test) - only if selected, this test will pass + * 1) seledit off - don't need to consider the implications of this option + * 2) foredit off - we're not considering editing, so channel is ok still + * 3) test_func (i.e. selection test) - only if selected, this test will pass */ #define ANIMCHANNEL_SELEDITOK(test_func) \ (!(filter_mode & ANIMFILTER_SELEDIT) || \ @@ -1197,12 +1197,12 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, eAnim_Chan */ for (fcu = first; ((fcu) && (fcu->grp == grp)); fcu = fcu->next) { /* special exception for Pose-Channel/Sequence-Strip/Node Based F-Curves: - * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which - * can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes. - * Since these checks were traditionally done as first check for objects, we do the same here - * - we currently use an 'approximate' method for getting these F-Curves that doesn't require - * carefully checking the entire path - * - this will also affect things like Drivers, and also works for Bone Constraints + * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which + * can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes. + * Since these checks were traditionally done as first check for objects, we do the same here + * - we currently use an 'approximate' method for getting these F-Curves that doesn't require + * carefully checking the entire path + * - this will also affect things like Drivers, and also works for Bone Constraints */ if (ads && owner_id) { if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) { @@ -1255,13 +1255,13 @@ static size_t animfilter_fcurves(ListBase *anim_data, bDopeSheet *ads, size_t items = 0; /* loop over every F-Curve able to be included - * - this for-loop works like this: - * 1) the starting F-Curve is assigned to the fcu pointer so that we have a starting point to search from - * 2) the first valid F-Curve to start from (which may include the one given as 'first') in the remaining - * list of F-Curves is found, and verified to be non-null - * 3) the F-Curve referenced by fcu pointer is added to the list - * 4) the fcu pointer is set to the F-Curve after the one we just added, so that we can keep going through - * the rest of the F-Curve list without an eternal loop. Back to step 2 :) + * - this for-loop works like this: + * 1) the starting F-Curve is assigned to the fcu pointer so that we have a starting point to search from + * 2) the first valid F-Curve to start from (which may include the one given as 'first') in the remaining + * list of F-Curves is found, and verified to be non-null + * 3) the F-Curve referenced by fcu pointer is added to the list + * 4) the fcu pointer is set to the F-Curve after the one we just added, so that we can keep going through + * the rest of the F-Curve list without an eternal loop. Back to step 2 :) */ for (fcu = first; ( (fcu = animfilter_fcurve_next(ads, fcu, fcurve_type, filter_mode, owner, owner_id)) ); fcu = fcu->next) { if (UNLIKELY(fcurve_type == ANIMTYPE_NLACURVE)) { @@ -1290,9 +1290,9 @@ static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeS /* if we care about the selection status of the channels, * but the group isn't expanded (1)... - * (1) this only matters if we actually care about the hierarchy though. - * - Hierarchy matters: this hack should be applied - * - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack + * (1) this only matters if we actually care about the hierarchy though. + * - Hierarchy matters: this hack should be applied + * - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack */ if ( ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp) == 0) && /* care about hierarchy but group isn't expanded */ (filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) ) /* care about selection status */ @@ -1305,9 +1305,9 @@ static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeS * since this creates too much overhead for animators (i.e. making a slow workflow) * * Tools affected by this at time of coding (2010 Feb 09): - * - inserting keyframes on selected channels only - * - pasting keyframes - * - creating ghost curves in Graph Editor + * - inserting keyframes on selected channels only + * - pasting keyframes + * - creating ghost curves in Graph Editor */ filter_mode &= ~(ANIMFILTER_SEL | ANIMFILTER_UNSEL | ANIMFILTER_LIST_VISIBLE); } @@ -1392,12 +1392,12 @@ static size_t animfilter_action(bAnimContext *ac, ListBase *anim_data, bDopeShee } /* Include NLA-Data for NLA-Editor: - * - when ANIMFILTER_LIST_CHANNELS is used, that means we should be filtering the list for display - * Although the evaluation order is from the first track to the last and then apply the Action on top, - * we present this in the UI as the Active Action followed by the last track to the first so that we - * get the evaluation order presented as per a stack. - * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation - * order, i.e. first to last. Otherwise, some tools may get screwed up. + * - when ANIMFILTER_LIST_CHANNELS is used, that means we should be filtering the list for display + * Although the evaluation order is from the first track to the last and then apply the Action on top, + * we present this in the UI as the Active Action followed by the last track to the first so that we + * get the evaluation order presented as per a stack. + * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation + * order, i.e. first to last. Otherwise, some tools may get screwed up. */ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id) { @@ -1414,8 +1414,8 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop /* there isn't really anything editable here, so skip if need editable */ if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { /* just add the action track now (this MUST appear for drawing) - * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then - * overwrite this with the real value - REVIEW THIS... + * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then + * overwrite this with the real value - REVIEW THIS... */ ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id, { @@ -1441,7 +1441,7 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop next = nlt->next; /* if we're in NLA-tweakmode, don't show this track if it was disabled (due to tweaking) for now - * - active track should still get shown though (even though it has disabled flag set) + * - active track should still get shown though (even though it has disabled flag set) */ // FIXME: the channels after should still get drawn, just 'differently', and after an active-action channel if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED) && (adt->act_track != nlt)) @@ -1716,13 +1716,13 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, voi Object *ob = base->object; /* firstly, check if object can be included, by the following factors: - * - if only visible, must check for layer and also viewport visibility - * --> while tools may demand only visible, user setting takes priority - * as user option controls whether sets of channels get included while - * tool-flag takes into account collapsed/open channels too - * - if only selected, must check if object is selected - * - there must be animation data to edit (this is done recursively as we - * try to add the channels) + * - if only visible, must check for layer and also viewport visibility + * --> while tools may demand only visible, user setting takes priority + * as user option controls whether sets of channels get included while + * tool-flag takes into account collapsed/open channels too + * - if only selected, must check if object is selected + * - there must be animation data to edit (this is done recursively as we + * try to add the channels) */ if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) { /* layer visibility - we check both object and base, since these may not be in sync yet */ @@ -1740,7 +1740,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, voi /* check if object belongs to the filtering group if option to filter * objects by the grouped status is on - * - used to ease the process of doing multiple-character choreographies + * - used to ease the process of doing multiple-character choreographies */ if (ads->filter_grp != NULL) { if (BKE_collection_has_object_recursive(ads->filter_grp, ob) == 0) @@ -2857,13 +2857,13 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m return false; /* firstly, check if object can be included, by the following factors: - * - if only visible, must check for layer and also viewport visibility - * --> while tools may demand only visible, user setting takes priority - * as user option controls whether sets of channels get included while - * tool-flag takes into account collapsed/open channels too - * - if only selected, must check if object is selected - * - there must be animation data to edit (this is done recursively as we - * try to add the channels) + * - if only visible, must check for layer and also viewport visibility + * --> while tools may demand only visible, user setting takes priority + * as user option controls whether sets of channels get included while + * tool-flag takes into account collapsed/open channels too + * - if only selected, must check if object is selected + * - there must be animation data to edit (this is done recursively as we + * try to add the channels) */ if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) { /* layer visibility - we check both object and base, since these may not be in sync yet */ @@ -2909,7 +2909,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m /* check if object belongs to the filtering group if option to filter * objects by the grouped status is on - * - used to ease the process of doing multiple-character choreographies + * - used to ease the process of doing multiple-character choreographies */ if (ads->filter_grp != NULL) { if (BKE_collection_has_object_recursive(ads->filter_grp, ob) == 0) @@ -2989,10 +2989,10 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, b /* If filtering for channel drawing, we want the objects in alphabetical order, * to make it easier to predict where items are in the hierarchy - * - This order only really matters if we need to show all channels in the list (e.g. for drawing) - * (XXX: What about lingering "active" flags? The order may now become unpredictable) - * - Don't do this if this behaviour has been turned off (i.e. due to it being too slow) - * - Don't do this if there's just a single object + * - This order only really matters if we need to show all channels in the list (e.g. for drawing) + * (XXX: What about lingering "active" flags? The order may now become unpredictable) + * - Don't do this if this behaviour has been turned off (i.e. due to it being too slow) + * - Don't do this if there's just a single object */ if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && !(ads->flag & ADS_FLAG_NO_DB_SORT) && (view_layer->object_bases.first != view_layer->object_bases.last)) @@ -3032,16 +3032,16 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, b } /* Summary track for DopeSheet/Action Editor - * - return code is whether the summary lets the other channels get drawn + * - return code is whether the summary lets the other channels get drawn */ static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_data, int filter_mode, size_t *items) { bDopeSheet *ads = NULL; /* get the DopeSheet information to use - * - we should only need to deal with the DopeSheet/Action Editor, - * since all the other Animation Editors won't have this concept - * being applicable. + * - we should only need to deal with the DopeSheet/Action Editor, + * since all the other Animation Editors won't have this concept + * being applicable. */ if ((ac && ac->sl) && (ac->spacetype == SPACE_ACTION)) { SpaceAction *saction = (SpaceAction *)ac->sl; @@ -3053,8 +3053,8 @@ static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_ } /* dopesheet summary - * - only for drawing and/or selecting keyframes in channels, but not for real editing - * - only useful for DopeSheet/Action/etc. editors where it is actually useful + * - only for drawing and/or selecting keyframes in channels, but not for real editing + * - only useful for DopeSheet/Action/etc. editors where it is actually useful */ if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && (ads->filterflag & ADS_FILTER_SUMMARY)) { bAnimListElem *ale = make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL); @@ -3064,7 +3064,7 @@ static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_ } /* if summary is collapsed, don't show other channels beneath this - * - this check is put inside the summary check so that it doesn't interfere with normal operation + * - this check is put inside the summary check so that it doesn't interfere with normal operation */ if (ads->flag & ADS_FLAG_SUMMARY_COLLAPSED) return 0; @@ -3150,8 +3150,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data) next = ale->next; /* check if hash has any record of an entry like this - * - just use ale->data for now, though it would be nicer to involve - * ale->type in combination too to capture corner cases (where same data performs differently) + * - just use ale->data for now, though it would be nicer to involve + * ale->type in combination too to capture corner cases (where same data performs differently) */ if (BLI_gset_add(gs, ale->data)) { /* this entry is 'unique' and can be kept */ @@ -3175,9 +3175,9 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data) /* This function filters the active data source to leave only animation channels suitable for * usage by the caller. It will return the length of the list * - * *anim_data: is a pointer to a ListBase, to which the filtered animation channels - * will be placed for use. - * filter_mode: how should the data be filtered - bitmapping accessed flags + * *anim_data: is a pointer to a ListBase, to which the filtered animation channels + * will be placed for use. + * filter_mode: how should the data be filtered - bitmapping accessed flags */ size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype) { diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h index de91ce06c8b..73f2e85164b 100644 --- a/source/blender/editors/animation/anim_intern.h +++ b/source/blender/editors/animation/anim_intern.h @@ -39,15 +39,15 @@ extern ListBase builtin_keyingsets; /* Operator Define Prototypes ------------------- */ /* Main Keyframe Management operators: - * These handle keyframes management from various spaces. They only make use of - * Keying Sets. + * These handle keyframes management from various spaces. They only make use of + * Keying Sets. */ void ANIM_OT_keyframe_insert(struct wmOperatorType *ot); void ANIM_OT_keyframe_delete(struct wmOperatorType *ot); /* Main Keyframe Management operators: - * These handle keyframes management from various spaces. They will handle the menus - * required for each space. + * These handle keyframes management from various spaces. They will handle the menus + * required for each space. */ void ANIM_OT_keyframe_insert_menu(struct wmOperatorType *ot); diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 4e0993152f7..d88a418fa06 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -19,7 +19,7 @@ * All rights reserved. * * Contributor(s): Blender Foundation, 2005. Full recode - * Joshua Leung + * Joshua Leung * * ***** END GPL LICENSE BLOCK ***** */ @@ -87,10 +87,10 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* For now, name will consist of 3 parts: struct-name, property name, array index * There are several options possible: - * 1) <struct-name>.<property-name>.<array-index> - * i.e. Bone1.Location.X, or Object.Location.X - * 2) <array-index> <property-name> (<struct name>) - * i.e. X Location (Bone1), or X Location (Object) + * 1) <struct-name>.<property-name>.<array-index> + * i.e. Bone1.Location.X, or Object.Location.X + * 2) <array-index> <property-name> (<struct name>) + * i.e. X Location (Bone1), or X Location (Object) * * Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have * problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of @@ -98,11 +98,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) */ /* for structname - * - as base, we use a custom name from the structs if one is available - * - however, if we're showing subdata of bones (probably there will be other exceptions later) - * need to include that info too since it gets confusing otherwise - * - if a pointer just refers to the ID-block, then don't repeat this info - * since this just introduces clutter + * - as base, we use a custom name from the structs if one is available + * - however, if we're showing subdata of bones (probably there will be other exceptions later) + * need to include that info too since it gets confusing otherwise + * - if a pointer just refers to the ID-block, then don't repeat this info + * since this just introduces clutter */ if (strstr(fcu->rna_path, "bones") && strstr(fcu->rna_path, "constraints")) { /* perform string 'chopping' to get "Bone Name : Constraint Name" */ @@ -160,7 +160,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* Icon for this property's owner: - * use the struct's icon if it is set + * use the struct's icon if it is set */ icon = RNA_struct_ui_icon(ptr.type); @@ -200,8 +200,8 @@ void getcolor_fcurve_rainbow(int cur, int tot, float out[3]) /* we try to divide the color into groupings of n colors, * where n is: - * 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves - * 4 - for 'even' numbers of curves - there should be a majority of quartets of curves + * 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves + * 4 - for 'even' numbers of curves - there should be a majority of quartets of curves * so the base color is simply one of the three primary colors */ grouping = (4 - (tot % 2)); diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 6fa1150eb0e..f6fdd539983 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -409,8 +409,8 @@ static int previewrange_define_exec(bContext *C, wmOperator *op) efra = UI_view2d_region_to_view_x(&ar->v2d, rect.xmax); /* set start/end frames for preview-range - * - must clamp within allowable limits - * - end must not be before start (though this won't occur most of the time) + * - must clamp within allowable limits + * - end must not be before start (though this won't occur most of the time) */ FRAMENUMBER_MIN_CLAMP(sfra); FRAMENUMBER_MIN_CLAMP(efra); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 723da10e002..85e58521493 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -71,10 +71,10 @@ /* Get (or add relevant data to be able to do so) F-Curve from the driver stack, * for the given Animation Data block. This assumes that all the destinations are valid. * - * - add: 0 - don't add anything if not found, - * 1 - add new Driver FCurve (with keyframes for visual tweaking), - * 2 - add new Driver FCurve (with generator, for script backwards compatibility) - * -1 - add new Driver FCurve without driver stuff (for pasting) + * - add: 0 - don't add anything if not found, + * 1 - add new Driver FCurve (with keyframes for visual tweaking), + * 2 - add new Driver FCurve (with generator, for script backwards compatibility) + * -1 - add new Driver FCurve without driver stuff (for pasting) */ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_index, short add) { @@ -95,8 +95,8 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde } /* try to find f-curve matching for this setting - * - add if not found and allowed to add one - * TODO: add auto-grouping support? how this works will need to be resolved + * - add if not found and allowed to add one + * TODO: add auto-grouping support? how this works will need to be resolved */ fcu = list_find_fcurve(&adt->drivers, rna_path, array_index); @@ -593,8 +593,8 @@ bool ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int ar } /* Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block or replace an existing one - * with the driver + driver-curve data from the buffer + * Add a new driver for the specified property on the given ID block or replace an existing one + * with the driver + driver-curve data from the buffer */ bool ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index f1d8f9a1ebf..3136b3e7137 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -705,7 +705,7 @@ void ANIM_fmodifiers_copybuf_free(void) /* copy the given F-Modifiers to the buffer, returning whether anything was copied or not * assuming that the buffer has been cleared already with ANIM_fmodifiers_copybuf_free() - * - active: only copy the active modifier + * - active: only copy the active modifier */ bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active) { @@ -734,7 +734,7 @@ bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active) } /* 'Paste' the F-Modifier(s) from the buffer to the specified list - * - replace: free all the existing modifiers to leave only the pasted ones + * - replace: free all the existing modifiers to leave only the pasted ones */ bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *curve) { diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 5ad10b3cf84..72da71a8a0e 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -740,7 +740,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, float ypos, float yscale uint key_len = 0; for (ActKeyColumn *ak = keys->first; ak; ak = ak->next) { /* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw - * - this might give some improvements, since we current have to flip between view/region matrices + * - this might give some improvements, since we current have to flip between view/region matrices */ if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax)) key_len++; diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 541a282f389..e733bb0f8b7 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -53,7 +53,7 @@ /* This file defines an API and set of callback-operators for non-destructive editing of keyframe data. * * Two API functions are defined for actually performing the operations on the data: - * ANIM_fcurve_keyframes_loop() + * ANIM_fcurve_keyframes_loop() * which take the data they operate on, a few callbacks defining what operations to perform. * * As operators which work on keyframes usually apply the same operation on all BezTriples in @@ -434,8 +434,8 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac) /* Some macros to make this easier... */ /* run the given check on the 3 handles - * - check should be a macro, which takes the handle index as its single arg, which it substitutes later - * - requires that a var, of type short, is named 'ok', and has been initialized to 0 + * - check should be a macro, which takes the handle index as its single arg, which it substitutes later + * - requires that a var, of type short, is named 'ok', and has been initialized to 0 */ #define KEYFRAME_OK_CHECKS(check) \ { \ @@ -495,8 +495,8 @@ static short ok_bezier_value(KeyframeEditData *ked, BezTriple *bezt) short ok = 0; /* value is stored in f1 property - * - this float accuracy check may need to be dropped? - * - should value be stored in f2 instead so that we won't have conflicts when using f1 for frames too? + * - this float accuracy check may need to be dropped? + * - should value be stored in f2 instead so that we won't have conflicts when using f1 for frames too? */ #define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][1], ked->f1) KEYFRAME_OK_CHECKS(KEY_CHECK_OK); @@ -707,7 +707,7 @@ short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt) ked->f1 += bezt->vec[1][0]; /* store average value in float 2 (only do rounding at last step) - * - this isn't always needed, but some operators may also require this + * - this isn't always needed, but some operators may also require this */ ked->f2 += bezt->vec[1][1]; @@ -953,7 +953,7 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type) /* Settings */ /* standard validation step for a few of these (implemented as macro for inlining without fn-call overhead): - * "if the handles are not of the same type, set them to type free" + * "if the handles are not of the same type, set them to type free" */ #define ENSURE_HANDLES_MATCH(bezt) \ if (bezt->h1 != bezt->h2) { \ diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index c4d38870258..df87e1b7a5f 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -82,8 +82,8 @@ void delete_fcurve_key(FCurve *fcu, int index, bool do_recalc) return; /* verify the index: - * 1) cannot be greater than the number of available keyframes - * 2) negative indices are for specifying a value from the end of the array + * 1) cannot be greater than the number of available keyframes + * 2) negative indices are for specifying a value from the end of the array */ if (abs(index) >= fcu->totvert) return; @@ -373,10 +373,10 @@ void smooth_fcurve(FCurve *fcu) } /* calculate the new smoothed F-Curve's with weighted averages: - * - this is done with two passes to avoid progressive corruption errors - * - uses 5 points for each operation (which stores in the relevant handles) - * - previous: w/a ratio = 3:5:2:1:1 - * - next: w/a ratio = 1:1:2:5:3 + * - this is done with two passes to avoid progressive corruption errors + * - uses 5 points for each operation (which stores in the relevant handles) + * - previous: w/a ratio = 3:5:2:1:1 + * - next: w/a ratio = 1:1:2:5:3 */ /* round 1: calculate smoothing deltas and new values */ @@ -466,7 +466,7 @@ void sample_fcurve(FCurve *fcu) /* cache values then add keyframes using these values, as adding * keyframes while sampling will affect the outcome... - * - only start sampling+adding from index=1, so that we don't overwrite original keyframe + * - only start sampling+adding from index=1, so that we don't overwrite original keyframe */ range = (int)(ceil(end->vec[1][0] - start->vec[1][0])); sfra = (int)(floor(start->vec[1][0])); @@ -514,7 +514,7 @@ void sample_fcurve(FCurve *fcu) /* - The copy/paste buffer currently stores a set of temporary F-Curves containing only the keyframes * that were selected in each of the original F-Curves * - All pasted frames are offset by the same amount. This is calculated as the difference in the times of - * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). + * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). * - The earliest frame is calculated per copy operation. */ @@ -587,8 +587,8 @@ short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data) int i; /* firstly, check if F-Curve has any selected keyframes - * - skip if no selected keyframes found (so no need to create unnecessary copy-buffer data) - * - this check should also eliminate any problems associated with using sample-data + * - skip if no selected keyframes found (so no need to create unnecessary copy-buffer data) + * - this check should also eliminate any problems associated with using sample-data */ if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, ANIM_editkeyframes_ok(BEZT_OK_SELECTED), NULL) == 0) continue; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 863dd4efa82..4bf6c43e348 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -185,8 +185,8 @@ FCurve *verify_fcurve(Main *bmain, bAction *act, const char group[], PointerRNA return NULL; /* try to find f-curve matching for this setting - * - add if not found and allowed to add one - * TODO: add auto-grouping support? how this works will need to be resolved + * - add if not found and allowed to add one + * TODO: add auto-grouping support? how this works will need to be resolved */ fcu = list_find_fcurve(&act->curves, rna_path, array_index); @@ -427,10 +427,10 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag) } } /* no keyframes already, but can only add if... - * 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know - * 2) there are no samples on the curve - * // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions, - * // but for now, having both is asking for trouble + * 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know + * 2) there are no samples on the curve + * // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions, + * // but for now, having both is asking for trouble */ else if ((flag & INSERTKEY_REPLACE) == 0 && (fcu->fpt == NULL)) { /* create new keyframes array */ @@ -524,8 +524,8 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType ke if (a < 0) return -1; /* don't recalculate handles if fast is set - * - this is a hack to make importers faster - * - we may calculate twice (due to autohandle needing to be calculated twice) + * - this is a hack to make importers faster + * - we may calculate twice (due to autohandle needing to be calculated twice) */ if ((flag & INSERTKEY_FAST) == 0) calchandles_fcurve(fcu); @@ -535,8 +535,8 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType ke BezTriple *bezt = (fcu->bezt + a); /* set interpolation from previous (if available), but only if we didn't just replace some keyframe - * - replacement is indicated by no-change in number of verts - * - when replacing, the user may have specified some interpolation that should be kept + * - replacement is indicated by no-change in number of verts + * - when replacing, the user may have specified some interpolation that should be kept */ if (fcu->totvert > oldTot) { if (a > 0) @@ -546,8 +546,8 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType ke } /* don't recalculate handles if fast is set - * - this is a hack to make importers faster - * - we may calculate twice (due to autohandle needing to be calculated twice) + * - this is a hack to make importers faster + * - we may calculate twice (due to autohandle needing to be calculated twice) */ if ((flag & INSERTKEY_FAST) == 0) calchandles_fcurve(fcu); @@ -568,9 +568,9 @@ enum { /* This helper function determines whether a new keyframe is needed */ /* Cases where keyframes should not be added: - * 1. Keyframe to be added between two keyframes with similar values - * 2. Keyframe to be added on frame where two keyframes are already situated - * 3. Keyframe lies at point that intersects the linear line between two keyframes + * 1. Keyframe to be added between two keyframes with similar values + * 2. Keyframe to be added on frame where two keyframes are already situated + * 3. Keyframe lies at point that intersects the linear line between two keyframes */ static short new_key_needed(FCurve *fcu, float cFrame, float nValue) { @@ -745,9 +745,9 @@ static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop) return false; /* get first constraint and determine type of keyframe constraints to check for - * - constraints can be on either Objects or PoseChannels, so we only check if the - * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for - * those structs, allowing us to identify the owner of the data + * - constraints can be on either Objects or PoseChannels, so we only check if the + * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for + * those structs, allowing us to identify the owner of the data */ if (ptr->type == &RNA_Object) { /* Object */ @@ -876,11 +876,11 @@ static float visualkey_get_value(Depsgraph *depsgraph, PointerRNA *ptr, Property int rotmode; /* handle for Objects or PoseChannels only - * - only Location, Rotation or Scale keyframes are supported currently - * - constraints can be on either Objects or PoseChannels, so we only check if the - * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for - * those structs, allowing us to identify the owner of the data - * - assume that array_index will be sane + * - only Location, Rotation or Scale keyframes are supported currently + * - constraints can be on either Objects or PoseChannels, so we only check if the + * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for + * those structs, allowing us to identify the owner of the data + * - assume that array_index will be sane */ if (ptr->type == &RNA_Object) { Object *ob = (Object *)ptr->data; @@ -956,14 +956,14 @@ static float visualkey_get_value(Depsgraph *depsgraph, PointerRNA *ptr, Property /* ------------------------- Insert Key API ------------------------- */ /* Secondary Keyframing API call: - * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary - * data being keyframed, and a pointer to the F-Curve to use have both been provided. + * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary + * data being keyframed, and a pointer to the F-Curve to use have both been provided. * - * keytype is the "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet. + * keytype is the "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet. * - * The flag argument is used for special settings that alter the behavior of - * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, - * and extra keyframe filtering. + * The flag argument is used for special settings that alter the behavior of + * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, + * and extra keyframe filtering. */ bool insert_keyframe_direct(Depsgraph *depsgraph, ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag) { @@ -1084,13 +1084,13 @@ bool insert_keyframe_direct(Depsgraph *depsgraph, ReportList *reports, PointerRN } /* Main Keyframing API call: - * Use this when validation of necessary animation data is necessary, since it may not exist yet. + * Use this when validation of necessary animation data is necessary, since it may not exist yet. * - * The flag argument is used for special settings that alter the behavior of - * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, - * and extra keyframe filtering. + * The flag argument is used for special settings that alter the behavior of + * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh, + * and extra keyframe filtering. * - * index of -1 keys all array indices + * index of -1 keys all array indices */ short insert_keyframe( Main *bmain, Depsgraph *depsgraph, ReportList *reports, ID *id, bAction *act, @@ -1150,8 +1150,8 @@ short insert_keyframe( /* will only loop once unless the array index was -1 */ for (; array_index < array_index_max; array_index++) { /* make sure the F-Curve exists - * - if we're replacing keyframes only, DO NOT create new F-Curves if they do not exist yet - * but still try to get the F-Curve if it exists... + * - if we're replacing keyframes only, DO NOT create new F-Curves if they do not exist yet + * but still try to get the F-Curve if it exists... */ fcu = verify_fcurve(bmain, act, group, &ptr, rna_path, array_index, (flag & INSERTKEY_REPLACE) == 0); @@ -1192,11 +1192,11 @@ short insert_keyframe( /* KEYFRAME DELETION */ /* Main Keyframing API call: - * Use this when validation of necessary animation data isn't necessary as it - * already exists. It will delete a keyframe at the current frame. + * Use this when validation of necessary animation data isn't necessary as it + * already exists. It will delete a keyframe at the current frame. * - * The flag argument is used for special settings that alter the behavior of - * the keyframe deletion. These include the quick refresh options. + * The flag argument is used for special settings that alter the behavior of + * the keyframe deletion. These include the quick refresh options. */ @@ -1257,7 +1257,7 @@ short delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, */ if (act == NULL) { /* if no action is provided, use the default one attached to this ID-block - * - if it doesn't exist, then we're out of options... + * - if it doesn't exist, then we're out of options... */ if (adt->action) { act = adt->action; @@ -1311,11 +1311,11 @@ short delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, /* KEYFRAME CLEAR */ /* Main Keyframing API call: - * Use this when validation of necessary animation data isn't necessary as it - * already exists. It will clear the current buttons fcurve(s). + * Use this when validation of necessary animation data isn't necessary as it + * already exists. It will clear the current buttons fcurve(s). * - * The flag argument is used for special settings that alter the behavior of - * the keyframe deletion. These include the quick refresh options. + * The flag argument is used for special settings that alter the behavior of + * the keyframe deletion. These include the quick refresh options. */ static short clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, @@ -1348,7 +1348,7 @@ static short clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *a */ if (act == NULL) { /* if no action is provided, use the default one attached to this ID-block - * - if it doesn't exist, then we're out of options... + * - if it doesn't exist, then we're out of options... */ if (adt->action) { act = adt->action; @@ -1436,9 +1436,9 @@ static int insert_key_exec(bContext *C, wmOperator *op) short success; /* type is the Keying Set the user specified to use when calling the operator: - * - type == 0: use scene's active Keying Set - * - type > 0: use a user-defined Keying Set from the active scene - * - type < 0: use a builtin Keying Set + * - type == 0: use scene's active Keying Set + * - type > 0: use a user-defined Keying Set from the active scene + * - type < 0: use a builtin Keying Set */ if (type == 0) type = scene->active_keyingset; @@ -1513,7 +1513,7 @@ void ANIM_OT_keyframe_insert(wmOperatorType *ot) ot->prop = prop; /* confirm whether a keyframe was added by showing a popup - * - by default, this is enabled, since this operator is assumed to be called independently + * - by default, this is enabled, since this operator is assumed to be called independently */ prop = RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); @@ -1575,7 +1575,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot) ot->prop = prop; /* confirm whether a keyframe was added by showing a popup - * - by default, this is disabled so that if a menu is shown, this doesn't come up too + * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ // XXX should this just be always on? prop = RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", @@ -1583,8 +1583,8 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN); /* whether the menu should always be shown - * - by default, the menu should only be shown when there is no active Keying Set (2.5 behavior), - * although in some cases it might be useful to always shown (pre 2.5 behavior) + * - by default, the menu should only be shown when there is no active Keying Set (2.5 behavior), + * although in some cases it might be useful to always shown (pre 2.5 behavior) */ prop = RNA_def_boolean(ot->srna, "always_prompt", 0, "Always Show Menu", ""); RNA_def_property_flag(prop, PROP_HIDDEN); @@ -1601,9 +1601,9 @@ static int delete_key_exec(bContext *C, wmOperator *op) short success; /* type is the Keying Set the user specified to use when calling the operator: - * - type == 0: use scene's active Keying Set - * - type > 0: use a user-defined Keying Set from the active scene - * - type < 0: use a builtin Keying Set + * - type == 0: use scene's active Keying Set + * - type > 0: use a user-defined Keying Set from the active scene + * - type < 0: use a builtin Keying Set */ if (type == 0) type = scene->active_keyingset; @@ -1665,7 +1665,7 @@ void ANIM_OT_keyframe_delete(wmOperatorType *ot) ot->prop = prop; /* confirm whether a keyframe was added by showing a popup - * - by default, this is enabled, since this operator is assumed to be called independently + * - by default, this is enabled, since this operator is assumed to be called independently */ RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Delete", "Show a popup when the keyframes get successfully removed"); @@ -2246,7 +2246,7 @@ static bool action_frame_has_keyframe(bAction *act, float frame, short filter) return false; /* loop over F-Curves, using binary-search to try to find matches - * - this assumes that keyframes are only beztriples + * - this assumes that keyframes are only beztriples */ for (fcu = act->curves.first; fcu; fcu = fcu->next) { /* only check if there are keyframes (currently only of type BezTriple) */ @@ -2365,9 +2365,9 @@ bool ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks ListBase dsources = {NULL, NULL}; /* now insert the keyframe(s) using the Keying Set - * 1) add datasource override for the Object - * 2) insert keyframes - * 3) free the extra info + * 1) add datasource override for the Object + * 2) insert keyframes + * 3) free the extra info */ ANIM_relative_keyingset_add_source(&dsources, &ob->id, NULL, NULL); ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); @@ -2386,9 +2386,9 @@ bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel * ListBase dsources = {NULL, NULL}; /* now insert the keyframe(s) using the Keying Set - * 1) add datasource override for the PoseChannel - * 2) insert keyframes - * 3) free the extra info + * 1) add datasource override for the PoseChannel + * 2) insert keyframes + * 3) free the extra info */ ANIM_relative_keyingset_add_source(&dsources, &ob->id, &RNA_PoseBone, pchan); ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index e97f88afffd..d8e9c5a7790 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -118,7 +118,7 @@ static int add_default_keyingset_exec(bContext *C, wmOperator *UNUSED(op)) short flag = 0, keyingflag = 0; /* validate flags - * - absolute KeyingSets should be created by default + * - absolute KeyingSets should be created by default */ flag |= KEYINGSET_ABSOLUTE; @@ -156,8 +156,8 @@ static int remove_active_keyingset_exec(bContext *C, wmOperator *op) KeyingSet *ks; /* verify the Keying Set to use: - * - use the active one - * - return error if it doesn't exist + * - use the active one + * - return error if it doesn't exist */ if (scene->active_keyingset == 0) { BKE_report(op->reports, RPT_ERROR, "No active keying set to remove"); @@ -204,8 +204,8 @@ static int add_empty_ks_path_exec(bContext *C, wmOperator *op) KS_Path *ksp; /* verify the Keying Set to use: - * - use the active one - * - return error if it doesn't exist + * - use the active one + * - return error if it doesn't exist */ if (scene->active_keyingset == 0) { BKE_report(op->reports, RPT_ERROR, "No active keying set to add empty path to"); @@ -304,14 +304,14 @@ static int add_keyingset_button_exec(bContext *C, wmOperator *op) } /* verify the Keying Set to use: - * - use the active one for now (more control over this can be added later) - * - add a new one if it doesn't exist + * - use the active one for now (more control over this can be added later) + * - add a new one if it doesn't exist */ if (scene->active_keyingset == 0) { short flag = 0, keyingflag = 0; /* validate flags - * - absolute KeyingSets should be created by default + * - absolute KeyingSets should be created by default */ flag |= KEYINGSET_ABSOLUTE; @@ -407,8 +407,8 @@ static int remove_keyingset_button_exec(bContext *C, wmOperator *op) } /* verify the Keying Set to use: - * - use the active one for now (more control over this can be added later) - * - return error if it doesn't exist + * - use the active one for now (more control over this can be added later) + * - return error if it doesn't exist */ if (scene->active_keyingset == 0) { BKE_report(op->reports, RPT_ERROR, "No active keying set to remove property from"); @@ -521,7 +521,7 @@ void ANIM_OT_keying_set_active_set(wmOperatorType *ot) /* keyingset to use (dynamic enum) */ prop = RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use"); RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf); -/* RNA_def_property_flag(prop, PROP_HIDDEN);*/ + // RNA_def_property_flag(prop, PROP_HIDDEN); } /* ******************************************* */ @@ -584,7 +584,7 @@ void ANIM_keyingset_info_register(KeyingSetInfo *ksi) KeyingSet *ks; /* create a new KeyingSet - * - inherit name and keyframing settings from the typeinfo + * - inherit name and keyframing settings from the typeinfo */ ks = BKE_keyingset_add(&builtin_keyingsets, ksi->idname, ksi->name, 1, ksi->keyingflag); @@ -669,9 +669,9 @@ KeyingSet *ANIM_scene_get_active_keyingset(Scene *scene) return NULL; /* currently, there are several possibilities here: - * - 0: no active keying set - * - > 0: one of the user-defined Keying Sets, but indices start from 0 (hence the -1) - * - < 0: a builtin keying set + * - 0: no active keying set + * - > 0: one of the user-defined Keying Sets, but indices start from 0 (hence the -1) + * - < 0: a builtin keying set */ if (scene->active_keyingset > 0) return BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1); @@ -691,7 +691,7 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) /* check if the KeyingSet exists in scene list */ if (scene) { /* get index and if valid, return - * - (absolute) Scene KeyingSets are from (>= 1) + * - (absolute) Scene KeyingSets are from (>= 1) */ index = BLI_findindex(&scene->keyingsets, ks); if (index != -1) @@ -699,8 +699,8 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) } /* still here, so try builtins list too - * - builtins are from (<= -1) - * - none/invalid is (= 0) + * - builtins are from (<= -1) + * - none/invalid is (= 0) */ index = BLI_findindex(&builtin_keyingsets, ks); if (index != -1) @@ -713,8 +713,8 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *transformKSName) { /* get KeyingSet to use - * - use the active KeyingSet if defined (and user wants to use it for all autokeying), - * or otherwise key transforms only + * - use the active KeyingSet if defined (and user wants to use it for all autokeying), + * or otherwise key transforms only */ if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset)) return ANIM_scene_get_active_keyingset(scene); @@ -740,7 +740,7 @@ const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNU } /* active Keying Set - * - only include entry if it exists + * - only include entry if it exists */ if (scene->active_keyingset) { /* active Keying Set */ @@ -756,7 +756,7 @@ const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNU i++; /* user-defined Keying Sets - * - these are listed in the order in which they were defined for the active scene + * - these are listed in the order in which they were defined for the active scene */ if (scene->keyingsets.first) { for (ks = scene->keyingsets.first; ks; ks = ks->next, i++) { @@ -818,8 +818,8 @@ bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) /* Special 'Overrides' Iterator for Relative KeyingSets ------ */ /* 'Data Sources' for relative Keying Set 'overrides' - * - this is basically a wrapper for PointerRNA's in a linked list - * - do not allow this to be accessed from outside for now + * - this is basically a wrapper for PointerRNA's in a linked list + * - do not allow this to be accessed from outside for now */ typedef struct tRKS_DSource { struct tRKS_DSource *next, *prev; @@ -847,8 +847,8 @@ void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *s tRKS_DSource *ds; /* sanity checks - * - we must have somewhere to output the data - * - we must have both srna+data (and with id too optionally), or id by itself only + * - we must have somewhere to output the data + * - we must have both srna+data (and with id too optionally), or id by itself only */ if (dsources == NULL) return; @@ -928,10 +928,10 @@ static short keyingset_apply_keying_flags(const short base_flags, const short ov short result = base_flags; /* The logic for whether a keying flag applies is as follows: - * - If the flag in question is set in "overrides", that means that the - * status of that flag in "own_flags" is used - * - If however the flag isn't set, then its value in "base_flags" is used - * instead (i.e. no override) + * - If the flag in question is set in "overrides", that means that the + * status of that flag in "own_flags" is used + * - If however the flag isn't set, then its value in "base_flags" is used + * instead (i.e. no override) */ #define APPLY_KEYINGFLAG_OVERRIDE(kflag) \ if (overrides & kflag) { \ @@ -1034,7 +1034,7 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe arraylen++; /* for each possible index, perform operation - * - assume that arraylen is greater than index + * - assume that arraylen is greater than index */ for (; i < arraylen; i++) { /* action to take depends on mode */ diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 5ed3fb67ec2..4ddbb9fb9c5 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -436,7 +436,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase { EditBone *eBone = MEM_mallocN(sizeof(EditBone), "addup_editbone"); - /* Copy data from old bone to new bone */ + /* Copy data from old bone to new bone */ memcpy(eBone, curBone, sizeof(EditBone)); curBone->temp.ebone = eBone; @@ -462,7 +462,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase chanold = BKE_pose_channel_verify(src_ob->pose, curBone->name); if (chanold) { /* WARNING: this creates a new posechannel, but there will not be an attached bone - * yet as the new bones created here are still 'EditBones' not 'Bones'. + * yet as the new bones created here are still 'EditBones' not 'Bones'. */ channew = BKE_pose_channel_verify(dst_ob->pose, eBone->name); diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index d3aa451fa6e..6d624f6746e 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -876,9 +876,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone } /* step 1: add a new bone - * - head = head/tail of start (default head) - * - tail = head/tail of end (default tail) - * - parent = parent of start + * - head = head/tail of start (default head) + * - tail = head/tail of end (default tail) + * - parent = parent of start */ if ((start->flag & BONE_TIPSEL) && (start->flag & BONE_SELECTED) == 0) { copy_v3_v3(head, start->tail); @@ -900,7 +900,7 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone BONE_NO_CYCLICOFFSET | BONE_NO_LOCAL_LOCATION | BONE_DONE); /* step 2a: reparent any side chains which may be parented to any bone in the chain of bones to merge - * - potentially several tips for side chains leading to some tree exist... + * - potentially several tips for side chains leading to some tree exist... */ for (chain = chains->first; chain; chain = chain->next) { /* traverse down chain until we hit the bottom or if we run into the tip of the chain of bones we're @@ -1103,8 +1103,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) /* loop over bones in chain */ for (ebo = chain->data; ebo; ebo = parent) { /* parent is this bone's original parent - * - we store this, as the next bone that is checked is this one - * but the value of ebo->parent may change here... + * - we store this, as the next bone that is checked is this one + * but the value of ebo->parent may change here... */ parent = ebo->parent; @@ -1116,8 +1116,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) swap_v3_v3(ebo->head, ebo->tail); /* do parent swapping: - * - use 'child' as new parent - * - connected flag is only set if points are coincidental + * - use 'child' as new parent + * - connected flag is only set if points are coincidental */ ebo->parent = child; if ((child) && equals_v3v3(ebo->head, child->tail)) @@ -1126,7 +1126,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) ebo->flag &= ~BONE_CONNECTED; /* get next bones - * - child will become the new parent of next bone + * - child will become the new parent of next bone */ child = ebo; } @@ -1140,8 +1140,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) } /* get next bones - * - child will become new parent of next bone (not swapping occurred, - * so set to NULL to prevent infinite-loop) + * - child will become new parent of next bone (not swapping occurred, + * so set to NULL to prevent infinite-loop) */ child = NULL; } diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 80dc2559bdb..0e95b6c3467 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -439,8 +439,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n for (ct = targets.first; ct; ct = ct->next) { /* any targets which point to original armature are redirected to the new one only if: - * - the target isn't origArm/newArm itself - * - the target is one that can be found in newArm/origArm + * - the target isn't origArm/newArm itself + * - the target is one that can be found in newArm/origArm */ if (ct->subtarget[0] != 0) { if (ct->tar == origArm) { @@ -477,8 +477,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n for (ct = targets.first; ct; ct = ct->next) { /* any targets which point to original armature are redirected to the new one only if: - * - the target isn't origArm/newArm itself - * - the target is one that can be found in newArm/origArm + * - the target isn't origArm/newArm itself + * - the target is one that can be found in newArm/origArm */ if (ct->subtarget[0] != '\0') { if (ct->tar == origArm) { @@ -514,8 +514,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n } /* Helper function for armature separating - remove certain bones from the given armature - * sel: remove selected bones from the armature, otherwise the unselected bones are removed - * (ob is not in editmode) + * sel: remove selected bones from the armature, otherwise the unselected bones are removed + * (ob is not in editmode) */ static void separate_armature_bones(Main *bmain, Object *ob, short sel) { @@ -596,11 +596,11 @@ static int separate_armature_exec(bContext *C, wmOperator *op) Base *oldbase, *newbase; /* we are going to do this as follows (unlike every other instance of separate): - * 1. exit editmode +posemode for active armature/base. Take note of what this is. - * 2. duplicate base - BASACT is the new one now - * 3. for each of the two armatures, enter editmode -> remove appropriate bones -> exit editmode + recalc - * 4. fix constraint links - * 5. make original armature active and enter editmode + * 1. exit editmode +posemode for active armature/base. Take note of what this is. + * 2. duplicate base - BASACT is the new one now + * 3. for each of the two armatures, enter editmode -> remove appropriate bones -> exit editmode + recalc + * 4. fix constraint links + * 5. make original armature active and enter editmode */ /* 1) only edit-base selected */ diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index aefca13d66c..3a619f771bd 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -164,7 +164,7 @@ static int pose_groups_menu_invoke(bContext *C, wmOperator *op, const wmEvent *U layout = UI_popup_menu_layout(pup); /* special entry - allow to create new group, then use that - * (not to be used for removing though) + * (not to be used for removing though) */ if (strstr(op->idname, "assign")) { uiItemIntO(layout, "New Group", ICON_NONE, op->idname, "type", 0); @@ -201,7 +201,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) pose = ob->pose; /* set the active group number to the one from operator props - * - if 0 after this, make a new group... + * - if 0 after this, make a new group... */ pose->active_group = RNA_int_get(op->ptr, "type"); if (pose->active_group == 0) diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index eeefcf39799..18ce6476105 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -90,19 +90,19 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS * It acts as a kind of "glorified clipboard for poses", allowing for naming of poses. * * Features: - * - PoseLibs are simply normal Actions - * - Each "pose" is simply a set of keyframes that occur on a particular frame - * -> a set of TimeMarkers that belong to each Action, help 'label' where a 'pose' can be - * found in the Action - * - The Scrollwheel or PageUp/Down buttons when used in a special mode or after pressing/holding - * [a modifier] key, cycles through the poses available for the active pose's poselib, allowing the - * animator to preview what action best suits that pose + * - PoseLibs are simply normal Actions + * - Each "pose" is simply a set of keyframes that occur on a particular frame + * -> a set of TimeMarkers that belong to each Action, help 'label' where a 'pose' can be + * found in the Action + * - The Scrollwheel or PageUp/Down buttons when used in a special mode or after pressing/holding + * [a modifier] key, cycles through the poses available for the active pose's poselib, allowing the + * animator to preview what action best suits that pose */ /* ************************************************************* */ /* gets the first available frame in poselib to store a pose on - * - frames start from 1, and a pose should occur on every frame... 0 is error! + * - frames start from 1, and a pose should occur on every frame... 0 is error! */ static int poselib_get_free_index(bAction *act) { @@ -476,8 +476,8 @@ static int poselib_add_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "name", name); /* add pose to poselib - replaces any existing pose there - * - for the 'replace' option, this should end up finding the appropriate marker, - * so no new one will be added + * - for the 'replace' option, this should end up finding the appropriate marker, + * so no new one will be added */ for (marker = act->markers.first; marker; marker = marker->next) { if (marker->frame == frame) { @@ -970,9 +970,9 @@ static void poselib_backup_free_data(tPoseLib_PreviewData *pld) /* ---------------------------- */ /* Applies the appropriate stored pose from the pose-library to the current pose - * - assumes that a valid object, with a poselib has been supplied - * - gets the string to print in the header - * - this code is based on the code for extract_pose_from_action in blenkernel/action.c + * - assumes that a valid object, with a poselib has been supplied + * - gets the string to print in the header + * - this code is based on the code for extract_pose_from_action in blenkernel/action.c */ static void poselib_apply_pose(tPoseLib_PreviewData *pld) { @@ -1102,7 +1102,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) RNA_int_set(op->ptr, "pose_index", -2); /* -2 means don't apply any pose */ /* old optimize trick... this enforces to bypass the depgraph - * - note: code copied from transform_generics.c -> recalcData() + * - note: code copied from transform_generics.c -> recalcData() */ // FIXME: shouldn't this use the builtin stuff? if ((pld->arm->flag & ARM_DELAYDEFORM) == 0) @@ -1182,8 +1182,8 @@ static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step) /* generate a new list of search matches */ for (marker = pld->act->markers.first; marker; marker = marker->next) { /* does the name partially match? - * - don't worry about case, to make it easier for users to quickly input a name (or - * part of one), which is the whole point of this feature + * - don't worry about case, to make it easier for users to quickly input a name (or + * part of one), which is the whole point of this feature */ if (BLI_strcasestr(marker->name, pld->searchstr)) { /* make link-data to store reference to it */ @@ -1326,7 +1326,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con } /* backup stuff that needs to occur before every operation - * - make a copy of searchstr, so that we know if cache needs to be rebuilt + * - make a copy of searchstr, so that we know if cache needs to be rebuilt */ BLI_strncpy(pld->searchold, pld->searchstr, sizeof(pld->searchold)); @@ -1610,7 +1610,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) poselib_backup_restore(pld); /* old optimize trick... this enforces to bypass the depgraph - * - note: code copied from transform_generics.c -> recalcData() + * - note: code copied from transform_generics.c -> recalcData() */ if ((arm->flag & ARM_DELAYDEFORM) == 0) DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index 0c7de754482..3947fc7388e 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -705,8 +705,8 @@ static bool pose_select_same_group(bContext *C, bool extend) } /* alloc a small array to keep track of the groups to use - * - each cell stores on/off state for whether group should be used - * - size is (groups_len + 1), since (index = 0) is used for no-group + * - each cell stores on/off state for whether group should be used + * - size is (groups_len + 1), since (index = 0) is used for no-group */ groups_len++; group_flags_array = MEM_callocN(objects_len * groups_len * sizeof(bool), "pose_select_same_group"); diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index be3914b2054..75090a656ae 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -335,9 +335,9 @@ static void pose_slide_apply_val( w2 = 1.0f - w1; /* this must come first */ } else { - /* - these weights are derived from the relative distance of these - * poses from the current frame - * - they then get normalized so that they only sum up to 1 + /* - these weights are derived from the relative distance of these + * poses from the current frame + * - they then get normalized so that they only sum up to 1 */ float wtot; @@ -350,15 +350,15 @@ static void pose_slide_apply_val( } /* depending on the mode, calculate the new value - * - in all of these, the start+end values are multiplied by w2 and w1 (respectively), - * since multiplication in another order would decrease the value the current frame is closer to + * - in all of these, the start+end values are multiplied by w2 and w1 (respectively), + * since multiplication in another order would decrease the value the current frame is closer to */ switch (pso->mode) { case POSESLIDE_PUSH: /* make the current pose more pronounced */ { /* perform a weighted average here, favoring the middle pose - * - numerator should be larger than denominator to 'expand' the result - * - perform this weighting a number of times given by the percentage... + * - numerator should be larger than denominator to 'expand' the result + * - perform this weighting a number of times given by the percentage... */ int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */ @@ -370,8 +370,8 @@ static void pose_slide_apply_val( case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */ { /* perform a weighted average here, favoring the middle pose - * - numerator should be smaller than denominator to 'relax' the result - * - perform this weighting a number of times given by the percentage... + * - numerator should be smaller than denominator to 'relax' the result + * - perform this weighting a number of times given by the percentage... */ int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */ @@ -445,8 +445,8 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl, con continue; /* do we have a match? - * - bPtr is the RNA Path with the standard part chopped off - * - pPtr is the chunk of the path which is left over + * - bPtr is the RNA Path with the standard part chopped off + * - pPtr is the chunk of the path which is left over */ bPtr = strstr(fcu->rna_path, pfl->pchan_path) + len; pPtr = strstr(bPtr, prop_prefix); @@ -629,9 +629,9 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso) /* for each link, handle each set of transforms */ for (pfl = pso->pfLinks.first; pfl; pfl = pfl->next) { /* valid transforms for each PoseChannel should have been noted already - * - sliding the pose should be a straightforward exercise for location+rotation, - * but rotations get more complicated since we may want to use quaternion blending - * for quaternions instead... + * - sliding the pose should be a straightforward exercise for location+rotation, + * but rotations get more complicated since we may want to use quaternion blending + * for quaternions instead... */ bPoseChannel *pchan = pfl->pchan; @@ -1334,7 +1334,7 @@ typedef union tPosePropagate_ModeData { /* get frame on which the "hold" for the bone ends * XXX: this may not really work that well if a bone moves on some channels and not others * if this happens to be a major issue, scrap this, and just make this happen - * independently per F-Curve + * independently per F-Curve */ static float pose_propagate_get_boneHoldEndFrame(tPChanFCurveLink *pfl, float startFrame) { @@ -1354,7 +1354,7 @@ static float pose_propagate_get_boneHoldEndFrame(tPChanFCurveLink *pfl, float st } /* find the long keyframe (i.e. hold), and hence obtain the endFrame value - * - the best case would be one that starts on the frame itself + * - the best case would be one that starts on the frame itself */ ActKeyColumn *ab = (ActKeyColumn *)BLI_dlrbTree_search_exact(&keys, compare_ak_cfraPtr, &startFrame); @@ -1495,11 +1495,11 @@ static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu, return; /* find the first keyframe to start propagating from - * - if there's a keyframe on the current frame, we probably want to save this value there too - * since it may be as of yet unkeyed - * - if starting before the starting frame, don't touch the key, as it may have had some valid - * values - * - if only doing selected keyframes, start from the first one + * - if there's a keyframe on the current frame, we probably want to save this value there too + * since it may be as of yet unkeyed + * - if starting before the starting frame, don't touch the key, as it may have had some valid + * values + * - if only doing selected keyframes, start from the first one */ if (mode != POSE_PROPAGATE_SELECTED_KEYS) { match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists); diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 5a6757294dc..5960c2d3c81 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -137,8 +137,8 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) copy_v3_v3(curbone->tail, pchan_eval->pose_tail); /* fix roll: - * 1. find auto-calculated roll value for this bone now - * 2. remove this from the 'visual' y-rotation + * 1. find auto-calculated roll value for this bone now + * 2. remove this from the 'visual' y-rotation */ { float premat[3][3], imat[3][3], pmat[3][3], tmat[3][3]; @@ -342,7 +342,7 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, const bo /* continue? */ if (paste_ok) { /* only loc rot size - * - only copies transform info for the pose + * - only copies transform info for the pose */ copy_v3_v3(pchan->loc, chan->loc); copy_v3_v3(pchan->size, chan->size); diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index a67ee8453bc..b891a181cfc 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -236,7 +236,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob) bArmature *arm = (bArmature *)ob->data; /* old optimize trick... this enforces to bypass the depgraph - * - note: code copied from transform_generics.c -> recalcData() + * - note: code copied from transform_generics.c -> recalcData() */ /* FIXME: shouldn't this use the builtin stuff? */ if ((arm->flag & ARM_DELAYDEFORM) == 0) @@ -338,8 +338,8 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, BLI_freelistN(&dsources); /* do the bone paths - * - only do this if keyframes should have been added - * - do not calculate unless there are paths already to update... + * - only do this if keyframes should have been added + * - do not calculate unless there are paths already to update... */ FOREACH_OBJECT_IN_MODE_BEGIN(view_layer, OB_MODE_POSE, ob) { if (ob->id.tag & LIB_TAG_DOIT) { @@ -354,7 +354,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, /* ------------------------- */ /* find the next F-Curve for a PoseChannel with matching path... - * - path is not just the pfl rna_path, since that path doesn't have property info yet + * - path is not just the pfl rna_path, since that path doesn't have property info yet */ LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path) { diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index 1a2d6d67cbe..1a51875af9e 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -380,7 +380,7 @@ static void gp_draw_stroke_2d( /* if the first segment, start of segment is segment's normal */ if (i == 0) { /* draw start cap first - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -421,7 +421,7 @@ static void gp_draw_stroke_2d( /* calculate gradient to apply * - as basis, use just pthick * bisector gradient - * - if cross-section not as thick as it should be, add extra padding to fix it + * - if cross-section not as thick as it should be, add extra padding to fix it */ mt[0] = mb[0] * pthick; mt[1] = mb[1] * pthick; @@ -463,7 +463,7 @@ static void gp_draw_stroke_2d( immVertex2fv(pos, t1); /* draw end cap as last step - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -893,8 +893,8 @@ static void gp_draw_data_all( /* ............................ * XXX - * We need to review the calls below, since they may be/are not that suitable for - * the new ways that we intend to be drawing data... + * We need to review the calls below, since they may be/are not that suitable for + * the new ways that we intend to be drawing data... * ............................ */ /* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */ diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 57be09d807c..e9b862cba9e 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -252,14 +252,14 @@ static bool gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2]) return true; /* check if mouse moved at least certain distance on both axes (best case) - * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand + * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand */ else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX)) return true; /* check if the distance since the last point is significant enough - * - prevents points being added too densely - * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though + * - prevents points being added too densely + * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though */ else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX) return true; @@ -278,7 +278,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] if (gpd->runtime.sbuffer_sflag & GP_STROKE_3DSPACE) { if (gpencil_project_check(p) && (ED_view3d_autodist_simple(p->ar, mval, out, 0, depth))) { /* projecting onto 3D-Geometry - * - nothing more needs to be done here, since view_autodist_simple() has already done it + * - nothing more needs to be done here, since view_autodist_simple() has already done it */ } else { @@ -292,8 +292,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] * works OK, but it could of course be improved. * * TODO: - * - investigate using nearest point(s) on a previous stroke as - * reference point instead or as offset, for easier stroke matching + * - investigate using nearest point(s) on a previous stroke as + * reference point instead or as offset, for easier stroke matching */ gp_get_3d_reference(p, rvec); @@ -355,7 +355,7 @@ static short gp_stroke_addpoint( } else { /* just reset the endpoint to the latest value - * - assume that pointers for this are always valid... + * - assume that pointers for this are always valid... */ pt = ((tGPspoint *)(gpd->runtime.sbuffer) + 1); @@ -460,8 +460,8 @@ static short gp_stroke_addpoint( } /* simplify a stroke (in buffer) before storing it - * - applies a reverse Chaikin filter - * - code adapted from etch-a-ton branch + * - applies a reverse Chaikin filter + * - code adapted from etch-a-ton branch */ static void gp_stroke_simplify(tGPsdata *p) { @@ -480,15 +480,15 @@ static void gp_stroke_simplify(tGPsdata *p) return; /* clear buffer (but don't free mem yet) so that we can write to it - * - firstly set sbuffer to NULL, so a new one is allocated - * - secondly, reset flag after, as it gets cleared auto + * - firstly set sbuffer to NULL, so a new one is allocated + * - secondly, reset flag after, as it gets cleared auto */ gpd->runtime.sbuffer = NULL; gp_session_validatebuffer(p); gpd->runtime.sbuffer_sflag = flag; /* macro used in loop to get position of new point - * - used due to the mixture of datatypes in use here + * - used due to the mixture of datatypes in use here */ #define GP_SIMPLIFY_AVPOINT(offs, sfac) \ { \ @@ -550,7 +550,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) int depth_margin = (ts->annotate_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0; /* get total number of points to allocate space for - * - drawing straight-lines only requires the endpoints + * - drawing straight-lines only requires the endpoints */ if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) totelem = (gpd->runtime.sbuffer_size >= 2) ? 2 : gpd->runtime.sbuffer_size; @@ -973,7 +973,7 @@ static bool gp_session_initdata(bContext *C, tGPsdata *p) /* RegionView3D *rv3d = ar->regiondata; */ /* set current area - * - must verify that region data is 3D-view (and not something else) + * - must verify that region data is 3D-view (and not something else) */ /* CAUTION: If this is the "toolbar", then this will change on the first stroke */ p->sa = curarea; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 03589bb69ae..2b2e3772e4d 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -879,7 +879,7 @@ static void gp_draw_stroke_2d( /* if the first segment, start of segment is segment's normal */ if (i == 0) { /* draw start cap first - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -919,8 +919,8 @@ static void gp_draw_stroke_2d( normalize_v2(mb); /* calculate gradient to apply - * - as basis, use just pthick * bisector gradient - * - if cross-section not as thick as it should be, add extra padding to fix it + * - as basis, use just pthick * bisector gradient + * - if cross-section not as thick as it should be, add extra padding to fix it */ mt[0] = mb[0] * pthick; mt[1] = mb[1] * pthick; @@ -965,7 +965,7 @@ static void gp_draw_stroke_2d( immVertex2fv(attr_id.pos, t1); /* draw end cap as last step - * - make points slightly closer to center (about halfway across) + * - make points slightly closer to center (about halfway across) */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; @@ -1557,11 +1557,11 @@ static void gp_draw_data_layers(RegionView3D *rv3d, gp_draw_strokes(&tgpw); /* Draw verts of selected strokes - * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering - * - locked layers can't be edited, so there's no point showing these verts - * as they will have no bearings on what gets edited - * - only show when in editmode, since operators shouldn't work otherwise - * (NOTE: doing it this way means that the toggling editmode shows visible change immediately) + * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering + * - locked layers can't be edited, so there's no point showing these verts + * as they will have no bearings on what gets edited + * - only show when in editmode, since operators shouldn't work otherwise + * (NOTE: doing it this way means that the toggling editmode shows visible change immediately) */ /* XXX: perhaps we don't want to show these when users are drawing... */ if ((G.f & G_RENDER_OGL) == 0 && diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 08680ba1e88..57bba10fa50 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -308,10 +308,10 @@ void ED_gplayer_frames_keytype_set(bGPDlayer *gpl, short type) /* -------------------------------------- */ /* Copy and Paste Tools */ /* - The copy/paste buffer currently stores a set of GP_Layers, with temporary - * GP_Frames with the necessary strokes + * GP_Frames with the necessary strokes * - Unless there is only one element in the buffer, names are also tested to check for compatibility. * - All pasted frames are offset by the same amount. This is calculated as the difference in the times of - * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). + * the current frame and the 'first keyframe' (i.e. the earliest one in all channels). * - The earliest frame is calculated per copy operation. */ @@ -483,10 +483,10 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) /* This should be the right frame... as it may be a pre-existing frame, * must make sure that only compatible stroke types get copied over - * - We cannot just add a duplicate frame, as that would cause errors - * - For now, we don't check if the types will be compatible since we - * don't have enough info to do so. Instead, we simply just paste, - * af it works, it will show up. + * - We cannot just add a duplicate frame, as that would cause errors + * - For now, we don't check if the types will be compatible since we + * don't have enough info to do so. Instead, we simply just paste, + * if it works, it will show up. */ for (gps = gpfs->strokes.first; gps; gps = gps->next) { /* make a copy of stroke, then of its points array */ diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 5c1b029fe95..18ff0efd3f9 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -628,9 +628,9 @@ static bool gp_brush_pinch_apply( copy_v3_v3(save_pt, &pt->x); /* Scale down standard influence value to get it more manageable... - * - No damping = Unmanageable at > 0.5 strength - * - Div 10 = Not enough effect - * - Div 5 = Happy medium... (by trial and error) + * - No damping = Unmanageable at > 0.5 strength + * - Div 10 = Not enough effect + * - Div 5 = Happy medium... (by trial and error) */ inf = gp_brush_influence_calc(gso, radius, co) / 5.0f; @@ -1438,7 +1438,7 @@ static bool gpsculpt_brush_do_stroke( } else { /* Loop over the points in the stroke, checking for intersections - * - an intersection means that we touched the stroke + * - an intersection means that we touched the stroke */ for (i = 0; (i + 1) < gps->totpoints; i++) { /* Get points to work with */ @@ -1465,7 +1465,7 @@ static bool gpsculpt_brush_do_stroke( { /* Check if point segment of stroke had anything to do with * brush region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(gso->mval, gso->mval_prev, radius, pc1[0], pc1[1], pc2[0], pc2[1])) { /* Apply operation to these points */ diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 9ec2915b60c..fc0464af430 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -146,7 +146,7 @@ static const EnumPropertyItem *rna_GPConvert_mode_items( /* --- */ /* convert the coordinates from the given stroke point into 3d-coordinates - * - assumes that the active space is the 3D-View + * - assumes that the active space is the 3D-View */ static void gp_strokepoint_convertcoords( bContext *C, bGPdata *gpd, bGPDlayer *gpl, bGPDstroke *gps, bGPDspoint *source_pt, @@ -1173,7 +1173,7 @@ static void gp_layer_to_curve( } /* init the curve object (remove rotation and get curve data from it) - * - must clear transforms set on object, as those skew our results + * - must clear transforms set on object, as those skew our results */ ob = BKE_object_add_only_object(bmain, OB_CURVE, gpl->info); cu = ob->data = BKE_curve_add(bmain, gpl->info, OB_CURVE); diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 99a6710ea4d..1cdc8274d32 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -408,11 +408,11 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index bool t_b = false; /* Horizontal leak (check vertical pixels) - * X - * X - * xB7 - * X - * X + * X + * X + * xB7 + * X + * X */ if (type == LEAK_HORZ) { /* pixels on top */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f95122b2282..f60c7892ab5 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -378,7 +378,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] if (gpencil_project_check(p) && (ED_view3d_autodist_simple(p->ar, mval, out, 0, depth))) { /* projecting onto 3D-Geometry - * - nothing more needs to be done here, since view_autodist_simple() has already done it + * - nothing more needs to be done here, since view_autodist_simple() has already done it */ /* verify valid zdepth, if it's wrong, the default darwing mode is used @@ -399,8 +399,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3] * works OK, but it could of course be improved. * * TODO: - * - investigate using nearest point(s) on a previous stroke as - * reference point instead or as offset, for easier stroke matching + * - investigate using nearest point(s) on a previous stroke as + * reference point instead or as offset, for easier stroke matching */ gp_get_3d_reference(p, rvec); @@ -588,7 +588,7 @@ static short gp_stroke_addpoint( } else { /* just reset the endpoint to the latest value - * - assume that pointers for this are always valid... + * - assume that pointers for this are always valid... */ pt = ((tGPspoint *)(gpd->runtime.sbuffer) + 1); @@ -853,7 +853,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) int depth_margin = (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0; /* get total number of points to allocate space for - * - drawing straight-lines only requires the endpoints + * - drawing straight-lines only requires the endpoints */ if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) totelem = (gpd->runtime.sbuffer_size >= 2) ? 2 : gpd->runtime.sbuffer_size; @@ -1448,7 +1448,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, { /* Check if point segment of stroke had anything to do with * eraser region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(mval, mvalo, radius, pc0[0], pc0[1], pc2[0], pc2[1])) { if ((gp_stroke_eraser_is_occluded(p, pt0, pc0[0], pc0[1]) == false) || @@ -1803,7 +1803,7 @@ static bool gp_session_initdata(bContext *C, wmOperator *op, tGPsdata *p) /* RegionView3D *rv3d = ar->regiondata; */ /* set current area - * - must verify that region data is 3D-view (and not something else) + * - must verify that region data is 3D-view (and not something else) */ /* CAUTION: If this is the "toolbar", then this will change on the first stroke */ p->sa = curarea; @@ -3020,9 +3020,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) } /* toggle painting mode upon mouse-button movement - * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only) - * - RIGHTMOUSE = polyline (hotkey) / eraser (all) - * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) + * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only) + * - RIGHTMOUSE = polyline (hotkey) / eraser (all) + * (Disabling RIGHTMOUSE case here results in bugs like [#32647]) * also making sure we have a valid event value, to not exit too early */ if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (ELEM(event->val, KM_PRESS, KM_RELEASE))) { diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 815f420f532..b3606d26bee 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -123,10 +123,10 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op) } /* if deselecting, we need to deselect strokes across all frames - * - Currently, an exception is only given for deselection - * Selecting and toggling should only affect what's visible, - * while deselecting helps clean up unintended/forgotten - * stuff on other frames + * - Currently, an exception is only given for deselection + * Selecting and toggling should only affect what's visible, + * while deselecting helps clean up unintended/forgotten + * stuff on other frames */ if (action == SEL_DESELECT) { /* deselect strokes across editable layers @@ -887,7 +887,7 @@ static bool gp_stroke_do_circle_sel( } else { /* Loop over the points in the stroke, checking for intersections - * - an intersection means that we touched the stroke + * - an intersection means that we touched the stroke */ bool hit = false; for (i = 0; (i + 1) < gps->totpoints; i++) { @@ -910,7 +910,7 @@ static bool gp_stroke_do_circle_sel( /* check if point segment of stroke had anything to do with * eraser region (either within stroke painted, or on its lines) - * - this assumes that linewidth is irrelevant + * - this assumes that linewidth is irrelevant */ if (gp_stroke_inside_circle(mval, mvalo, radius, x0, y0, x1, y1)) { /* change selection of stroke, and then of both points diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 708d8f37e58..1dc46d2850d 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -161,8 +161,8 @@ void gpencil_undo_push(bGPdata *gpd) } /* limit number of undo steps to the maximum undo steps - * - to prevent running out of memory during **really** - * long drawing sessions (triggering swapping) + * - to prevent running out of memory during **really** + * long drawing sessions (triggering swapping) */ /* TODO: Undo-memory constraint is not respected yet, but can be added if we have any need for it */ if (U.undosteps && !BLI_listbase_is_empty(&undo_nodes)) { diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index a2be7622537..f7cd7bc3786 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -476,7 +476,7 @@ typedef struct bAnimChannelType { int (*setting_flag)(bAnimContext *ac, eAnimChannel_Settings setting, bool *neg); /* get the pointer to int/short where data is stored, * with type being sizeof(ptr_data) which should be fine for runtime use... - * - assume that setting has been checked to be valid for current context + * - assume that setting has been checked to be valid for current context */ void *(*setting_ptr)(bAnimListElem *ale, eAnimChannel_Settings setting, short *type); } bAnimChannelType; @@ -500,25 +500,25 @@ void ANIM_channel_draw_widgets(const struct bContext *C, bAnimContext *ac, bAnim /* Check if some setting for a channel is enabled * Returns: 1 = On, 0 = Off, -1 = Invalid * - * - setting: eAnimChannel_Settings + * - setting: eAnimChannel_Settings */ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting); /* Change value of some setting for a channel - * - setting: eAnimChannel_Settings - * - mode: eAnimChannels_SetFlag + * - setting: eAnimChannel_Settings + * - mode: eAnimChannels_SetFlag */ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode); /* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting - * - anim_data: list of the all the anim channels that can be chosen - * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too, - * then the channels under closed expanders get ignored... - * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there) - * with the new state of the setting that we want flushed up/down the hierarchy - * - setting: type of setting to set - * - on: whether the visibility setting has been enabled or disabled + * - anim_data: list of the all the anim channels that can be chosen + * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too, + * then the channels under closed expanders get ignored... + * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there) + * with the new state of the setting that we want flushed up/down the hierarchy + * - setting: type of setting to set + * - on: whether the visibility setting has been enabled or disabled */ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode); @@ -582,12 +582,12 @@ void ANIM_fmodifiers_copybuf_free(void); /* copy the given F-Modifiers to the buffer, returning whether anything was copied or not * assuming that the buffer has been cleared already with ANIM_fmodifiers_copybuf_free() - * - active: only copy the active modifier + * - active: only copy the active modifier */ bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active); /* 'Paste' the F-Modifier(s) from the buffer to the specified list - * - replace: free all the existing modifiers to leave only the pasted ones + * - replace: free all the existing modifiers to leave only the pasted ones */ bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, struct FCurve *curve); @@ -662,9 +662,9 @@ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FC #define BEZKEYTYPE(bezt) ((bezt)->hide) /* set/clear/toggle macro - * - channel - channel with a 'flag' member that we're setting - * - smode - 0=clear, 1=set, 2=invert - * - sflag - bitflag to set + * - channel - channel with a 'flag' member that we're setting + * - smode - 0=clear, 1=set, 2=invert + * - sflag - bitflag to set */ #define ACHANNEL_SET_FLAG(channel, smode, sflag) \ { \ @@ -674,9 +674,9 @@ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FC } /* set/clear/toggle macro, where the flag is negative - * - channel - channel with a 'flag' member that we're setting - * - smode - 0=clear, 1=set, 2=invert - * - sflag - bitflag to set + * - channel - channel with a 'flag' member that we're setting + * - smode - 0=clear, 1=set, 2=invert + * - sflag - bitflag to set */ #define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \ { \ diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 7bade53cdf4..48bf390ee71 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -70,7 +70,7 @@ typedef struct EditBone { float head[3]; /* Orientation and length is implicit during editing */ float tail[3]; /* All joints are considered to have zero rotation with respect to - * their parents. Therefore any rotations specified during the + * their parents. Therefore any rotations specified during the * animation are automatically relative to the bones' rest positions*/ int flag; int layer; diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 5787a63d324..e7ea5cf159e 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -216,11 +216,11 @@ typedef enum eKeyMergeMode { /* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, struct FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); /* function for working with any type (i.e. one of the known types) of animation channel - * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) + * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) */ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, struct bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); /* same as above, except bAnimListElem wrapper is not needed... - * - keytype is eAnim_KeyType + * - keytype is eAnim_KeyType */ short ANIM_animchanneldata_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, void *data, int keytype, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 22e82d6b9ef..ed38e9cae58 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -62,7 +62,7 @@ struct EnumPropertyItem; /* ************ Keyframing Management **************** */ /* Get the active settings for keyframing settings from context (specifically the given scene) - * - incl_mode: include settings from keyframing mode in the result (i.e. replace only) + * - incl_mode: include settings from keyframing mode in the result (i.e. replace only) */ short ANIM_get_keyframing_flags(struct Scene *scene, short incl_mode); @@ -106,16 +106,16 @@ int insert_vert_fcurve(struct FCurve *fcu, float x, float y, eBezTriple_Keyframe /* -------- */ /* Secondary Keyframing API calls: - * Use this to insert a keyframe using the current value being keyframed, in the - * nominated F-Curve (no creation of animation data performed). Returns success. + * Use this to insert a keyframe using the current value being keyframed, in the + * nominated F-Curve (no creation of animation data performed). Returns success. */ bool insert_keyframe_direct(struct Depsgraph *depsgraph, struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag); /* -------- */ /* Main Keyframing API calls: - * Use this to create any necessary animation data, and then insert a keyframe - * using the current value being keyframed, in the relevant place. Returns success. + * Use this to create any necessary animation data, and then insert a keyframe + * using the current value being keyframed, in the relevant place. Returns success. */ short insert_keyframe( struct Main *bmain, struct Depsgraph *depsgraph, struct ReportList *reports, struct ID *id, struct bAction *act, @@ -162,8 +162,8 @@ typedef struct KeyingSetInfo { /* generate callbacks */ /* iterator to use to go through collections of data in context - * - this callback is separate from the 'adding' stage, allowing - * BuiltIn KeyingSets to be manually specified to use + * - this callback is separate from the 'adding' stage, allowing + * BuiltIn KeyingSets to be manually specified to use */ cbKeyingSet_Iterator iter; /* generator to use to add properties based on the data found by iterator */ @@ -312,8 +312,8 @@ bool ANIM_driver_can_paste(void); bool ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block or replace an existing one - * with the driver + driver-curve data from the buffer + * Add a new driver for the specified property on the given ID block or replace an existing one + * with the driver + driver-curve data from the buffer */ bool ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); @@ -356,22 +356,22 @@ bool autokeyframe_cfra_can_key(struct Scene *scene, struct ID *id); /* ************ Keyframe Checking ******************** */ /* Lesser Keyframe Checking API call: - * - Used for the buttons to check for keyframes... + * - Used for the buttons to check for keyframes... */ bool fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter); /* Main Keyframe Checking API call: * Checks whether a keyframe exists for the given ID-block one the given frame. - * - It is recommended to call this method over the other keyframe-checkers directly, - * in case some detail of the implementation changes... - * - frame: the value of this is quite often result of BKE_scene_frame_get() + * - It is recommended to call this method over the other keyframe-checkers directly, + * in case some detail of the implementation changes... + * - frame: the value of this is quite often result of BKE_scene_frame_get() */ bool id_frame_has_keyframe(struct ID *id, float frame, short filter); /* filter flags for id_cfra_has_keyframe * * WARNING: do not alter order of these, as also stored in files - * (for v3d->keyflags) + * (for v3d->keyflags) */ typedef enum eAnimFilterFlags { /* general */ diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index cae55473534..f35976750c9 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -46,8 +46,8 @@ /* Common View2D view types * NOTE: only define a type here if it completely sets all (+/- a few) of the relevant flags - * and settings for a View2D region, and that set of settings is used in more - * than one specific place + * and settings for a View2D region, and that set of settings is used in more + * than one specific place */ enum eView2D_CommonViewTypes { /* custom view type (region has defined all necessary flags already) */ @@ -121,7 +121,7 @@ enum eView2D_Gridlines { /* ------------------------------------------ */ -/* Macros: */ +/* Macros: */ /* test if mouse in a scrollbar (assume that scroller availability has been tested) */ #define IN_2D_VERT_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->vert, co)) diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 5be2b82af9e..d2bed210f9c 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -824,8 +824,8 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op)) txt = BKE_text_add(bmain, "Recent Reports"); /* convert entire list to a display string, and add this to the text-block - * - if commandline debug option enabled, show debug reports too - * - otherwise, up to info (which is what users normally see) + * - if commandline debug option enabled, show debug reports too + * - otherwise, up to info (which is what users normally see) */ str = BKE_reports_string(reports, (G.debug & G_DEBUG) ? RPT_DEBUG : RPT_INFO); @@ -1156,7 +1156,7 @@ static int edittranslation_exec(bContext *C, wmOperator *op) } /* Try to find a valid po file for current language... */ edittranslation_find_po_file(root, uilng, popath, FILE_MAX); -/* printf("po path: %s\n", popath);*/ + /* printf("po path: %s\n", popath); */ if (popath[0] == '\0') { BKE_reportf(op->reports, RPT_ERROR, "No valid po found for language '%s' under %s", uilng, root); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index aab580b49bd..4662d76a5e1 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -2382,9 +2382,9 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat if (state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) { if (data && data->state != PANEL_STATE_ANIMATION) { /* XXX: - * - the panel tabbing function call below (test_add_new_tabs()) has been commented out - * "It is too easy to do by accident when reordering panels, - * is very hard to control and use, and has no real benefit." - BillRey + * - the panel tabbing function call below (test_add_new_tabs()) has been commented out + * "It is too easy to do by accident when reordering panels, + * is very hard to control and use, and has no real benefit." - BillRey * Aligorith, 2009Sep */ //test_add_new_tabs(ar); // also copies locations of tabs in dragged panel diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index f1c9a7d200e..5bdf8f45832 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -939,7 +939,7 @@ static void ui_template_id( template_ui->idlb = which_libbase(CTX_data_main(C), idcode); /* create UI elements for this template - * - template_ID makes a copy of the template data and assigns it to the relevant buttons + * - template_ID makes a copy of the template data and assigns it to the relevant buttons */ if (template_ui->idlb) { if (use_tabs) { @@ -3410,10 +3410,10 @@ void uiTemplateLayers( } /* the number of layers determines the way we group them - * - we want 2 rows only (for now) - * - the number of columns (cols) is the total number of buttons per row - * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be - * - for now, only split into groups if group will have at least 5 items + * - we want 2 rows only (for now) + * - the number of columns (cols) is the total number of buttons per row + * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be + * - for now, only split into groups if group will have at least 5 items */ layers = RNA_property_array_length(ptr, prop); cols = (layers / 2) + (layers % 2); @@ -4396,7 +4396,7 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs( /* only for popups, see [#36109] */ /* if button is operator's default property, and a text-field, enable focus for it - * - this is used for allowing operators with popups to rename stuff with fewer clicks + * - this is used for allowing operators with popups to rename stuff with fewer clicks */ if (is_popup) { if ((but->rnaprop == op->type->prop) && (but->type == UI_BTYPE_TEXT)) { diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 4bd22956e8b..80f4bb57baa 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -162,8 +162,8 @@ static void view2d_masks(View2D *v2d, bool check_scrollers, const rcti *mask_scr scroll = view2d_scroll_mapped(v2d->scroll); /* scrollers are based off regionsize - * - they can only be on one to two edges of the region they define - * - if they overlap, they must not occupy the corners (which are reserved for other widgets) + * - they can only be on one to two edges of the region they define + * - if they overlap, they must not occupy the corners (which are reserved for other widgets) */ if (scroll) { const int scroll_width = (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) ? @@ -406,16 +406,16 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas tot = &v2d->tot; /* we must satisfy the following constraints (in decreasing order of importance): - * - alignment restrictions are respected - * - cur must not fall outside of tot - * - axis locks (zoom and offset) must be maintained - * - zoom must not be excessive (check either sizes or zoom values) - * - aspect ratio should be respected (NOTE: this is quite closely related to zoom too) + * - alignment restrictions are respected + * - cur must not fall outside of tot + * - axis locks (zoom and offset) must be maintained + * - zoom must not be excessive (check either sizes or zoom values) + * - aspect ratio should be respected (NOTE: this is quite closely related to zoom too) */ /* Step 1: if keepzoom, adjust the sizes of the rects only - * - firstly, we calculate the sizes of the rects - * - curwidth and curheight are saved as reference... modify width and height values here + * - firstly, we calculate the sizes of the rects + * - curwidth and curheight are saved as reference... modify width and height values here */ totwidth = BLI_rctf_size_x(tot); totheight = BLI_rctf_size_y(tot); @@ -525,9 +525,9 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas if (do_cur) { if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) { /* special exception for Outliner (and later channel-lists): - * - The view may be moved left to avoid contents being pushed out of view when view shrinks. - * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed) - * - width is not adjusted for changed ratios here... + * - The view may be moved left to avoid contents being pushed out of view when view shrinks. + * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed) + * - width is not adjusted for changed ratios here... */ if (winx < v2d->oldwinx) { float temp = v2d->oldwinx - winx; @@ -548,7 +548,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas else { if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winy != v2d->oldwiny)) { /* special exception for Outliner (and later channel-lists): - * - Currently, no actions need to be taken here... + * - Currently, no actions need to be taken here... */ if (winy < v2d->oldwiny) { @@ -635,8 +635,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas } else if (v2d->keeptot == V2D_KEEPTOT_STRICT) { /* This is an exception for the outliner (and later channel-lists, headers) - * - must clamp within tot rect (absolutely no excuses) - * --> therefore, cur->xmin must not be less than tot->xmin + * - must clamp within tot rect (absolutely no excuses) + * --> therefore, cur->xmin must not be less than tot->xmin */ if (cur->xmin < tot->xmin) { /* move cur across so that it sits at minimum of tot */ @@ -667,8 +667,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas } else { /* This here occurs when: - * - width too big, but maintaining zoom (i.e. widths cannot be changed) - * - width is OK, but need to check if outside of boundaries + * - width too big, but maintaining zoom (i.e. widths cannot be changed) + * - width is OK, but need to check if outside of boundaries * * So, resolution is to just shift view by the gap between the extremities. * We favour moving the 'minimum' across, as that's origin for most things @@ -718,8 +718,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas } else { /* This here occurs when: - * - height too big, but maintaining zoom (i.e. heights cannot be changed) - * - height is OK, but need to check if outside of boundaries + * - height too big, but maintaining zoom (i.e. heights cannot be changed) + * - height is OK, but need to check if outside of boundaries * * So, resolution is to just shift view by the gap between the extremities. * We favour moving the 'minimum' across, as that's origin for most things @@ -1690,8 +1690,8 @@ View2DScrollers *UI_view2d_scrollers_calc( scrollers->hor = hor; /* scroller 'buttons': - * - These should always remain within the visible region of the scrollbar - * - They represent the region of 'tot' that is visible in 'cur' + * - These should always remain within the visible region of the scrollbar + * - They represent the region of 'tot' that is visible in 'cur' */ /* horizontal scrollers */ @@ -1861,11 +1861,11 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v btheme->tui.widget_emboss[3] *= alpha_fac; /* will be reset later */ /* show zoom handles if: - * - zooming on x-axis is allowed (no scroll otherwise) - * - slider bubble is large enough (no overdraw confusion) - * - scale is shown on the scroller - * (workaround to make sure that button windows don't show these, - * and only the time-grids with their zoomability can do so) + * - zooming on x-axis is allowed (no scroll otherwise) + * - slider bubble is large enough (no overdraw confusion) + * - scale is shown on the scroller + * (workaround to make sure that button windows don't show these, + * and only the time-grids with their zoomability can do so) */ if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0 && (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) && @@ -1883,8 +1883,8 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v float fac, dfac, fac2, val; /* the numbers: convert grid->startx and -dx to scroll coordinates - * - fac is x-coordinate to draw to - * - dfac is gap between scale markings + * - fac is x-coordinate to draw to + * - dfac is gap between scale markings */ fac = (grid->startx - v2d->cur.xmin) / BLI_rctf_size_x(&v2d->cur); fac = (float)hor.xmin + fac * BLI_rcti_size_x(&hor); @@ -1964,11 +1964,11 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v btheme->tui.widget_emboss[3] *= alpha_fac; /* will be reset later */ /* show zoom handles if: - * - zooming on y-axis is allowed (no scroll otherwise) - * - slider bubble is large enough (no overdraw confusion) - * - scale is shown on the scroller - * (workaround to make sure that button windows don't show these, - * and only the time-grids with their zoomability can do so) + * - zooming on y-axis is allowed (no scroll otherwise) + * - slider bubble is large enough (no overdraw confusion) + * - scale is shown on the scroller + * (workaround to make sure that button windows don't show these, + * and only the time-grids with their zoomability can do so) */ if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0 && (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) && @@ -1986,10 +1986,10 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v float fac, dfac, val; /* the numbers: convert grid->starty and dy to scroll coordinates - * - fac is y-coordinate to draw to - * - dfac is gap between scale markings - * - these involve a correction for horizontal scrollbar - * NOTE: it's assumed that that scrollbar is there if this is involved! + * - fac is y-coordinate to draw to + * - dfac is gap between scale markings + * - these involve a correction for horizontal scrollbar + * NOTE: it's assumed that that scrollbar is there if this is involved! */ fac = (grid->starty - v2d->cur.ymin) / BLI_rctf_size_y(&v2d->cur); fac = vert.ymin + fac * BLI_rcti_size_y(&vert); diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 81632b48c80..62bc7e87f0e 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1157,7 +1157,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event vzd->dy += dy; /* store mouse coordinates for next time, if not doing continuous zoom - * - continuous zoom only depends on distance of mouse to starting point to determine rate of change + * - continuous zoom only depends on distance of mouse to starting point to determine rate of change */ if (U.viewzoom != USER_ZOOM_CONT) { // XXX store this setting as RNA prop? vzd->lastx = event->x; @@ -1249,9 +1249,9 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) if (zoom_in) { /* zoom in: - * - 'cur' rect will be defined by the coordinates of the border region - * - just set the 'cur' rect to have the same coordinates as the border region - * if zoom is allowed to be changed + * - 'cur' rect will be defined by the coordinates of the border region + * - just set the 'cur' rect to have the same coordinates as the border region + * if zoom is allowed to be changed */ if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { cur_new.xmin = rect.xmin; @@ -1264,9 +1264,9 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) } else { /* zoom out: - * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are, - * but the 'cur' rect coordinates will need to be adjusted to take in more of the view - * - calculate zoom factor, and adjust using center-point + * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are, + * but the 'cur' rect coordinates will need to be adjusted to take in more of the view + * - calculate zoom factor, and adjust using center-point */ float zoom, center, size; @@ -1636,8 +1636,8 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ bool in_min, in_max, in_bar, out_min, out_max, in_view = 1; /* firstly, check if - * - 'bubble' fills entire scroller - * - 'bubble' completely out of view on either side + * - 'bubble' fills entire scroller + * - 'bubble' completely out of view on either side */ if ((sh_min <= sc_min) && (sh_max >= sc_max)) in_view = 0; if (sh_min == sh_max) { @@ -1715,7 +1715,7 @@ static void scroller_activate_init(bContext *C, wmOperator *op, const wmEvent *e vsm->lastx = event->x; vsm->lasty = event->y; /* 'zone' depends on where mouse is relative to bubble - * - zooming must be allowed on this axis, otherwise, default to pan + * - zooming must be allowed on this axis, otherwise, default to pan */ scrollers = UI_view2d_scrollers_calc(C, v2d, NULL, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 5f6bffae7f6..4a2787e92e2 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3363,9 +3363,9 @@ void MESH_OT_solidify(wmOperatorType *ot) * Contributed by Robert Wenzlaff (Det. Thorn). * * 2.5 Revamp: - * - non modal (no menu before cutting) - * - exit on mouse release - * - polygon/segment drawing can become handled by WM cb later + * - non modal (no menu before cutting) + * - exit on mouse release + * - polygon/segment drawing can become handled by WM cb later * * bmesh port version */ diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 32eaa578be1..c9ce8ed54fc 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -138,8 +138,8 @@ static void join_mesh_single( } /* for each shapekey in destination mesh: - * - if there's a matching one, copy it across (will need to transform vertices into new space...) - * - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space) + * - if there's a matching one, copy it across (will need to transform vertices into new space...) + * - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space) */ if (key) { /* if this mesh has any shapekeys, check first, otherwise just copy coordinates */ @@ -168,8 +168,8 @@ static void join_mesh_single( } else { /* for each shapekey in destination mesh: - * - if it was an 'original', copy the appropriate data from nkey - * - otherwise, copy across plain coordinates (no need to transform coordinates) + * - if it was an 'original', copy the appropriate data from nkey + * - otherwise, copy across plain coordinates (no need to transform coordinates) */ if (key) { for (KeyBlock *kb = key->block.first; kb; kb = kb->next) { diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 212bf0ba018..4aedd6a55d4 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -276,8 +276,8 @@ static void test_constraint(Main *bmain, Object *owner, bPoseChannel *pchan, bCo bKinematicConstraint *data = con->data; /* bad: we need a separate set of checks here as poletarget is - * optional... otherwise poletarget must exist too or else - * the constraint is deemed invalid + * optional... otherwise poletarget must exist too or else + * the constraint is deemed invalid */ /* default IK check ... */ if (BKE_object_exists_check(bmain, data->tar) == 0) { @@ -1617,13 +1617,13 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob bool found = false; /* clear tar_ob and tar_pchan fields before use - * - assume for now that both always exist... + * - assume for now that both always exist... */ *tar_ob = NULL; *tar_pchan = NULL; /* check if constraint type doesn't requires a target - * - if so, no need to get any targets + * - if so, no need to get any targets */ switch (con_type) { /* no-target constraints --------------------------- */ @@ -1792,7 +1792,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase con = BKE_constraint_add_for_object(ob, NULL, type); /* get the first selected object/bone, and make that the target - * - apart from the buttons-window add buttons, we shouldn't add in this way + * - apart from the buttons-window add buttons, we shouldn't add in this way */ if (setTarget) { Object *tar_ob = NULL; @@ -1801,7 +1801,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase /* get the target objects, adding them as need be */ if (get_new_constraint_target(C, type, &tar_ob, &tar_pchan, 1)) { /* method of setting target depends on the type of target we've got - * - by default, just set the first target (distinction here is only for multiple-targeted constraints) + * - by default, just set the first target (distinction here is only for multiple-targeted constraints) */ if (tar_pchan) set_constraint_nth_target(con, tar_ob, tar_pchan->name, 0); @@ -1882,7 +1882,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op) } /* hack: set constraint targets from selected objects in context is allowed when - * operator name included 'with_targets', since the menu doesn't allow multiple properties + * operator name included 'with_targets', since the menu doesn't allow multiple properties */ if (strstr(op->idname, "with_targets")) with_targets = 1; @@ -1903,7 +1903,7 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op) } /* hack: set constraint targets from selected objects in context is allowed when - * operator name included 'with_targets', since the menu doesn't allow multiple properties + * operator name included 'with_targets', since the menu doesn't allow multiple properties */ if (strstr(op->idname, "with_targets")) with_targets = 1; @@ -2027,7 +2027,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED /* the type of targets we'll set determines the menu entries to show... */ if (get_new_constraint_target(C, CONSTRAINT_TYPE_KINEMATIC, &tar_ob, &tar_pchan, 0)) { /* bone target, or object target? - * - the only thing that matters is that we want a target... + * - the only thing that matters is that we want a target... */ if (tar_pchan) uiItemBooleanO(layout, IFACE_("To Active Bone"), ICON_NONE, "POSE_OT_ik_add", "with_targets", 1); diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index ef2694ec70a..77def4af6d0 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -319,7 +319,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) } } - /* Increment the step */ + /* Increment the step */ y -= ACHANNEL_STEP(ac); } GPU_blend(false); @@ -336,9 +336,9 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) immUnbindProgram(); /* Draw keyframes - * 1) Only channels that are visible in the Action Editor get drawn/evaluated. - * This is to try to optimize this for heavier data sets - * 2) Keyframes which are out of view horizontally are disregarded + * 1) Only channels that are visible in the Action Editor get drawn/evaluated. + * This is to try to optimize this for heavier data sets + * 2) Keyframes which are out of view horizontally are disregarded */ y = (float)(-ACHANNEL_HEIGHT(ac)); diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 377698d931c..c2376b506d4 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -86,10 +86,10 @@ /* *************************** Localise Markers ***************************** */ /* ensure that there is: - * 1) an active action editor - * 2) that the mode will have an active action available - * 3) that the set of markers being shown are the scene markers, not the list we're merging - * 4) that there are some selected markers + * 1) an active action editor + * 2) that the mode will have an active action available + * 3) that the set of markers being shown are the scene markers, not the list we're merging + * 4) that there are some selected markers */ static bool act_markers_make_local_poll(bContext *C) { diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index c00be5f4c39..0c96560f6d5 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -75,16 +75,16 @@ /* ******************** 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... */ /* Deselects keyframes in the action 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 - * - sel: how to select keyframes (SELECT_*) + * - test: check if select or deselect all + * - sel: how to select keyframes (SELECT_*) */ static void deselect_action_keys(bAnimContext *ac, short test, short sel) { @@ -209,10 +209,10 @@ void ACTION_OT_select_all(wmOperatorType *ot) /* ******************** Box Select Operator **************************** */ /* This operator currently works in one of three ways: - * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS) - * -> ALT-BKEY - depending on which axis of the region was larger... - * -> 2) x-axis, so select all frames within frame range (ACTKEYS_BORDERSEL_FRAMERANGE) - * -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS) + * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS) + * -> ALT-BKEY - depending on which axis of the region was larger... + * -> 2) x-axis, so select all frames within frame range (ACTKEYS_BORDERSEL_FRAMERANGE) + * -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS) */ /* defines for box_select mode */ @@ -359,9 +359,9 @@ static int actkeys_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 = ACTKEYS_BORDERSEL_FRAMERANGE; @@ -664,10 +664,10 @@ void ACTION_OT_select_circle(wmOperatorType *ot) /* ******************** Column Select Operator **************************** */ /* This operator works in one of four ways: - * - 1) select all keyframes in the same frame as a selected one (KKEY) - * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY) - * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY) - * - 4) select all keyframes that occur between selected markers (ALT-KKEY) + * - 1) select all keyframes in the same frame as a selected one (KKEY) + * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY) + * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY) + * - 4) select all keyframes that occur between selected markers (ALT-KKEY) */ /* defines for column-select mode */ @@ -802,7 +802,7 @@ static void columnselect_action_keys(bAnimContext *ac, short mode) AnimData *adt = ANIM_nla_mapping_get(ac, ale); /* loop over cfraelems (stored in the KeyframeEditData->list) - * - we need to do this here, as we can apply fewer NLA-mapping conversions + * - we need to do this here, as we can apply fewer NLA-mapping conversions */ for (ce = ked.list.first; ce; ce = ce->next) { /* set frame for validation callback to refer to */ @@ -1228,10 +1228,10 @@ void ACTION_OT_select_leftright(wmOperatorType *ot) /* ******************** Mouse-Click Select Operator *********************** */ /* This operator works in one of three ways: - * - 1) keyframe under mouse - no special modifiers - * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier - * - 3) column select all keyframes in frame under mouse - CTRL modifier - * - 4) all keyframes in channel under mouse - CTRL+ALT modifiers + * - 1) keyframe under mouse - no special modifiers + * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier + * - 3) column select all keyframes in frame under mouse - CTRL modifier + * - 4) all keyframes in channel under mouse - CTRL+ALT modifiers * * In addition to these basic options, the SHIFT modifier can be used to toggle the * selection mode between replacing the selection (without) and inverting the selection (with). diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 2f0b6faabe4..a9e5ee67cc9 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -231,14 +231,14 @@ static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezT return 0; /* find first selected keyframe for now, and call it the active one - * - this is a reasonable assumption, given that whenever anyone - * wants to edit numerically, there is likely to only be 1 vert selected + * - this is a reasonable assumption, given that whenever anyone + * wants to edit numerically, there is likely to only be 1 vert selected */ for (i = 0, b = fcu->bezt; i < fcu->totvert; i++, b++) { if (BEZT_ISSEL_ANY(b)) { /* found - * - 'previous' is either the one before, of the keyframe itself (which is still fine) - * XXX: we can just make this null instead if needed + * - 'previous' is either the one before, of the keyframe itself (which is still fine) + * XXX: we can just make this null instead if needed */ *prevbezt = (i > 0) ? b - 1 : b; *bezt = b; @@ -390,8 +390,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) } /* numerical coordinate editing - * - we use the button-versions of the calls so that we can attach special update handlers - * and unit conversion magic that cannot be achieved using a purely RNA-approach + * - we use the button-versions of the calls so that we can attach special update handlers + * and unit conversion magic that cannot be achieved using a purely RNA-approach */ col = uiLayoutColumn(layout, true); /* keyframe itself */ diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 927f64cb528..65bf8af70e8 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -66,7 +66,7 @@ /* determine the alpha value that should be used when * drawing components for some F-Curve (fcu) - * - selected F-Curves should be more visible than partially visible ones + * - selected F-Curves should be more visible than partially visible ones */ static float fcurve_display_alpha(FCurve *fcu) { @@ -126,7 +126,7 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d) for (i = 0, fed = env->data; i < env->totvert; i++, fed++) { /* only draw if visible - * - min/max here are fixed, not relative + * - min/max here are fixed, not relative */ if (IN_RANGE(fed->time, (v2d->cur.xmin - fac), (v2d->cur.xmax + fac))) { immVertex2f(shdr_pos, fed->time, fed->min); @@ -183,13 +183,13 @@ static void draw_fcurve_selected_keyframe_vertices(FCurve *fcu, View2D *v2d, boo BezTriple *bezt = fcu->bezt; for (int i = 0; i < fcu->totvert; i++, bezt++) { /* as an optimization step, only draw those in view - * - we apply a correction factor to ensure that points don't pop in/out due to slight twitches of view size + * - we apply a correction factor to ensure that points don't pop in/out due to slight twitches of view size */ if (IN_RANGE(bezt->vec[1][0], (v2d->cur.xmin - fac), (v2d->cur.xmax + fac))) { if (edit) { /* 'Keyframe' vertex only, as handle lines and handles have already been drawn - * - only draw those with correct selection state for the current drawing color - * - + * - only draw those with correct selection state for the current drawing color + * - */ if ((bezt->f2 & SELECT) == sel) immVertex2fv(pos, bezt->vec[1]); @@ -237,8 +237,8 @@ static void draw_fcurve_selected_handle_vertices(FCurve *fcu, View2D *v2d, bool for (int i = 0; i < fcu->totvert; i++, prevbezt = bezt, bezt++) { /* Draw the editmode handles for a bezier curve (others don't have handles) * if their selection status matches the selection status we're drawing for - * - first handle only if previous beztriple was bezier-mode - * - second handle only if current beztriple is bezier-mode + * - first handle only if previous beztriple was bezier-mode + * - second handle only if current beztriple is bezier-mode * * Also, need to take into account whether the keyframe was selected * if a Graph Editor option to only show handles of selected keys is on. @@ -281,9 +281,9 @@ static void draw_fcurve_vertices(ARegion *ar, FCurve *fcu, bool do_handles, bool View2D *v2d = &ar->v2d; /* only draw points if curve is visible - * - draw unselected points before selected points as separate passes - * to make sure in the case of overlapping points that the selected is always visible - * - draw handles before keyframes, so that keyframes will overlap handles (keyframes are more important for users) + * - draw unselected points before selected points as separate passes + * to make sure in the case of overlapping points that the selected is always visible + * - draw handles before keyframes, so that keyframes will overlap handles (keyframes are more important for users) */ uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -503,15 +503,15 @@ static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d unitFac = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, mapping_flag, &offset); /* Note about sampling frequency: - * Ideally, this is chosen such that we have 1-2 pixels = 1 segment - * which means that our curves can be as smooth as possible. However, - * this does mean that curves may not be fully accurate (i.e. if they have - * sudden spikes which happen at the sampling point, we may have problems). - * Also, this may introduce lower performance on less densely detailed curves, - * though it is impossible to predict this from the modifiers! + * Ideally, this is chosen such that we have 1-2 pixels = 1 segment + * which means that our curves can be as smooth as possible. However, + * this does mean that curves may not be fully accurate (i.e. if they have + * sudden spikes which happen at the sampling point, we may have problems). + * Also, this may introduce lower performance on less densely detailed curves, + * though it is impossible to predict this from the modifiers! * - * If the automatically determined sampling frequency is likely to cause an infinite - * loop (i.e. too close to 0), then clamp it to a determined "safe" value. The value + * If the automatically determined sampling frequency is likely to cause an infinite + * loop (i.e. too close to 0), then clamp it to a determined "safe" value. The value * chosen here is just the coarsest value which still looks reasonable... */ /* grid->dx represents the number of 'frames' between gridlines, but we divide by U.v2d_min_gridsize to get pixels-steps */ @@ -544,8 +544,8 @@ static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d /* at each sampling interval, add a new vertex - * - apply the unit correction factor to the calculated values so that - * the displayed values appear correctly in the viewport + * - apply the unit correction factor to the calculated values so that + * the displayed values appear correctly in the viewport */ n = (etime - stime) / samplefreq + 0.5f; @@ -743,7 +743,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 } else if (prevbezt->ipo == BEZT_IPO_BEZ) { /* Bezier-Interpolation: draw curve as series of segments between keyframes - * - resol determines number of points to sample in between keyframes + * - resol determines number of points to sample in between keyframes */ /* resol depends on distance between points (not just horizontal) OR is a fixed high res */ @@ -984,8 +984,8 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) /* the ghost curves are simply sampled F-Curves stored in sipo->ghostCurves */ for (fcu = sipo->ghostCurves.first; fcu; fcu = fcu->next) { /* set whatever color the curve has set - * - this is set by the function which creates these - * - draw with a fixed opacity of 2 + * - this is set by the function which creates these + * - draw with a fixed opacity of 2 */ immUniformColor3fvAlpha(fcu->color, 0.5f); @@ -1016,8 +1016,8 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* for each curve: - * draw curve, then handle-lines, and finally vertices in this order so that - * the data will be layered correctly + * draw curve, then handle-lines, and finally vertices in this order so that + * the data will be layered correctly */ for (ale = anim_data.first; ale; ale = ale->next) { FCurve *fcu = (FCurve *)ale->key_data; @@ -1030,10 +1030,10 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid } /* draw curve: - * - curve line may be result of one or more destructive modifiers or just the raw data, - * so we need to check which method should be used - * - controls from active modifier take precedence over keyframes - * (XXX! editing tools need to take this into account!) + * - curve line may be result of one or more destructive modifiers or just the raw data, + * so we need to check which method should be used + * - controls from active modifier take precedence over keyframes + * (XXX! editing tools need to take this into account!) */ /* 1) draw curve line */ @@ -1081,7 +1081,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid } else { /* set whatever color the curve has set - * - unselected curves draw less opaque to help distinguish the selected ones + * - unselected curves draw less opaque to help distinguish the selected ones */ immUniformColor3fvAlpha(fcu->color, fcurve_display_alpha(fcu)); } @@ -1117,7 +1117,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid } /* 2) draw handles and vertices as appropriate based on active - * - if the option to only show controls if the F-Curve is selected is enabled, we must obey this + * - if the option to only show controls if the F-Curve is selected is enabled, we must obey this */ if (!(sipo->flag & SIPO_SELCUVERTSONLY) || (fcu->flag & FCURVE_SELECTED)) { if (!fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) { @@ -1198,10 +1198,10 @@ void graph_draw_channel_names(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 ACHANNEL_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 ACHANNEL_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. */ height = (float)((items * ACHANNEL_STEP(ac)) + (ACHANNEL_HEIGHT(ac) * 2)); UI_view2d_totRect_set(v2d, BLI_rcti_size_x(&ar->v2d.mask), height); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 4a5bd0c09b9..08a5a6aeedd 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -375,7 +375,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) unitFac = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, mapping_flag, &offset); /* create samples, but store them in a new curve - * - we cannot use fcurve_store_samples() as that will only overwrite the original curve + * - we cannot use fcurve_store_samples() as that will only overwrite the original curve */ gcu->fpt = fpt = MEM_callocN(sizeof(FPoint) * (end - start + 1), "Ghost FPoint Samples"); gcu->totvert = end - start + 1; @@ -389,7 +389,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) } /* set color of ghost curve - * - make the color slightly darker + * - make the color slightly darker */ gcu->color[0] = fcu->color[0] - 0.07f; gcu->color[1] = fcu->color[1] - 0.07f; @@ -1819,10 +1819,10 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* The process is done in two passes: - * 1) Sets of three related rotation curves are identified from the selected channels, - * and are stored as a single 'operation unit' for the next step - * 2) Each set of three F-Curves is processed for each keyframe, with the values being - * processed as necessary + * 1) Sets of three related rotation curves are identified from the selected channels, + * and are stored as a single 'operation unit' for the next step + * 2) Each set of three F-Curves is processed for each keyframe, with the values being + * processed as necessary */ /* step 1: extract only the rotation f-curves */ @@ -1833,8 +1833,8 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op) FCurve *fcu = (FCurve *)ale->data; /* check if this is an appropriate F-Curve - * - only rotation curves - * - for pchan curves, make sure we're only using the euler curves + * - only rotation curves + * - for pchan curves, make sure we're only using the euler curves */ if (strstr(fcu->rna_path, "rotation_euler") == NULL) continue; @@ -1874,7 +1874,7 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op) } /* step 2: go through each set of curves, processing the values at each keyframe - * - it is assumed that there must be a full set of keyframes at each keyframe position + * - it is assumed that there must be a full set of keyframes at each keyframe position */ for (euf = eulers.first; euf; euf = euf->next) { int f; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 1b3d154f804..a6cc047d2dc 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -65,8 +65,8 @@ /* Set Cursor --------------------------------------------------------------------- */ /* The 'cursor' in the Graph Editor consists of two parts: - * 1) Current Frame Indicator (as per ANIM_OT_change_frame) - * 2) Value Indicator (stored per Graph Editor instance) + * 1) Current Frame Indicator (as per ANIM_OT_change_frame) + * 2) Value Indicator (stored per Graph Editor instance) */ static bool graphview_cursor_poll(bContext *C) diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index ffbde1e9aab..cbea292c4ec 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -69,20 +69,20 @@ /* ******************** 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... */ /* Deselects keyframes in the Graph 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 - * - sel: how to select keyframes - * 0 = deselect - * 1 = select - * 2 = invert - * - do_channels: whether to affect selection status of channels + * - test: check if select or deselect all + * - sel: how to select keyframes + * 0 = deselect + * 1 = select + * 2 = invert + * - do_channels: whether to affect selection status of channels */ void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channels) { @@ -221,10 +221,10 @@ void GRAPH_OT_select_all(wmOperatorType *ot) /* ******************** Box Select Operator **************************** */ /* This operator currently works in one of three ways: - * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION) - * -> ALT-BKEY - depending on which axis of the region was larger... - * -> 2) x-axis, so select all frames within frame range (validation with BEZT_OK_FRAMERANGE) - * -> 3) y-axis, so select all frames within channels that region included (validation with BEZT_OK_VALUERANGE) + * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION) + * -> ALT-BKEY - depending on which axis of the region was larger... + * -> 2) x-axis, so select all frames within frame range (validation with BEZT_OK_FRAMERANGE) + * -> 3) y-axis, so select all frames within channels that region included (validation with BEZT_OK_VALUERANGE) * * The selection backend is also reused for the Lasso and Circle select operators. */ @@ -360,7 +360,7 @@ static int graphkeys_box_select_exec(bContext *C, wmOperator *op) deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true); /* get select mode - * - 'include_handles' from the operator specifies whether to include handles in the selection + * - 'include_handles' from the operator specifies whether to include handles in the selection */ if (select) { selectmode = SELECT_ADD; @@ -377,9 +377,9 @@ static int graphkeys_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 = BEZT_OK_FRAMERANGE; @@ -577,10 +577,10 @@ void GRAPH_OT_select_circle(wmOperatorType *ot) /* ******************** Column Select Operator **************************** */ /* This operator works in one of four ways: - * - 1) select all keyframes in the same frame as a selected one (KKEY) - * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY) - * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY) - * - 4) select all keyframes that occur between selected markers (ALT-KKEY) + * - 1) select all keyframes in the same frame as a selected one (KKEY) + * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY) + * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY) + * - 4) select all keyframes that occur between selected markers (ALT-KKEY) */ /* defines for column-select mode */ @@ -699,7 +699,7 @@ static void columnselect_graph_keys(bAnimContext *ac, short mode) AnimData *adt = ANIM_nla_mapping_get(ac, ale); /* loop over cfraelems (stored in the KeyframeEditData->list) - * - we need to do this here, as we can apply fewer NLA-mapping conversions + * - we need to do this here, as we can apply fewer NLA-mapping conversions */ for (ce = ked.list.first; ce; ce = ce->next) { /* set frame for validation callback to refer to */ @@ -1079,9 +1079,9 @@ void GRAPH_OT_select_leftright(wmOperatorType *ot) /* ******************** Mouse-Click Select Operator *********************** */ /* This operator works in one of three ways: - * - 1) keyframe under mouse - no special modifiers - * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier - * - 3) column select all keyframes in frame under mouse - CTRL modifier + * - 1) keyframe under mouse - no special modifiers + * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier + * - 3) column select all keyframes in frame under mouse - CTRL modifier * * In addition to these basic options, the SHIFT modifier can be used to toggle the * selection mode between replacing the selection (without) and inverting the selection (with). @@ -1195,8 +1195,8 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L short mapping_flag = 0; /* get curves to search through - * - if the option to only show keyframes that belong to selected F-Curves is enabled, - * include the 'only selected' flag... + * - if the option to only show keyframes that belong to selected F-Curves is enabled, + * include the 'only selected' flag... */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS); if (sipo->flag & SIPO_SELCUVERTSONLY) // FIXME: this should really be check for by the filtering code... @@ -1271,7 +1271,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert(ListBase *matches) /* which mode of search are we in: find first selected, or find vert? */ if (found) { /* just take this vert now that we've found the selected one - * - we'll need to remove this from the list so that it can be returned to the original caller + * - we'll need to remove this from the list so that it can be returned to the original caller */ BLI_remlink(matches, nvi); return nvi; diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 4adb95677b0..912b5ceed58 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -166,9 +166,9 @@ bool graphop_visible_keyframes_poll(bContext *C) FCurve *fcu = (FCurve *)ale->data; /* visible curves for selection must fulfill the following criteria: - * - it has bezier keyframes - * - F-Curve modifiers do not interfere with the result too much - * (i.e. the modifier-control drawing check returns false) + * - it has bezier keyframes + * - F-Curve modifiers do not interfere with the result too much + * (i.e. the modifier-control drawing check returns false) */ if (fcu->bezt == NULL) continue; @@ -215,10 +215,10 @@ bool graphop_editable_keyframes_poll(bContext *C) FCurve *fcu = (FCurve *)ale->data; /* editable curves must fulfill the following criteria: - * - it has bezier keyframes - * - it must not be protected from editing (this is already checked for with the edit flag - * - F-Curve modifiers do not interfere with the result too much - * (i.e. the modifier-control drawing check returns false) + * - it has bezier keyframes + * - it must not be protected from editing (this is already checked for with the edit flag + * - F-Curve modifiers do not interfere with the result too much + * (i.e. the modifier-control drawing check returns false) */ if (fcu->bezt == NULL) continue; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index eff216f8c02..1fa6cb9b3de 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -651,8 +651,8 @@ static void graph_refresh_fcurve_colors(const bContext *C) UI_SetTheme(SPACE_IPO, RGN_TYPE_WINDOW); /* build list of F-Curves which will be visible as channels in channel-region - * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a - * mismatch between channel-colors and the drawn curves + * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a + * mismatch between channel-colors and the drawn curves */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS); items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); 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); diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index e5d1a42c274..64b09eca890 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2163,9 +2163,9 @@ void draw_outliner(const bContext *C) if (soops->outlinevis == SO_DATA_API) { /* RNA has two columns: - * - column 1 is (max_width + OL_RNA_COL_SPACEX) or - * (OL_RNA_COL_X), whichever is wider... - * - column 2 is fixed at OL_RNA_COL_SIZEX + * - column 1 is (max_width + OL_RNA_COL_SPACEX) or + * (OL_RNA_COL_X), whichever is wider... + * - column 2 is fixed at OL_RNA_COL_SIZEX * * (*) XXX max width for now is a fixed factor of (UI_UNIT_X * (max_indention + 100)) */ diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 973091a4b9d..ce89e7e6d66 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1385,18 +1385,18 @@ static void tree_element_to_path(TreeElement *te, TreeStoreElem *tselem, char *newpath = NULL; /* optimize tricks: - * - Don't do anything if the selected item is a 'struct', but arrays are allowed + * - Don't do anything if the selected item is a 'struct', but arrays are allowed */ if (tselem->type == TSE_RNA_STRUCT) return; /* Overview of Algorithm: - * 1. Go up the chain of parents until we find the 'root', taking note of the - * levels encountered in reverse-order (i.e. items are added to the start of the list - * for more convenient looping later) - * 2. Walk down the chain, adding from the first ID encountered - * (which will become the 'ID' for the KeyingSet Path), and build a - * path as we step through the chain + * 1. Go up the chain of parents until we find the 'root', taking note of the + * levels encountered in reverse-order (i.e. items are added to the start of the list + * for more convenient looping later) + * 2. Walk down the chain, adding from the first ID encountered + * (which will become the 'ID' for the KeyingSet Path), and build a + * path as we step through the chain */ /* step 1: flatten out hierarchy of parents into a flat chain */ diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 86d909220e2..902235779cf 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1866,10 +1866,10 @@ static int outliner_filter_subtree( if (!outliner_filter_has_name(te, search_string, soops->search_flags)) { /* item isn't something we're looking for, but... - * - if the subtree is expanded, check if there are any matches that can be easily found - * so that searching for "cu" in the default scene will still match the Cube - * - otherwise, we can't see within the subtree and the item doesn't match, - * so these can be safely ignored (i.e. the subtree can get freed) + * - if the subtree is expanded, check if there are any matches that can be easily found + * so that searching for "cu" in the default scene will still match the Cube + * - otherwise, we can't see within the subtree and the item doesn't match, + * so these can be safely ignored (i.e. the subtree can get freed) */ tselem = TREESTORE(te); diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index d814a27c282..a9ae158d162 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -650,13 +650,13 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, const w Editing *ed = BKE_sequencer_editing_get(scene, false); /* only enable "use_framerate" if there aren't any existing strips - * - When there are no strips yet, there is no harm in enabling this, - * and it makes the single-strip case really nice for casual users - * - When there are strips, it's best we don't touch the framerate, - * as all hell may break loose (e.g. audio strips start overlapping - * and can't be restored) - * - These initial guesses can still be manually overridden by users - * from the modal options panel + * - When there are no strips yet, there is no harm in enabling this, + * and it makes the single-strip case really nice for casual users + * - When there are strips, it's best we don't touch the framerate, + * as all hell may break loose (e.g. audio strips start overlapping + * and can't be restored) + * - These initial guesses can still be manually overridden by users + * from the modal options panel */ if (ed && ed->seqbasep && ed->seqbasep->first) { RNA_boolean_set(op->ptr, "use_framerate", false); diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index e3fe124a5c4..29cc5bafb17 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -337,9 +337,9 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel) BLI_dlrbTree_linkedlist_sync(&keys); /* start drawing keyframes - * - we use the binary-search capabilities of the tree to only start from - * the first visible keyframe (last one can then be easily checked) - * - draw within a single GL block to be faster + * - we use the binary-search capabilities of the tree to only start from + * the first visible keyframe (last one can then be easily checked) + * - draw within a single GL block to be faster */ glBegin(GL_LINES); for (ak = time_cfra_find_ak(keys.root, v2d->cur.xmin); @@ -430,8 +430,8 @@ static void time_draw_keyframes(const bContext *C, ARegion *ar) } /* draw scene keyframes first - * - don't try to do this when only drawing active/selected data keyframes, - * since this can become quite slow + * - don't try to do this when only drawing active/selected data keyframes, + * since this can become quite slow */ if (onlysel == 0) { /* set draw color */ @@ -440,9 +440,9 @@ static void time_draw_keyframes(const bContext *C, ARegion *ar) } /* draw keyframes from selected objects - * - only do the active object if in posemode (i.e. showing only keyframes for the bones) - * OR the onlysel flag was set, which means that only active object's keyframes should - * be considered + * - only do the active object if in posemode (i.e. showing only keyframes for the bones) + * OR the onlysel flag was set, which means that only active object's keyframes should + * be considered */ UI_ThemeColor(TH_TIME_KEYFRAME); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 069245b7560..9bd8417c46e 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -810,7 +810,7 @@ enum { TFM_MODAL_ADD_SNAP = 16, TFM_MODAL_REMOVE_SNAP = 17, -/* 18 and 19 used by numinput, defined in transform.h */ +/* 18 and 19 used by numinput, defined in transform.h */ TFM_MODAL_PROPSIZE_UP = 20, TFM_MODAL_PROPSIZE_DOWN = 21, @@ -2834,8 +2834,8 @@ static void constraintTransLim(TransInfo *t, TransData *td) float ctime = (float)(t->scene->r.cfra); /* Make a temporary bConstraintOb for using these limit constraints - * - they only care that cob->matrix is correctly set ;-) - * - current space should be local + * - they only care that cob->matrix is correctly set ;-) + * - current space should be local */ unit_m4(cob.matrix); copy_v3_v3(cob.matrix[3], td->loc); @@ -2901,8 +2901,8 @@ static void constraintTransLim(TransInfo *t, TransData *td) static void constraintob_from_transdata(bConstraintOb *cob, TransData *td) { /* Make a temporary bConstraintOb for use by limit constraints - * - they only care that cob->matrix is correctly set ;-) - * - current space should be local + * - they only care that cob->matrix is correctly set ;-) + * - current space should be local */ memset(cob, 0, sizeof(bConstraintOb)); if (td->ext) { @@ -3003,8 +3003,8 @@ static void constraintSizeLim(TransInfo *t, TransData *td) int i; /* Make a temporary bConstraintOb for using these limit constraints - * - they only care that cob->matrix is correctly set ;-) - * - current space should be local + * - they only care that cob->matrix is correctly set ;-) + * - current space should be local */ if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { /* scale val and reset size */ @@ -8633,7 +8633,7 @@ static short getAnimEdit_SnapMode(TransInfo *t) } /* toggle autosnap on/off - * - when toggling on, prefer nearest frame over 1.0 frame increments + * - when toggling on, prefer nearest frame over 1.0 frame increments */ if (t->modifiers & MOD_SNAP_INVERT) { if (autosnap) diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index c0d4db0cc97..06e4f63d3d0 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3457,13 +3457,13 @@ static void createTransNlaData(bContext *C, TransInfo *t) if (strip->type != NLASTRIP_TYPE_TRANSITION) { if (strip->flag & NLASTRIP_FLAG_SELECT) { /* our transform data is constructed as follows: - * - only the handles on the right side of the current-frame get included - * - td structs are transform-elements operated on by the transform system - * and represent a single handle. The storage/pointer used (val or loc) depends on - * whether we're scaling or transforming. Ultimately though, the handles - * the td writes to will simply be a dummy in tdn - * - for each strip being transformed, a single tdn struct is used, so in some - * cases, there will need to be 1 of these tdn elements in the array skipped... + * - only the handles on the right side of the current-frame get included + * - td structs are transform-elements operated on by the transform system + * and represent a single handle. The storage/pointer used (val or loc) depends on + * whether we're scaling or transforming. Ultimately though, the handles + * the td writes to will simply be a dummy in tdn + * - for each strip being transformed, a single tdn struct is used, so in some + * cases, there will need to be 1 of these tdn elements in the array skipped... */ float center[3], yval; @@ -4650,9 +4650,9 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) } /* special hack (must be done after initTransDataCurveHandles(), as that stores handle settings to restore...): - * - Check if we've got entire BezTriple selected and we're scaling/rotating that point, - * then check if we're using auto-handles. - * - If so, change them auto-handles to aligned handles so that handles get affected too + * - Check if we've got entire BezTriple selected and we're scaling/rotating that point, + * then check if we're using auto-handles. + * - If so, change them auto-handles to aligned handles so that handles get affected too */ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) && ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM) && @@ -4960,9 +4960,9 @@ void flushTransGraphData(TransInfo *t) float inv_unit_scale = 1.0f / tdg->unit_scale; /* handle snapping for time values - * - we should still be in NLA-mapping timespace - * - only apply to keyframes (but never to handles) - * - don't do this when canceling, or else these changes won't go away + * - we should still be in NLA-mapping timespace + * - only apply to keyframes (but never to handles) + * - don't do this when canceling, or else these changes won't go away */ if ((t->state != TRANS_CANCEL) && (td->flag & TD_NOTIMESNAP) == 0) { switch (sipo->autosnap) { @@ -5679,9 +5679,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) td->con = ob->constraints.first; /* hack: temporarily disable tracking and/or constraints when getting - * object matrix, if tracking is on, or if constraints don't need - * inverse correction to stop it from screwing up space conversion - * matrix later + * object matrix, if tracking is on, or if constraints don't need + * inverse correction to stop it from screwing up space conversion + * matrix later */ constinv = constraints_list_needinv(t, &ob->constraints); @@ -5747,7 +5747,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) /* Get the effect of parenting, and/or certain constraints. * NOTE: some Constraints, and also Tracking should never get this - * done, as it doesn't work well. + * done, as it doesn't work well. */ BKE_object_to_mat3(ob, obmtx); copy_m3_m4(totmat, ob->obmat); @@ -6084,9 +6084,9 @@ void autokeyframe_pose(bContext *C, Scene *scene, Object *ob, int tmode, short t short flag = 0; /* flag is initialized from UserPref keyframing settings - * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get - * visual keyframes even if flag not set, as it's not that useful otherwise - * (for quick animation recording) + * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get + * visual keyframes even if flag not set, as it's not that useful otherwise + * (for quick animation recording) */ flag = ANIM_get_keyframing_flags(scene, 1); diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 579dbad706c..adf4d5bec4b 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -273,9 +273,9 @@ static void animrecord_check_state(Scene *scene, ID *id, wmTimer *animtimer) return; /* check if we need a new strip if: - * - if animtimer is running - * - we're not only keying for available channels - * - the option to add new actions for each round is not enabled + * - if animtimer is running + * - we're not only keying for available channels + * - the option to add new actions for each round is not enabled */ if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL) == 0 && (scene->toolsettings->autokey_flag & ANIMRECORD_FLAG_WITHNLA)) { /* if playback has just looped around, we need to add a new NLA track+strip to allow a clean pass to occur */ @@ -535,8 +535,8 @@ static void recalcData_nla(TransInfo *t) if ((pExceeded && nExceeded) || (iter == 4)) { /* both endpoints exceeded (or iteration ping-pong'd meaning that we need a compromise) - * - simply crop strip to fit within the bounds of the strips bounding it - * - if there were no neighbors, clear the transforms (make it default to the strip's current values) + * - simply crop strip to fit within the bounds of the strips bounding it + * - if there were no neighbors, clear the transforms (make it default to the strip's current values) */ if (strip->prev && strip->next) { tdn->h1[0] = strip->prev->end; @@ -626,7 +626,7 @@ static void recalcData_nla(TransInfo *t) /* now, check if we need to try and move track - * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved + * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved */ delta_y1 = ((int)tdn->h1[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex); delta_y2 = ((int)tdn->h2[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex); |