Cleanup: comments (long lines) in editors

This commit is contained in:
Campbell Barton 2019-04-22 00:18:34 +10:00
parent f8b2268f4f
commit 0ac990d088
139 changed files with 1249 additions and 753 deletions

View File

@ -356,7 +356,8 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
else if (ELEM(GS(ale->id->name), ID_MA, ID_PA))
offset += (short)(0.7f * U.widget_unit);
/* if not in Action Editor mode, action-groups (and their children) must carry some offset too... */
/* If not in Action Editor mode, action-groups (and their children)
* must carry some offset too. */
else if (ac->datatype != ANIMCONT_ACTION)
offset += (short)(0.7f * U.widget_unit);
@ -3855,7 +3856,8 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
return -1;
}
/* quick macro for use in ANIM_channel_setting_set - set flag for setting according the mode given */
/* Quick macro for use in ANIM_channel_setting_set -
* set flag for setting according the mode given. */
#define ACF_SETTING_SET(sval, sflag, smode) \
{ \
if (negflag) { \
@ -4022,8 +4024,8 @@ void ANIM_channel_draw(
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
/* F-Curve channels need to have a special 'color code' box drawn, which is colored with whatever
* color the curve has stored
/* F-Curve channels need to have a special 'color code' box drawn,
* which is colored with whatever color the curve has stored.
*/
immUniformColor3fv(fcu->color);
@ -4143,26 +4145,29 @@ void ANIM_channel_draw(
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PINNED))
offset += ICON_WIDTH;
/* NOTE: technically, NLA Action "pushdown" should be here too, but there are no sliders there */
/* NOTE: technically, NLA Action "pushdown" should be here too,
* but there are no sliders there. */
/* NLA action channels have slightly different spacing requirements... */
if (ale->type == ANIMTYPE_NLAACTION)
ymin_ofs = NLACHANNEL_SKIP;
}
/* 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
/* 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.
*/
if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) {
/* adjust offset */
offset += SLIDER_WIDTH;
}
/* 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
/* 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.
*/
immRectf(pos,
v2d->cur.xmax - (float)offset,
@ -4402,7 +4407,8 @@ static void achannel_setting_slider_nla_curve_cb(bContext *C,
/* get flags for keyframing */
flag = ANIM_get_keyframing_flags(scene, 1);
/* get pointer and property from the slider - this should all match up with the NlaStrip required... */
/* Get pointer and property from the slider -
* this should all match up with the NlaStrip required. */
UI_context_active_but_prop_get(C, &ptr, &prop, &index);
if (fcu && prop) {
@ -4853,7 +4859,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_MUTE);
}
if (ale->type == ANIMTYPE_GPLAYER) {
/* Not technically "mute" (in terms of anim channels, but this sets layer visibility instead) */
/* Not technically "mute"
* (in terms of anim channels, but this sets layer visibility instead). */
offset -= ICON_WIDTH;
draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_VISIBLE);
}
@ -4900,17 +4907,20 @@ void ANIM_channel_draw_widgets(const bContext *C,
}
}
/* 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
/* 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.
*/
if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) {
/* adjust offset */
// TODO: make slider width dynamic, so that they can be easier to use when the view is wide enough
/* TODO: make slider width dynamic,
* so that they can be easier to use when the view is wide enough. */
offset -= SLIDER_WIDTH;
/* need backdrop behind sliders... */
@ -4931,7 +4941,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
if (prop) {
uiBut *but;
/* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
/* Create the slider button,
* and assign relevant callback to ensure keyframes are inserted. */
but = uiDefAutoButR(block,
&ptr,
prop,
@ -4977,7 +4988,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
uiBut *but;
/* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
/* Create the slider button,
* and assign relevant callback to ensure keyframes are inserted. */
but = uiDefAutoButR(block,
&ptr,
prop,

View File

@ -501,7 +501,8 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
*/
if (((setting == ACHANNEL_SETTING_VISIBLE) && (mode != ACHANNEL_SETFLAG_CLEAR)) ||
((setting != ACHANNEL_SETTING_VISIBLE) && (mode == ACHANNEL_SETFLAG_CLEAR))) {
/* go backwards in the list, until the highest-ranking element (by indention has been covered) */
/* Go backwards in the list, until the highest-ranking element
* (by indention has been covered). */
for (ale = match->prev; ale; ale = ale->prev) {
const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
int level;
@ -517,8 +518,8 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
/* if the level is 'less than' (i.e. more important) the level we're matching
* but also 'less than' the level just tried (i.e. only the 1st group above grouped F-Curves,
* when toggling visibility of F-Curves, gets flushed, which should happen if we don't let prevLevel
* get updated below once the first 1st group is found)...
* when toggling visibility of F-Curves, gets flushed, which should happen if we don't let
* prevLevel get updated below once the first 1st group is found).
*/
if (level < prevLevel) {
/* flush the new status... */
@ -907,7 +908,8 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands,
(island == NULL) ||
/* 2) unselected islands have single channels only - to allow up/down movement */
((island->flag & REORDER_ISLAND_SELECTED) == 0) ||
/* 3) if channel is unselected, stop existing island (it was either wrong sel status, or full already) */
/* 3) if channel is unselected, stop existing island
* (it was either wrong sel status, or full already) */
(is_sel == 0) ||
/* 4) hidden status changes */
((island->flag & REORDER_ISLAND_HIDDEN) != is_hidden)) {
@ -997,9 +999,12 @@ static bool rearrange_animchannel_islands(ListBase *list,
rearrange_animchannel_add_to_islands(&islands, list, channel, type, is_hidden);
}
/* 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
/* Perform moving of selected islands now, but only if there is more than one of them
* 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.
*/
if (islands.first != islands.last) {
tReorderChannelIsland *first = (mode > 0) ? islands.last : islands.first;
@ -2632,10 +2637,11 @@ static int animchannels_channel_get(bAnimContext *ac, const int mval[2])
ar = ac->ar;
v2d = &ar->v2d;
/* 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.
/* 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.
*/
UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
@ -2724,7 +2730,8 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
return 0;
}
/* selectmode -1 is a special case for ActionGroups only, which selects all of the channels underneath it only... */
/* selectmode -1 is a special case for ActionGroups only,
* which selects all of the channels underneath it only. */
/* TODO: should this feature be extended to work with other channel types too? */
if ((selectmode == -1) && (ale->type != ANIMTYPE_GROUP)) {
/* normal channels should not behave normally in this case */
@ -2800,7 +2807,8 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
if ((adt) && (adt->flag & ADT_UI_SELECTED))
adt->flag |= ADT_UI_ACTIVE;
/* ensure we exit editmode on whatever object was active before to avoid getting stuck there - T48747 */
/* Ensure we exit editmode on whatever object was active before
* to avoid getting stuck there - T48747. */
if (ob != CTX_data_edit_object(C)) {
ED_object_editmode_exit(C, EM_FREEDATA);
}
@ -2965,9 +2973,10 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
case ANIMTYPE_NLACONTROLS: {
AnimData *adt = (AnimData *)ale->data;
/* toggle expand
* - Although the triangle widget already allows this, since there's nothing else that can be done here now,
* let's just use it for easier expand/collapse for now
/* Toggle expand:
* - Although the triangle widget already allows this,
* since there's nothing else that can be done here now,
* let's just use it for easier expand/collapse for now.
*/
adt->flag ^= ADT_NLA_SKEYS_COLLAPSED;
@ -2977,8 +2986,9 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
case ANIMTYPE_GPDATABLOCK: {
bGPdata *gpd = (bGPdata *)ale->data;
/* toggle expand
* - although the triangle widget already allows this, the whole channel can also be used for this purpose
/* Toggle expand:
* - Although the triangle widget already allows this,
* the whole channel can also be used for this purpose.
*/
gpd->flag ^= GP_DATA_EXPAND;
@ -3015,8 +3025,9 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
case ANIMTYPE_MASKDATABLOCK: {
Mask *mask = (Mask *)ale->data;
/* toggle expand
* - although the triangle widget already allows this, the whole channel can also be used for this purpose
/* Toggle expand
* - Although the triangle widget already allows this,
* the whole channel can also be used for this purpose.
*/
mask->flag ^= MASK_ANIMF_EXPAND;

View File

@ -149,7 +149,8 @@ static void animchan_sync_group(bAnimContext *ac, bAnimListElem *ale, bActionGro
Object *ob = (Object *)owner_id;
/* check if there are bones, and whether the name matches any
* NOTE: this feature will only really work if groups by default contain the F-Curves for a single bone
* NOTE: this feature will only really work if groups by default contain the F-Curves
* for a single bone.
*/
if (ob->pose) {
bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, agrp->name);
@ -314,8 +315,10 @@ void ANIM_sync_animchannels_to_data(const bContext *C)
return;
/* filter data */
/* NOTE: we want all channels, since we want to be able to set selection status on some of them even when collapsed
* However, don't include duplicates so that selection statuses don't override each other
/* NOTE: we want all channels, since we want to be able to set selection status on some of them
* even when collapsed... however,
* don't include duplicates so that selection statuses don't override each other.
*/
filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS;
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);

View File

@ -255,7 +255,8 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
ANIMCONT_CHANNEL)) {
/* handling depends on the type of animation-context we've got */
if (ale) {
/* NLA Control Curves occur on NLA strips, and shouldn't be subjected to this kind of mapping */
/* NLA Control Curves occur on NLA strips,
* and shouldn't be subjected to this kind of mapping. */
if (ale->type != ANIMTYPE_NLACURVE)
return ale->adt;
}
@ -267,7 +268,8 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
/* ------------------- */
/* helper function for ANIM_nla_mapping_apply_fcurve() -> "restore", i.e. mapping points back to action-time */
/* Helper function for ANIM_nla_mapping_apply_fcurve() -> "restore",
* i.e. mapping points back to action-time. */
static short bezt_nlamapping_restore(KeyframeEditData *ked, BezTriple *bezt)
{
/* AnimData block providing scaling is stored in 'data', only_keys option is stored in i1 */

View File

@ -239,11 +239,12 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
saction->ads.source = (ID *)ac->scene;
/* sync scene's "selected keys only" flag with our "only selected" flag
*
* XXX: This is a workaround for T55525. We shouldn't really be syncing the flags like this,
* but it's a simpler fix for now than also figuring out how the next/prev keyframe tools
* should work in the 3D View if we allowed full access to the timeline's dopesheet filters
* (i.e. we'd have to figure out where to host those settings, to be on a scene level like
* this flag currently is, along with several other unknowns)
* but it's a simpler fix for now than also figuring out how the next/prev keyframe
* tools should work in the 3D View if we allowed full access to the timeline's
* dopesheet filters (i.e. we'd have to figure out where to host those settings,
* to be on a scene level like this flag currently is, along with several other unknowns).
*/
if (ac->scene->flag & SCE_KEYS_NO_SELONLY)
saction->ads.filterflag &= ~ADS_FILTER_ONLYSEL;
@ -339,7 +340,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
/* 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).
*/
@ -467,20 +469,24 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
/* quick macro to test if AnimData is usable for NLA */
#define ANIMDATA_HAS_NLA(id) ((id)->adt && (id)->adt->nla_tracks.first)
/* Quick macro to test for all three above usability tests, performing the appropriate provided
/**
* Quick macro to test for all three above usability tests, performing the appropriate provided
* action for each when the AnimData context is appropriate.
*
* Priority order for this goes (most important, to least): AnimData blocks, NLA, Drivers, Keyframes.
*
* For this to work correctly, a standard set of data needs to be available within the scope that this
* gets called in:
* 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;
*
* - 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)
* - 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
@ -991,7 +997,8 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id
/* check whether to continue or skip */
if ((pchan) && (pchan->bone)) {
/* if only visible channels, skip if bone not visible unless user wants channels from hidden data too */
/* If only visible channels,
* skip if bone not visible unless user wants channels from hidden data too. */
if (skip_hidden) {
bArmature *arm = (bArmature *)ob->data;
@ -1173,8 +1180,10 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads,
bActionGroup *grp = (channel_type == ANIMTYPE_FCURVE) ? owner : NULL;
FCurve *fcu = NULL;
/* loop over F-Curves - assume that the caller of this has already checked that these should be included
* NOTE: we need to check if the F-Curves belong to the same group, as this gets called for groups too...
/* Loop over F-Curves - assume that the caller of this has already checked
* that these should be included.
* NOTE: we need to check if the F-Curves belong to the same group,
* as this gets called for groups too...
*/
for (fcu = first; ((fcu) && (fcu->grp == grp)); fcu = fcu->next) {
/* special exception for Pose-Channel/Sequence-Strip/Node Based F-Curves:
@ -1199,7 +1208,8 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads,
if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || (fcu->flag & FCURVE_VISIBLE)) {
/* only work with this channel and its subchannels if it is editable */
if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_FCU(fcu)) {
/* only include this curve if selected in a way consistent with the filtering requirements */
/* Only include this curve if selected in a way consistent
* with the filtering requirements. */
if (ANIMCHANNEL_SELOK(SEL_FCU(fcu)) && ANIMCHANNEL_SELEDITOK(SEL_FCU(fcu))) {
/* only include if this curve is active */
if (!(filter_mode & ANIMFILTER_ACTIVE) || (fcu->flag & FCURVE_ACTIVE)) {
@ -1240,14 +1250,17 @@ static size_t animfilter_fcurves(ListBase *anim_data,
FCurve *fcu;
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 :)
/* 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 :)
*/
for (fcu = first;
((fcu = animfilter_fcurve_next(ads, fcu, fcurve_type, filter_mode, owner, owner_id)));
@ -1290,21 +1303,23 @@ static size_t animfilter_act_group(bAnimContext *ac,
* - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack
*/
if (
/* care about hierarchy but group isn't expanded */
/* Care about hierarchy but group isn't expanded. */
((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp) == 0) &&
/* care about selection status */
/* Care about selection status. */
(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL))) {
/* if the group itself isn't selected appropriately, we shouldn't consider it's children either */
/* If the group itself isn't selected appropriately,
* we shouldn't consider it's children either. */
if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) == 0)
return 0;
/* if we're still here, then the selection status of the curves within this group should not matter,
* since this creates too much overhead for animators (i.e. making a slow workflow)
/* if we're still here,
* then the selection status of the curves within this group should not matter,
* 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);
}
@ -1397,12 +1412,13 @@ static size_t animfilter_action(bAnimContext *ac,
}
/* 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,
@ -1423,9 +1439,10 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac),
if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || (adt->action)) {
/* 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...
/* 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.
*/
ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id, NULL, {
ale->data = adt->action ? adt->action : NULL;
@ -1441,7 +1458,8 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac),
first = adt->nla_tracks.first;
}
/* loop over NLA Tracks - assume that the caller of this has already checked that these should be included */
/* loop over NLA Tracks -
* assume that the caller of this has already checked that these should be included */
for (nlt = first; nlt; nlt = next) {
/* 'next' NLA-Track to use depends on whether we're filtering for drawing or not */
if (filter_mode & ANIMFILTER_LIST_CHANNELS)
@ -1452,7 +1470,8 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac),
/* 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)
*/
// FIXME: the channels after should still get drawn, just 'differently', and after an active-action channel
// 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))
continue;
@ -1516,7 +1535,8 @@ static size_t animfilter_nla_controls(
/* for now, we only go one level deep - so controls on grouped FCurves are not handled */
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
for (strip = nlt->strips.first; strip; strip = strip->next) {
/* pass strip as the "owner", so that the name lookups (used while filtering) will resolve */
/* pass strip as the "owner",
* so that the name lookups (used while filtering) will resolve */
/* NLA tracks are coming from AnimData, so owner of f-curves
* is the same as owner of animation data. */
tmp_items += animfilter_fcurves(&tmp_data,
@ -1563,8 +1583,9 @@ static size_t animfilter_block_data(
if (adt) {
IdAdtTemplate *iat = (IdAdtTemplate *)id;
/* NOTE: this macro is used instead of inlining the logic here, since this sort of filtering is still needed
* in a few places in the rest of the code still - notably for the few cases where special mode-based
/* NOTE: this macro is used instead of inlining the logic here,
* since this sort of filtering is still needed in a few places in the rest of the code still -
* notably for the few cases where special mode-based
* different types of data expanders are required.
*/
ANIMDATA_FILTER_CASES(
@ -1613,7 +1634,8 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
/* only work with this channel and its subchannels if it is editable */
if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_SHAPEKEY(kb)) {
/* only include this track if selected in a way consistent with the filtering requirements */
/* Only include this track if selected in a way consistent
* with the filtering requirements. */
if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb))) {
// TODO: consider 'active' too?
@ -1950,7 +1972,8 @@ static size_t animdata_filter_mask(Main *bmain,
return items;
}
/* NOTE: owner_id is scene, material, or texture block, which is the direct owner of the node tree in question */
/* NOTE: owner_id is scene, material, or texture block,
* which is the direct owner of the node tree in question. */
static size_t animdata_filter_ds_nodetree_group(bAnimContext *ac,
ListBase *anim_data,
bDopeSheet *ads,
@ -2100,9 +2123,10 @@ static size_t animdata_filter_ds_texture(bAnimContext *ac,
/* nodes */
if ((tex->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) {
/* owner_id as id instead of texture, since it'll otherwise be impossible to track the depth */
// FIXME: perhaps as a result, textures should NOT be included under materials, but under their own section instead
// so that free-floating textures can also be animated
/* owner_id as id instead of texture,
* since it'll otherwise be impossible to track the depth. */
// FIXME: perhaps as a result, textures should NOT be included under materials,
// but under their own section instead so that free-floating textures can also be animated.
tmp_items += animdata_filter_ds_nodetree(
ac, &tmp_data, ads, (ID *)tex, tex->nodetree, filter_mode);
}
@ -2219,7 +2243,7 @@ static size_t animdata_filter_ds_materials(
size_t items = 0;
int a = 0;
/* first pass: take the materials referenced via the Material slots of the object */
/* First pass: take the materials referenced via the Material slots of the object. */
for (a = 1; a <= ob->totcol; a++) {
Material *ma = give_current_material(ob, a);
@ -2235,10 +2259,12 @@ static size_t animdata_filter_ds_materials(
}
}
/* second pass: go through a second time looking for "nested" materials (material.material references)
/* Second pass: go through a second time looking for "nested" materials
* (material.material references).
*
* NOTE: here we ignore the expanded status of the parent, as it could be too confusing as to why these are
* disappearing/not available, since the relationships between these is not that clear
* NOTE: here we ignore the expanded status of the parent, as it could be too confusing as to
* why these are disappearing/not available,
* since the relationships between these is not that clear.
*/
if (has_nested) {
for (a = 1; a <= ob->totcol; a++) {
@ -2681,7 +2707,8 @@ static size_t animdata_filter_dopesheet_ob(
/* firstly add object expander if required */
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
/* check if filtering by selection */
// XXX: double-check on this - most of the time, a lot of tools need to filter out these channels!
/* XXX: double-check on this -
* most of the time, a lot of tools need to filter out these channels! */
if (ANIMCHANNEL_SELOK((base->flag & BASE_SELECTED))) {
/* check if filtering by active status */
if (ANIMCHANNEL_ACTIVEOK(ob)) {
@ -3013,7 +3040,9 @@ static Base **animdata_filter_ds_sorted_bases(bDopeSheet *ads,
return sorted_bases;
}
// TODO: implement pinning... (if and when pinning is done, what we need to do is to provide freeing mechanisms - to protect against data that was deleted)
// TODO: implement pinning...
// (if and when pinning is done, what we need to do is to provide freeing mechanisms -
// to protect against data that was deleted).
static size_t animdata_filter_dopesheet(bAnimContext *ac,
ListBase *anim_data,
bDopeSheet *ads,
@ -3052,7 +3081,8 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
/* movie clip's animation */
items += animdata_filter_dopesheet_movieclips(ac, anim_data, ads, filter_mode);
/* scene-linked animation - e.g. world, compositing nodes, scene anim (including sequencer currently) */
/* Scene-linked animation - e.g. world, compositing nodes, scene anim
* (including sequencer currently). */
items += animdata_filter_dopesheet_scene(ac, anim_data, ads, scene, filter_mode);
/* If filtering for channel drawing, we want the objects in alphabetical order,
@ -3133,8 +3163,8 @@ static short animdata_filter_dopesheet_summary(bAnimContext *ac,
(*items)++;
}
/* 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
/* 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.
*/
if (ads->flag & ADS_FLAG_SUMMARY_COLLAPSED)
return 0;
@ -3281,7 +3311,8 @@ size_t ANIM_animdata_filter(bAnimContext *ac,
}
}
else {
/* the check for the DopeSheet summary is included here since the summary works here too */
/* The check for the DopeSheet summary is included here
* since the summary works here too. */
if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
items += animfilter_action(ac, anim_data, ads, data, filter_mode, (ID *)obact);
}
@ -3300,7 +3331,8 @@ size_t ANIM_animdata_filter(bAnimContext *ac,
}
}
else {
/* the check for the DopeSheet summary is included here since the summary works here too */
/* The check for the DopeSheet summary is included here
* since the summary works here too. */
if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items))
items = animdata_filter_shapekey(ac, anim_data, key, filter_mode);
}

View File

@ -43,9 +43,13 @@
/* ----------------------- Getter functions ----------------------- */
/* Write into "name" buffer, the name of the property (retrieved using RNA from the curve's settings),
/**
* Write into "name" buffer, the name of the property
* (retrieved using RNA from the curve's settings),
* and return the icon used for the struct that this property refers to
* WARNING: name buffer we're writing to cannot exceed 256 chars (check anim_channels_defines.c for details)
*
* \warning name buffer we're writing to cannot exceed 256 chars
* (check anim_channels_defines.c for details).
*/
int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
{
@ -83,17 +87,19 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
* 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
* hierarchy though, which isn't so clear with option 2.
* 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 hierarchy though,
* which isn't so clear with option 2.
*/
/* 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
/* 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.
*/
if (strstr(fcu->rna_path, "bones") && strstr(fcu->rna_path, "constraints")) {
/* perform string 'chopping' to get "Bone Name : Constraint Name" */

View File

@ -118,7 +118,8 @@ ListBase *ED_animcontext_get_markers(const bAnimContext *ac)
/**
* Apply some transformation to markers after the fact
*
* \param markers: List of markers to affect - this may or may not be the scene markers list, so don't assume anything
* \param markers: List of markers to affect - this may or may not be the scene markers list,
* so don't assume anything.
* \param scene: Current scene (for getting current frame)
* \param mode: (TfmMode) transform mode that this transform is for
* \param value: From the transform code, this is ``t->vec[0]``
@ -326,7 +327,8 @@ TimeMarker *ED_markers_get_first_selected(ListBase *markers)
/* --------------------------------- */
/* Print debugging prints of list of markers
* BSI's: do NOT make static or put in if-defs as "unused code". That's too much trouble when we need to use for quick debugging!
* BSI's: do NOT make static or put in if-defs as "unused code".
* That's too much trouble when we need to use for quick debugging!
*/
void debug_markers_print_list(ListBase *markers)
{
@ -1504,7 +1506,13 @@ static void MARKER_OT_rename(wmOperatorType *ot)
sizeof(((TimeMarker *)NULL)->name),
"Name",
"New name for marker");
//RNA_def_boolean(ot->srna, "ensure_unique", 0, "Ensure Unique", "Ensure that new name is unique within collection of markers");
#if 0
RNA_def_boolean(ot->srna,
"ensure_unique",
0,
"Ensure Unique",
"Ensure that new name is unique within collection of markers");
#endif
}
/* **************** make links to scene ***************** */

View File

@ -249,7 +249,8 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph,
/* get copies of objects/bones to get the calculated results from
* (for copy-on-write evaluation), so that we actually get some results
*/
// TODO: Create a copy of background depsgraph that only contain these entities, and only evaluates them..
// TODO: Create a copy of background depsgraph that only contain these entities,
// and only evaluates them.
for (MPathTarget *mpt = targets->first; mpt; mpt = mpt->next) {
mpt->ob_eval = DEG_get_evaluated_object(depsgraph, mpt->ob);

View File

@ -102,7 +102,8 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde
fcu->rna_path = BLI_strdup(rna_path);
fcu->array_index = array_index;
/* if add is negative, don't init this data yet, since it will be filled in by the pasted driver */
/* If add is negative, don't init this data yet,
* since it will be filled in by the pasted driver. */
if (add > 0) {
BezTriple *bezt;
size_t i;
@ -629,8 +630,9 @@ bool ANIM_copy_driver(
/* copy this to the copy/paste buf if it exists */
if (fcu && fcu->driver) {
/* make copies of some info such as the rna_path, then clear this info from the F-Curve temporarily
* so that we don't end up wasting memory storing the path which won't get used ever...
/* Make copies of some info such as the rna_path, then clear this info from the
* F-Curve temporarily so that we don't end up wasting memory storing the path
* which won't get used ever.
*/
char *tmp_path = fcu->rna_path;
fcu->rna_path = NULL;
@ -916,7 +918,8 @@ static bool add_driver_button_poll(bContext *C)
return (fcu == NULL || fcu->driver);
}
/* Wrapper for creating a driver without knowing what the targets will be yet (i.e. "manual/add later") */
/* Wrapper for creating a driver without knowing what the targets will be yet
* (i.e. "manual/add later"). */
static int add_driver_button_none(bContext *C, wmOperator *op, short mapping_type)
{
PointerRNA ptr = {{NULL}};
@ -963,7 +966,8 @@ static int add_driver_button_menu_exec(bContext *C, wmOperator *op)
/* Create Driver using Eyedropper */
wmOperatorType *ot = WM_operatortype_find("UI_OT_eyedropper_driver", true);
/* XXX: We assume that it's fine to use the same set of properties, since they're actually the same... */
/* XXX: We assume that it's fine to use the same set of properties,
* since they're actually the same. */
WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, op->ptr);
return OPERATOR_FINISHED;

View File

@ -63,7 +63,8 @@
/* UI STUFF */
// XXX! --------------------------------
/* temporary definition for limits of float number buttons (FLT_MAX tends to infinity with old system) */
/* Temporary definition for limits of float number buttons
* (FLT_MAX tends to infinity with old system). */
#define UI_FLT_MAX 10000.0f
#define B_REDR 1
@ -97,7 +98,8 @@ static void delete_fmodifier_cb(bContext *C, void *ctx_v, void *fcm_v)
ED_undo_push(C, "Delete F-Curve Modifier");
/* send notifiers */
// XXX for now, this is the only way to get updates in all the right places... but would be nice to have a special one in this case
/* XXX for now, this is the only way to get updates in all the right places...
* but would be nice to have a special one in this case. */
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
DEG_id_tag_update(ctx->fcurve_owner_id, ID_RECALC_ANIMATION);
}

View File

@ -211,7 +211,8 @@ static void nupdate_ak_bezt(void *node, void *data)
/* count keyframes in this column */
ak->totkey++;
/* for keyframe type, 'proper' keyframes have priority over breakdowns (and other types for now) */
/* For keyframe type, 'proper' keyframes have priority over breakdowns
* (and other types for now). */
if (BEZKEYTYPE(bezt) == BEZT_KEYTYPE_KEYFRAME)
ak->key_type = BEZT_KEYTYPE_KEYFRAME;
@ -273,7 +274,8 @@ static void nupdate_ak_gpframe(void *node, void *data)
/* count keyframes in this column */
ak->totkey++;
/* for keyframe type, 'proper' keyframes have priority over breakdowns (and other types for now) */
/* for keyframe type, 'proper' keyframes have priority over breakdowns
* (and other types for now). */
if (gpf->key_type == BEZT_KEYTYPE_KEYFRAME)
ak->key_type = BEZT_KEYTYPE_KEYFRAME;
}
@ -777,8 +779,10 @@ static void draw_keylist(View2D *v2d,
/* count keys */
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
/* 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.
*/
if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax))
key_len++;
@ -1216,7 +1220,8 @@ void gpl_to_keylist(bDopeSheet *UNUSED(ads), bGPDlayer *gpl, DLRBT_Tree *keys)
bGPDframe *gpf;
if (gpl && keys) {
/* although the frames should already be in an ordered list, they are not suitable for displaying yet */
/* Although the frames should already be in an ordered list,
* they are not suitable for displaying yet. */
for (gpf = gpl->frames.first; gpf; gpf = gpf->next)
add_gpframe_to_keycolumns_list(keys, gpf);

View File

@ -43,7 +43,8 @@
#include "ED_keyframes_edit.h"
#include "ED_markers.h"
/* This file defines an API and set of callback-operators for non-destructive editing of keyframe data.
/* 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()
@ -146,7 +147,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked,
return 0;
}
/* -------------------------------- Further Abstracted (Not Exposed Directly) ----------------------------- */
/* --------------------- Further Abstracted (Not Exposed Directly) ----------------------------- */
/* This function is used to loop over the keyframe data in an Action Group */
static short agrp_keyframes_loop(KeyframeEditData *ked,
@ -467,9 +468,11 @@ 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
/* 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.
*/
#define KEYFRAME_OK_CHECKS(check) \
{ \
@ -529,9 +532,10 @@ 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?
/* 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?
*/
#define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][1], ked->f1)
KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
@ -998,8 +1002,10 @@ 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"
/**
* 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".
*/
#define ENSURE_HANDLES_MATCH(bezt) \
if (bezt->h1 != bezt->h2) { \

View File

@ -173,8 +173,9 @@ void duplicate_fcurve_keys(FCurve *fcu)
/* **************************************************** */
/* Various Tools */
/* Basic F-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only
* optionally clears up curve if one keyframe with default value remains
/**
* Basic F-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on
* linear-segments only optionally clears up curve if one keyframe with default value remains.
*/
void clean_fcurve(struct bAnimContext *ac, bAnimListElem *ale, float thresh, bool cleardefault)
{
@ -373,7 +374,8 @@ void smooth_fcurve(FCurve *fcu)
/* round 1: calculate smoothing deltas and new values */
tsb = tarray;
for (i = 0; i < totSel; i++, tsb++) {
/* don't touch end points (otherwise, curves slowly explode, as we don't have enough data there) */
/* Don't touch end points (otherwise, curves slowly explode,
* as we don't have enough data there). */
if (ELEM(i, 0, (totSel - 1)) == 0) {
const tSmooth_Bezt *tP1 = tsb - 1;
const tSmooth_Bezt *tP2 = (i - 2 > 0) ? (tsb - 2) : (NULL);
@ -500,11 +502,12 @@ void sample_fcurve(FCurve *fcu)
}
/* **************************************************** */
/* Copy/Paste Tools */
/* - 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).
/* Copy/Paste Tools:
* - 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 earliest frame is calculated per copy operation.
*/
@ -591,8 +594,9 @@ short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
aci->rna_path = MEM_dupallocN(fcu->rna_path);
aci->array_index = fcu->array_index;
/* detect if this is a bone. We do that here rather than during pasting because ID pointers will get invalidated if we undo.
* storing the relevant information here helps avoiding crashes if we undo-repaste */
/* Detect if this is a bone. We do that here rather than during pasting because ID pointers
* will get invalidated if we undo.
* Storing the relevant information here helps avoiding crashes if we undo-repaste. */
if ((aci->id_type == ID_OB) && (((Object *)aci->id)->type == OB_ARMATURE) && aci->rna_path) {
Object *ob = (Object *)aci->id;
bPoseChannel *pchan;
@ -1005,10 +1009,11 @@ short paste_animedit_keys(bAnimContext *ac,
unsigned int totmatch = 0;
for (ale = anim_data->first; ale; ale = ale->next) {
/* find buffer item to paste from
* - if names don't matter (i.e. only 1 channel in buffer), don't check id/group
* - if names do matter, only check if id-type is ok for now (group check is not that important)
* - most importantly, rna-paths should match (array indices are unimportant for now)
/* Find buffer item to paste from:
* - If names don't matter (i.e. only 1 channel in buffer), don't check id/group
* - If names do matter, only check if id-type is ok for now
* (group check is not that important).
* - Most importantly, rna-paths should match (array indices are unimportant for now)
*/
AnimData *adt = ANIM_nla_mapping_get(ac, ale);
FCurve *fcu = (FCurve *)ale->data; /* destination F-Curve */

View File

@ -398,7 +398,8 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
}
if (flag & INSERTKEY_CYCLE_AWARE) {
/* If replacing an end point of a cyclic curve without offset, modify the other end too. */
/* If replacing an end point of a cyclic curve without offset,
* modify the other end too. */
if ((i == 0 || i == fcu->totvert - 1) &&
BKE_fcurve_get_cycle_type(fcu) == FCU_CYCLE_PERFECT) {
replace_bezt_keyframe_ypos(&fcu->bezt[i == 0 ? fcu->totvert - 1 : 0], bezt);
@ -411,7 +412,8 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
/* insert new - if we're not restricted to replacing keyframes only */
BezTriple *newb = MEM_callocN((fcu->totvert + 1) * sizeof(BezTriple), "beztriple");
/* add the beztriples that should occur before the beztriple to be pasted (originally in fcu) */
/* Add the beztriples that should occur before the beztriple to be pasted
* (originally in fcu). */
if (i > 0)
memcpy(newb, fcu->bezt, i * sizeof(BezTriple));
@ -545,9 +547,10 @@ int insert_vert_fcurve(
if ((fcu->totvert > 2) && (flag & INSERTKEY_REPLACE) == 0) {
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
/* 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.
*/
if (fcu->totvert > oldTot) {
if (a > 0)
@ -1146,8 +1149,9 @@ static bool insert_keyframe_value(ReportList *reports,
}
/* 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.
*
* This function can't keyframe quaternion channels on some NLA strip types.
*
@ -2205,8 +2209,9 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op)
continue;
}
/* special exception for bones, as this makes this operator more convenient to use
* NOTE: This is only done in pose mode. In object mode, we're dealing with the entire object.
/* Special exception for bones, as this makes this operator more convenient to use
* NOTE: This is only done in pose mode.
* In object mode, we're dealing with the entire object.
*/
if ((ob->mode & OB_MODE_POSE) && strstr(fcu->rna_path, "pose.bones[\"")) {
bPoseChannel *pchan;
@ -2355,8 +2360,9 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
const char *group = NULL;
/* Special exception for keyframing transforms:
* Set "group" for this manually, instead of having them appearing at the bottom (ungrouped)
* part of the channels list. Leaving these ungrouped is not a nice user behavior in this case.
* Set "group" for this manually, instead of having them appearing at the bottom
* (ungrouped) part of the channels list.
* Leaving these ungrouped is not a nice user behavior in this case.
*
* TODO: Perhaps we can extend this behavior in future for other properties...
*/

View File

@ -461,7 +461,8 @@ void ANIM_OT_keyingset_button_remove(wmOperatorType *ot)
/* ******************************************* */
/* Change Active KeyingSet Operator ------------------------ */
/* This operator checks if a menu should be shown for choosing the KeyingSet to make the active one */
/* This operator checks if a menu should be shown
* for choosing the KeyingSet to make the active one. */
static int keyingset_active_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
@ -526,7 +527,7 @@ ListBase builtin_keyingsets = {NULL, NULL};
/* --------------- */
/* Find KeyingSet type info given a name */
/* Find KeyingSet type info given a name. */
KeyingSetInfo *ANIM_keyingset_info_find_name(const char name[])
{
/* sanity checks */
@ -537,7 +538,7 @@ KeyingSetInfo *ANIM_keyingset_info_find_name(const char name[])
return BLI_findstring(&keyingset_type_infos, name, offsetof(KeyingSetInfo, idname));
}
/* Find builtin KeyingSet by name */
/* Find builtin KeyingSet by name. */
KeyingSet *ANIM_builtin_keyingset_get_named(KeyingSet *prevKS, const char name[])
{
KeyingSet *ks, *first = NULL;
@ -569,7 +570,8 @@ KeyingSet *ANIM_builtin_keyingset_get_named(KeyingSet *prevKS, const char name[]
/* --------------- */
/* Add the given KeyingSetInfo to the list of type infos, and create an appropriate builtin set too */
/* Add the given KeyingSetInfo to the list of type infos,
* and create an appropriate builtin set too. */
void ANIM_keyingset_info_register(KeyingSetInfo *ksi)
{
KeyingSet *ks;
@ -589,7 +591,8 @@ void ANIM_keyingset_info_register(KeyingSetInfo *ksi)
BLI_addtail(&keyingset_type_infos, ksi);
}
/* Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate */
/* Remove the given KeyingSetInfo from the list of type infos,
* and also remove the builtin set if appropriate. */
void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi)
{
KeyingSet *ks, *ksn;
@ -1037,7 +1040,8 @@ int ANIM_apply_keyingset(
continue;
}
/* since keying settings can be defined on the paths too, apply the settings for this path first */
/* Since keying settings can be defined on the paths too,
* apply the settings for this path first. */
kflag2 = keyingset_apply_keying_flags(kflag, ksp->keyingoverride, ksp->keyingflag);
/* get pointer to name of group to add channels to */

View File

@ -1206,6 +1206,7 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot)
/* Properties */
prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, 1000, "Number of Cuts", "", 1, 10);
/* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
/* Avoid re-using last var because it can cause
* _very_ high poly meshes and annoy users (or worse crash) */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}

View File

@ -917,17 +917,17 @@ static void bones_merge(
newbone->flag = start->flag & (BONE_HINGE | BONE_NO_DEFORM | BONE_NO_SCALE |
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...
/* 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.
*/
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
* merging (need to stop in this case to avoid corrupting this chain too!)
/* Traverse down chain until we hit the bottom or if we run into the tip of the chain of bones
* we're merging (need to stop in this case to avoid corrupting this chain too!).
*/
for (ebone = chain->data; (ebone) && (ebone != end); ebone = ebone->parent) {
short found = 0;
/* check if this bone is parented to one in the merging chain
/* Check if this bone is parented to one in the merging chain
* ! WATCHIT: must only go check until end of checking chain
*/
for (ebo = end; (ebo) && (ebo != start->parent); ebo = ebo->parent) {

View File

@ -318,8 +318,9 @@ void ED_armature_bone_rename(Main *bmain,
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
}
/* Fix all animdata that may refer to this bone - we can't just do the ones attached to objects, since
* other ID-blocks may have drivers referring to this bone [#29822]
/* Fix all animdata that may refer to this bone -
* we can't just do the ones attached to objects,
* since other ID-blocks may have drivers referring to this bone T29822.
*/
// XXX: the ID here is for armatures, but most bone drivers are actually on the object instead...
{
@ -376,8 +377,8 @@ void ED_armature_bones_flip_names(Main *bmain,
BoneFlipNameData *bfn;
/* First pass: generate flip names, and blindly rename.
* If rename did not yield expected result, store both bone's name and expected flipped one into temp list
* for second pass. */
* If rename did not yield expected result,
* store both bone's name and expected flipped one into temp list for second pass. */
for (LinkData *link = bones_names->first; link; link = link->next) {
char name_flip[MAXBONENAME];
char *name = link->data;
@ -397,8 +398,9 @@ void ED_armature_bones_flip_names(Main *bmain,
}
/* Second pass to handle the bones that have naming conflicts with other bones.
* Note that if the other bone was not selected, its name was not flipped, so conflict remains and that second
* rename simply generates a new numbered alternative name. */
* Note that if the other bone was not selected, its name was not flipped,
* so conflict remains and that second rename simply generates a new numbered alternative name.
*/
for (bfn = bones_names_conflicts.first; bfn; bfn = bfn->next) {
ED_armature_bone_rename(bmain, arm, bfn->name, bfn->name_flip);
}

View File

@ -172,8 +172,9 @@ void ED_operatormacros_armature(void)
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
/* XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
* that would require fixing a properties bug 19733 */
/* XXX would it be nicer to just be able to have standard extrude_move,
* but set the forked property separate?
* that would require fixing a properties bug T19733. */
ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked",
"Extrude Forked",
"Create new bones from the selected joints and move them",

View File

@ -116,9 +116,10 @@ typedef struct tJoinArmature_AdtFixData {
GHash *names_map;
} tJoinArmature_AdtFixData;
/* Callback to pass to BKE_animdata_main_cb() for fixing driver ID's to point to the new ID */
/* FIXME: For now, we only care about drivers here. When editing rigs, it's very rare to have animation
* on the rigs being edited already, so it should be safe to skip these.
/* Callback to pass to BKE_animdata_main_cb() for fixing driver ID's to point to the new ID. */
/* FIXME: For now, we only care about drivers here.
* When editing rigs, it's very rare to have animation on the rigs being edited already,
* so it should be safe to skip these.
*/
static void joined_armature_fix_animdata_cb(ID *id, FCurve *fcu, void *user_data)
{
@ -591,12 +592,13 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
Object *oldob, *newob;
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
/* 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) only edit-base selected */
@ -672,7 +674,7 @@ void ARMATURE_OT_separate(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/* ******************************************** Parenting ************************************************* */
/* ********************************* Parenting ************************************************* */
/* armature parenting options */
#define ARM_PAR_CONNECT 1

View File

@ -55,7 +55,7 @@
#include "armature_intern.h"
#include "meshlaplacian.h"
/* ********************************** Bone Skinning *********************************************** */
/* ******************************* Bone Skinning *********************************************** */
static int bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap)
{

View File

@ -551,9 +551,11 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, struct Bone *actBone)
/**
* This function:
* - Sets local head/tail rest locations using parent bone's arm_mat.
* - Calls #BKE_armature_where_is_bone() which uses parent's transform (arm_mat) to define this bone's transform.
* - Calls #BKE_armature_where_is_bone() which uses parent's transform (arm_mat)
* to define this bone's transform.
* - Fixes (converts) EditBone roll into Bone roll.
* - Calls again #BKE_armature_where_is_bone(), since roll fiddling may have changed things for our bone...
* - Calls again #BKE_armature_where_is_bone(),
* since roll fiddling may have changed things for our bone.
*
* \note The order is crucial here, we can only handle child
* if all its parents in chain have already been handled (this is ensured by recursive process).
@ -565,8 +567,8 @@ static void armature_finalize_restpose(ListBase *bonelist, ListBase *editbonelis
for (curBone = bonelist->first; curBone; curBone = curBone->next) {
/* Set bone's local head/tail.
* Note that it's important to use final parent's restpose (arm_mat) here, instead of setting those values
* from editbone's matrix (see T46010). */
* Note that it's important to use final parent's restpose (arm_mat) here,
* instead of setting those values from editbone's matrix (see T46010). */
if (curBone->parent) {
float parmat_inv[4][4];

View File

@ -78,7 +78,8 @@ Object *ED_pose_object_from_context(bContext *C)
ScrArea *sa = CTX_wm_area(C);
Object *ob;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
/* Since this call may also be used from the buttons window,
* we need to check for where to get the object. */
if (sa && sa->spacetype == SPACE_PROPERTIES) {
ob = ED_object_context(C);
}
@ -790,7 +791,8 @@ static int armature_layers_invoke(bContext *C, wmOperator *op, const wmEvent *ev
if (arm == NULL)
return OPERATOR_CANCELLED;
/* get RNA pointer to armature data to use that to retrieve the layers as ints to init the operator */
/* Get RNA pointer to armature data to use that to retrieve the layers as ints
* to init the operator. */
RNA_id_pointer_create((ID *)arm, &ptr);
RNA_boolean_get_array(&ptr, "layers", layers);
RNA_boolean_set_array(op->ptr, "layers", layers);

View File

@ -677,7 +677,8 @@ static int poselib_rename_invoke(bContext *C, wmOperator *op, const wmEvent *eve
return OPERATOR_CANCELLED;
}
else {
/* use the existing name of the marker as the name, and use the active marker as the one to rename */
/* Use the existing name of the marker as the name,
* and use the active marker as the one to rename. */
RNA_enum_set(op->ptr, "pose", act->active_marker - 1);
RNA_string_set(op->ptr, "name", marker->name);
}
@ -1359,7 +1360,11 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con
/* only accept 'press' event, and ignore 'release', so that we don't get double actions */
if (ELEM(event->val, KM_PRESS, KM_NOTHING) == 0) {
//printf("PoseLib: skipping event with type '%s' and val %d\n", WM_key_event_string(event->type, false), event->val);
#if 0
printf("PoseLib: skipping event with type '%s' and val %d\n",
WM_key_event_string(event->type, false),
event->val);
#endif
return ret;
}

View File

@ -397,7 +397,8 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, Object *ob, flo
}
case POSESLIDE_BREAKDOWN: /* make the current pose slide around between the endpoints */
{
/* perform simple linear interpolation - coefficient for start must come from pso->percentage... */
/* Perform simple linear interpolation -
* coefficient for start must come from pso->percentage. */
/* TODO: make this use some kind of spline interpolation instead? */
(*val) = ((sVal * w2) + (eVal * w1));
break;
@ -583,7 +584,8 @@ static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
/* perform blending */
if (pso->mode == POSESLIDE_BREAKDOWN) {
/* just perform the interpol between quat_prev and quat_next using pso->percentage as a guide */
/* Just perform the interpol between quat_prev and
* quat_next using pso->percentage as a guide. */
interp_qt_qtqt(quat_final, quat_prev, quat_next, pso->percentage);
}
else if (pso->mode == POSESLIDE_PUSH) {
@ -1109,7 +1111,8 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
}
/* perform pose updates - in response to some user action (e.g. pressing a key or moving the mouse) */
/* Perform pose updates - in response to some user action
* (e.g. pressing a key or moving the mouse). */
if (do_pose_update) {
/* update percentage indicator in header */
pose_slide_draw_status(pso);
@ -1396,7 +1399,8 @@ typedef enum ePosePropagate_Termination {
POSE_PROPAGATE_SELECTED_MARKERS,
} ePosePropagate_Termination;
/* termination data needed for some modes - assumes only one of these entries will be needed at a time */
/* Termination data needed for some modes -
* assumes only one of these entries will be needed at a time. */
typedef union tPosePropagate_ModeData {
/* smart holds + before frame: frame number to stop on */
float end_frame;
@ -1656,7 +1660,8 @@ static int pose_propagate_exec(bContext *C, wmOperator *op)
poseAnim_mapping_get(C, &pflinks);
if (BLI_listbase_is_empty(&pflinks)) {
/* There is a change the reason the list is empty is that there is no valid object to propagate poses for.
/* There is a change the reason the list is empty is
* that there is no valid object to propagate poses for.
* This is very unlikely though, so we focus on the most likely issue. */
BKE_report(op->reports, RPT_ERROR, "No keyframed poses to propagate to");
return OPERATOR_CANCELLED;

View File

@ -244,8 +244,9 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
* new raw-transform components, don't recalc the poses yet, otherwise IK result will
* change, thus changing the result we may be trying to record.
*/
/* XXX For some reason, we can't use pchan->chan_mat here, gives odd rotation/offset (see T38251).
* Using pchan->pose_mat and bringing it back in bone space seems to work as expected!
/* XXX For some reason, we can't use pchan->chan_mat here, gives odd rotation/offset
* (see T38251).
* Using pchan->pose_mat and bringing it back in bone space seems to work as expected!
*/
BKE_armature_mat_pose_to_bone(pchan_eval, pchan_eval->pose_mat, delta_mat);
@ -326,7 +327,8 @@ static bPoseChannel *pose_bone_do_paste(Object *ob,
/* only copy when:
* 1) channel exists - poses are not meant to add random channels to anymore
* 2) if selection-masking is on, channel is selected - only selected bones get pasted on, allowing making both sides symmetrical
* 2) if selection-masking is on, channel is selected -
* only selected bones get pasted on, allowing making both sides symmetrical.
*/
pchan = BKE_pose_channel_find_name(ob->pose, name);
@ -667,7 +669,8 @@ static void pchan_clear_rot(bPoseChannel *pchan)
if ((pchan->protectflag & OB_LOCK_ROTZ) == 0)
pchan->rotAxis[2] = 0.0f;
/* check validity of axis - axis should never be 0,0,0 (if so, then we make it rotate about y) */
/* check validity of axis - axis should never be 0,0,0
* (if so, then we make it rotate about y). */
if (IS_EQF(pchan->rotAxis[0], pchan->rotAxis[1]) &&
IS_EQF(pchan->rotAxis[1], pchan->rotAxis[2]))
pchan->rotAxis[1] = 1.0f;

View File

@ -733,8 +733,8 @@ static void calc_shapeKeys(Object *obedit, ListBase *newnurbs)
nu = editnurb->nurbs.first;
/* We need to restore to original curve into newnurb, *not* editcurve's nurbs.
* Otherwise, in case we update obdata *without* leaving editmode (e.g. viewport render), we would
* invalidate editcurve. */
* Otherwise, in case we update obdata *without* leaving editmode (e.g. viewport render),
* we would invalidate editcurve. */
newnu = newnurbs->first;
i = 0;
while (nu) {
@ -1275,9 +1275,10 @@ void ED_curve_editnurb_load(Main *bmain, Object *obedit)
}
}
/* We have to pass also new copied nurbs, since we want to restore original curve (without edited shapekey)
* on obdata, but *not* on editcurve itself (ED_curve_editnurb_load call does not always implies freeing
* of editcurve, e.g. when called to generate render data...). */
/* We have to pass also new copied nurbs, since we want to restore original curve
* (without edited shapekey) on obdata, but *not* on editcurve itself
* (ED_curve_editnurb_load call does not always implies freeing
* of editcurve, e.g. when called to generate render data). */
calc_shapeKeys(obedit, &newnurb);
cu->nurb = newnurb;
@ -2288,7 +2289,8 @@ static void adduplicateflagNurb(
}
else {
if (ED_curve_nurb_select_check(v3d, nu)) {
/* a rectangular area in nurb has to be selected and if splitting must be in U or V direction */
/* A rectangular area in nurb has to be selected and if splitting
* must be in U or V direction. */
usel = MEM_callocN(nu->pntsu, "adduplicateN3");
bp = nu->bp;
for (a = 0; a < nu->pntsv; a++) {
@ -3726,7 +3728,8 @@ void CURVE_OT_subdivide(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, 1000, "Number of cuts", "", 1, 10);
/* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
/* Avoid re-using last var because it can cause _very_ high poly meshes
* and annoy users (or worse crash). */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}

View File

@ -22,8 +22,9 @@
*
* \name Gizmo Geometry
*
* \brief Prototypes for arrays defining the gizmo geometry. The actual definitions can be found in files usually
* called geom_xxx_gizmo.c
* \brief Prototypes for arrays defining the gizmo geometry.
* The actual definitions can be found in files usually
* called geom_xxx_gizmo.c
*/
#ifndef __GIZMO_GEOMETRY_H__

View File

@ -937,7 +937,8 @@ static int gizmo_cage2d_modal(bContext *C,
}
/* For transform logic to be manageable we operate in -0.5..0.5 2D space,
* no matter the size of the rectangle, mouse coords are scaled to unit space.
* The mouse coords have been projected into the matrix so we don't need to worry about axis alignment.
* The mouse coords have been projected into the matrix
* so we don't need to worry about axis alignment.
*
* - The cursor offset are multiplied by 'dims'.
* - Matrix translation is also multiplied by 'dims'.

View File

@ -470,7 +470,8 @@ static int gizmo_cage3d_modal(bContext *C,
}
/* For transform logic to be manageable we operate in -0.5..0.5 2D space,
* no matter the size of the rectangle, mouse coords are scaled to unit space.
* The mouse coords have been projected into the matrix so we don't need to worry about axis alignment.
* The mouse coords have been projected into the matrix
* so we don't need to worry about axis alignment.
*
* - The cursor offset are multiplied by 'dims'.
* - Matrix translation is also multiplied by 'dims'.

View File

@ -138,8 +138,9 @@ static void gp_draw_stroke_buffer(const tGPspoint *points,
immBeginAtMost(GPU_PRIM_LINE_STRIP, totpoints);
for (int i = 0; i < totpoints; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
/* If there was a significant pressure change,
* stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP).
*/
if (fabsf(pt->pressure - oldpressure) > 0.2f) {
/* need to have 2 points to avoid immEnd assert error */
@ -277,8 +278,9 @@ static void gp_draw_stroke_3d(const bGPDspoint *points,
immBeginAtMost(GPU_PRIM_LINE_STRIP, totpoints + cyclic_add);
const bGPDspoint *pt = points;
for (int i = 0; i < totpoints; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
/* If there was a significant pressure change, stop the curve,
* change the thickness of the stroke, and continue drawing again
* (since line-width cannot change in middle of GL_LINE_STRIP)
* Note: we want more visible levels of pressures when thickness is bigger.
*/
if (fabsf(pt->pressure - curpressure) > 0.2f / (float)thickness) {
@ -352,8 +354,9 @@ static void gp_draw_stroke_2d(const bGPDspoint *points,
scalefac = 0.001f;
}
/* tessellation code - draw stroke as series of connected quads (triangle strips in fact) with connection
* edges rotated to minimize shrinking artifacts, and rounded endcaps
/* Tessellation code - draw stroke as series of connected quads
* (triangle strips in fact) with connection edges rotated to minimize shrinking artifacts,
* and rounded endcaps.
*/
{
const bGPDspoint *pt1, *pt2;
@ -377,7 +380,8 @@ static void gp_draw_stroke_2d(const bGPDspoint *points,
float mt[2], sc[2]; /* gradient for thickness, point for end-cap */
float pthick; /* thickness at segment point */
/* get x and y coordinates from point2 (point1 has already been computed in previous iteration). */
/* Get x and y coordinates from point2
* (point1 has already been computed in previous iteration). */
gp_calc_2d_stroke_fxy(&pt2->x, sflag, offsx, offsy, winx, winy, s1);
/* calculate gradient and normal - 'angle'=(ny/nx) */
@ -1041,7 +1045,8 @@ void ED_annotation_draw_2dimage(const bContext *C)
case SPACE_CLIP: /* clip */
{
/* just draw using standard scaling (settings here are currently ignored anyways) */
/* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled */
/* FIXME: the opengl poly-strokes don't draw at right thickness when done this way,
* so disabled. */
offsx = 0;
offsy = 0;
sizex = ar->winx;

View File

@ -160,7 +160,8 @@ typedef struct tGPsdata {
/* These need to be doubles, as (at least under unix) they are in seconds since epoch,
* float (and its 7 digits precision) is definitively not enough here!
* double, with its 15 digits precision, ensures us millisecond precision for a few centuries at least.
* double, with its 15 digits precision,
* ensures us millisecond precision for a few centuries at least.
*/
/** Used when converting to path. */
double inittime;
@ -287,9 +288,10 @@ static bool gp_stroke_filtermval(tGPsdata *p, const float mval[2], float pmval[2
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
/* 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.
*/
else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX)
return true;
@ -646,7 +648,8 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
ToolSettings *ts = p->scene->toolsettings;
int i, totelem;
/* since strokes are so fine, when using their depth we need a margin otherwise they might get missed */
/* Since strokes are so fine, when using their depth we need a margin
* otherwise they might get missed. */
int depth_margin = (ts->annotate_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0;
/* get total number of points to allocate space for
@ -1718,7 +1721,8 @@ static void gpencil_draw_apply(wmOperator *op, tGPsdata *p, Depsgraph *depsgraph
p->mvalo[1] = p->mval[1];
p->opressure = p->pressure;
}
/* only add current point to buffer if mouse moved (even though we got an event, it might be just noise) */
/* Only add current point to buffer if mouse moved
* (even though we got an event, it might be just noise). */
else if (gp_stroke_filtermval(p, p->mval, p->mvalo)) {
/* try to add point */
short ok = gp_stroke_addpoint(p, p->mval, p->pressure, p->curtime);

View File

@ -274,7 +274,8 @@ static void gp_calc_stroke_text_coordinates(
}
}
/* Triangulate stroke for high quality fill (this is done only if cache is null or stroke was modified) */
/* Triangulate stroke for high quality fill
* (this is done only if cache is null or stroke was modified). */
static void gp_triangulate_stroke_fill(bGPDstroke *gps)
{
BLI_assert(gps->totpoints >= 3);
@ -643,8 +644,8 @@ static void gp_draw_stroke_2d(const bGPDspoint *points,
/* TODO: fancy++ with the magic of shaders */
/* tessellation code - draw stroke as series of connected quads (triangle strips in fact) with connection
* edges rotated to minimize shrinking artifacts, and rounded endcaps
/* tessellation code - draw stroke as series of connected quads (triangle strips in fact)
* with connection edges rotated to minimize shrinking artifacts, and rounded endcaps.
*/
{
const bGPDspoint *pt1, *pt2;
@ -675,7 +676,8 @@ static void gp_draw_stroke_2d(const bGPDspoint *points,
float mt[2], sc[2]; /* gradient for thickness, point for end-cap */
float pthick; /* thickness at segment point */
/* get x and y coordinates from point2 (point1 has already been computed in previous iteration). */
/* Get x and y coordinates from point2
* (point1 has already been computed in previous iteration). */
mul_v3_m4v3(fpt, diff_mat, &pt2->x);
gp_calc_2d_stroke_fxy(fpt, sflag, offsx, offsy, winx, winy, s1);

View File

@ -301,12 +301,14 @@ 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
/* Copy and Paste Tools:
* - The copy/paste buffer currently stores a set of GP_Layers, with temporary
* 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).
* - 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 earliest frame is calculated per copy operation.
*/

View File

@ -210,7 +210,8 @@ static const ColorTemplate gp_stroke_material_grey = {
/* ***************************************************************** */
/* Stroke API */
/* add a Simple stroke with colors (original design created by Daniel M. Lara and Matias Mendiola) */
/* Add a Simple stroke with colors
* (original design created by Daniel M. Lara and Matias Mendiola). */
void ED_gpencil_create_stroke(bContext *C, Object *ob, float mat[4][4])
{
Main *bmain = CTX_data_main(C);

View File

@ -302,7 +302,8 @@ static float gp_brush_influence_calc(tGP_BrushEditData *gso, const int radius, c
/* ----------------------------------------------- */
/* Smooth Brush */
/* A simple (but slower + inaccurate) smooth-brush implementation to test the algorithm for stroke smoothing */
/* A simple (but slower + inaccurate)
* smooth-brush implementation to test the algorithm for stroke smoothing. */
static bool gp_brush_smooth_apply(
tGP_BrushEditData *gso, bGPDstroke *gps, int pt_index, const int radius, const int co[2])
{
@ -351,7 +352,8 @@ static bool gp_brush_thickness_apply(
inf = gp_brush_influence_calc(gso, radius, co) / 10.0f;
/* apply */
// XXX: this is much too strong, and it should probably do some smoothing with the surrounding stuff
/* XXX: this is much too strong,
* and it should probably do some smoothing with the surrounding stuff. */
if (gp_brush_invert_check(gso)) {
/* make line thinner - reduce stroke pressure */
pt->pressure -= inf;
@ -801,7 +803,16 @@ static bool gp_brush_randomize_apply(
mul_v2_fl(svec, fac);
}
//printf("%f %f (%f), nco = {%f %f}, co = %d %d\n", svec[0], svec[1], fac, nco[0], nco[1], co[0], co[1]);
#if 0
printf("%f %f (%f), nco = {%f %f}, co = %d %d\n",
svec[0],
svec[1],
fac,
nco[0],
nco[1],
co[0],
co[1]);
#endif
/* convert to dataspace */
if (gps->flag & GP_STROKE_3DSPACE) {
@ -1106,7 +1117,8 @@ static void gp_brush_clone_adjust(tGP_BrushEditData *gso)
gp_brush_grab_calc_dvec(gso);
/* For each of the stored strokes, apply the offset to each point */
/* NOTE: Again this assumes that in the 3D view, we only have 3d space and not screenspace strokes... */
/* NOTE: Again this assumes that in the 3D view,
* we only have 3d space and not screenspace strokes... */
for (snum = 0; snum < data->totitems; snum++) {
bGPDstroke *gps = data->new_strokes[snum];
bGPDspoint *pt;
@ -1453,7 +1465,8 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso,
pt1 = gps->points + i;
pt2 = gps->points + i + 1;
/* Skip if neither one is selected (and we are only allowed to edit/consider selected points) */
/* Skip if neither one is selected
* (and we are only allowed to edit/consider selected points) */
if (gso->settings->flag & GP_SCULPT_SETT_FLAG_SELECT_MASK) {
if (!(pt1->flag & GP_SPOINT_SELECT) && !(pt2->flag & GP_SPOINT_SELECT)) {
include_last = false;
@ -1501,9 +1514,10 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso,
changed |= ok;
}
else if (include_last) {
/* This case is for cases where for whatever reason the second vert (1st here) doesn't get included
* because the whole edge isn't in bounds, but it would've qualified since it did with the
* previous step (but wasn't added then, to avoid double-ups)
/* This case is for cases where for whatever reason the second vert (1st here)
* doesn't get included because the whole edge isn't in bounds,
* but it would've qualified since it did with the previous step
* (but wasn't added then, to avoid double-ups).
*/
changed |= apply(gso, gps, i, radius, pc1);
include_last = false;

View File

@ -693,8 +693,10 @@ static void gp_stroke_to_path(bContext *C,
* the last segment to get the first point (p1) position and timing.
* - If we do not have those (quite odd, but may happen), we linearly interpolate the last point
* with the first point of the current stroke.
* The same goes for the second point, first segment of the current stroke is "negatively" extrapolated
* if it exists, else (if the stroke is a single point), linear interpolation with last curve point...
*
* The same goes for the second point, first segment of the current stroke is "negatively"
* extrapolated if it exists, else (if the stroke is a single point),
* linear interpolation with last curve point.
*/
if (curnu && !stitch && old_nbp) {
float p1[3], p2[3], p[3], next_p[3];
@ -774,8 +776,9 @@ static void gp_stroke_to_path(bContext *C,
dt = -GAP_DFAC; /* Rather arbitrary too! */
}
bp = &nu->bp[old_nbp];
/* Note we can't give anything else than 0.0 as time here, since a negative one (which would be expected value)
* would not work (it would be *before* gtd->inittime, which is not supported currently).
/* Note we can't give anything else than 0.0 as time here, since a negative one
* (which would be expected value) would not work
* (it would be *before* gtd->inittime, which is not supported currently).
*/
gp_stroke_to_path_add_point(
gtd, bp, p, p, do_gtd, gps->inittime, dt, 0.0f, rad_fac, minmax_weights);
@ -907,9 +910,10 @@ static void gp_stroke_to_bezier(bContext *C,
/* create new 'nurb' or extend current one within the curve */
if (nu) {
old_nbezt = nu->pntsu;
/* If we do stitch, first point of current stroke is assumed the same as last point of previous stroke,
* so no need to add it.
* If no stitch, we want to add two additional points to make a "zero-radius" link between both strokes.
/* If we do stitch, first point of current stroke is assumed the same as last point of
* previous stroke, so no need to add it.
* If no stitch, we want to add two additional points to make a "zero-radius"
* link between both strokes.
*/
BKE_nurb_bezierPoints_add(nu, gps->totpoints + ((stitch) ? -1 : 2) + add_start_end_points);
}
@ -962,8 +966,11 @@ static void gp_stroke_to_bezier(bContext *C,
* the last segment to get the first point (p1) position and timing.
* - If we do not have those (quite odd, but may happen), we linearly interpolate the last point
* with the first point of the current stroke.
* The same goes for the second point, first segment of the current stroke is "negatively" extrapolated
* if it exists, else (if the stroke is a single point), linear interpolation with last curve point...
*
* The same goes for the second point,
* first segment of the current stroke is "negatively" extrapolated
* if it exists, else (if the stroke is a single point),
* linear interpolation with last curve point.
*/
else {
float p1[3], p2[3];
@ -1133,7 +1140,8 @@ static void gp_stroke_to_bezier(bContext *C,
/* The end point */
interp_v3_v3v3(h1, p, prev_bezt->vec[1], BEZT_HANDLE_FAC);
interp_v3_v3v3(h2, p, prev_bezt->vec[1], -BEZT_HANDLE_FAC);
/* Note bezt has already been incremented in main loop above, so it points to the right place. */
/* Note bezt has already been incremented in main loop above,
* so it points to the right place. */
gp_stroke_to_bezier_add_point(gtd,
bezt,
p,

View File

@ -124,7 +124,8 @@ static int gp_data_add_exec(bContext *C, wmOperator *op)
id_us_min(&gpd->id);
}
/* add new datablock, with a single layer ready to use (so users don't have to perform an extra step) */
/* Add new datablock, with a single layer ready to use
* (so users don't have to perform an extra step). */
if (is_annotation) {
bGPdata *gpd = BKE_gpencil_data_addnew(bmain, DATA_("Annotations"));
*gpd_ptr = gpd;
@ -2091,7 +2092,10 @@ typedef struct tJoinGPencil_AdtFixData {
GHash *names_map;
} tJoinGPencil_AdtFixData;
/* Callback to pass to BKE_fcurves_main_cb() for RNA Paths attached to each F-Curve used in the AnimData */
/**
* Callback to pass to #BKE_fcurves_main_cb()
* for RNA Paths attached to each F-Curve used in the #AnimData.
*/
static void joined_gpencil_fix_animdata_cb(ID *id, FCurve *fcu, void *user_data)
{
tJoinGPencil_AdtFixData *afd = (tJoinGPencil_AdtFixData *)user_data;
@ -2374,7 +2378,7 @@ static bool gpencil_active_color_poll(bContext *C)
return false;
}
/* ******************* Lock and hide any color non used in current layer ************************** */
/* **************** Lock and hide any color non used in current layer ************************** */
static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
{
bGPdata *gpd = ED_gpencil_data_get_active(C);

View File

@ -1212,8 +1212,9 @@ static bool gp_strokes_paste_poll(bContext *C)
{
/* 1) Must have GP datablock to paste to
* - We don't need to have an active layer though, as that can easily get added
* - If the active layer is locked, we can't paste there, but that should prompt a warning instead
* 2) Copy buffer must at least have something (though it may be the wrong sort...)
* - If the active layer is locked, we can't paste there,
* but that should prompt a warning instead.
* 2) Copy buffer must at least have something (though it may be the wrong sort...).
*/
return (ED_gpencil_data_get_active(C) != NULL) &&
(!BLI_listbase_is_empty(&gp_strokes_copypastebuf));
@ -1273,8 +1274,9 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
}
if (ok == false) {
/* XXX: this check is not 100% accurate (i.e. image editor is incompatible with normal 2D strokes),
* but should be enough to give users a good idea of what's going on
/* XXX: this check is not 100% accurate
* (i.e. image editor is incompatible with normal 2D strokes),
* but should be enough to give users a good idea of what's going on.
*/
if (CTX_wm_area(C)->spacetype == SPACE_VIEW3D)
BKE_report(op->reports, RPT_ERROR, "Cannot paste 2D strokes in 3D View");
@ -1541,7 +1543,8 @@ static int gp_blank_frame_add_exec(bContext *C, wmOperator *op)
/* Initialise datablock and an active layer if nothing exists yet */
if (ELEM(NULL, gpd, active_gpl)) {
/* let's just be lazy, and call the "Add New Layer" operator, which sets everything up as required */
/* Let's just be lazy, and call the "Add New Layer" operator,
* which sets everything up as required. */
WM_operator_name_call(C, "GPENCIL_OT_layer_add", WM_OP_EXEC_DEFAULT, NULL);
}
@ -2239,13 +2242,13 @@ void gp_stroke_delete_tagged_points(bGPDframe *gpf,
e++;
}
}
/* Each island corresponds to a new stroke. We must adjust the
* timings of these new strokes:
/* Each island corresponds to a new stroke.
* We must adjust the timings of these new strokes:
*
* Each point's timing data is a delta from stroke's inittime, so as we erase some points from
* the start of the stroke, we have to offset this inittime and all remaining points' delta values.
* This way we get a new stroke with exactly the same timing as if user had started drawing from
* the first non-removed point...
* Each point's timing data is a delta from stroke's inittime, so as we erase some points
* from the start of the stroke, we have to offset this inittime and all remaining points'
* delta values. This way we get a new stroke with exactly the same timing as if user had
* started drawing from the first non-removed point.
*/
{
bGPDspoint *pts;

View File

@ -930,7 +930,8 @@ static void gpencil_get_depth_array(tGPDfill *tgpf)
view3d_region_operator_needs_opengl(tgpf->win, tgpf->ar);
ED_view3d_autodist_init(tgpf->depsgraph, tgpf->ar, tgpf->v3d, 0);
/* since strokes are so fine, when using their depth we need a margin otherwise they might get missed */
/* Since strokes are so fine, when using their depth we need a margin
* otherwise they might get missed. */
int depth_margin = 0;
/* get an array of depths, far depths are blended */

View File

@ -178,7 +178,8 @@ typedef struct tGPsdata {
/* These need to be doubles, as (at least under unix) they are in seconds since epoch,
* float (and its 7 digits precision) is definitively not enough here!
* double, with its 15 digits precision, ensures us millisecond precision for a few centuries at least.
* double, with its 15 digits precision,
* ensures us millisecond precision for a few centuries at least.
*/
/** Used when converting to path. */
double inittime;
@ -370,9 +371,10 @@ static bool gp_stroke_filtermval(tGPsdata *p, const float mval[2], float mvalo[2
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
/* 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.
*/
else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX)
return true;
@ -913,7 +915,8 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
(!is_depth);
int i, totelem;
/* since strokes are so fine, when using their depth we need a margin otherwise they might get missed */
/* Since strokes are so fine,
* when using their depth we need a margin otherwise they might get missed. */
int depth_margin = (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0;
/* get total number of points to allocate space for
@ -1233,9 +1236,9 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
/* calculate UVs along the stroke */
ED_gpencil_calc_stroke_uv(obact, gps);
/* add stroke to frame, usually on tail of the listbase, but if on back is enabled the stroke is added on listbase head
* because the drawing order is inverse and the head stroke is the first to draw. This is very useful for artist
* when drawing the background
/* add stroke to frame, usually on tail of the listbase, but if on back is enabled the stroke
* is added on listbase head because the drawing order is inverse and the head stroke is the
* first to draw. This is very useful for artist when drawing the background.
*/
if ((ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) &&
(p->paintmode != GP_PAINTMODE_DRAW_POLY)) {
@ -2544,7 +2547,8 @@ static void gpencil_draw_apply(bContext *C, wmOperator *op, tGPsdata *p, Depsgra
copy_v2_v2(p->mvalo, p->mval);
p->opressure = p->pressure;
}
/* only add current point to buffer if mouse moved (even though we got an event, it might be just noise) */
/* Only add current point to buffer if mouse moved
* (even though we got an event, it might be just noise). */
else if (gp_stroke_filtermval(p, p->mval, p->mvalo)) {
/* if lazy mouse, interpolate the last and current mouse positions */
@ -3266,10 +3270,12 @@ static void gpencil_stroke_end(wmOperator *op)
p->gpf = NULL;
}
/* Move last stroke in the listbase to the head to be drawn below all previous strokes in the layer */
/* Move last stroke in the listbase to the head
* to be drawn below all previous strokes in the layer. */
static void gpencil_move_last_stroke_to_back(bContext *C)
{
/* move last stroke (the polygon) to head of the listbase stroke to draw on back of all previous strokes */
/* Move last stroke (the polygon) to head of the listbase stroke
* to draw on back of all previous strokes. */
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);

View File

@ -291,7 +291,8 @@ typedef enum eGP_SelectGrouped {
/* Select strokes with the same color */
GP_SEL_SAME_MATERIAL = 1,
/* TODO: All with same prefix - Useful for isolating all layers for a particular character for instance */
/* TODO: All with same prefix -
* Useful for isolating all layers for a particular character for instance. */
/* TODO: All with same appearance - colour/opacity/volumetric/fills ? */
} eGP_SelectGrouped;
@ -621,7 +622,8 @@ static int gpencil_select_more_exec(bContext *C, wmOperator *UNUSED(op))
int i;
bool prev_sel;
/* First Pass: Go in forward order, expanding selection if previous was selected (pre changes)...
/* First Pass: Go in forward order,
* expanding selection if previous was selected (pre changes).
* - This pass covers the "after" edges of selection islands
*/
prev_sel = false;
@ -705,7 +707,8 @@ static int gpencil_select_less_exec(bContext *C, wmOperator *UNUSED(op))
int i;
bool prev_sel;
/* First Pass: Go in forward order, shrinking selection if previous was not selected (pre changes)...
/* First Pass: Go in forward order, shrinking selection
* if previous was not selected (pre changes).
* - This pass covers the "after" edges of selection islands
*/
prev_sel = false;
@ -776,9 +779,12 @@ void GPENCIL_OT_select_less(wmOperatorType *ot)
/** \name Circle Select Operator
* \{ */
/* Helper to check if a given stroke is within the area */
/* NOTE: Code here is adapted (i.e. copied directly) from gpencil_paint.c::gp_stroke_eraser_dostroke()
* It would be great to de-duplicate the logic here sometime, but that can wait...
/**
* Helper to check if a given stroke is within the area.
*
* \note Code here is adapted (i.e. copied directly)
* from gpencil_paint.c #gp_stroke_eraser_dostroke().
* It would be great to de-duplicate the logic here sometime, but that can wait.
*/
static bool gp_stroke_do_circle_sel(bGPDlayer *gpl,
bGPDstroke *gps,

View File

@ -154,7 +154,8 @@ void gpencil_undo_push(bGPdata *gpd)
* - 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 */
/* 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)) {
/* remove anything older than n-steps before cur_node */
int steps = 0;

View File

@ -85,7 +85,9 @@
/* ******************************************************** */
/* Context Wrangling... */
/* Get pointer to active Grease Pencil datablock, and an RNA-pointer to trace back to whatever owns it,
/**
* Get pointer to active Grease Pencil datablock,
* and an RNA-pointer to trace back to whatever owns it,
* when context info is not available.
*/
bGPdata **ED_gpencil_data_get_pointers_direct(
@ -154,7 +156,8 @@ bGPdata **ED_gpencil_data_get_pointers_direct(
{
SpaceSeq *sseq = (SpaceSeq *)sl;
/* for now, Grease Pencil data is associated with the space (actually preview region only) */
/* For now, Grease Pencil data is associated with the space
* (actually preview region only). */
/* XXX our convention for everything else is to link to data though... */
if (r_ptr)
RNA_pointer_create(screen_id, &RNA_SpaceSequenceEditor, sseq, r_ptr);
@ -202,7 +205,8 @@ bGPdata **ED_gpencil_data_get_pointers_direct(
return NULL;
}
/* Get pointer to active Grease Pencil datablock, and an RNA-pointer to trace back to whatever owns it */
/* Get pointer to active Grease Pencil datablock,
* and an RNA-pointer to trace back to whatever owns it. */
bGPdata **ED_gpencil_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
{
ID *screen_id = (ID *)CTX_wm_screen(C);
@ -251,7 +255,11 @@ bGPdata *ED_gpencil_data_get_active_evaluated(const bContext *C)
Object *ob = CTX_data_active_object(C);
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
/* if (ob && ob->type == OB_GPENCIL) BLI_assert(ob_eval->data == DEG_get_evaluated_id(ob->data)); */
#if 0
if (ob && ob->type == OB_GPENCIL) {
BLI_assert(ob_eval->data == DEG_get_evaluated_id(ob->data));
}
#endif
return ED_gpencil_data_get_active_direct(screen_id, sa, scene_eval, ob_eval);
}
@ -606,7 +614,8 @@ void gp_apply_parent_point(
* \param[out] r_x The screen-space x-coordinate of the point
* \param[out] r_y The screen-space y-coordinate of the point
*
* \warning This assumes that the caller has already checked whether the stroke in question can be drawn.
* \warning This assumes that the caller has already checked
* whether the stroke in question can be drawn.
*/
void gp_point_to_xy(
const GP_SpaceConversion *gsc, const bGPDstroke *gps, const bGPDspoint *pt, int *r_x, int *r_y)
@ -650,15 +659,17 @@ void gp_point_to_xy(
}
/**
* Convert a Grease Pencil coordinate (i.e. can be 2D or 3D) to screenspace (2D)
* Convert a Grease Pencil coordinate (i.e. can be 2D or 3D) to screenspace (2D).
*
* Just like #gp_point_to_xy(), except the resulting coordinates are floats not ints.
* Use this version to solve "stair-step" artifacts which may arise when roundtripping the calculations.
* Use this version to solve "stair-step" artifacts which may arise when
* roundtripping the calculations.
*
* \param r_x: [out] The screen-space x-coordinate of the point.
* \param r_y: [out] The screen-space y-coordinate of the point.
* \param r_x[out]: The screen-space x-coordinate of the point.
* \param r_y[out]: The screen-space y-coordinate of the point.
*
* \warning This assumes that the caller has already checked whether the stroke in question can be drawn.
* \warning This assumes that the caller has already checked
* whether the stroke in question can be drawn.
*/
void gp_point_to_xy_fl(const GP_SpaceConversion *gsc,
const bGPDstroke *gps,
@ -1079,7 +1090,9 @@ void ED_gp_project_point_to_plane(const Scene *scene,
/* ******************************************************** */
/* Stroke Operations */
// XXX: Check if these functions duplicate stuff in blenkernel, and/or whether we should just deduplicate
/* XXX: Check if these functions duplicate stuff in blenkernel,
* and/or whether we should just deduplicate. */
/**
* Subdivide a stroke once, by adding a point half way between each pair of existing points

View File

@ -143,8 +143,8 @@ short insert_keyframe(struct Main *bmain,
eInsertKeyFlags flag);
/* Main Keyframing API call:
* Use this to delete keyframe on current frame for relevant channel. Will perform checks just in case.
*/
* Use this to delete keyframe on current frame for relevant channel.
* Will perform checks just in case. */
short delete_keyframe(struct Main *bmain,
struct ReportList *reports,
struct ID *id,

View File

@ -358,7 +358,10 @@ float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vert
void ED_vgroup_vert_active_mirror(struct Object *ob, int def_nr);
/* mesh_data.c */
// void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces);
#if 0
void ED_mesh_geometry_add(
struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces);
#endif
void ED_mesh_polys_add(struct Mesh *mesh, struct ReportList *reports, int count);
void ED_mesh_tessfaces_add(struct Mesh *mesh, struct ReportList *reports, int count);
void ED_mesh_edges_add(struct Mesh *mesh, struct ReportList *reports, int count);

View File

@ -78,12 +78,16 @@ struct UnitSettings;
/**
* There are important things to note here for code using numinput:
* - Values passed to #applyNumInput() should be valid and are stored as default ones (val_org), if it is not EDITED.
* - bool returned by #applyNumInput should be used to decide whether to apply numinput-specific post-process to data.
* - Once #applyNumInput has been called, #hasNumInput returns a valid value to decide whether to use numinput
* as drawstr source or not (i.e. to call #outputNumInput).
* - Values passed to #applyNumInput() should be valid and are stored as default ones (val_org),
* if it is not EDITED.
* - bool returned by #applyNumInput should be used to decide whether to apply
* numinput-specific post-process to data.
* - Once #applyNumInput has been called,
* #hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not
* (i.e. to call #outputNumInput).
*
* Those two steps have to be separated (so do not use a common call to #hasNumInput() to do both in the same time!).
* Those two steps have to be separated
* (so do not use a common call to #hasNumInput() to do both in the same time!).
*/
void initNumInput(NumInput *n);

View File

@ -341,7 +341,8 @@ void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3]);
void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3]);
void UI_GetThemeColorShade4ubv(int colorid, int offset, unsigned char col[4]);
// get three color values, range 0-255, complete with shading offset for the RGB components and blending
// get three color values, range 0-255,
// complete with shading offset for the RGB components and blending.
void UI_GetThemeColorBlendShade3ubv(
int colorid1, int colorid2, float fac, int offset, unsigned char col[3]);
@ -361,7 +362,8 @@ void UI_GetThemeColorShadeAlpha4ubv(int colorid,
int alphaoffset,
unsigned char col[4]);
// get four color values, range 0.0-1.0, complete with shading offset for the RGB components and blending
// get four color values, range 0.0-1.0,
// complete with shading offset for the RGB components and blending.
void UI_GetThemeColorBlendShade3fv(
int colorid1, int colorid2, float fac, int offset, float col[3]);
void UI_GetThemeColorBlendShade4fv(

View File

@ -58,7 +58,8 @@
* When we place a shape, pick a plane.
*
* We may base this choice on context,
* for now pick the "ground" based on the 3D cursor's dominant plane pointing down relative to the view.
* for now pick the "ground" based on the 3D cursor's dominant plane
* pointing down relative to the view.
*/
static void calc_initial_placement_point_from_view(bContext *C,
const float mval[2],

View File

@ -491,7 +491,8 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* for OFFSET_VALUE only, the scale is the size of a pixel under the mouse in 3d space */
opdata->scale[OFFSET_VALUE] = rv3d ? ED_view3d_pixel_size(rv3d, center_3d) : 1.0f;
/* since we are affecting untransformed object but seeing in transformed space, compensate for that */
/* since we are affecting untransformed object but seeing in transformed space,
* compensate for that */
opdata->scale[OFFSET_VALUE] /= opdata->max_obj_scale;
edbm_bevel_calc_initial_length(op, event, false);

View File

@ -1653,7 +1653,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
}
/* Now go through the candidates and find intersections */
/* These tolerances, in screen space, are for intermediate hits, as ends are already snapped to screen */
/* These tolerances, in screen space, are for intermediate hits,
* as ends are already snapped to screen. */
if (kcd->is_interactive) {
vert_tol = KNIFE_FLT_EPS_PX_VERT;
@ -1663,8 +1664,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
else {
/* Use 1/100th of a pixel, see T43896 (too big), T47910 (too small).
*
* Update, leave this as is until we investigate not using pixel coords for geometry calculations: T48023
*/
* Update, leave this as is until we investigate not using pixel coords
* for geometry calculations: T48023. */
vert_tol = line_tol = face_tol = 0.5f;
}

View File

@ -170,23 +170,26 @@ static float edbm_rip_edge_side_measure(
*
* The method used for checking the side of selection is as follows...
* - First tag all rip-able edges.
* - Build a contiguous edge list by looping over tagged edges and following each ones tagged siblings in both
* directions.
* - The loops are not stored in an array, Instead both loops on either side of each edge has its index values set
* to count down from the last edge, this way, once we have the 'last' edge its very easy to walk down the
* connected edge loops.
* The reason for using loops like this is because when the edges are split we don't which face user gets the newly
* created edge (its as good as random so we cant assume new edges will be on once side).
* After splitting, its very simple to walk along boundary loops since each only has one edge from a single side.
* - The end loop pairs are stored in an array however to support multiple edge-selection-islands, so you can rip
* multiple selections at once.
* - Build a contiguous edge list by looping over tagged edges and following each ones tagged
* siblings in both directions.
* - The loops are not stored in an array, Instead both loops on either side of each edge has
* its index values set to count down from the last edge, this way, once we have the 'last'
* edge its very easy to walk down the connected edge loops.
* The reason for using loops like this is because when the edges are split we don't which
* face user gets the newly created edge
* (its as good as random so we cant assume new edges will be on once side).
* After splitting, its very simple to walk along boundary loops since each only has one edge
* from a single side.
* - The end loop pairs are stored in an array however to support multiple edge-selection-islands,
* so you can rip multiple selections at once.
* - * Execute the split *
* - For each #EdgeLoopPair walk down both sides of the split using the loops and measure which is facing the mouse.
* - For each #EdgeLoopPair walk down both sides of the split using the loops and measure
* which is facing the mouse.
* - Deselect the edge loop facing away.
*
* Limitation!
* This currently works very poorly with intersecting edge islands (verts with more than 2 tagged edges)
* This is nice to but for now not essential.
* This currently works very poorly with intersecting edge islands
* (verts with more than 2 tagged edges). This is nice to but for now not essential.
*
* - campbell.
*/

View File

@ -885,8 +885,9 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_
BM_select_history_clear(bm);
/* Notes on hidden geometry:
* - un-hide the face since its possible hidden was copied when copying surrounding face attributes.
* - un-hide before adding to select history
* - Un-hide the face since its possible hidden was copied when copying
* surrounding face attributes.
* - Un-hide before adding to select history
* since we may extend into an existing, hidden vert/edge.
*/
@ -946,8 +947,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
BMElem *ele_desel;
BMFace *ele_desel_face;
/* be extra clever, figure out if a partial selection should be extended so we can create geometry
* with single vert or single edge selection */
/* be extra clever, figure out if a partial selection should be extended so we can create
* geometry with single vert or single edge selection. */
ele_desel = edbm_add_edge_face_exec__tricky_extend_sel(em->bm);
#endif
if (!EDBM_op_init(em,
@ -980,7 +981,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
/* Newly created faces may include existing hidden edges,
* copying face data from surrounding, may have copied hidden face flag too.
*
* Important that faces use flushing since 'edges.out' wont include hidden edges that already existed.
* Important that faces use flushing since 'edges.out'
* wont include hidden edges that already existed.
*/
BMO_slot_buffer_hflag_disable(
em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_HIDDEN, true);
@ -3425,7 +3427,8 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot)
/* api callbacks */
ot->exec = edbm_blend_from_shape_exec;
// ot->invoke = WM_operator_props_popup_call; /* disable because search popup closes too easily */
/* disable because search popup closes too easily */
// ot->invoke = WM_operator_props_popup_call;
ot->ui = edbm_blend_from_shape_ui;
ot->poll = ED_operator_editmesh;
@ -7730,7 +7733,8 @@ static void point_normals_apply(bContext *C, wmOperator *op, float target[3], co
copy_v3_v3(lnor_ed->nloc, lnor_ed->niloc);
}
else if (do_spherize) {
/* Note that this is *not* real spherical interpolation. Probably good enough in this case though? */
/* Note that this is *not* real spherical interpolation.
* Probably good enough in this case though? */
const float strength = RNA_float_get(op->ptr, "spherize_strength");
float spherized_normal[3];
@ -8810,12 +8814,13 @@ static int edbm_smoothen_normals_exec(bContext *C, wmOperator *op)
float(*smooth_normal)[3] = MEM_callocN(sizeof(*smooth_normal) * lnors_ed_arr->totloop, __func__);
/* This is weird choice of operation, taking all loops of faces of current vertex... Could lead to some rather
* far away loops weighting as much as very close ones (topologically speaking), with complex polygons.
* Using topological distance here (rather than geometrical one) makes sense imho, but would rather go with
* a more consistent and flexible code, we could even add max topological distance to take into account,
* and a weighting curve...
* Would do that later though, think for now we can live with that choice. --mont29 */
/* This is weird choice of operation, taking all loops of faces of current vertex.
* Could lead to some rather far away loops weighting as much as very close ones
* (topologically speaking), with complex polygons.
* Using topological distance here (rather than geometrical one)
* makes sense imho, but would rather go with a more consistent and flexible code,
* we could even add max topological distance to take into account, * and a weighting curve.
* Would do that later though, think for now we can live with that choice. --mont29. */
BMLoopNorEditData *lnor_ed = lnors_ed_arr->lnor_editdata;
for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) {
l = lnor_ed->loop;

View File

@ -93,13 +93,13 @@ typedef struct UndoMesh {
int selectmode;
/** \note
* this isn't a prefect solution, if you edit keys and change shapes this works well (fixing [#32442]),
* but editing shape keys, going into object mode, removing or changing their order,
* then go back into editmode and undo will give issues - where the old index will be out of sync
* with the new object index.
* this isn't a prefect solution, if you edit keys and change shapes this works well
* (fixing T32442), but editing shape keys, going into object mode, removing or changing their
* order, then go back into editmode and undo will give issues - where the old index will be
* out of sync with the new object index.
*
* There are a few ways this could be made to work but for now its a known limitation with mixing
* object and editmode operations - Campbell */
* object and editmode operations - Campbell. */
int shapenr;
#ifdef USE_ARRAY_STORE

View File

@ -1017,7 +1017,8 @@ static BMVert *cache_mirr_intptr_as_bmvert(intptr_t *index_lookup, int index)
* \param use_select: Restrict to selected verts.
* \param use_topology: Use topology mirror.
* \param maxdist: Distance for close point test.
* \param r_index: Optional array to write into, as an alternative to a customdata layer (length of total verts).
* \param r_index: Optional array to write into, as an alternative to a customdata layer
* (length of total verts).
*/
void EDBM_verts_mirror_cache_begin_ex(BMEditMesh *em,
const int axis,

View File

@ -784,7 +784,8 @@ static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator
CustomData *data = GET_CD_DATA(me, ldata);
if (me->edit_mesh) {
/* Tag edges as sharp according to smooth threshold if needed, to preserve autosmooth shading. */
/* Tag edges as sharp according to smooth threshold if needed,
* to preserve autosmooth shading. */
if (me->flag & ME_AUTOSMOOTH) {
BM_edges_sharp_from_angle_set(me->edit_mesh->bm, me->smoothresh);
}
@ -792,7 +793,8 @@ static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator
BM_data_layer_add(me->edit_mesh->bm, data, CD_CUSTOMLOOPNORMAL);
}
else {
/* Tag edges as sharp according to smooth threshold if needed, to preserve autosmooth shading. */
/* Tag edges as sharp according to smooth threshold if needed,
* to preserve autosmooth shading. */
if (me->flag & ME_AUTOSMOOTH) {
float(*polynors)[3] = MEM_mallocN(sizeof(*polynors) * (size_t)me->totpoly, __func__);

View File

@ -150,9 +150,11 @@ static void join_mesh_single(Depsgraph *depsgraph,
mul_m4_v3(cmat, mvert->co);
}
/* 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)
/* 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 (key) {
/* if this mesh has any shapekeys, check first, otherwise just copy coordinates */
@ -337,7 +339,8 @@ int join_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
/* only join meshes if there are verts to join, there aren't too many, and we only had one mesh selected */
/* Only join meshes if there are verts to join,
* there aren't too many, and we only had one mesh selected. */
me = (Mesh *)ob->data;
key = me->key;
@ -748,9 +751,10 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
static MirrTopoStore_t mesh_topo_store = {NULL, -1. - 1, -1};
/* mode is 's' start, or 'e' end, or 'u' use */
/* if end, ob can be NULL */
/* note, is supposed return -1 on error, which callers are currently checking for, but is not used so far */
/** mode is 's' start, or 'e' end, or 'u' use
* if end, ob can be NULL.
* \note, is supposed return -1 on error,
* which callers are currently checking for, but is not used so far. */
int ED_mesh_mirror_topo_table(Object *ob, Mesh *me_eval, char mode)
{
if (mode == 'u') { /* use table */

View File

@ -1421,8 +1421,9 @@ static int object_delete_exec(bContext *C, wmOperator *op)
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
}
/* This is sort of a quick hack to address T51243 - Proper thing to do here would be to nuke most of all this
* custom scene/object/base handling, and use generic lib remap/query for that.
/* This is sort of a quick hack to address T51243 -
* Proper thing to do here would be to nuke most of all this custom scene/object/base handling,
* and use generic lib remap/query for that.
* But this is for later (aka 2.8, once layers & co are settled and working).
*/
if (use_global && ob->id.lib == NULL) {
@ -1535,8 +1536,10 @@ static void copy_object_set_idnew(bContext *C)
/********************* Make Duplicates Real ************************/
/**
* \note regarding hashing dupli-objects when using OB_DUPLICOLLECTION, skip the first member of #DupliObject.persistent_id
* since its a unique index and we only want to know if the group objects are from the same dupli-group instance.
* \note regarding hashing dupli-objects when using OB_DUPLICOLLECTION,
* skip the first member of #DupliObject.persistent_id
* since its a unique index and we only want to know if the group objects are from the same
* dupli-group instance.
*/
static unsigned int dupliobject_group_hash(const void *ptr)
{
@ -1550,8 +1553,10 @@ static unsigned int dupliobject_group_hash(const void *ptr)
}
/**
* \note regarding hashing dupli-objects when NOT using OB_DUPLICOLLECTION, include the first member of #DupliObject.persistent_id
* since its the index of the vertex/face the object is instantiated on and we want to identify objects on the same vertex/face.
* \note regarding hashing dupli-objects when NOT using OB_DUPLICOLLECTION,
* include the first member of #DupliObject.persistent_id
* since its the index of the vertex/face the object is instantiated on and we want to identify
* objects on the same vertex/face.
*/
static unsigned int dupliobject_hash(const void *ptr)
{
@ -1827,7 +1832,8 @@ static void convert_ensure_curve_cache(Depsgraph *depsgraph, Scene *scene, Objec
if (ob->runtime.curve_cache == NULL) {
/* Force creation. This is normally not needed but on operator
* redo we might end up with an object which isn't evaluated yet.
* Also happens in case we are working on a copy of the object (all its caches have been nuked then).
* Also happens in case we are working on a copy of the object
* (all its caches have been nuked then).
*/
if (ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT)) {
/* We need 'for render' ON here, to enable computing bevel dipslist if needed.
@ -1932,8 +1938,9 @@ static int convert_exec(bContext *C, wmOperator *op)
Base *base = link->ptr.data;
Object *ob = base->object;
/* The way object type conversion works currently (enforcing conversion of *all* objects using converted
* object-data, even some un-selected/hidden/another scene ones, sounds totally bad to me.
/* The way object type conversion works currently (enforcing conversion of *all* objects
* using converted object-data, even some un-selected/hidden/another scene ones,
* sounds totally bad to me.
* However, changing this is more design than bug-fix, not to mention convoluted code below,
* so that will be for later.
* But at the very least, do not do that with linked IDs! */
@ -2269,9 +2276,10 @@ void OBJECT_OT_convert(wmOperatorType *ot)
/*
* dupflag: a flag made from constants declared in DNA_userdef_types.h
* The flag tells adduplicate() whether to copy data linked to the object, or to reference the existing data.
* The flag tells adduplicate() whether to copy data linked to the object,
* or to reference the existing data.
* U.dupflag for default operations or you can construct a flag as python does
* if the dupflag is 0 then no data will be copied (linked duplicate) */
* if the dupflag is 0 then no data will be copied (linked duplicate). */
/* used below, assumes id.new is correct */
/* leaves selection of base/object unaltered */

View File

@ -586,7 +586,7 @@ static void object_test_constraint(Main *bmain, Object *owner, bConstraint *con)
}
}
/************************ generic functions for operators using constraint names and data context *********************/
/*** generic functions for operators using constraint names and data context *********************/
#define EDIT_CONSTRAINT_OWNER_OBJECT 0
#define EDIT_CONSTRAINT_OWNER_BONE 1
@ -690,20 +690,30 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
if (pchan)
list = &pchan->constraints;
else {
//if (G.debug & G_DEBUG)
//printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob) ? ob->id.name + 2 : "<None>");
#if 0
if (G.debug & G_DEBUG) {
printf("edit_constraint_property_get: No active bone for object '%s'\n",
(ob) ? ob->id.name + 2 : "<None>");
}
#endif
return NULL;
}
}
else {
//if (G.debug & G_DEBUG)
//printf("edit_constraint_property_get: defaulting to getting list in the standard way\n");
#if 0
if (G.debug & G_DEBUG) {
printf("edit_constraint_property_get: defaulting to getting list in the standard way\n");
}
#endif
list = get_active_constraints(ob);
}
con = BKE_constraints_find_name(list, constraint_name);
//if (G.debug & G_DEBUG)
//printf("constraint found = %p, %s\n", (void *)con, (con) ? con->name : "<Not found>");
#if 0
if (G.debug & G_DEBUG) {
printf("constraint found = %p, %s\n", (void *)con, (con) ? con->name : "<Not found>");
}
#endif
if (con && (type != 0) && (con->type != type))
con = NULL;
@ -1275,10 +1285,11 @@ static void object_pose_tag_update(Main *bmain, Object *ob)
{
BKE_pose_tag_recalc(bmain, ob->pose); /* Checks & sort pose channels. */
if (ob->proxy && ob->adt) {
/* We need to make use of ugly POSE_ANIMATION_WORKAROUND here too, else anim data are not reloaded
* after calling `BKE_pose_rebuild()`, which causes T43872.
* Note that this is a bit wide here, since we cannot be sure whether there are some locked proxy bones
* or not...
/* We need to make use of ugly #POSE_ANIMATION_WORKAROUND here too,
* else anim data are not reloaded after calling `BKE_pose_rebuild()`,
* which causes T43872.
* Note that this is a bit wide here, since we cannot be sure whether there are some locked
* proxy bones or not.
* XXX Temp hack until new depsgraph hopefully solves this. */
DEG_id_tag_update(&ob->id, ID_RECALC_ANIMATION);
}
@ -1816,7 +1827,8 @@ static int constraint_add_exec(
return OPERATOR_CANCELLED;
}
/* create a new constraint of the type required, and add it to the active/given constraints list */
/* Create a new constraint of the type required,
* and add it to the active/given constraints list. */
if (pchan)
con = BKE_constraint_add_for_pose(ob, pchan, NULL, type);
else
@ -1831,8 +1843,8 @@ static int constraint_add_exec(
/* 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)
/* 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).
*/
if (tar_pchan)
set_constraint_nth_target(con, tar_ob, tar_pchan->name, 0);
@ -1881,8 +1893,8 @@ static int constraint_add_exec(
if ((ob->type == OB_ARMATURE) && (pchan)) {
BKE_pose_tag_recalc(bmain, ob->pose); /* sort pose channels */
if (BKE_constraints_proxylocked_owner(ob, pchan) && ob->adt) {
/* We need to make use of ugly POSE_ANIMATION_WORKAROUND here too, else anim data are not reloaded
* after calling `BKE_pose_rebuild()`, which causes T43872.
/* We need to make use of ugly POSE_ANIMATION_WORKAROUND here too,
* else anim data are not reloaded after calling `BKE_pose_rebuild()`, which causes T43872.
* XXX Temp hack until new depsgraph hopefully solves this. */
DEG_id_tag_update(&ob->id, ID_RECALC_ANIMATION);
}
@ -2091,7 +2103,8 @@ static int pose_ik_add_exec(bContext *C, wmOperator *op)
Object *ob = CTX_data_active_object(C);
const bool with_targets = RNA_boolean_get(op->ptr, "with_targets");
/* add the constraint - all necessary checks should have been done by the invoke() callback already... */
/* add the constraint - all necessary checks should have
* been done by the invoke() callback already... */
return constraint_add_exec(
C, op, ob, get_active_constraints(ob), CONSTRAINT_TYPE_KINEMATIC, with_targets);
}

View File

@ -379,7 +379,7 @@ void OBJECT_OT_gpencil_modifier_add(wmOperatorType *ot)
ot->prop = prop;
}
/************************ generic functions for operators using mod names and data context *********************/
/********** generic functions for operators using mod names and data context *********************/
static int gpencil_edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
{

View File

@ -889,7 +889,7 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
ot->prop = prop;
}
/************************ generic functions for operators using mod names and data context *********************/
/********** generic functions for operators using mod names and data context *********************/
bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
{
@ -2022,7 +2022,8 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
mmd->totinfluence = 0;
}
else {
/* Force modifier to run, it will call binding routine (this has to happen outside of depsgraph evaluation). */
/* Force modifier to run, it will call binding routine
* (this has to happen outside of depsgraph evaluation). */
MeshDeformModifierData *mmd_eval = (MeshDeformModifierData *)modifier_get_evaluated(
depsgraph, ob, &mmd->modifier);
mmd_eval->bindfunc = ED_mesh_deform_bind_callback;

View File

@ -739,15 +739,18 @@ bool ED_object_parent_set(ReportList *reports,
/* don't do anything here, since this is not technically "parenting" */
}
else if (ELEM(partype, PAR_CURVE, PAR_LATTICE) || (pararm)) {
/* partype is now set to PAROBJECT so that invisible 'virtual' modifiers don't need to be created
* NOTE: the old (2.4x) method was to set ob->partype = PARSKEL, creating the virtual modifiers
/* partype is now set to PAROBJECT so that invisible 'virtual'
* modifiers don't need to be created.
* NOTE: the old (2.4x) method was to set ob->partype = PARSKEL,
* creating the virtual modifiers.
*/
ob->partype = PAROBJECT; /* note, dna define, not operator property */
/* ob->partype = PARSKEL; */ /* note, dna define, not operator property */
/* BUT, to keep the deforms, we need a modifier, and then we need to set the object that it uses
* - We need to ensure that the modifier we're adding doesn't already exist, so we check this by
* assuming that the parent is selected too...
/* BUT, to keep the deforms, we need a modifier,
* and then we need to set the object that it uses
* - We need to ensure that the modifier we're adding doesn't already exist,
* so we check this by assuming that the parent is selected too.
*/
/* XXX currently this should only happen for meshes, curves, surfaces,
* and lattices - this stuff isn't available for metas yet */
@ -1682,9 +1685,10 @@ static Collection *single_object_users_collection(Main *bmain,
}
}
/* Since master collection has already be duplicated as part of scene copy, we do not duplictae it here.
* However, this means its children need to be re-added manually here, otherwise their parent lists are empty
* (which will lead to crashes, see T63101). */
/* Since master collection has already be duplicated as part of scene copy,
* we do not duplictae it here.
* However, this means its children need to be re-added manually here,
* otherwise their parent lists are empty (which will lead to crashes, see T63101). */
CollectionChild *child_next, *child = collection->children.first;
CollectionChild *orig_child_last = collection->children.last;
for (; child != NULL; child = child_next) {
@ -1713,9 +1717,10 @@ static void single_object_users(
single_object_users_collection(bmain, scene, master_collection, flag, copy_collections, true);
/* duplicate collections that consist entirely of duplicated objects */
/* XXX I guess that was designed for calls from 'make single user' operator... But since copy_collection is
* always false then, was not doing anything. And that kind of behavior should be added at operator level,
* not in a utility function also used by rather different code... */
/* XXX I guess that was designed for calls from 'make single user' operator.
* But since copy_collection is always false then, was not doing anything.
* And that kind of behavior should be added at operator level,
* not in a utility function also used by rather different code. */
#if 0
if (copy_collections) {
Collection *collection, *collectionn;
@ -1755,7 +1760,8 @@ static void single_object_users(
ID_NEW_REMAP(v3d->camera);
}
/* Making single user may affect other scenes if they share with current one some collections in their ViewLayer. */
/* Making single user may affect other scenes if they share
* with current one some collections in their ViewLayer. */
BKE_main_collection_sync(bmain);
}
@ -2148,7 +2154,8 @@ static void make_local_material_tag(Material *ma)
ma->id.tag &= ~LIB_TAG_PRE_EXISTING;
make_local_animdata_tag(BKE_animdata_from_id(&ma->id));
/* About nodetrees: root one is made local together with material, others we keep linked for now... */
/* About nodetrees: root one is made local together with material,
* others we keep linked for now... */
}
}
@ -2367,7 +2374,8 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
}
FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
/* Then, we remove (untag) bone shape objects, you shall never want to override those (hopefully)... */
/* Then, we remove (untag) bone shape objects, you shall never want to override those
* (hopefully)... */
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (collection, ob) {
if (ob->type == OB_ARMATURE && ob->pose != NULL) {
for (bPoseChannel *pchan = ob->pose->chanbase.first; pchan != NULL; pchan = pchan->next) {

View File

@ -470,7 +470,8 @@ enum {
};
static const EnumPropertyItem prop_select_linked_types[] = {
//{OBJECT_SELECT_LINKED_IPO, "IPO", 0, "Object IPO", ""}, // XXX deprecated animation system stuff...
/* XXX deprecated animation system stuff. */
// {OBJECT_SELECT_LINKED_IPO, "IPO", 0, "Object IPO", ""},
{OBJECT_SELECT_LINKED_OBDATA, "OBDATA", 0, "Object Data", ""},
{OBJECT_SELECT_LINKED_MATERIAL, "MATERIAL", 0, "Material", ""},
{OBJECT_SELECT_LINKED_DUPGROUP, "DUPGROUP", 0, "Instanced Collection", ""},

View File

@ -281,7 +281,9 @@ void OBJECT_OT_shaderfx_add(wmOperatorType *ot)
BLT_I18NCONTEXT_ID_ID); /* Abused, for "Light"... */
}
/************************ generic functions for operators using names and data context *********************/
/* -------------------------------------------------------------------- */
/** \name Generic Functions for Operators Using Names and Data Context
* \{ */
static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
{
@ -353,6 +355,8 @@ static ShaderFxData *edit_shaderfx_property_get(wmOperator *op, Object *ob, int
return fx;
}
/** \} */
/************************ remove shaderfx operator *********************/
static int shaderfx_remove_exec(bContext *C, wmOperator *op)

View File

@ -126,7 +126,8 @@ static void object_clear_rot(Object *ob, const bool clear_delta)
ob->drotAxis[2] = 0.0f;
}
/* check validity of axis - axis should never be 0,0,0 (if so, then we make it rotate about y) */
/* Check validity of axis - axis should never be 0,0,0
* (if so, then we make it rotate about y). */
if (IS_EQF(ob->rotAxis[0], ob->rotAxis[1]) && IS_EQF(ob->rotAxis[1], ob->rotAxis[2]))
ob->rotAxis[1] = 1.0f;
if (IS_EQF(ob->drotAxis[0], ob->drotAxis[1]) && IS_EQF(ob->drotAxis[1], ob->drotAxis[2]) &&
@ -1385,11 +1386,12 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
* - campbell.
* \{ */
/* When using multiple objects, apply their relative rotational offset to the active object. */
/** When using multiple objects, apply their relative rotational offset to the active object. */
#define USE_RELATIVE_ROTATION
/* Disable overlays, ignoring user setting (light wire gets in the way). */
/** Disable overlays, ignoring user setting (light wire gets in the way). */
#define USE_RENDER_OVERRIDE
/* Calculate a depth if the cursor isn't already over a depth (not essential but feels buggy without). */
/** Calculate a depth if the cursor isn't already over a depth
* (not essential but feels buggy without). */
#define USE_FAKE_DEPTH_INIT
struct XFormAxisItem {

View File

@ -245,7 +245,8 @@ bool ED_vgroup_parray_alloc(ID *id,
* For use with tools that use ED_vgroup_parray_alloc with \a use_vert_sel == true.
* This finds the unselected mirror deform verts and copies the weights to them from the selected.
*
* \note \a dvert_array has mirrored weights filled in, in case cleanup operations are needed on both.
* \note \a dvert_array has mirrored weights filled in,
* in case cleanup operations are needed on both.
*/
void ED_vgroup_parray_mirror_sync(Object *ob,
MDeformVert **dvert_array,
@ -376,7 +377,8 @@ bool ED_vgroup_array_copy(Object *ob, Object *ob_from)
if (ob == ob_from)
return true;
/* in case we copy vgroup between two objects using same data, we only have to care about object side of things. */
/* In case we copy vgroup between two objects using same data,
* we only have to care about object side of things. */
if (ob->data != ob_from->data) {
ED_vgroup_parray_alloc(ob_from->data, &dvert_array_from, &dvert_tot_from, false);
ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false);
@ -1227,8 +1229,9 @@ static int *getSurroundingVerts(Mesh *me, int vert, int *count)
return verts;
}
/* get a single point in space by averaging a point cloud (vectors of size 3)
* coord is the place the average is stored, points is the point cloud, count is the number of points in the cloud
/* Get a single point in space by averaging a point cloud (vectors of size 3)
* coord is the place the average is stored,
* points is the point cloud, count is the number of points in the cloud.
*/
static void getSingleCoordinate(MVert *points, int count, float coord[3])
{

View File

@ -3256,8 +3256,8 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
/* NOTE: this is not nice to use tessfaces but hard to avoid since pa->num uses tessfaces */
BKE_mesh_tessface_ensure(me);
/* Note: In case psys uses Mesh tessface indices, we mirror final Mesh itself, not orig mesh. Avoids an (impossible)
* mesh -> orig -> mesh tessface indices conversion... */
/* NOTE: In case psys uses Mesh tessface indices, we mirror final Mesh itself, not orig mesh.
* Avoids an (impossible) mesh -> orig -> mesh tessface indices conversion. */
mirrorfaces = mesh_get_x_mirror_faces(
ob, NULL, use_dm_final_indices ? psmd_eval->mesh_final : NULL);
@ -3350,7 +3350,8 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
}
/* assign face index */
/* NOTE: mesh_get_x_mirror_faces generates -1 for non-found mirror, same as DMCACHE_NOTFOUND... */
/* NOTE: mesh_get_x_mirror_faces generates -1 for non-found mirror,
* same as DMCACHE_NOTFOUND. */
newpa->num = mirrorfaces[pa_num * 2];
if (use_dm_final_indices) {

View File

@ -1066,8 +1066,10 @@ static bool copy_particle_systems_to_object(const bContext *C,
* the final DM of the object without particles.
* However, when evaluating the DM all the particle modifiers must be valid,
* i.e. have the psys assigned already.
* To break this hen/egg problem we create all psys separately first (to collect required customdata masks),
* then create the DM, then add them to the object and make the psys modifiers ...
*
* To break this hen/egg problem we create all psys separately first
* (to collect required customdata masks),
* then create the DM, then add them to the object and make the psys modifiers.
*/
#define PSYS_FROM_FIRST (single_psys_from ? single_psys_from : ob_from->particlesystem.first)
#define PSYS_FROM_NEXT(cur) (single_psys_from ? NULL : (cur)->next)

View File

@ -701,7 +701,8 @@ static bool fluid_init_filepaths(Main *bmain,
const bool dir_exists = BLI_dir_create_recursive(targetDir);
const bool is_writable = BLI_file_is_writable(targetFile);
/* We change path to some presumably valid default value, but do not allow bake process to continue,
/* We change path to some presumably valid default value,
* but do not allow bake process to continue,
* this gives user chance to set manually another path. */
if (!dir_exists || !is_writable) {
modifier_path_init(domainSettings->surfdataPath,
@ -817,7 +818,13 @@ static int runSimulationCallback(void *data, int status, int frame)
if (status == FLUIDSIM_CBSTATUS_NEWFRAME) {
fluidbake_updatejob(fb, frame / (float)settings->noOfFrames);
//printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n", status, frame, settings->domainId, settings->noOfFrames ); // DEBUG
# if 0
printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n",
status,
frame,
settings->domainId,
settings->noOfFrames); // DEBUG
# endif
}
if (fluidbake_breakjob(fb)) {
@ -940,7 +947,8 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
elbeemDebugOut(debugStrBuffer);
}
/* make sure it corresponds to startFrame setting (old: noFrames = scene->r.efra - scene->r.sfra +1) */
/* Make sure it corresponds to startFrame setting
* (old: noFrames = scene->r.efra - scene->r.sfra +1). */
;
noFrames = scene->r.efra - 0;
if (noFrames <= 0) {
@ -1017,9 +1025,9 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
return false;
}
channels->length =
scene->r
.efra; // DG TODO: why using endframe and not "noFrames" here? .. because "noFrames" is buggy too? (not using sfra)
/* DG TODO: why using endframe and not "noFrames" here?
* because "noFrames" is buggy too? (not using sfra) */
channels->length = scene->r.efra;
channels->aniFrameTime = (double)((double)domainSettings->animEnd -
(double)domainSettings->animStart) /
(double)noFrames;

View File

@ -1332,7 +1332,8 @@ void ED_preview_icon_job(
icon_preview_add_size(ip, rect, sizex, sizey);
/* Special threading hack: warn main code that this preview is being rendered and cannot be freed... */
/* Special threading hack:
* warn main code that this preview is being rendered and cannot be freed... */
{
PreviewImage *prv_img = owner;
if (prv_img->tag & PRV_TAG_DEFFERED) {
@ -1363,7 +1364,8 @@ void ED_preview_shader_job(const bContext *C,
Scene *scene = CTX_data_scene(C);
short id_type = GS(id->name);
/* Use workspace render only for buttons Window, since the other previews are related to the datablock. */
/* Use workspace render only for buttons Window,
* since the other previews are related to the datablock. */
if (!check_engine_supports_preview(scene)) {
return;

View File

@ -554,7 +554,8 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
at->draw(C, ar);
}
/* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */
/* XXX test: add convention to end regions always in pixel space,
* for drawing of borders/gestures etc */
ED_region_pixelspace(ar);
ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
@ -2390,7 +2391,8 @@ void ED_region_panels_layout_ex(
}
}
else if (vertical) {
/* we always keep the scroll offset - so the total view gets increased with the scrolled away part */
/* We always keep the scroll offset -
* so the total view gets increased with the scrolled away part. */
if (v2d->cur.ymax < -FLT_EPSILON) {
/* Clamp to lower view boundary */
if (v2d->tot.ymin < -v2d->winy) {
@ -2525,7 +2527,8 @@ void ED_region_header_layout(const bContext *C, ARegion *ar)
int yco = buttony + (ar->winy - buttony) / 2;
int maxco = xco;
/* XXX workaround for 1 px alignment issue. Not sure what causes it... Would prefer a proper fix - Julian */
/* XXX workaround for 1 px alignment issue. Not sure what causes it...
* Would prefer a proper fix - Julian */
if (!ELEM(CTX_wm_area(C)->spacetype, SPACE_TOPBAR, SPACE_STATUSBAR)) {
yco -= 1;
}

View File

@ -351,7 +351,8 @@ void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state,
/* NOTE: Weirdly enough this is only required on macOS. Without this there is some sort of
* bleeding of data is happening from tiles which are drawn later on.
* This doesn't seem to be too slow, but still would be nice to have fast and nice solution. */
* This doesn't seem to be too slow,
* but still would be nice to have fast and nice solution. */
#ifdef __APPLE__
GPU_flush();
#endif
@ -494,7 +495,8 @@ float bglPolygonOffsetCalc(const float winmat[16], float viewdist, float dist)
/* This adjustment effectively results in reducing the Z value by 0.25%.
*
* winmat[14] actually evaluates to `-2 * far * near / (far - near)`,
* is very close to -0.2 with default clip range, and is used as the coefficient multiplied by `w / z`,
* is very close to -0.2 with default clip range,
* and is used as the coefficient multiplied by `w / z`,
* thus controlling the z dependent part of the depth value.
*/
return winmat[14] * -0.0025f * dist;

View File

@ -566,9 +566,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "gpencil_data")) {
/* FIXME: for some reason, CTX_data_active_object(C) returns NULL when called from these situations
* (as outlined above - see Campbell's #ifdefs). That causes the get_active function to fail when
* called from context. For that reason, we end up using an alternative where we pass everything in!
/* FIXME: for some reason, CTX_data_active_object(C) returns NULL when called from these
* situations (as outlined above - see Campbell's #ifdefs).
* That causes the get_active function to fail when called from context.
* For that reason, we end up using an alternative where we pass everything in!
*/
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, sa, scene, obact);
@ -578,8 +579,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "gpencil_data_owner")) {
/* pointer to which data/datablock owns the reference to the Grease Pencil data being used (as gpencil_data)
* XXX: see comment for gpencil_data case...
/* Pointer to which data/datablock owns the reference to the Grease Pencil data being used
* (as gpencil_data).
* XXX: see comment for gpencil_data case.
*/
bGPdata **gpd_ptr = NULL;
PointerRNA ptr;

View File

@ -540,7 +540,8 @@ void ED_screen_draw_split_preview(ScrArea *sa, const int dir, const float fac)
/* Screen Thumbnail Preview */
/**
* Calculates a scale factor to squash the preview for \a screen into a rectangle of given size and aspect.
* Calculates a scale factor to squash the preview for \a screen into a rectangle
* of given size and aspect.
*/
static void screen_preview_scale_get(
const bScreen *screen, float size_x, float size_y, const float asp[2], float r_scale[2])
@ -588,7 +589,8 @@ static void screen_preview_draw_areas(const bScreen *screen,
static void screen_preview_draw(const bScreen *screen, int size_x, int size_y)
{
const float asp[2] = {1.0f, 0.8f}; /* square previews look a bit ugly */
/* could use theme color (tui.wcol_menu_item.text), but then we'd need to regenerate all previews when changing */
/* could use theme color (tui.wcol_menu_item.text),
* but then we'd need to regenerate all previews when changing. */
const float col[4] = {1.0f, 1.0f, 1.0f, 1.0f};
float scale[2];

View File

@ -84,7 +84,8 @@ bool screen_geom_edge_is_horizontal(ScrEdge *se)
}
/**
* \param bounds_rect: Either window or screen bounds. Used to exclude edges along window/screen edges.
* \param bounds_rect: Either window or screen bounds.
* Used to exclude edges along window/screen edges.
*/
ScrEdge *screen_geom_area_map_find_active_scredge(const ScrAreaMap *area_map,
const rcti *bounds_rect,
@ -225,7 +226,8 @@ void screen_geom_vertices_scale(const wmWindow *win, bScreen *sc)
}
}
/* Global areas have a fixed size that only changes with the DPI. Here we ensure that exactly this size is set. */
/* Global areas have a fixed size that only changes with the DPI.
* Here we ensure that exactly this size is set. */
for (ScrArea *area = win->global_areas.areabase.first; area; area = area->next) {
if (area->global->flag & GLOBAL_AREA_IS_HIDDEN) {
continue;

View File

@ -4274,7 +4274,8 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
/* Recalculate the time-step for the timer now that we've finished calculating this,
* since the frames-per-second value may have been changed.
*/
/* TODO: this may make evaluation a bit slower if the value doesn't change... any way to avoid this? */
/* TODO: this may make evaluation a bit slower if the value doesn't change...
* any way to avoid this? */
wt->timestep = (1.0 / FPS);
return OPERATOR_FINISHED;
@ -4620,7 +4621,8 @@ static int drivers_editor_show_invoke(bContext *C, wmOperator *op, const wmEvent
ANIM_set_active_channel(&ac, ac.data, ac.datatype, filter, fcu, ANIMTYPE_FCURVE);
}
else {
/* Just blindly isolate... This isn't the best, and shouldn't happen, but may be enough... */
/* Just blindly isolate...
* This isn't the best, and shouldn't happen, but may be enough. */
fcu->flag |= (FCURVE_ACTIVE | FCURVE_SELECTED);
}
}

View File

@ -109,7 +109,8 @@ static WorkSpaceLayout *workspace_change_get_new_layout(Main *bmain,
WorkSpace *workspace_new,
wmWindow *win)
{
/* ED_workspace_duplicate may have stored a layout to activate once the workspace gets activated. */
/* ED_workspace_duplicate may have stored a layout to activate
* once the workspace gets activated. */
WorkSpaceLayout *layout_old = WM_window_get_active_layout(win);
WorkSpaceLayout *layout_new;
bScreen *screen_new;
@ -158,7 +159,8 @@ bool ED_workspace_change(WorkSpace *workspace_new, bContext *C, wmWindowManager
win->workspace_hook->temp_layout_store = NULL;
if (workspace_old == workspace_new) {
/* Could also return true, everything that needs to be done was done (nothing :P), but nothing changed */
/* Could also return true, everything that needs to be done was done (nothing :P),
* but nothing changed */
return false;
}

View File

@ -194,8 +194,8 @@ static void load_tex_task_cb_ex(void *__restrict userdata,
len = sqrtf(x * x + y * y);
if (ELEM(mtex->brush_map_mode, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_STENCIL) || len <= 1.0f) {
/* it is probably worth optimizing for those cases where the texture is not rotated by skipping the calls to
* atan2, sqrtf, sin, and cos. */
/* It is probably worth optimizing for those cases where the texture is not rotated by
* skipping the calls to atan2, sqrtf, sin, and cos. */
if (mtex->tex && (rotation > 0.001f || rotation < -0.001f)) {
const float angle = atan2f(y, x) + rotation;

View File

@ -81,8 +81,10 @@
#include "paint_intern.h"
/* This is a static resource for non-global access.
* Maybe it should be exposed as part of the paint operation, but for now just give a public interface.
/**
* This is a static resource for non-global access.
* Maybe it should be exposed as part of the paint operation,
* but for now just give a public interface.
*/
static ImagePaintPartialRedraw imapaintpartial = {0, 0, 0, 0, 0};

View File

@ -1131,7 +1131,8 @@ static bool check_seam(const ProjPaintState *ps,
i1_fidx = BKE_MESH_TESSTRI_VINDEX_ORDER(lt_vtri, i1);
i2_fidx = BKE_MESH_TESSTRI_VINDEX_ORDER(lt_vtri, i2);
/* Only need to check if 'i2_fidx' is valid because we know i1_fidx is the same vert on both faces */
/* Only need to check if 'i2_fidx' is valid because
* we know i1_fidx is the same vert on both faces. */
if (i2_fidx != -1) {
const float *lt_tri_uv[3] = {PS_LOOPTRI_AS_UV_3(ps->poly_to_loop_uv, lt)};
Image *tpage = project_paint_face_paint_image(ps, tri_index);
@ -1392,11 +1393,11 @@ static void insert_seam_vert_array(const ProjPaintState *ps,
}
}
/*
* Be tricky with flags, first 4 bits are PROJ_FACE_SEAM0 to 4, last 4 bits are PROJ_FACE_NOSEAM0 to 4
* 1<<i - where i is (0-3)
/**
* Be tricky with flags, first 4 bits are #PROJ_FACE_SEAM0 to 4,
* last 4 bits are #PROJ_FACE_NOSEAM0 to 4. `1 << i` - where i is `(0..3)`.
*
* If we're multithreadng, make sure threads are locked when this is called
* If we're multithreadng, make sure threads are locked when this is called.
*/
static void project_face_seams_init(const ProjPaintState *ps,
MemArena *arena,
@ -1427,7 +1428,8 @@ static void project_face_seams_init(const ProjPaintState *ps,
insert_seam_vert_array(ps, arena, tri_index, fidx[0], ibuf_x, ibuf_y);
if (other_face != -1) {
/* Check if the other seam is already set. We don't want to insert it in the list twice. */
/* Check if the other seam is already set.
* We don't want to insert it in the list twice. */
if ((ps->faceSeamFlags[other_face] & (PROJ_FACE_SEAM0 << other_fidx)) == 0) {
ps->faceSeamFlags[other_face] |= PROJ_FACE_SEAM0 << other_fidx;
insert_seam_vert_array(ps, arena, other_face, other_fidx, ibuf_x, ibuf_y);
@ -2205,17 +2207,21 @@ static float len_squared_v2v2_alt(const float v1[2], const float v2_1, const flo
return x * x + y * y;
}
/* note, use a squared value so we can use len_squared_v2v2
* be sure that you have done a bounds check first or this may fail */
/* only give bucket_bounds as an arg because we need it elsewhere */
/**
* \note Use a squared value so we can use #len_squared_v2v2
* be sure that you have done a bounds check first or this may fail.
*
* Only give \a bucket_bounds as an arg because we need it elsewhere.
*/
static bool project_bucket_isect_circle(const float cent[2],
const float radius_squared,
const rctf *bucket_bounds)
{
/* Would normally to a simple intersection test, however we know the bounds of these 2 already intersect
* so we only need to test if the center is inside the vertical or horizontal bounds on either axis,
* this is even less work then an intersection test
/* Would normally to a simple intersection test,
* however we know the bounds of these 2 already intersect so we only need to test
* if the center is inside the vertical or horizontal bounds on either axis,
* this is even less work then an intersection test.
*/
#if 0
if (BLI_rctf_isect_pt_v(bucket_bounds, cent))
@ -3027,7 +3033,8 @@ static void project_paint_face_init(const ProjPaintState *ps,
&uv_clip_tot,
do_backfacecull || ps->do_occlude);
/* sometimes this happens, better just allow for 8 intersectiosn even though there should be max 6 */
/* Sometimes this happens, better just allow for 8 intersections
* even though there should be max 6 */
#if 0
if (uv_clip_tot > 6) {
printf("this should never happen! %d\n", uv_clip_tot);
@ -3132,7 +3139,12 @@ static void project_paint_face_init(const ProjPaintState *ps,
(face_seam_flag & PROJ_FACE_SEAM_INIT2) == 0) {
project_face_seams_init(ps, arena, tri_index, 0, true, ibuf->x, ibuf->y);
face_seam_flag = ps->faceSeamFlags[tri_index];
//printf("seams - %d %d %d %d\n", flag&PROJ_FACE_SEAM0, flag&PROJ_FACE_SEAM1, flag&PROJ_FACE_SEAM2);
# if 0
printf("seams - %d %d %d %d\n",
flag & PROJ_FACE_SEAM0,
flag & PROJ_FACE_SEAM1,
flag & PROJ_FACE_SEAM2);
# endif
}
if ((face_seam_flag & (PROJ_FACE_SEAM0 | PROJ_FACE_SEAM1 | PROJ_FACE_SEAM2)) == 0) {

View File

@ -354,9 +354,10 @@ typedef struct LassoMaskData {
MaskTaskData task_data;
} LassoMaskData;
/* Lasso select. This could be defined as part of VIEW3D_OT_select_lasso, still the shortcuts conflict,
* so we will use a separate operator */
/**
* Lasso select. This could be defined as part of #VIEW3D_OT_select_lasso,
* still the shortcuts conflict, so we will use a separate operator.
*/
static bool is_effected_lasso(LassoMaskData *data, float co[3])
{
float scr_co_f[2];

View File

@ -553,7 +553,8 @@ static void do_weight_paint_normalize_all_locked_try_active(MDeformVert *dvert,
if (!success) {
/**
* Locks prevented the first pass from full completion, so remove restriction on active group; e.g:
* Locks prevented the first pass from full completion,
* so remove restriction on active group; e.g:
*
* - With 1.0 weight painted into active:
* nonzero locked weight; first pass zeroed out unlocked weight; scale 1 down to fit.
@ -845,15 +846,15 @@ static void do_weight_paint_vertex_single(
dv_mirr, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags, wpi->mirror.lock);
}
else {
/* this case accounts for...
* - painting onto a center vertex of a mesh
* - x mirror is enabled
* - auto normalize is enabled
* - the group you are painting onto has a L / R version
/* This case accounts for:
* - Painting onto a center vertex of a mesh.
* - X-mirror is enabled.
* - Auto normalize is enabled.
* - The group you are painting onto has a L / R version.
*
* We want L/R vgroups to have the same weight but this cant be if both are over 0.5,
* We _could_ have special check for that, but this would need its own normalize function which
* holds 2 groups from changing at once.
* We _could_ have special check for that, but this would need its own
* normalize function which holds 2 groups from changing at once.
*
* So! just balance out the 2 weights, it keeps them equal and everything normalized.
*
@ -1289,7 +1290,8 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
BKE_paint_toolslots_brush_validate(bmain, &ts->wpaint->paint);
}
/* When locked, it's almost impossible to select the pose then the object to enter weight paint mode.
/* When locked, it's almost impossible to select the pose
* then the object to enter weight paint mode.
* In this case move our pose object in/out of pose mode.
* This is in fits with the convention of selecting multiple objects and entering a mode. */
if (scene->toolsettings->object_flag & SCE_OBJECT_MODE_LOCK) {

View File

@ -151,7 +151,7 @@ static bool vertex_paint_from_weight(Object *ob)
}
/* TODO: respect selection. */
/* TODO: Do we want to take weights from evaluated mesh instead? 2.7x was not doing it anyway... */
/* TODO: Do we want to take weights from evaluated mesh instead? 2.7x was not doing it anyway. */
mp = me->mpoly;
vgroup_active = ob->actdef - 1;
for (int i = 0; i < me->totpoly; i++, mp++) {

View File

@ -422,9 +422,10 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob)
BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
/* Disable OpenMP when dynamic-topology is enabled. Otherwise, new entries might be inserted by
* sculpt_undo_push_node() into the GHash used internally by BM_log_original_vert_co() by a different thread.
* See T33787. */
/**
* Disable OpenMP when dynamic-topology is enabled. Otherwise, new entries might be inserted by
* #sculpt_undo_push_node() into the GHash used internally by #BM_log_original_vert_co()
* by a different thread. See T33787. */
SculptThreadedTaskData data = {
.sd = sd,
.ob = ob,
@ -2357,7 +2358,8 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
mul_v3_v3(offset, ss->cache->scale);
mul_v3_fl(offset, bstrength);
/* we divide out the squared alpha and multiply by the squared crease to give us the pinch strength */
/* We divide out the squared alpha and multiply by the squared crease
* to give us the pinch strength. */
crease_correction = brush->crease_pinch_factor * brush->crease_pinch_factor;
brush_alpha = BKE_brush_alpha_get(scene, brush);
if (brush_alpha > 0.0f)
@ -2370,7 +2372,8 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
if (brush->sculpt_tool == SCULPT_TOOL_BLOB)
flippedbstrength *= -1.0f;
/* Use surface normal for 'spvc', so the vertices are pinched towards a line instead of a single point.
/* Use surface normal for 'spvc',
* so the vertices are pinched towards a line instead of a single point.
* Without this we get a 'flat' surface surrounding the pinch */
sculpt_project_v3_cache_init(&spvc, ss->cache->sculpt_normal_symm);
@ -4271,7 +4274,8 @@ static void do_symmetrical_brush_actions(Sculpt *sd,
cache->bstrength = brush_strength(sd, cache, feather, ups);
cache->symmetry = symm;
/* symm is a bit combination of XYZ - 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
/* symm is a bit combination of XYZ -
* 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
for (i = 0; i <= symm; ++i) {
if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
cache->mirror_symmetry_pass = i;
@ -5381,8 +5385,8 @@ static void sculpt_brush_stroke_cancel(bContext *C, wmOperator *op)
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
const Brush *brush = BKE_paint_brush(&sd->paint);
/* XXX Canceling strokes that way does not work with dynamic topology, user will have to do real undo for now.
* See T46456. */
/* XXX Canceling strokes that way does not work with dynamic topology,
* user will have to do real undo for now. See T46456. */
if (ss->cache && !sculpt_stroke_is_dynamic_topology(ss, brush)) {
paint_mesh_restore_co(sd, ob);
}

View File

@ -147,8 +147,10 @@ typedef struct SculptThreadedTaskData {
void *custom_data;
/* Data specific to some callbacks. */
/* Note: even if only one or two of those are used at a time, keeping them separated, names help figuring out
* what it is, and memory overhead is ridiculous anyway... */
/* Note: even if only one or two of those are used at a time,
* keeping them separated, names help figuring out
* what it is, and memory overhead is ridiculous anyway. */
float flippedbstrength;
float angle;
float strength;

View File

@ -306,8 +306,9 @@ static void HC_relaxation_iteration_uv(BMEditMesh *em,
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
float dist;
/* This is supposed to happen only if "Pin Edges" is on, since we have initialization on stroke start
* If ever uv brushes get their own mode we should check for toolsettings option too */
/* This is supposed to happen only if "Pin Edges" is on,
* since we have initialization on stroke start.
* If ever uv brushes get their own mode we should check for toolsettings option too. */
if ((sculptdata->uv[i].flag & MARK_BOUNDARY)) {
continue;
}
@ -375,8 +376,8 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em,
add_v2_v2(tmp_uvdata[tmpedge->uv1].sum_co, sculptdata->uv[tmpedge->uv2].uv);
}
/* Original Lacplacian algorithm included removal of normal component of translation. here it is not
* needed since we translate along the UV plane always.*/
/* Original Lacplacian algorithm included removal of normal component of translation.
* here it is not needed since we translate along the UV plane always. */
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
copy_v2_v2(tmp_uvdata[i].p, tmp_uvdata[i].sum_co);
mul_v2_fl(tmp_uvdata[i].p, 1.f / tmp_uvdata[i].ncounter);
@ -384,8 +385,9 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em,
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
float dist;
/* This is supposed to happen only if "Pin Edges" is on, since we have initialization on stroke start
* If ever uv brushes get their own mode we should check for toolsettings option too */
/* This is supposed to happen only if "Pin Edges" is on,
* since we have initialization on stroke start.
* If ever uv brushes get their own mode we should check for toolsettings option too. */
if ((sculptdata->uv[i].flag & MARK_BOUNDARY)) {
continue;
}
@ -463,8 +465,9 @@ static void uv_sculpt_stroke_apply(bContext *C,
alpha *= invert;
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
float dist, diff[2];
/* This is supposed to happen only if "Lock Borders" is on, since we have initialization on stroke start
* If ever uv brushes get their own mode we should check for toolsettings option too */
/* This is supposed to happen only if "Lock Borders" is on,
* since we have initialization on stroke start.
* If ever uv brushes get their own mode we should check for toolsettings option too. */
if (sculptdata->uv[i].flag & MARK_BOUNDARY) {
continue;
}

View File

@ -170,7 +170,8 @@ static bool action_new_poll(bContext *C)
Scene *scene = CTX_data_scene(C);
/* Check tweakmode is off (as you don't want to be tampering with the action in that case) */
/* NOTE: unlike for pushdown, this operator needs to be run when creating an action from nothing... */
/* NOTE: unlike for pushdown,
* this operator needs to be run when creating an action from nothing... */
if (ED_operator_action_active(C)) {
SpaceAction *saction = (SpaceAction *)CTX_wm_space_data(C);
Object *ob = CTX_data_active_object(C);
@ -242,7 +243,10 @@ static int action_new_exec(bContext *C, wmOperator *UNUSED(op))
}
}
else {
//printf("WARNING: Failed to stash %s. It may already exist in the NLA stack though\n", oldact->id.name);
#if 0
printf("WARNING: Failed to stash %s. It may already exist in the NLA stack though\n",
oldact->id.name);
#endif
}
}
@ -425,7 +429,8 @@ static bool action_stash_create_poll(bContext *C)
AnimData *adt = ED_actedit_animdata_from_context(C);
/* Check tweakmode is off (as you don't want to be tampering with the action in that case) */
/* NOTE: unlike for pushdown, this operator needs to be run when creating an action from nothing... */
/* NOTE: unlike for pushdown,
* this operator needs to be run when creating an action from nothing... */
if (adt) {
if (!(adt->flag & ADT_NLA_EDIT_ON))
return true;
@ -472,7 +477,8 @@ static int action_stash_create_exec(bContext *C, wmOperator *op)
if (BKE_nla_action_stash(adt)) {
bAction *new_action = NULL;
/* create new action not based on the old one (since the "new" operator already does that) */
/* Create new action not based on the old one
* (since the "new" operator already does that). */
new_action = action_create_new(C, NULL);
/* The stash operation will remove the user already,
@ -644,7 +650,8 @@ static int action_unlink_exec(bContext *C, wmOperator *op)
static int action_unlink_invoke(bContext *C, wmOperator *op, const wmEvent *evt)
{
/* NOTE: this is hardcoded to match the behavior for the unlink button (in interface_templates.c) */
/* NOTE: this is hardcoded to match the behavior for the unlink button
* (in interface_templates.c). */
RNA_boolean_set(op->ptr, "force_delete", evt->shift != 0);
return action_unlink_exec(C, op);
}

View File

@ -219,7 +219,8 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const
tmax = BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP);
}
/* try to set cur using these values, if they're more extreme than previously set values */
/* Try to set cur using these values,
* if they're more extreme than previously set values. */
*min = min_ff(*min, tmin);
*max = max_ff(*max, tmax);
found = true;
@ -392,7 +393,8 @@ static int actkeys_viewall(bContext *C, const bool only_sel)
/* set vertical range */
if (only_sel == false) {
/* view all -> the summary channel is usually the shows everything, and resides right at the top... */
/* view all -> the summary channel is usually the shows everything,
* and resides right at the top... */
v2d->cur.ymax = 0.0f;
v2d->cur.ymin = (float)-BLI_rcti_size_y(&v2d->mask);
}
@ -1297,8 +1299,9 @@ static void setipo_action_keys(bAnimContext *ac, short mode)
ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
/* Loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet.
* Currently that's not necessary here.
*/
for (ale = anim_data.first; ale; ale = ale->next) {
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, calchandles_fcurve);
@ -1376,8 +1379,9 @@ static void sethandles_action_keys(bAnimContext *ac, short mode)
ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting flags for handles
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
/* Loop through setting flags for handles
* Note: we do not supply KeyframeEditData to the looper yet.
* Currently that's not necessary here.
*/
for (ale = anim_data.first; ale; ale = ale->next) {
FCurve *fcu = (FCurve *)ale->key_data;
@ -1457,8 +1461,9 @@ static void setkeytype_action_keys(bAnimContext *ac, short mode)
ANIMFILTER_FOREDIT /*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
/* Loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet.
* Currently that's not necessary here.
*/
for (ale = anim_data.first; ale; ale = ale->next) {
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, NULL);

View File

@ -115,8 +115,10 @@ void action_keymap(wmKeyConfig *keyconf)
WM_keymap_ensure(keyconf, "Dopesheet Generic", SPACE_ACTION, 0);
/* channels */
/* Channels are not directly handled by the Action Editor module, but are inherited from the Animation module.
* All the relevant operations, keymaps, drawing, etc. can therefore all be found in that module instead, as these
/* Channels are not directly handled by the Action Editor module,
* but are inherited from the Animation module.
* All the relevant operations, keymaps, drawing, etc.
* can therefore all be found in that module instead, as these
* are all used for the Graph-Editor too.
*/

View File

@ -203,11 +203,13 @@ 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)
/**
* 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.
*/
/* defines for box_select mode */
@ -229,7 +231,8 @@ static void box_select_action(bAnimContext *ac, const rcti rect, short mode, sho
rctf rectf;
float ymin = 0, ymax = (float)(-ACHANNEL_HEIGHT_HALF(ac));
/* convert mouse coordinates to frame ranges and channel coordinates corrected for view pan/zoom */
/* Convert mouse coordinates to frame ranges and channel
* coordinates corrected for view pan/zoom. */
UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin + 2, &rectf.xmin, &rectf.ymin);
UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax - 2, &rectf.xmax, &rectf.ymax);
@ -342,10 +345,12 @@ 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...
/* 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...
*/
if (BLI_rcti_size_x(&rect) >= BLI_rcti_size_y(&rect))
mode = ACTKEYS_BORDERSEL_FRAMERANGE;
@ -409,7 +414,8 @@ static void region_select_action_keys(
rctf rectf, scaled_rectf;
float ymin = 0, ymax = (float)(-ACHANNEL_HEIGHT_HALF(ac));
/* convert mouse coordinates to frame ranges and channel coordinates corrected for view pan/zoom */
/* Convert mouse coordinates to frame ranges and channel
* coordinates corrected for view pan/zoom. */
UI_view2d_region_to_view_rctf(v2d, rectf_view, &rectf);
/* filter data */
@ -1413,8 +1419,8 @@ static void mouse_action_keys(
UI_view2d_listview_view_to_cell(
v2d, 0, ACHANNEL_STEP(ac), 0, (float)ACHANNEL_HEIGHT_HALF(ac), x, y, NULL, &channel_index);
/* x-range to check is +/- 7px for standard keyframe under standard dpi/y-scale (in screen/region-space),
* on either side of mouse click (size of keyframe icon)
/* x-range to check is +/- 7px for standard keyframe under standard dpi/y-scale
* (in screen/region-space), on either side of mouse click (size of keyframe icon).
*/
/* standard channel height (to allow for some slop) */
@ -1509,7 +1515,8 @@ static void mouse_action_keys(
akn = ak->left;
}
/* remove active channel from list of channels for separate treatment (since it's needed later on) */
/* Remove active channel from list of channels for separate treatment
* (since it's needed later on). */
BLI_remlink(&anim_data, ale);
ale->next = ale->prev = NULL;

View File

@ -764,15 +764,15 @@ static void action_refresh(const bContext *C, ScrArea *sa)
{
SpaceAction *saction = (SpaceAction *)sa->spacedata.first;
/* update the state of the animchannels in response to changes from the data they represent
* NOTE: the temp flag is used to indicate when this needs to be done, and will be cleared once handled
*/
/* Update the state of the animchannels in response to changes from the data they represent
* NOTE: the temp flag is used to indicate when this needs to be done,
* and will be cleared once handled. */
if (saction->runtime.flag & SACTION_RUNTIME_FLAG_NEED_CHAN_SYNC) {
ARegion *ar;
/* Perform syncing of channel state incl. selection
* Active action setting also occurs here (as part of anim channel filtering in anim_filter.c)
*/
* Active action setting also occurs here
* (as part of anim channel filtering in anim_filter.c). */
ANIM_sync_animchannels_to_data(C);
saction->runtime.flag &= ~SACTION_RUNTIME_FLAG_NEED_CHAN_SYNC;

View File

@ -689,7 +689,8 @@ void file_draw_list(const bContext *C, ARegion *ar)
filelist_cache_previews_update(files);
/* Handle preview timer here, since it's filelist_file_cache_block() and filelist_cache_previews_update()
/* Handle preview timer here,
* since it's filelist_file_cache_block() and filelist_cache_previews_update()
* which controls previews task. */
{
const bool previews_running = filelist_cache_previews_running(files);

View File

@ -1639,7 +1639,8 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w
numfiles = filelist_files_ensure(sfile->files);
/* Due to async nature of file listing, we may execute this code before `file_refresh()`
* editing entry is available in our listing, so we also have to handle switching to rename mode here. */
* editing entry is available in our listing,
* so we also have to handle switching to rename mode here. */
FileSelectParams *params = ED_fileselect_get_params(sfile);
if ((params->rename_flag &
(FILE_PARAMS_RENAME_PENDING | FILE_PARAMS_RENAME_POSTSCROLL_PENDING)) != 0) {
@ -1657,8 +1658,8 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w
/* if we are not editing, we are done */
if (edit_idx == -1) {
/* Do not invalidate timer if filerename is still pending, we might still be building the filelist
* and yet have to find edited entry... */
/* Do not invalidate timer if filerename is still pending,
* we might still be building the filelist and yet have to find edited entry. */
if (params->rename_flag == 0) {
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), sfile->smoothscroll_timer);
sfile->smoothscroll_timer = NULL;
@ -1693,8 +1694,8 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w
}
numfiles_layout = ED_fileselect_layout_numfiles(sfile->layout, ar);
/* Using margins helps avoiding scrolling to stop when target item is barely visible on one side of the screen
* (i.e. it centers a bit more the target). */
/* Using margins helps avoiding scrolling to stop when target item
* is barely visible on one side of the screen (i.e. it centers a bit more the target). */
int numfiles_layout_margin = max_ii(0, numfiles_layout / 3);
/* check if we have reached our final scroll position */
@ -1702,7 +1703,8 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w
(sfile->scroll_offset < offset + numfiles_layout - numfiles_layout_margin)) {
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), sfile->smoothscroll_timer);
sfile->smoothscroll_timer = NULL;
/* Postscroll (after rename has been validated by user) is done, rename process is totally finisehd, cleanup. */
/* Postscroll (after rename has been validated by user) is done,
* rename process is totally finisehd, cleanup. */
if ((params->rename_flag & FILE_PARAMS_RENAME_POSTSCROLL_ACTIVE) != 0) {
params->renamefile[0] = '\0';
params->rename_flag = 0;
@ -1791,8 +1793,10 @@ void FILE_OT_filepath_drop(wmOperatorType *ot)
RNA_def_string_file_path(ot->srna, "filepath", "Path", FILE_MAX, "", "");
}
/* create a new, non-existing folder name, returns 1 if successful, 0 if name couldn't be created.
* The actual name is returned in 'name', 'folder' contains the complete path, including the new folder name.
/**
* Create a new, non-existing folder name, returns 1 if successful, 0 if name couldn't be created.
* The actual name is returned in 'name', 'folder' contains the complete path,
* including the new folder name.
*/
static int new_folder_path(const char *parent, char *folder, char *name)
{
@ -2270,7 +2274,8 @@ static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
filelist_entry_select_index_set(
sfile->files, idx, FILE_SEL_ADD, FILE_SEL_EDITING, CHECK_ALL);
BLI_strncpy(sfile->params->renamefile, file->relpath, FILE_MAXFILE);
/* We can skip the pending state, as we can directly set FILE_SEL_EDITING on the expected entry here. */
/* We can skip the pending state,
* as we can directly set FILE_SEL_EDITING on the expected entry here. */
sfile->params->rename_flag = FILE_PARAMS_RENAME_ACTIVE;
}
ED_area_tag_redraw(sa);

View File

@ -293,9 +293,11 @@ typedef struct FileList {
struct FileListEntryCache filelist_cache;
/* We need to keep those info outside of actual filelist items, because those are no more persistent
/* We need to keep those info outside of actual filelist items,
* because those are no more persistent
* (only generated on demand, and freed as soon as possible).
* Persistent part (mere list of paths + stat info) is kept as small as possible, and filebrowser-agnostic.
* Persistent part (mere list of paths + stat info)
* is kept as small as possible, and filebrowser-agnostic.
*/
GHash *selection_state;
@ -304,7 +306,8 @@ typedef struct FileList {
struct BlendHandle *libfiledata;
/* Set given path as root directory, if last bool is true may change given string in place to a valid value.
/* Set given path as root directory,
* if last bool is true may change given string in place to a valid value.
* Returns True if valid dir. */
bool (*checkdirf)(struct FileList *, char *, const bool);
@ -1177,8 +1180,8 @@ static void filelist_cache_preview_freef(TaskPool *__restrict UNUSED(pool),
{
FileListEntryPreview *preview = taskdata;
/* If preview->flag is empty, it means that preview has already been generated and added to done queue,
* we do not own it anymore. */
/* If preview->flag is empty, it means that preview has already been generated and
* added to done queue, we do not own it anymore. */
if (preview->flags) {
if (preview->img) {
IMB_freeImBuf(preview->img);
@ -1207,7 +1210,7 @@ static void filelist_cache_previews_clear(FileListEntryCache *cache)
BLI_task_pool_cancel(cache->previews_pool);
while ((preview = BLI_thread_queue_pop_timeout(cache->previews_done, 0))) {
// printf("%s: DONE %d - %s - %p\n", __func__, preview->index, preview->path, preview->img);
// printf("%s: DONE %d - %s - %p\n", __func__, preview->index, preview->path, preview->img);
if (preview->img) {
IMB_freeImBuf(preview->img);
}
@ -1514,8 +1517,10 @@ bool filelist_pending(struct FileList *filelist)
}
/**
* Limited version of full update done by space_file's file_refresh(), to be used by operators and such.
* Ensures given filelist is ready to be used (i.e. it is filtered and sorted), unless it is tagged for a full refresh.
* Limited version of full update done by space_file's file_refresh(),
* to be used by operators and such.
* Ensures given filelist is ready to be used (i.e. it is filtered and sorted),
* unless it is tagged for a full refresh.
*/
int filelist_files_ensure(FileList *filelist)
{
@ -1717,7 +1722,11 @@ static void filelist_file_cache_block_release(struct FileList *filelist,
for (i = 0; i < size; i++, cursor++) {
FileDirEntry *entry = cache->block_entries[cursor];
// printf("%s: release cacheidx %d (%%p %%s)\n", __func__, cursor/*, cache->block_entries[cursor], cache->block_entries[cursor]->relpath*/);
#if 0
printf("%s: release cacheidx %d (%%p %%s)\n",
__func__,
cursor /*, cache->block_entries[cursor], cache->block_entries[cursor]->relpath*/);
#endif
BLI_ghash_remove(cache->uuids, entry->uuid, NULL, NULL);
filelist_file_release_entry(filelist, entry);
#ifndef NDEBUG
@ -1828,8 +1837,12 @@ bool filelist_file_cache_block(struct FileList *filelist, const int index)
int size2 = 0;
int idx1, idx2 = 0;
// printf("\tcache releasing: [%d:%d] (%d)\n",
// cache->block_end_index - size1, cache->block_end_index, cache->block_cursor);
#if 0
printf("\tcache releasing: [%d:%d] (%d)\n",
cache->block_end_index - size1,
cache->block_end_index,
cache->block_cursor);
#endif
idx1 = (cache->block_cursor + end_index - cache->block_start_index) % cache_size;
if (idx1 + size1 > cache_size) {
@ -1988,8 +2001,8 @@ bool filelist_cache_previews_update(FileList *filelist)
// printf("%s: %d - %s - %p\n", __func__, preview->index, preview->path, preview->img);
if (preview->img) {
/* Due to asynchronous process, a preview for a given image may be generated several times, i.e.
* entry->image may already be set at this point. */
/* Due to asynchronous process, a preview for a given image may be generated several times,
* i.e. entry->image may already be set at this point. */
if (entry && !entry->image) {
entry->image = preview->img;
changed = true;
@ -2275,7 +2288,8 @@ static unsigned int groupname_to_filter_id(const char *group)
}
/**
* From here, we are in 'Job Context', i.e. have to be careful about sharing stuff between background working thread
* From here, we are in 'Job Context',
* i.e. have to be careful about sharing stuff between background working thread.
* and main one (used by UI among other things).
*/
typedef struct TodoDir {
@ -2519,10 +2533,14 @@ static void filelist_readjob_main_rec(Main *bmain, FileList *filelist)
# if 0 /* XXX TODO show the selection status of the objects */
if (!filelist->has_func) { /* F4 DATA BROWSE */
if (idcode == ID_OB) {
if ( ((Object *)id)->flag & SELECT) files->entry->selflag |= FILE_SEL_SELECTED;
if ( ((Object *)id)->flag & SELECT) {
files->entry->selflag |= FILE_SEL_SELECTED;
}
}
else if (idcode == ID_SCE) {
if ( ((Scene *)id)->r.scemode & R_BG_RENDER) files->entry->selflag |= FILE_SEL_SELECTED;
if ( ((Scene *)id)->r.scemode & R_BG_RENDER) {
files->entry->selflag |= FILE_SEL_SELECTED;
}
}
}
# endif
@ -2533,10 +2551,20 @@ static void filelist_readjob_main_rec(Main *bmain, FileList *filelist)
idcode == ID_IM) {
files->typeflag |= FILE_TYPE_IMAGE;
}
// if (id->lib && fake) BLI_snprintf(files->extra, sizeof(files->entry->extra), "LF %d", id->us);
// else if (id->lib) BLI_snprintf(files->extra, sizeof(files->entry->extra), "L %d", id->us);
// else if (fake) BLI_snprintf(files->extra, sizeof(files->entry->extra), "F %d", id->us);
// else BLI_snprintf(files->extra, sizeof(files->entry->extra), " %d", id->us);
# if 0
if (id->lib && fake) {
BLI_snprintf(files->extra, sizeof(files->entry->extra), "LF %d", id->us);
}
else if (id->lib) {
BLI_snprintf(files->extra, sizeof(files->entry->extra), "L %d", id->us);
}
else if (fake) {
BLI_snprintf(files->extra, sizeof(files->entry->extra), "F %d", id->us);
}
else {
BLI_snprintf(files->extra, sizeof(files->entry->extra), " %d", id->us);
}
# endif
if (id->lib) {
if (totlib == 0)

View File

@ -757,8 +757,8 @@ void ED_fileselect_exit(wmWindowManager *wm, ScrArea *sa, SpaceFile *sfile)
}
}
/** Helper used by both main update code, and smoothscroll timer, to try to enable rename editing from
* params->renamefile name. */
/** Helper used by both main update code, and smoothscroll timer,
* to try to enable rename editing from #FileSelectParams.renamefile name. */
void file_params_renamefile_activate(SpaceFile *sfile, FileSelectParams *params)
{
BLI_assert(params->rename_flag != 0);

View File

@ -219,9 +219,8 @@ void fsmenu_entry_refresh_valid(struct FSMenuEntry *fsentry)
if (fsentry->path && fsentry->path[0]) {
#ifdef WIN32
/* XXX Special case, always consider those as valid.
* Thanks to Windows, which can spend five seconds to perform a mere stat() call on those paths...
* See T43684.
*/
* Thanks to Windows, which can spend five seconds to perform a mere stat() call on those paths
* See T43684. */
const char *exceptions[] = {"A:\\", "B:\\", NULL};
const size_t exceptions_len[] = {strlen(exceptions[0]), strlen(exceptions[1]), 0};
int i;
@ -519,11 +518,11 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
#else
# ifdef __APPLE__
{
/* Get mounted volumes better method OSX 10.6 and higher, see: */
/*https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html*/
/* Get mounted volumes better method OSX 10.6 and higher, see:
* https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html */
/* we get all volumes sorted including network and do not relay
* on user-defined finder visibility, less confusing */
/* We get all volumes sorted including network and do not relay
* on user-defined finder visibility, less confusing. */
CFURLRef cfURL = NULL;
CFURLEnumeratorResult result = kCFURLEnumeratorSuccess;

View File

@ -76,8 +76,10 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **
bAnimContext ac;
bAnimListElem *elem = NULL;
/* for now, only draw if we could init the anim-context info (necessary for all animation-related tools)
* to work correctly is able to be correctly retrieved. There's no point showing empty panels?
/* For now, only draw if we could init the anim-context info
* (necessary for all animation-related tools)
* to work correctly is able to be correctly retrieved.
* There's no point showing empty panels?
*/
if (ANIM_animdata_get_context(C, &ac) == 0)
return 0;
@ -869,7 +871,8 @@ static void graph_draw_driven_property_panel(uiLayout *layout, ID *id, FCurve *f
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
/* -> user friendly 'name' for datablock that owns F-Curve */
/* XXX: Actually, we may need the datablock icons only... (e.g. right now will show bone for bone props) */
/* XXX: Actually, we may need the datablock icons only...
* (e.g. right now will show bone for bone props). */
uiItemL(row, id->name + 2, icon);
/* -> user friendly 'name' for F-Curve/driver target */
@ -915,7 +918,8 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
uiItemS(layout);
uiItemS(layout);
/* show expression box if doing scripted drivers, and/or error messages when invalid drivers exist */
/* show expression box if doing scripted drivers,
* and/or error messages when invalid drivers exist */
if (driver->type == DRIVER_TYPE_PYTHON) {
bool bpy_data_expr_error = (strstr(driver->expression, "bpy.data.") != NULL);
bool bpy_ctx_expr_error = (strstr(driver->expression, "bpy.context.") != NULL);
@ -1190,7 +1194,8 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
/* ----------------------------------------------------------------- */
/* panel to show property driven by the driver (in Drivers Editor) - duplicates Active FCurve, but useful for clarity */
/* Panel to show property driven by the driver (in Drivers Editor) - duplicates Active FCurve,
* but useful for clarity. */
static void graph_panel_driven_property(const bContext *C, Panel *pa)
{
bAnimListElem *ale;
@ -1223,7 +1228,8 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* ----------------------------------------------------------------- */
/* poll to make this not show up in the graph editor, as this is only to be used as a popup elsewhere */
/* Poll to make this not show up in the graph editor,
* as this is only to be used as a popup elsewhere. */
static bool graph_panel_drivers_popover_poll(const bContext *C, PanelType *UNUSED(pt))
{
return ED_operator_graphedit_active((bContext *)C) == false;

View File

@ -175,8 +175,9 @@ static void draw_fcurve_selected_keyframe_vertices(
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
/* 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.
*/
if (IN_RANGE(bezt->vec[1][0], (v2d->cur.xmin - fac), (v2d->cur.xmax + fac))) {
if (edit) {
@ -281,9 +282,10 @@ 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
* - 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 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);
@ -484,7 +486,8 @@ static void draw_fcurve_samples(SpaceGraph *sipo, ARegion *ar, FCurve *fcu)
/* Curve ---------------- */
/* helper func - just draw the F-Curve by sampling the visible region (for drawing curves with modifiers) */
/* Helper func - just draw the F-Curve by sampling the visible region
* (for drawing curves with modifiers). */
static void draw_fcurve_curve(
bAnimContext *ac, ID *id, FCurve *fcu_, View2D *v2d, View2DGrid *grid, unsigned int pos)
{
@ -496,8 +499,8 @@ static void draw_fcurve_curve(
short mapping_flag = ANIM_get_normalization_flags(ac);
int i, n;
/* when opening a blend file on a different sized screen or while dragging the toolbar this can happen
* best just bail out in this case */
/* when opening a blend file on a different sized screen or while dragging the toolbar this can
* happen best just bail out in this case. */
UI_view2d_grid_size(grid, &dx, &dy);
if (dx <= 0.0f)
return;
@ -523,7 +526,8 @@ static void draw_fcurve_curve(
*/
/* grid->dx represents the number of 'frames' between gridlines,
* but we divide by U.v2d_min_gridsize to get pixels-steps */
/* TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted? */
/* TODO: perhaps we should have 1.0 frames
* as upper limit so that curves don't get too distorted? */
samplefreq = dx / (U.v2d_min_gridsize * U.pixelsize);
if (sipo->flag & SIPO_BEAUTYDRAW_OFF) {

View File

@ -230,8 +230,8 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = graphkeys_previewrange_exec;
ot->poll =
ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
// XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
ot->poll = ED_operator_graphedit_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -447,7 +447,8 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
/* ghost curves are snapshots of the visible portions of the curves, so set range to be the visible range */
/* Ghost curves are snapshots of the visible portions of the curves,
* so set range to be the visible range. */
v2d = &ac.ar->v2d;
start = (int)v2d->cur.xmin;
end = (int)v2d->cur.xmax;
@ -638,13 +639,17 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
FCurve *fcu = (FCurve *)ale->key_data;
float cfra = (float)CFRA;
/* read value from property the F-Curve represents, or from the curve only?
* - ale->id != NULL: Typically, this means that we have enough info to try resolving the path
* - ale->owner != NULL: If this is set, then the path may not be resolvable from the ID alone,
* so it's easier for now to just read the F-Curve directly.
* (TODO: add the full-blown PointerRNA relative parsing case here...)
* - fcu->driver != NULL: If this is set, then it's a driver. If we don't check for this, we'd end
* up adding the keyframes on a new F-Curve in the action data instead.
/* Read value from property the F-Curve represents, or from the curve only?
*
* - ale->id != NULL:
* Typically, this means that we have enough info to try resolving the path.
* - ale->owner != NULL:
* If this is set, then the path may not be resolvable from the ID alone,
* so it's easier for now to just read the F-Curve directly.
* (TODO: add the full-blown PointerRNA relative parsing case here...)
* - fcu->driver != NULL:
* If this is set, then it's a driver. If we don't check for this, we'd end
* up adding the keyframes on a new F-Curve in the action data instead.
*/
if (ale->id && !ale->owner && !fcu->driver) {
insert_keyframe(ac->bmain,
@ -760,9 +765,9 @@ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op)
/* preserve selection? */
if (RNA_boolean_get(op->ptr, "extend") == false) {
/* deselect all keyframes first, so that we can immediately start manipulating the newly added one(s)
* - only affect the keyframes themselves, as we don't want channels popping in and out...
*/
/* Deselect all keyframes first,
* so that we can immediately start manipulating the newly added one(s)
* - only affect the keyframes themselves, as we don't want channels popping in and out. */
deselect_graph_keys(&ac, false, SELECT_SUBTRACT, false);
}
@ -1755,8 +1760,9 @@ static void setipo_graph_keys(bAnimContext *ac, short mode)
ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
/* Loop through setting BezTriple interpolation
* Note: we do not supply KeyframeEditData to the looper yet.
* Currently that's not necessary here.
*/
for (ale = anim_data.first; ale; ale = ale->next) {
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, calchandles_fcurve);
@ -1826,8 +1832,9 @@ static void seteasing_graph_keys(bAnimContext *ac, short mode)
ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple easing
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
/* Loop through setting BezTriple easing.
* Note: we do not supply KeyframeEditData to the looper yet.
* Currently that's not necessary here.
*/
for (ale = anim_data.first; ale; ale = ale->next) {
ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, set_cb, calchandles_fcurve);
@ -1898,8 +1905,9 @@ static void sethandles_graph_keys(bAnimContext *ac, short mode)
ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting flags for handles
* Note: we do not supply KeyframeEditData to the looper yet. Currently that's not necessary here...
/* Loop through setting flags for handles.
* Note: we do not supply KeyframeEditData to the looper yet.
* Currently that's not necessary here.
*/
for (ale = anim_data.first; ale; ale = ale->next) {
FCurve *fcu = (FCurve *)ale->key_data;
@ -2081,8 +2089,10 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
continue;
}
/* simple method: just treat any difference between keys of greater than 180 degrees as being a flip */
/* FIXME: there are more complicated methods that will be needed to fix more cases than just some */
/* Simple method: just treat any difference between
* keys of greater than 180 degrees as being a flip. */
/* FIXME: there are more complicated methods that
* will be needed to fix more cases than just some */
for (f = 0; f < 3; f++) {
FCurve *fcu = euf->fcurves[f];
BezTriple *bezt, *prev;
@ -2787,7 +2797,13 @@ void GRAPH_OT_fmodifier_copy(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* id-props */
//ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All F-Modifiers", "Copy all the F-Modifiers, instead of just the active one");
#if 0
ot->prop = RNA_def_boolean(ot->srna,
"all",
1,
"All F-Modifiers",
"Copy all the F-Modifiers, instead of just the active one");
#endif
}
/* ******************** Paste F-Modifiers Operator *********************** */
@ -2814,7 +2830,8 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
ANIMFILTER_NODUPLIS);
}
else {
/* This is only if the operator gets called from a hotkey or search - Paste to all visible curves */
/* This is only if the operator gets called from a hotkey or search -
* Paste to all visible curves. */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_SEL |
ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
}

View File

@ -493,9 +493,11 @@ void graphedit_keymap(wmKeyConfig *keyconf)
WM_keymap_ensure(keyconf, "Graph Editor Generic", SPACE_GRAPH, 0);
/* channels */
/* Channels are not directly handled by the Graph Editor module, but are inherited from the Animation module.
* All the relevant operations, keymaps, drawing, etc. can therefore all be found in that module instead, as these
* are all used for the Graph Editor too.
/* Channels are not directly handled by the Graph Editor module,
* but are inherited from the Animation module.
* All the relevant operations, keymaps, drawing, etc.
* can therefore all be found in that module instead,
* as these are all used for the Graph Editor too.
*/
/* keyframes */

Some files were not shown because too many files have changed in this diff Show More