diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 10:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 14:04:51 +0300 |
commit | 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch) | |
tree | e7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/editors/animation | |
parent | c735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff) |
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 104 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 28 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 4 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 16 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 68 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 4 | ||||
-rw-r--r-- | source/blender/editors/animation/drivers.c | 27 | ||||
-rw-r--r-- | source/blender/editors/animation/fmodifier_ui.c | 12 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 25 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_general.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 16 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 9 |
13 files changed, 173 insertions, 148 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 9f56bfd8d40..a9786f28ad5 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -85,7 +85,7 @@ #include "WM_types.h" /* *********************************************** */ -// XXX constant defines to be moved elsewhere? +/* XXX constant defines to be moved elsewhere? */ /* extra padding for lengths (to go under scrollers) */ #define EXTRA_SCROLL_PAD 100.0f @@ -288,7 +288,7 @@ static short acf_generic_indention_1(bAnimContext *UNUSED(ac), bAnimListElem *UN { return 1; } -#if 0 // XXX not used +#if 0 /* XXX not used */ static short acf_generic_indention_2(bAnimContext *ac, bAnimListElem *ale) { return 2; @@ -304,7 +304,7 @@ static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListE if (ale->type == ANIMTYPE_FCURVE) { FCurve *fcu = (FCurve *)ale->data; - // TODO: we need some way of specifying that the indention color should be one less... + /* TODO: we need some way of specifying that the indention color should be one less. */ if (fcu->grp) { indent++; } @@ -562,7 +562,7 @@ static bAnimChannelType ACF_SUMMARY = { /* Scene ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_scene_icon(bAnimListElem *UNUSED(ale)) { return ICON_SCENE_DATA; @@ -810,8 +810,8 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings se case ACHANNEL_SETTING_SELECT: /* selected */ return GET_ACF_FLAG_PTR(base->flag, type); - case ACHANNEL_SETTING_EXPAND: /* expanded */ - return GET_ACF_FLAG_PTR(ob->nlaflag, type); // xxx + case ACHANNEL_SETTING_EXPAND: /* expanded */ + return GET_ACF_FLAG_PTR(ob->nlaflag, type); /* XXX */ case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ @@ -1062,7 +1062,7 @@ static bool acf_fcurve_setting_valid(bAnimContext *ac, return true; } else { - return false; // NOTE: in this special case, we need to draw ICON_ZOOMOUT + return false; /* NOTE: in this special case, we need to draw ICON_ZOOMOUT */ } case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */ @@ -1126,7 +1126,7 @@ static bAnimChannelType ACF_FCURVE = { acf_generic_channel_color, /* backdrop color */ acf_generic_channel_backdrop, /* backdrop */ acf_generic_indention_flexible, - /* indent level */ // xxx rename this to f-curves only? + /* indent level */ /* XXX rename this to f-curves only? */ acf_generic_group_offset, /* offset */ acf_fcurve_name, /* name */ @@ -1145,7 +1145,7 @@ static void acf_nla_controls_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3]) { - // TODO: give this its own theme setting? + /* TODO: give this its own theme setting? */ UI_GetThemeColorShade3fv(TH_GROUP, 55, r_color); } @@ -1187,7 +1187,7 @@ static bool acf_nla_controls_setting_valid(bAnimContext *UNUSED(ac), case ACHANNEL_SETTING_EXPAND: return true; - // TODO: selected? + /* TODO: selected? */ default: /* unsupported */ return false; @@ -1290,7 +1290,7 @@ static bAnimChannelType ACF_NLACURVE = { /* Object Action Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_fillactd_icon(bAnimListElem *UNUSED(ale)) { return ICON_ACTION; @@ -1380,7 +1380,7 @@ static bAnimChannelType ACF_FILLACTD = { /* Drivers Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_filldrivers_icon(bAnimListElem *UNUSED(ale)) { return ICON_DRIVER; @@ -1392,7 +1392,7 @@ static void acf_filldrivers_name(bAnimListElem *UNUSED(ale), char *name) } /* check if some setting exists for this channel */ -// TODO: this could be made more generic +/* TODO: this could be made more generic */ static bool acf_filldrivers_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), eAnimChannel_Settings setting) @@ -1465,7 +1465,7 @@ static bAnimChannelType ACF_FILLDRIVERS = { /* Material Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsmat_icon(bAnimListElem *UNUSED(ale)) { return ICON_MATERIAL_DATA; @@ -1544,7 +1544,7 @@ static bAnimChannelType ACF_DSMAT = { /* Light Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dslight_icon(bAnimListElem *UNUSED(ale)) { return ICON_LIGHT_DATA; @@ -1625,17 +1625,17 @@ static bAnimChannelType ACF_DSLIGHT = { /* Texture Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dstex_icon(bAnimListElem *UNUSED(ale)) { return ICON_TEXTURE_DATA; } /* offset for texture expanders */ -// FIXME: soon to be obsolete? +/* FIXME: soon to be obsolete? */ static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale)) { - return 14; // XXX: simply include this in indention instead? + return 14; /* XXX: simply include this in indention instead? */ } /* get the appropriate flag(s) for the setting when it is valid */ @@ -1711,7 +1711,7 @@ static bAnimChannelType ACF_DSTEX = { /* Camera Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dscachefile_icon(bAnimListElem *ale) { UNUSED_VARS(ale); @@ -1794,7 +1794,7 @@ static bAnimChannelType ACF_DSCACHEFILE = { /* Camera Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dscam_icon(bAnimListElem *UNUSED(ale)) { return ICON_CAMERA_DATA; @@ -1877,7 +1877,7 @@ static bAnimChannelType ACF_DSCAM = { /* Curve Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dscur_icon(bAnimListElem *ale) { Curve *cu = (Curve *)ale->data; @@ -1966,7 +1966,7 @@ static bAnimChannelType ACF_DSCUR = { /* Shape Key Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsskey_icon(bAnimListElem *UNUSED(ale)) { return ICON_SHAPEKEY_DATA; @@ -2064,7 +2064,7 @@ static bAnimChannelType ACF_DSSKEY = { /* World Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dswor_icon(bAnimListElem *UNUSED(ale)) { return ICON_WORLD_DATA; @@ -2143,7 +2143,7 @@ static bAnimChannelType ACF_DSWOR = { /* Particle Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dspart_icon(bAnimListElem *UNUSED(ale)) { return ICON_PARTICLE_DATA; @@ -2222,7 +2222,7 @@ static bAnimChannelType ACF_DSPART = { /* MetaBall Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsmball_icon(bAnimListElem *UNUSED(ale)) { return ICON_META_DATA; @@ -2303,7 +2303,7 @@ static bAnimChannelType ACF_DSMBALL = { /* Armature Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsarm_icon(bAnimListElem *UNUSED(ale)) { return ICON_ARMATURE_DATA; @@ -2382,7 +2382,7 @@ static bAnimChannelType ACF_DSARM = { /* NodeTree Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsntree_icon(bAnimListElem *UNUSED(ale)) { return ICON_NODETREE; @@ -2555,7 +2555,7 @@ static bAnimChannelType ACF_DSLINESTYLE = { /* Mesh Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsmesh_icon(bAnimListElem *UNUSED(ale)) { return ICON_MESH_DATA; @@ -2621,7 +2621,7 @@ static bAnimChannelType ACF_DSMESH = { acf_generic_dataexpand_color, /* backdrop color */ acf_generic_dataexpand_backdrop, /* backdrop */ acf_generic_indention_1, - /* indent level */ // XXX this only works for compositing + /* indent level */ /* XXX this only works for compositing */ acf_generic_basic_offset, /* offset */ acf_generic_idblock_name, /* name */ @@ -2635,7 +2635,7 @@ static bAnimChannelType ACF_DSMESH = { /* Lattice Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dslat_icon(bAnimListElem *UNUSED(ale)) { return ICON_LATTICE_DATA; @@ -2701,7 +2701,7 @@ static bAnimChannelType ACF_DSLAT = { acf_generic_dataexpand_color, /* backdrop color */ acf_generic_dataexpand_backdrop, /* backdrop */ acf_generic_indention_1, - /* indent level */ // XXX this only works for compositing + /* indent level */ /* XXX this only works for compositing */ acf_generic_basic_offset, /* offset */ acf_generic_idblock_name, /* name */ @@ -2715,7 +2715,7 @@ static bAnimChannelType ACF_DSLAT = { /* Speaker Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsspk_icon(bAnimListElem *UNUSED(ale)) { return ICON_SPEAKER; @@ -2794,7 +2794,7 @@ static bAnimChannelType ACF_DSSPK = { /* Hair Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dshair_icon(bAnimListElem *UNUSED(ale)) { return ICON_HAIR_DATA; @@ -2873,7 +2873,7 @@ static bAnimChannelType ACF_DSHAIR = { /* PointCloud Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dspointcloud_icon(bAnimListElem *UNUSED(ale)) { return ICON_POINTCLOUD_DATA; @@ -2954,7 +2954,7 @@ static bAnimChannelType ACF_DSPOINTCLOUD = { /* Volume Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsvolume_icon(bAnimListElem *UNUSED(ale)) { return ICON_VOLUME_DATA; @@ -3113,7 +3113,7 @@ static bAnimChannelType ACF_DSSIMULATION = { /* GPencil Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsgpencil_icon(bAnimListElem *UNUSED(ale)) { return ICON_GREASEPENCIL; @@ -3194,7 +3194,7 @@ static bAnimChannelType ACF_DSGPENCIL = { /* World Expander ------------------------------------------- */ -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_dsmclip_icon(bAnimListElem *UNUSED(ale)) { return ICON_SEQUENCE; @@ -3397,7 +3397,7 @@ static void acf_gpd_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color); } -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_gpd_icon(bAnimListElem *UNUSED(ale)) { return ICON_GREASEPENCIL; @@ -3576,7 +3576,7 @@ static void acf_mask_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color); } -// TODO: just get this from RNA? +/* TODO: just get this from RNA? */ static int acf_mask_icon(bAnimListElem *UNUSED(ale)) { return ICON_MOD_MASK; @@ -3875,7 +3875,7 @@ static bAnimChannelType ACF_NLATRACK = { acf_generic_channel_backdrop, /* backdrop */ acf_generic_indention_flexible, /* indent level */ acf_generic_group_offset, - /* offset */ // XXX? + /* offset */ /* XXX? */ acf_nlatrack_name, /* name */ acf_nlatrack_name_prop, /* name prop */ @@ -3970,7 +3970,7 @@ static void acf_nlaaction_name(bAnimListElem *ale, char *name) if (name) { if (act) { - // TODO: add special decoration when doing this in tweaking mode? + /* TODO: add special decoration when doing this in tweaking mode? */ BLI_strncpy(name, act->id.name + 2, ANIM_CHAN_NAME_SIZE); } else { @@ -4027,7 +4027,7 @@ static int acf_nlaaction_setting_flag(bAnimContext *UNUSED(ac), switch (setting) { case ACHANNEL_SETTING_PINNED: /* pinned - map/unmap */ - *neg = true; // XXX + *neg = true; /* XXX */ return ADT_NLA_EDIT_NOMAP; default: /* unsupported */ @@ -4054,7 +4054,7 @@ static bAnimChannelType ACF_NLAACTION = { acf_nlaaction_backdrop, /* backdrop */ acf_generic_indention_flexible, /* indent level */ acf_generic_group_offset, - /* offset */ // XXX? + /* offset */ /* XXX? */ acf_nlaaction_name, /* name */ acf_nlaaction_name_prop, /* name prop */ @@ -4328,15 +4328,15 @@ void ANIM_channel_setting_set(bAnimContext *ac, /* --------------------------- */ -// size of icons +/* size of icons */ #define ICON_WIDTH (0.85f * U.widget_unit) -// width of sliders +/* width of sliders */ #define SLIDER_WIDTH (4 * U.widget_unit) -// min-width of rename textboxes +/* min-width of rename textboxes */ #define RENAME_TEXT_MIN_WIDTH (U.widget_unit) -// width of graph editor color bands +/* width of graph editor color bands */ #define GRAPH_COLOR_BAND_WIDTH (0.3f * U.widget_unit) -// extra offset for the visibility icons in the graph editor +/* extra offset for the visibility icons in the graph editor */ #define GRAPH_ICON_VISIBILITY_OFFSET (GRAPH_COLOR_BAND_WIDTH * 1.5f) /* Helper - Check if a channel needs renaming */ @@ -4796,7 +4796,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi /* try to resolve the path stored in the F-Curve */ if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) { /* find or create new F-Curve */ - // XXX is the group name for this ok? + /* XXX is the group name for this ok? */ bAction *act = ED_id_action_ensure(bmain, (ID *)key); FCurve *fcu = ED_action_fcurve_ensure(bmain, act, NULL, &ptr, rna_path, 0); @@ -4945,7 +4945,7 @@ static void draw_setting_widget(bAnimContext *ac, /* --- */ case ACHANNEL_SETTING_PROTECT: /* protected lock */ - // TODO: what about when there's no protect needed? + /* TODO: what about when there's no protect needed? */ // icon = ((enabled) ? ICON_LOCKED : ICON_UNLOCKED); icon = ICON_UNLOCKED; @@ -5241,7 +5241,7 @@ void ANIM_channel_draw_widgets(const bContext *C, /* reset offset - now goes from RHS of panel */ offset = (int)rect->xmax; - // TODO: when drawing sliders, make those draw instead of these toggles if not enough space + /* TODO: when drawing sliders, make those draw instead of these toggles if not enough space. */ if (v2d && !is_being_renamed) { short draw_sliders = 0; @@ -5518,7 +5518,7 @@ void ANIM_channel_draw_widgets(const bContext *C, } } else { /* Special Slider for stuff without RNA Access ---------- */ - // TODO: only implement this case when we really need it... + /* TODO: only implement this case when we really need it... */ } } } diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 6aa8f8d0b27..bb27b0e11d1 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -59,7 +59,7 @@ #include "ED_anim_api.h" #include "ED_armature.h" -#include "ED_keyframes_edit.h" // XXX move the select modes out of there! +#include "ED_keyframes_edit.h" /* XXX move the select modes out of there! */ #include "ED_object.h" #include "ED_screen.h" #include "ED_select_utils.h" @@ -73,7 +73,7 @@ /* -------------------------- Selection ------------------------------------- */ /* Set the given animation-channel as the active one for the active context */ -// TODO: extend for animdata types... +/* TODO: extend for animdata types... */ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, @@ -1470,8 +1470,8 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) rearrange_driver_channels(&ac, adt, mode); break; - case ANIMCONT_ACTION: /* Single Action only... */ - case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME... + case ANIMCONT_ACTION: /* Single Action only... */ + case ANIMCONT_SHAPEKEY: /* DOUBLE CHECK ME... */ { if (adt->action) { rearrange_action_channels(&ac, adt->action, mode); @@ -1939,7 +1939,7 @@ static const EnumPropertyItem prop_animchannel_setflag_types[] = { }; /* defines for set animation-channel settings */ -// TODO: could add some more types, but those are really quite dependent on the mode... +/* TODO: could add some more types, but those are really quite dependent on the mode... */ static const EnumPropertyItem prop_animchannel_settings_types[] = { {ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""}, {ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""}, @@ -1948,12 +1948,14 @@ static const EnumPropertyItem prop_animchannel_settings_types[] = { /* ------------------- */ -/* Set/clear a particular flag (setting) for all selected + visible channels - * setting: the setting to modify - * mode: eAnimChannels_SetFlag - * onlysel: only selected channels get the flag set +/** + * Set/clear a particular flag (setting) for all selected + visible channels + * \param setting: the setting to modify. + * \param mode: eAnimChannels_SetFlag. + * \param onlysel: only selected channels get the flag set. + * + * TODO: enable a setting which turns flushing on/off?. */ -// TODO: enable a setting which turns flushing on/off? static void setflag_anim_channels(bAnimContext *ac, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode, @@ -3295,11 +3297,11 @@ static void ANIM_OT_channels_click(wmOperatorType *ot) /* properties */ /* NOTE: don't save settings, otherwise, can end up with some weird behavior (sticky extend) */ - prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); // SHIFTKEY + prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); /* SHIFTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean( - ot->srna, "children_only", false, "Select Children Only", ""); // CTRLKEY|SHIFTKEY + ot->srna, "children_only", false, "Select Children Only", ""); /* CTRLKEY|SHIFTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); } @@ -3443,7 +3445,7 @@ void ED_operatortypes_animchannels(void) WM_operatortype_append(ANIM_OT_channels_ungroup); } -// TODO: check on a poll callback for this, to get hotkeys into menus +/* TODO: check on a poll callback for this, to get hotkeys into menus */ void ED_keymap_animchannels(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Animation Channels", 0, 0); diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 4fb68b614ff..831de3e7bc4 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) * we'd be calling property update functions here too ... */ DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | - ID_RECALC_ANIMATION); // XXX or do we want something more restrictive? + ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */ } } @@ -121,7 +121,7 @@ void ANIM_id_update(Main *bmain, ID *id) bmain, id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | - ID_RECALC_ANIMATION); // XXX or do we want something more restrictive? + ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */ } } diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 73df0518f06..b2eb41f7480 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -126,8 +126,11 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) /* *************************************************** */ /* SCENE FRAME RANGE */ -/* Draw frame range guides (for scene frame range) in background */ -// TODO: Should we still show these when preview range is enabled? +/** + * Draw frame range guides (for scene frame range) in background. + * + * TODO: Should we still show these when preview range is enabled? + */ void ANIM_draw_framerange(Scene *scene, View2D *v2d) { /* draw darkened area outside of active timeline frame range */ @@ -167,8 +170,11 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d) /* *************************************************** */ /* NLA-MAPPING UTILITIES (required for drawing and also editing keyframes) */ -/* Obtain the AnimData block providing NLA-mapping for the given channel (if applicable) */ -// TODO: do not supply return this if the animdata tells us that there is no mapping to perform +/** + * Obtain the AnimData block providing NLA-mapping for the given channel (if applicable). + * + * TODO: do not supply return this if the animdata tells us that there is no mapping to perform. + */ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) { /* sanity checks */ @@ -182,7 +188,7 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) } /* apart from strictly keyframe-related contexts, this shouldn't even happen */ - // XXX: nla and channel here may not be necessary... + /* XXX: nla and channel here may not be necessary... */ if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_SHAPEKEY, diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index ed119a111be..11581adf919 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -142,7 +142,7 @@ static Key *actedit_get_shapekeys(bAnimContext *ac) } /* XXX pinning is not available in 'ShapeKey' mode... */ - // if (saction->pin) return NULL; + // if (saction->pin) { return NULL; } /* shapekey data is stored with geometry data */ key = BKE_key_from_object(ob); @@ -223,9 +223,11 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction) case SACTCONT_MASK: /* Mask */ /* XXX review how this mode is handled... */ { /* TODO, other methods to get the mask */ - // Sequence *seq = BKE_sequencer_active_get(ac->scene); - // MovieClip *clip = ac->scene->clip; - // struct Mask *mask = seq ? seq->mask : NULL; +#if 0 + Sequence *seq = BKE_sequencer_active_get(ac->scene); + MovieClip *clip = ac->scene->clip; + struct Mask *mask = seq ? seq->mask : NULL; +#endif /* update scene-pointer (no need to check for pinning yet, as not implemented) */ saction->ads.source = (ID *)ac->scene; @@ -562,12 +564,14 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) /* ............................... */ -/* Add a new animation channel, taking into account the "peek" flag, which is used to just check +/** + * Add a new animation channel, taking into account the "peek" flag, which is used to just check * whether any channels will be added (but without needing them to actually get created). * - * ! This causes the calling function to return early if we're only "peeking" for channels + * \warning This causes the calling function to return early if we're only "peeking" for channels. + * + * XXX: ale_statement stuff is really a hack for one special case. It shouldn't really be needed. */ -// XXX: ale_statement stuff is really a hack for one special case. It shouldn't really be needed... #define ANIMCHANNEL_NEW_CHANNEL_FULL( \ channel_data, channel_type, owner_id, fcurve_owner_id, ale_statement) \ if (filter_mode & ANIMFILTER_TMP_PEEK) { \ @@ -681,7 +685,7 @@ static bAnimListElem *make_new_animlistelem(void *data, ale->flag = adt->flag; - // XXX... drivers don't show summary for now + /* XXX drivers don't show summary for now. */ ale->key_data = NULL; ale->datatype = ALE_NONE; break; @@ -921,7 +925,7 @@ static bAnimListElem *make_new_animlistelem(void *data, /* NOTE: we just reuse the same expand filter for this case */ ale->flag = EXPANDED_GPD(gpd); - // XXX: currently, this is only used for access to its animation data + /* XXX: currently, this is only used for access to its animation data */ ale->key_data = (adt) ? adt->action : NULL; ale->datatype = ALE_ACT; @@ -1234,7 +1238,7 @@ static bool fcurve_has_errors(FCurve *fcu) } /* check variables for other things that need linting... */ - // TODO: maybe it would be more efficient just to have a quick flag for this? + /* TODO: maybe it would be more efficient just to have a quick flag for this? */ for (dvar = driver->variables.first; dvar; dvar = dvar->next) { DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) { if (dtar->flag & DTAR_FLAG_INVALID) { @@ -1476,7 +1480,7 @@ static size_t animfilter_action(bAnimContext *ac, } /* do groups */ - // TODO: do nested groups? + /* TODO: do nested groups? */ for (agrp = act->groups.first; agrp; agrp = agrp->next) { /* store reference to last channel of group */ if (agrp->channels.last) { @@ -1725,7 +1729,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac, /* Only include this track if selected in a way consistent * with the filtering requirements. */ if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb))) { - // TODO: consider 'active' too? + /* TODO: consider 'active' too? */ /* owner-id here must be key so that the F-Curve can be resolved... */ ANIMCHANNEL_NEW_CHANNEL(kb, ANIMTYPE_SHAPEKEY, key, NULL); @@ -1735,7 +1739,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac, } else { /* just use the action associated with the shapekey */ - // TODO: somehow manage to pass dopesheet info down here too? + /* TODO: somehow manage to pass dopesheet info down here too? */ if (key->adt) { if (filter_mode & ANIMFILTER_ANIMDATA) { if (ANIMCHANNEL_SELOK(SEL_ANIMDATA(key->adt))) { @@ -1840,8 +1844,11 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data, return items; } -/* Grab all Grease Pencil data-blocks in file. */ -// TODO: should this be amalgamated with the dopesheet filtering code? +/** + * Grab all Grease Pencil data-blocks in file. + * + * TODO: should this be amalgamated with the dope-sheet filtering code? + */ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, void *UNUSED(data), @@ -1930,8 +1937,9 @@ static size_t animdata_filter_ds_gpencil( tmp_items += animfilter_block_data(ac, &tmp_data, ads, &gpd->id, filter_mode); /* add Grease Pencil layers */ - // TODO: do these need a separate expander? - // XXX: what order should these go in? + + /* TODO: do these need a separate expander? + * XXX: what order should these go in? */ } END_ANIMFILTER_SUBCHANNELS; @@ -1940,7 +1948,7 @@ static size_t animdata_filter_ds_gpencil( /* include data-expand widget first */ if (filter_mode & ANIMFILTER_LIST_CHANNELS) { /* check if filtering by active status */ - // XXX: active check here needs checking + /* XXX: active check here needs checking */ if (ANIMCHANNEL_ACTIVEOK(gpd)) { ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_DSGPENCIL, gpd, NULL); } @@ -1976,7 +1984,7 @@ static size_t animdata_filter_ds_cachefile( /* include data-expand widget first */ if (filter_mode & ANIMFILTER_LIST_CHANNELS) { /* check if filtering by active status */ - // XXX: active check here needs checking + /* XXX: active check here needs checking */ if (ANIMCHANNEL_ACTIVEOK(cache_file)) { ANIMCHANNEL_NEW_CHANNEL(cache_file, ANIMTYPE_DSCACHEFILE, cache_file, NULL); } @@ -2027,7 +2035,7 @@ static size_t animdata_filter_mask(Main *bmain, size_t items = 0; /* For now, grab mask data-blocks directly from main. */ - // XXX: this is not good... + /* XXX: this is not good... */ for (mask = bmain->masks.first; mask; mask = mask->id.next) { ListBase tmp_data = {NULL, NULL}; size_t tmp_items = 0; @@ -2215,8 +2223,10 @@ static size_t animdata_filter_ds_texture(bAnimContext *ac, 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. + + /* 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); } @@ -2406,7 +2416,7 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr, * which would be nice to animate (i.e. texture parameters) but which are not actually * attached to any other objects/materials/etc. in the scene */ -// TODO: do we want an expander for this? +/* TODO: do we want an expander for this? */ static size_t animdata_filter_ds_modifiers( bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode) { @@ -2900,7 +2910,7 @@ static size_t animdata_filter_ds_scene( void *cdata = NULL; /* determine the type of expander channels to use */ - // this is the best way to do this for now... + /* this is the best way to do this for now... */ ANIMDATA_FILTER_CASES( sce, /* Some useless long comment to prevent wrapping by old clang-format versions... */ {/* AnimData - no channel, but consider data */}, @@ -3168,9 +3178,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, @@ -3227,7 +3237,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && !(ads->flag & ADS_FLAG_NO_DB_SORT) && (view_layer->object_bases.first != view_layer->object_bases.last)) { /* Filter list of bases (i.e. objects), sort them, then add their contents normally... */ - // TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort... + /* TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort... */ Base **sorted_bases; size_t num_bases; @@ -3238,7 +3248,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, items += animdata_filter_dopesheet_ob(ac, anim_data, ads, sorted_bases[i], filter_mode); } - // TODO: store something to validate whether any changes are needed? + /* TODO: store something to validate whether any changes are needed? */ /* free temporary data */ MEM_freeN(sorted_bases); diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 38e5723f7db..8e1f03295f4 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -687,7 +687,7 @@ static int ed_marker_add_exec(bContext *C, wmOperator *UNUSED(op)) marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker"); marker->flag = SELECT; marker->frame = frame; - BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); // XXX - temp code only + BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); /* XXX - temp code only */ BLI_addtail(markers, marker); WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL); @@ -1110,7 +1110,7 @@ static void ed_marker_duplicate_apply(bContext *C) } /* new marker is added to the beginning of list */ - // FIXME: bad ordering! + /* FIXME: bad ordering! */ BLI_addhead(markers, newmarker); } } diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 4d5ff33d5cf..b2a9d6ac9b7 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -883,9 +883,12 @@ void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const ch /* Add Driver - Enum Defines ------------------------- */ -/* Mapping Types enum for operators */ -/* NOTE: Used by ANIM_OT_driver_button_add and UI_OT_eyedropper_driver */ -// XXX: These names need reviewing +/** + * Mapping Types enum for operators. + * \note Used by #ANIM_OT_driver_button_add and #UI_OT_eyedropper_driver. + * + * XXX: These names need reviewing. + */ EnumPropertyItem prop_driver_create_mapping_types[] = { {CREATEDRIVER_MAPPING_1_N, "SINGLE_MANY", @@ -1014,7 +1017,7 @@ static int add_driver_button_none(bContext *C, wmOperator *op, short mapping_typ /* send updates */ UI_context_update_anim_flag(C); DEG_relations_tag_update(CTX_data_main(C)); - WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX + WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */ return OPERATOR_FINISHED; } @@ -1051,8 +1054,8 @@ static int add_driver_button_menu_invoke(bContext *C, wmOperator *op, const wmEv } /* Show menu */ - // TODO: This should get filtered by the enum filter - /* important to execute in the region we're currently in */ + /* TODO: This should get filtered by the enum filter. */ + /* important to execute in the region we're currently in. */ return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT); } @@ -1167,7 +1170,7 @@ static int remove_driver_button_exec(bContext *C, wmOperator *op) /* send updates */ UI_context_update_anim_flag(C); DEG_relations_tag_update(CTX_data_main(C)); - WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX + WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */ } return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; @@ -1183,7 +1186,7 @@ void ANIM_OT_driver_button_remove(wmOperatorType *ot) /* callbacks */ ot->exec = remove_driver_button_exec; - // op->poll = ??? // TODO: need to have some driver to be able to do this... + /* TODO: `op->poll` need to have some driver to be able to do this. */ /* flags */ ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL; @@ -1220,7 +1223,7 @@ void ANIM_OT_driver_button_edit(wmOperatorType *ot) /* callbacks */ ot->exec = edit_driver_button_exec; - // op->poll = ??? // TODO: need to have some driver to be able to do this... + /* TODO: `op->poll` need to have some driver to be able to do this. */ /* flags */ ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL; @@ -1264,7 +1267,7 @@ void ANIM_OT_copy_driver_button(wmOperatorType *ot) /* callbacks */ ot->exec = copy_driver_button_exec; - // op->poll = ??? // TODO: need to have some driver to be able to do this... + /* TODO: `op->poll` need to have some driver to be able to do this. */ /* flags */ ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL; @@ -1295,7 +1298,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op) DEG_id_tag_update(ptr.owner_id, ID_RECALC_ANIMATION); - WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); // XXX + WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); /* XXX */ MEM_freeN(path); } @@ -1314,7 +1317,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot) /* callbacks */ ot->exec = paste_driver_button_exec; - // op->poll = ??? // TODO: need to have some driver to be able to do this... + /* TODO: `op->poll` need to have some driver to be able to do this. */ /* flags */ ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL; diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index a8fb0be4fbf..fc622c7a52e 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -61,7 +61,7 @@ /* ********************************************** */ /* UI STUFF */ -// XXX! -------------------------------- +/* XXX! -------------------------------- */ /* Temporary definition for limits of float number buttons * (FLT_MAX tends to infinity with old system). */ #define UI_FLT_MAX 10000.0f @@ -499,7 +499,7 @@ static void draw_modifier__fn_generator(uiLayout *layout, uiItemR(col, &ptr, "function_type", 0, "", ICON_NONE); uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - col = uiLayoutColumn(layout, false); // no grouping for now + col = uiLayoutColumn(layout, false); /* no grouping for now */ uiItemR(col, &ptr, "amplitude", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "phase_multiplier", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "phase_offset", 0, NULL, ICON_NONE); @@ -580,7 +580,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar /* init template data */ fed.min = -1.0f; fed.max = 1.0f; - fed.time = (float)scene->r.cfra; // XXX make this int for ease of use? + fed.time = (float)scene->r.cfra; /* XXX make this int for ease of use? */ fed.f1 = fed.f2 = 0; /* check that no data exists for the current frame... */ @@ -625,7 +625,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar } /* callback to remove envelope data point */ -// TODO: should we have a separate file for things like this? +/* TODO: should we have a separate file for things like this? */ static void fmod_envelope_deletepoint_cb(bContext *UNUSED(C), void *fcm_dv, void *ind_v) { FMod_Envelope *env = (FMod_Envelope *)fcm_dv; @@ -914,7 +914,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, box = uiLayoutBox(layout); row = uiLayoutRow(box, false); - block = uiLayoutGetBlock(row); // err... + block = uiLayoutGetBlock(row); /* err... */ /* left-align -------------------------------------------- */ sub = uiLayoutRow(row, true); @@ -1008,7 +1008,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, } /* one last panel below this: FModifier range */ - // TODO: experiment with placement of this + /* TODO: experiment with placement of this */ { box = uiLayoutBox(layout); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 4d6d7fa3ad5..542a6d45db7 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -1071,7 +1071,7 @@ void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, int saction ac.datatype = ANIMCONT_CHANNEL; /* get F-Curves to take keyframes from */ - filter = ANIMFILTER_DATA_VISIBLE; // curves only + filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* loop through each F-Curve, grabbing the keyframes */ @@ -1109,7 +1109,7 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, int saction_fl ac.datatype = ANIMCONT_CHANNEL; /* get F-Curves to take keyframes from */ - filter = ANIMFILTER_DATA_VISIBLE; // curves only + filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* loop through each F-Curve, grabbing the keyframes */ @@ -1143,7 +1143,7 @@ void cachefile_to_keylist(bDopeSheet *ads, /* get F-Curves to take keyframes from */ ListBase anim_data = {NULL, NULL}; - int filter = ANIMFILTER_DATA_VISIBLE; // curves only + int filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* loop through each F-Curve, grabbing the keyframes */ diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 299aa1db4f5..d5260cac0c9 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -70,7 +70,7 @@ /* This function is used to loop over BezTriples in the given F-Curve, applying a given * operation on them, and optionally applies an F-Curve validation function afterwards. */ -// TODO: make this function work on samples too... +/* TODO: make this function work on samples too. */ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, @@ -237,7 +237,7 @@ static short ob_keyframes_loop(KeyframeEditData *ked, ac.datatype = ANIMCONT_CHANNEL; /* get F-Curves to take keyframes from */ - filter = ANIMFILTER_DATA_VISIBLE; // curves only + filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* Loop through each F-Curve, applying the operation as required, @@ -286,7 +286,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked, ac.datatype = ANIMCONT_CHANNEL; /* get F-Curves to take keyframes from */ - filter = ANIMFILTER_DATA_VISIBLE; // curves only + filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* Loop through each F-Curve, applying the operation as required, @@ -478,7 +478,7 @@ void ANIM_animdata_keyframe_callback(bAnimContext *ac, /* Keyframe Integrity Tools */ /* Rearrange keyframes if some are out of order */ -// used to be recalc_*_ipos() where * was object or action +/* used to be recalc_*_ipos() where * was object or action */ void ANIM_editkeyframes_refresh(bAnimContext *ac) { ListBase anim_data = {NULL, NULL}; @@ -834,7 +834,7 @@ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt) const float scale = (rmap->newMax - rmap->newMin) / (rmap->oldMax - rmap->oldMin); /* perform transform on all three handles unless indicated otherwise */ - // TODO: need to include some checks for that + /* TODO: need to include some checks for that */ bezt->vec[0][0] = scale * (bezt->vec[0][0] - rmap->oldMin) + rmap->newMin; bezt->vec[1][0] = scale * (bezt->vec[1][0] - rmap->oldMin) + rmap->newMin; @@ -1025,7 +1025,7 @@ static short mirror_bezier_value(KeyframeEditData *ked, BezTriple *bezt) } /* Note: for markers and 'value', the values to use must be supplied as the first float value */ -// calchandles_fcurve +/* calchandles_fcurve */ KeyframeEditFunc ANIM_editkeyframes_mirror(short mode) { switch (mode) { @@ -1128,9 +1128,12 @@ static short set_bezier_vector(KeyframeEditData *UNUSED(ked), BezTriple *bezt) return 0; } -/* Queries if the handle should be set to 'free' or 'align' */ -// NOTE: this was used for the 'toggle free/align' option -// currently this isn't used, but may be restored later +/** + * Queries if the handle should be set to 'free' or 'align'. + * + * \note This was used for the 'toggle free/align' option + * currently this isn't used, but may be restored later. + */ static short bezier_isfree(KeyframeEditData *UNUSED(ked), BezTriple *bezt) { if ((bezt->f1 & SELECT) && (bezt->h1)) { @@ -1181,7 +1184,7 @@ static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt) } /* Set all selected Bezier Handles to a single type */ -// calchandles_fcurve +/* calchandles_fcurve */ KeyframeEditFunc ANIM_editkeyframes_handles(short mode) { switch (mode) { @@ -1309,7 +1312,7 @@ static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt) } /* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ -// ANIM_editkeyframes_ipocurve_ipotype() ! +/* ANIM_editkeyframes_ipocurve_ipotype() ! */ KeyframeEditFunc ANIM_editkeyframes_ipo(short mode) { switch (mode) { diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 0bec20c739e..f916969c9f3 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -485,7 +485,7 @@ typedef struct tSmooth_Bezt { } tSmooth_Bezt; /* Use a weighted moving-means method to reduce intensity of fluctuations */ -// TODO: introduce scaling factor for weighting falloff +/* TODO: introduce scaling factor for weighting falloff */ void smooth_fcurve(FCurve *fcu) { int totSel = 0; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index e4b73ea65a0..431ec9e0526 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -462,8 +462,8 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag) /* no keyframes already, but can only add if... * 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know * 2) there are no samples on the curve - * // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions, - * // but for now, having both is asking for trouble + * NOTE: maybe we may want to allow this later when doing samples -> bezt conversions, + * but for now, having both is asking for trouble */ else if ((flag & INSERTKEY_REPLACE) == 0 && (fcu->fpt == NULL)) { /* create new keyframes array */ @@ -1875,7 +1875,7 @@ static int insert_key_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); bool ob_edit_mode = false; - float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */ int num_channels; KeyingSet *ks = keyingset_get_from_op_with_error(op, op->type->prop, scene); @@ -2058,7 +2058,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ - // XXX should this just be always on? + /* XXX should this just be always on? */ prop = RNA_def_boolean(ot->srna, "confirm_success", 0, @@ -2079,7 +2079,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot) static int delete_key_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */ int num_channels; KeyingSet *ks = keyingset_get_from_op_with_error(op, op->type->prop, scene); @@ -2609,7 +2609,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op) PropertyRNA *prop = NULL; Main *bmain = CTX_data_main(C); char *path; - float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */ bool changed = false; int index; const bool all = RNA_boolean_get(op->ptr, "all"); @@ -2781,7 +2781,7 @@ void ANIM_OT_keyframe_clear_button(wmOperatorType *ot) bool autokeyframe_cfra_can_key(const Scene *scene, ID *id) { - float cfra = (float)CFRA; // XXX for now, this will do + float cfra = (float)CFRA; /* XXX for now, this will do */ /* only filter if auto-key mode requires this */ if (IS_AUTOKEY_ON(scene) == 0) { @@ -2981,7 +2981,7 @@ bool id_frame_has_keyframe(ID *id, float frame, short filter) case ID_OB: /* object */ return object_frame_has_keyframe((Object *)id, frame, filter); #if 0 - // XXX TODO... for now, just use 'normal' behavior + /* XXX TODO... for now, just use 'normal' behavior */ case ID_SCE: /* scene */ break; #endif diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 876740b889a..fda7b600c1c 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -214,7 +214,7 @@ static int add_empty_ks_path_exec(bContext *C, wmOperator *op) BLI_addtail(&ks->paths, ksp); ks->active_path = BLI_listbase_count(&ks->paths); - ksp->groupmode = KSP_GROUP_KSNAME; // XXX? + ksp->groupmode = KSP_GROUP_KSNAME; /* XXX? */ ksp->idtype = ID_OB; ksp->flag = KSP_FLAG_WHOLE_ARRAY; @@ -968,14 +968,15 @@ eModifyKey_Returns ANIM_validate_keyingset(bContext *C, ListBase *dsources, Keyi } /* if we don't have any paths now, then this still qualifies as invalid context */ - // FIXME: we need some error conditions (to be retrieved from the iterator why this failed!) + /* FIXME: we need some error conditions (to be retrieved from the iterator why this failed!) + */ if (BLI_listbase_is_empty(&ks->paths)) { return MODIFYKEY_INVALID_CONTEXT; } } else { /* poll callback tells us that KeyingSet is useless in current context */ - // FIXME: the poll callback needs to give us more info why + /* FIXME: the poll callback needs to give us more info why */ return MODIFYKEY_INVALID_CONTEXT; } } @@ -1149,7 +1150,7 @@ int ANIM_apply_keyingset( { Object *ob = (Object *)ksp->id; - // XXX: only object transforms? + /* XXX: only object transforms? */ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); break; } |