From 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 10 Oct 2020 18:19:55 +1100 Subject: Cleanup: use C comments for descriptive text Follow our code style guide by using C-comments for text descriptions. --- .../editors/animation/anim_channels_defines.c | 104 ++++++++++----------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'source/blender/editors/animation/anim_channels_defines.c') 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... */ } } } -- cgit v1.2.3