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 | |
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')
150 files changed, 615 insertions, 563 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; } diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 5f01c4ed038..4d31a5e786b 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -942,7 +942,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op) Object *ob = objects[ob_index]; bArmature *arm = ob->data; - ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed? + ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */ preEditBoneDuplicate(arm->edbo); @@ -1117,7 +1117,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) /* The beginning of the duplicated mirrored bones in the edbo list */ EditBone *ebone_first_dupe = NULL; - ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed? + ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */ preEditBoneDuplicate(arm->edbo); @@ -1399,7 +1399,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) if (arm->flag & ARM_MIRROR_EDIT) { flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone); if (flipbone) { - forked_iter = 0; // we extrude 2 different bones + forked_iter = 0; /* we extrude 2 different bones */ if (flipbone->flag & (BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED)) { /* don't want this bone to be selected... */ flipbone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); @@ -1449,7 +1449,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) newbone->dist = ebone->dist; newbone->xwidth = ebone->xwidth; newbone->zwidth = ebone->zwidth; - newbone->rad_head = ebone->rad_tail; // don't copy entire bone... + newbone->rad_head = ebone->rad_tail; /* don't copy entire bone. */ newbone->rad_tail = ebone->rad_tail; newbone->segments = 1; newbone->layer = ebone->layer; @@ -1470,7 +1470,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) BLI_strncpy(newbone->name, ebone->name, sizeof(newbone->name)); - if (flipbone && forked_iter) { // only set if mirror edit + if (flipbone && forked_iter) { /* only set if mirror edit */ if (strlen(newbone->name) < (MAXBONENAME - 2)) { if (a == 0) { strcat(newbone->name, "_L"); @@ -1587,10 +1587,10 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) copy_v3_v3(bone->head, curs); if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) { - add_v3_v3v3(bone->tail, bone->head, imat[1]); // bone with unit length 1 + add_v3_v3v3(bone->tail, bone->head, imat[1]); /* bone with unit length 1 */ } else { - add_v3_v3v3(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z + add_v3_v3v3(bone->tail, bone->head, imat[2]); /* bone with unit length 1, pointing up Z */ } ED_armature_edit_refresh_layer_used(obedit->data); @@ -1638,7 +1638,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op) cuts = RNA_int_get(op->ptr, "number_cuts"); /* loop over all editable bones */ - // XXX the old code did this in reverse order though! + /* XXX the old code did this in reverse order though! */ CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, selected_editable_bones, bArmature *, arm) { for (i = cuts + 1; i > 1; i--) { /* compute cut ratio first */ diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 2efb7315b89..14d64d2d808 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -685,7 +685,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op) separate_armature_bones(bmain, ob_old, true); separate_armature_bones(bmain, ob_new, false); - /* 4) fix links before depsgraph flushes */ // err... or after? + /* 4) fix links before depsgraph flushes, err... or after? */ separated_armature_fix_links(bmain, ob_old, ob_new); DEG_id_tag_update(&ob_old->id, ID_RECALC_GEOMETRY); /* this is the original one */ diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index cf64cfc849d..e51e5ec5cef 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -451,7 +451,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys) BLI_bvhtree_insert(sys->heat.bvhtree, a, bb, 2); - // Setup inverse pointers to use on isect.orig + /* Setup inverse pointers to use on isect.orig */ sys->heat.vltree[vtri[0]] = lt; sys->heat.vltree[vtri[1]] = lt; sys->heat.vltree[vtri[2]] = lt; diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 85948f3abc3..e8c35958115 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -279,7 +279,7 @@ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, const wmEven } /* show popup dialog to allow editing of range... */ - // FIXME: hardcoded dimensions here are just arbitrary + /* FIXME: hard-coded dimensions here are just arbitrary. */ return WM_operator_props_dialog_popup(C, op, 200); } diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 33c1a8a8b4f..947e2dbf5aa 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1856,7 +1856,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; /* properties */ - // TODO: make the pose_index into a proper enum instead of a cryptic int... + /* TODO: make the pose_index into a proper enum instead of a cryptic int. */ ot->prop = RNA_def_int( ot->srna, "pose_index", @@ -1868,7 +1868,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot) 0, INT_MAX); - // XXX: percentage vs factor? + /* XXX: percentage vs factor? */ /* not used yet */ #if 0 RNA_def_float_factor(ot->srna, diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index c63f2ff12c5..731d0d10e0b 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -114,7 +114,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) bArmature *arm; /* sanity checks */ - // XXX: actually, we can probably still get away with no object - at most we have no updates + /* XXX: actually, we can probably still get away with no object - at most we have no updates */ if (ELEM(NULL, ob, ob->pose, pchan, pchan->bone)) { return; } @@ -133,7 +133,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) arm->act_bone = NULL; } - // TODO: select and activate corresponding vgroup? + /* TODO: select and activate corresponding vgroup? */ ED_pose_bone_select_tag_update(ob); } } diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index e60270bc3f0..59e14f85c81 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -480,7 +480,7 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, float tval = (float)RNA_property_boolean_get(&ptr, prop); pose_slide_apply_val(pso, fcu, pfl->ob, &tval); RNA_property_boolean_set( - &ptr, prop, (int)tval); // XXX: do we need threshold clamping here? + &ptr, prop, (int)tval); /* XXX: do we need threshold clamping here? */ break; } case PROP_ENUM: { @@ -681,14 +681,14 @@ static void pose_slide_rest_pose_apply(bContext *C, tPoseSlideOp *pso) if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_BBONE_SHAPE) && (pchan->flag & POSE_BBONE_SHAPE)) { /* bbone properties - they all start a "bbone_" prefix */ - // TODO Not implemented + /* TODO Not implemented */ // pose_slide_apply_props(pso, pfl, "bbone_"); } if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_PROPS) && (pfl->oldprops)) { /* Not strictly a transform, but custom properties contribute * to the pose produced in many rigs (e.g. the facial rigs used in Sintel). */ - // TODO Not implemented + /* TODO Not implemented */ // pose_slide_apply_props(pso, pfl, "[\""); /* dummy " for texteditor bugs */ } } @@ -790,7 +790,7 @@ static void pose_slide_reset(tPoseSlideOp *pso) /* ------------------------------------ */ /* draw percentage indicator in header */ -// TODO: Include hints about locks here... +/* TODO: Include hints about locks here... */ static void pose_slide_draw_status(tPoseSlideOp *pso) { char status_str[UI_MAX_DRAW_STR]; diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index b09015096a6..d3f11c5a16f 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -385,7 +385,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Scene *scene = CTX_data_scene(C); - // must be active object, not edit-object + /* must be active object, not edit-object */ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); bArmature *arm = BKE_armature_from_object(ob); @@ -688,8 +688,8 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, pchan->curve_in_x *= -1; pchan->curve_out_x *= -1; - pchan->roll1 *= -1; // XXX? - pchan->roll2 *= -1; // XXX? + pchan->roll1 *= -1; /* XXX? */ + pchan->roll2 *= -1; /* XXX? */ /* has to be done as eulers... */ if (pchan->rotmode > 0) { @@ -1108,7 +1108,7 @@ static int pose_clear_transform_generic_exec(bContext *C, ViewLayer *view_layer = CTX_data_view_layer(C); View3D *v3d = CTX_wm_view3d(C); FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob_iter) { - // XXX: UGLY HACK (for autokey + clear transforms) + /* XXX: UGLY HACK (for autokey + clear transforms) */ Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob_iter); ListBase dsources = {NULL, NULL}; bool changed = false; diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index e2038bdd2a3..2a6dc9f406b 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -332,7 +332,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) { if (ob->id.tag & LIB_TAG_DOIT) { if (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) { - // ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear + // ED_pose_clear_paths(C, ob); /* XXX for now, don't need to clear. */ /* TODO(sergey): Should ensure we can use more narrow update range here. */ ED_pose_recalculate_paths(C, scene, ob, POSE_PATH_CALC_RANGE_FULL); } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 15a147b6b86..85d86849140 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1349,7 +1349,7 @@ void ED_curve_editnurb_make(Object *obedit) nu = cu->nurb.first; while (nu) { newnu = BKE_nurb_duplicate(nu); - BKE_nurb_test_2d(newnu); // after join, or any other creation of curve + BKE_nurb_test_2d(newnu); /* after join, or any other creation of curve */ BLI_addtail(&editnurb->nurbs, newnu); nu = nu->next; } @@ -7001,7 +7001,7 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op) BKE_curve_curve_dimension_update(cu); } - DEG_relations_tag_update(bmain); // because we removed object(s), call before editmode! + DEG_relations_tag_update(bmain); /* because we removed object(s), call before editmode! */ DEG_id_tag_update(&ob_active->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 4d72e90b89b..684666aba13 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -127,7 +127,7 @@ Nurb *ED_curve_add_nurbs_primitive( float fac; int a, b; const float grid = 1.0f; - const int cutype = (type & CU_TYPE); // poly, bezier, nurbs, etc + const int cutype = (type & CU_TYPE); /* poly, bezier, nurbs, etc */ const int stype = (type & CU_PRIMITIVE); unit_m4(umat); diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c index 13f3903f0b2..eb40500d011 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c @@ -386,4 +386,4 @@ void ED_gizmotypes_button_2d(void) WM_gizmotype_append(GIZMO_GT_button_2d); } -/** \} */ // Button Gizmo API +/** \} */ /* Button Gizmo API */ diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c index 2cd73f613c1..f7ab1732457 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c @@ -92,7 +92,7 @@ static void gizmo_calc_rect_view_scale(const wmGizmo *gz, const float dims[3], f static void gizmo_calc_rect_view_margin(const wmGizmo *gz, const float dims[3], float margin[3]) { const float handle_size = 0.15f; - // XXX, the scale isn't taking offset into account, we need to calculate scale per handle! + /* XXX, the scale isn't taking offset into account, we need to calculate scale per handle! */ // handle_size *= gz->scale_final; float scale_xyz[3]; diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c index ad7036f4460..011563eece5 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c @@ -481,4 +481,4 @@ void ED_gizmotypes_move_3d(void) WM_gizmotype_append(GIZMO_GT_move_3d); } -/** \} */ // Move Gizmo API +/** \} */ /* Move Gizmo API */ diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index b6cbbe7712b..fe1c5efc747 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -744,8 +744,8 @@ static void annotation_draw_data( annotation_draw_data_layers(gpd, offsx, offsy, winx, winy, cfra, dflag); /* turn off alpha blending, then smooth lines */ - GPU_blend(GPU_BLEND_NONE); // alpha blending - GPU_line_smooth(false); // smooth lines + GPU_blend(GPU_BLEND_NONE); /* alpha blending */ + GPU_line_smooth(false); /* smooth lines */ GPU_depth_mask(prev_depth_mask); } diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 897a6e9653d..d4f3c4d7f5e 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -443,7 +443,7 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) } /* filter data */ - // TODO: try doing it with selection, then without selection imits + /* TODO: try doing it with selection, then without selection limits. */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); @@ -649,7 +649,7 @@ static bool gpencil_frame_mirror_marker(bGPDframe *gpf, Scene *scene) } /* mirror selected gp-frames on... */ -// TODO: mirror over a specific time +/* TODO: mirror over a specific time */ void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode) { switch (mode) { diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index b7bf1861ff3..fa7fe27635a 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1441,7 +1441,7 @@ static int gpencil_strokes_copy_exec(bContext *C, wmOperator *op) } /* updates (to ensure operator buttons are refreshed, when used via hotkeys) */ - WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); // XXX? + WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); /* XXX? */ /* done */ return OPERATOR_FINISHED; @@ -1749,11 +1749,11 @@ void GPENCIL_OT_move_to_layer(wmOperatorType *ot) ot->name = "Move Strokes to Layer"; ot->idname = "GPENCIL_OT_move_to_layer"; ot->description = - "Move selected strokes to another layer"; // XXX: allow moving individual points too? + "Move selected strokes to another layer"; /* XXX: allow moving individual points too? */ /* callbacks */ ot->exec = gpencil_move_to_layer_exec; - ot->poll = gpencil_stroke_edit_poll; // XXX? + ot->poll = gpencil_stroke_edit_poll; /* XXX? */ /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -2766,7 +2766,7 @@ static int gpencil_snap_to_grid(bContext *C, wmOperator *UNUSED(op)) continue; } - // TODO: if entire stroke is selected, offset entire stroke by same amount? + /* TODO: if entire stroke is selected, offset entire stroke by same amount? */ for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { /* only if point is selected */ if (pt->flag & GP_SPOINT_SELECT) { diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 247cc218c2f..a11397bd0bb 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1269,7 +1269,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf) for (int i = 0; i < gps->totpoints; i++) { BKE_gpencil_stroke_smooth(gps, i, smoothfac - reduce); } - reduce += 0.25f; // reduce the factor + reduce += 0.25f; /* reduce the factor */ } /* if axis locked, reproject to plane locked */ diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c index d37e393ac77..1d500223ab8 100644 --- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c @@ -760,7 +760,7 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso, float rmat[3][3]; /* Express position of point relative to cursor, ready to rotate */ - // XXX: There is still some offset here, but it's close to working as expected... + /* XXX: There is still some offset here, but it's close to working as expected. */ vec[0] = (float)(co[0] - gso->mval[0]); vec[1] = (float)(co[1] - gso->mval[1]); @@ -778,7 +778,7 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso, UI_view2d_region_to_view(v2d, vec[0], vec[1], &pt->x, &pt->y); } else { - // XXX + /* XXX */ copy_v2_v2(&pt->x, vec); } } @@ -2125,7 +2125,7 @@ void GPENCIL_OT_sculpt_paint(wmOperatorType *ot) /* identifiers */ ot->name = "Stroke Sculpt"; ot->idname = "GPENCIL_OT_sculpt_paint"; - ot->description = "Apply tweaks to strokes by painting over the strokes"; // XXX + ot->description = "Apply tweaks to strokes by painting over the strokes"; /* XXX */ /* api callbacks */ ot->exec = gpencil_sculpt_brush_exec; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 8b77709bacb..5a45afe9c5a 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -335,7 +335,7 @@ bool ED_gpencil_has_keyframe_v3d(Scene *UNUSED(scene), Object *ob, int cfra) bGPDlayer *gpl = BKE_gpencil_layer_active_get(ob->data); if (gpl) { if (gpl->actframe) { - // XXX: assumes that frame has been fetched already + /* XXX: assumes that frame has been fetched already */ return (gpl->actframe->framenum == cfra); } /* XXX: disabled as could be too much of a penalty */ @@ -2531,7 +2531,7 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { if (gps->flag & GP_STROKE_SELECT) { action = SEL_DESELECT; - break; // XXX: this only gets out of the inner loop... + break; /* XXX: this only gets out of the inner loop. */ } } CTX_DATA_END; @@ -2584,9 +2584,11 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) case SEL_SELECT: pt->flag |= GP_SPOINT_SELECT; break; - // case SEL_DESELECT: - // pt->flag &= ~GP_SPOINT_SELECT; - // break; +#if 0 + case SEL_DESELECT: + pt->flag &= ~GP_SPOINT_SELECT; + break; +#endif case SEL_INVERT: pt->flag ^= GP_SPOINT_SELECT; break; diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 36990414e6d..04f6932d671 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -332,7 +332,7 @@ typedef enum eAnimFilter_Flags { } eAnimFilter_Flags; /* ---------- Flag Checking Macros ------------ */ -// xxx check on all of these flags again... +/* XXX check on all of these flags again. */ /* Dopesheet only */ /* 'Scene' channels */ @@ -507,7 +507,7 @@ typedef enum eAnimChannels_SetFlag { ACHANNEL_SETFLAG_ADD = 1, /** on->off, off->on */ ACHANNEL_SETFLAG_INVERT = 2, - /** some on -> all off // all on */ + /** some on -> all off / all on */ ACHANNEL_SETFLAG_TOGGLE = 3, } eAnimChannels_SetFlag; @@ -730,7 +730,7 @@ void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt, /* ..... */ /* Perform auto-blending/extend refreshes after some operations */ -// NOTE: defined in space_nla/nla_edit.c, not in animation/ +/* NOTE: defined in space_nla/nla_edit.c, not in animation/ */ void ED_nla_postop_refresh(bAnimContext *ac); /* ------------- Unit Conversion Mappings ------------- */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 09ab72efaaf..d99ecf2fd56 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -160,7 +160,7 @@ DEF_ICON_BLANK(157) DEF_ICON_BLANK(158) DEF_ICON_BLANK(159) DEF_ICON_BLANK(160) -DEF_ICON(BLANK1) // Not actually blank - this is used all over the place +DEF_ICON(BLANK1) /* Not actually blank - this is used all over the place */ DEF_ICON(FAKE_USER_OFF) DEF_ICON(FAKE_USER_ON) /* EDITORS */ @@ -192,7 +192,7 @@ DEF_ICON(UV) DEF_ICON_BLANK(190) /* MODES */ -DEF_ICON(OBJECT_DATAMODE) // XXX fix this up +DEF_ICON(OBJECT_DATAMODE) /* XXX fix this up */ DEF_ICON(EDITMODE_HLT) DEF_ICON(UV_DATA) DEF_ICON(VPAINT_HLT) @@ -873,7 +873,7 @@ DEF_ICON(SEQ_SPLITVIEW) DEF_ICON(SEQ_STRIP_META) DEF_ICON(SEQ_STRIP_DUPLICATE) DEF_ICON_BLANK(872) -DEF_ICON(IMAGE_RGB) // XXX CHANGE TO STRAIGHT ALPHA, Z ETC +DEF_ICON(IMAGE_RGB) /* XXX CHANGE TO STRAIGHT ALPHA, Z ETC */ DEF_ICON(IMAGE_RGB_ALPHA) DEF_ICON(IMAGE_ALPHA) DEF_ICON(IMAGE_ZDEPTH) diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index a7b87d38472..f597bb307db 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -50,7 +50,7 @@ typedef enum ThemeColorID { TH_REDALERT, TH_THEMEUI, - // common colors among spaces + /* Common colors among spaces. */ TH_BACK, /** Use when 'TH_SHOW_BACK_GRAD' is set (the lower, darker color). */ @@ -358,92 +358,92 @@ struct bThemeState { int spacetype, regionid; }; -// THE CODERS API FOR THEMES: +/* THE CODERS API FOR THEMES: */ -// returns one value, not scaled +/* returns one value, not scaled */ float UI_GetThemeValuef(int colorid); int UI_GetThemeValue(int colorid); float UI_GetThemeValueTypef(int colorid, int spacetype); int UI_GetThemeValueType(int colorid, int spacetype); -// get three color values, scaled to 0.0-1.0 range +/* get three color values, scaled to 0.0-1.0 range */ void UI_GetThemeColor3fv(int colorid, float col[3]); void UI_GetThemeColorBlend3ubv(int colorid1, int colorid2, float fac, unsigned char col[3]); void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[3]); void UI_GetThemeColorBlend4f(int colorid1, int colorid2, float fac, float r_col[4]); -// get the color, range 0.0-1.0, complete with shading offset +/* get the color, range 0.0-1.0, complete with shading offset */ 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]); -// get four color values, scaled to 0.0-1.0 range +/* get four color values, scaled to 0.0-1.0 range */ void UI_GetThemeColor4fv(int colorid, float col[4]); /* get four color values from specified space type, scaled to 0.0-1.0 range */ void UI_GetThemeColorType4fv(int colorid, int spacetype, float col[4]); -// get four color values, range 0.0-1.0, complete with shading offset for the RGB components +/* get four color values, range 0.0-1.0, complete with shading offset for the RGB components */ void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4]); void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4]); -// get four color values ranged between 0 and 255; includes the alpha channel +/* get four color values ranged between 0 and 255; includes the alpha channel */ void UI_GetThemeColorShadeAlpha4ubv(int colorid, int coloffset, 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( int colorid1, int colorid2, float fac, int offset, float col[4]); -// get the 3 or 4 byte values +/* get the 3 or 4 byte values */ void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]); void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]); -// get a theme color from specified space type +/* get a theme color from specified space type */ void UI_GetThemeColorType3fv(int colorid, int spacetype, float col[3]); void UI_GetThemeColorType3ubv(int colorid, int spacetype, unsigned char col[3]); void UI_GetThemeColorType4ubv(int colorid, int spacetype, unsigned char col[4]); -// get theme color for coloring monochrome icons +/* get theme color for coloring monochrome icons */ bool UI_GetIconThemeColor4ubv(int colorid, unsigned char col[4]); -// shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) +/* shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) */ void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset); -// get a 3 byte color, blended and shaded between two other char color pointers +/* get a 3 byte color, blended and shaded between two other char color pointers */ void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset); -// sets the font color -// (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color) +/* sets the font color + * (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color) */ void UI_FontThemeColor(int fontid, int colorid); -// clear the framebuffer using the input colorid +/* clear the framebuffer using the input colorid */ void UI_ThemeClearColor(int colorid); -// internal (blender) usage only, for init and set active +/* internal (blender) usage only, for init and set active */ void UI_SetTheme(int spacetype, int regionid); -// get current theme +/* get current theme */ struct bTheme *UI_GetTheme(void); void UI_Theme_Store(struct bThemeState *theme_state); void UI_Theme_Restore(struct bThemeState *theme_state); -// return shadow width outside menus and popups */ +/* return shadow width outside menus and popups */ int UI_ThemeMenuShadowWidth(void); /* only for buttons in theme editor! */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 98e76114956..e2e19e9fcd4 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2628,7 +2628,7 @@ static void ui_get_but_string_unit( int precision; if (unit->scale_length < 0.0001f) { - unit->scale_length = 1.0f; // XXX do_versions + unit->scale_length = 1.0f; /* XXX do_versions */ } /* Use precision override? */ @@ -3663,7 +3663,7 @@ static void ui_but_update_ex(uiBut *but, const bool validate) } /* safety is 4 to enable small number buttons (like 'users') */ - // okwidth = -4 + (BLI_rcti_size_x(&but->rect)); // UNUSED + // okwidth = -4 + (BLI_rcti_size_x(&but->rect)); /* UNUSED */ /* name: */ switch (but->type) { @@ -3805,7 +3805,7 @@ void UI_block_align_begin(uiBlock *block) block->flag |= UI_BUT_ALIGN_DOWN; block->alignnr++; - /* buttons declared after this call will get this align nr */ // XXX flag? + /* buttons declared after this call will get this align nr */ /* XXX flag? */ } void UI_block_align_end(uiBlock *block) diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index bcb8a10be02..dec1710ac69 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -783,7 +783,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), GPU_blend(GPU_BLEND_NONE); # if 0 - // restore scissortest + /* restore scissortest */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); # endif diff --git a/source/blender/editors/interface/interface_eyedropper_driver.c b/source/blender/editors/interface/interface_eyedropper_driver.c index 29c0368219b..8762a4819d4 100644 --- a/source/blender/editors/interface/interface_eyedropper_driver.c +++ b/source/blender/editors/interface/interface_eyedropper_driver.c @@ -58,7 +58,7 @@ typedef struct DriverDropper { int index; bool is_undo; - // TODO: new target? + /* TODO: new target? */ } DriverDropper; static bool driverdropper_init(bContext *C, wmOperator *op) @@ -130,7 +130,7 @@ static void driverdropper_sample(bContext *C, wmOperator *op, const wmEvent *eve UI_context_update_anim_flag(C); DEG_relations_tag_update(CTX_data_main(C)); DEG_id_tag_update(ddr->ptr.owner_id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); - WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX + WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */ } } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 8448acaaceb..2c1b6d9f9d5 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2385,7 +2385,7 @@ static void ui_but_paste_numeric_array(bContext *C, { const int array_length = get_but_property_array_length(but); if (array_length > 4) { - // not supported for now + /* not supported for now */ return; } @@ -5747,7 +5747,7 @@ static bool ui_numedit_but_UNITVEC( } else { /* outer circle */ - mrad = rad / sqrtf(mrad); // veclen + mrad = rad / sqrtf(mrad); /* veclen */ dx *= (2.0f * mrad - 1.0f); dy *= (2.0f * mrad - 1.0f); @@ -6371,7 +6371,7 @@ static bool ui_numedit_but_HSVCIRCLE(uiBut *but, /* exception, when using color wheel in 'locked' value state: * allow choosing a hue for black values, by giving a tiny increment */ if (cpicker->use_color_lock) { - if (U.color_picker_type == USER_CP_CIRCLE_HSV) { // lock + if (U.color_picker_type == USER_CP_CIRCLE_HSV) { /* lock */ if (hsv[2] == 0.f) { hsv[2] = 0.0001f; } @@ -6474,7 +6474,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, /* exception, when using color wheel in 'locked' value state: * allow choosing a hue for black values, by giving a tiny increment */ if (cpicker->use_color_lock) { - if (U.color_picker_type == USER_CP_CIRCLE_HSV) { // lock + if (U.color_picker_type == USER_CP_CIRCLE_HSV) { /* lock */ if (hsv[2] == 0.f) { hsv[2] = 0.0001f; } diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index b89f7a60ae1..fbe61a23d11 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -771,7 +771,7 @@ static ImBuf *create_mono_icon_with_border(ImBuf *buf, const int asy = MAX2(by - blur_size, 0); const int aey = MIN2(by + blur_size + 1, icon_height); - // blur alpha channel + /* blur alpha channel */ const int write_offset = by * (ICON_GRID_W + 2 * ICON_MONO_BORDER_OUTSET) + bx; float alpha_accum = 0.0; uint alpha_samples = 0; @@ -908,7 +908,7 @@ void UI_icons_reload_internal_textures(void) static void init_internal_icons(void) { -# if 0 // temp disabled +# if 0 /* temp disabled */ if ((btheme != NULL) && btheme->tui.iconfile[0]) { char *icondir = BKE_appdir_folder_id(BLENDER_DATAFILES, "icons"); char iconfilestr[FILE_MAX]; @@ -1299,7 +1299,7 @@ static void ui_studiolight_free_function(StudioLight *sl, void *data) return; } - // get icons_id, get icons and kill wm jobs + /* get icons_id, get icons and kill wm jobs */ if (sl->icon_id_radiance) { ui_studiolight_kill_icon_preview_job(wm, sl->icon_id_radiance); } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 6b11e727b66..89cd17319bd 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -98,7 +98,8 @@ #include "PIL_time.h" -// #define USE_OP_RESET_BUT // we may want to make this optional, disable for now. +/* we may want to make this optional, disable for now. */ +// #define USE_OP_RESET_BUT /* defines for templateID/TemplateSearch */ #define TEMPLATE_SEARCH_TEXTBUT_WIDTH (UI_UNIT_X * 6) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 3d98688dc04..68b804f5b28 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4199,7 +4199,7 @@ static void widget_tab(uiWidgetColors *wcol, rcti *rect, int state, int roundbox /* Draw shaded outline - Disabled for now, * seems incorrect and also looks nicer without it imho ;) */ - //#define USE_TAB_SHADED_HIGHLIGHT + // #define USE_TAB_SHADED_HIGHLIGHT uiWidgetBase wtb; uchar theme_col_tab_highlight[3]; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index dddd6446c0e..f115618c13b 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -402,7 +402,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) * Ensure View2D rects remain in a viable configuration * 'cur' is not allowed to be: larger than max, smaller than min, or outside of 'tot' */ -// XXX pre2.5 -> this used to be called test_view2d() +/* XXX pre2.5 -> this used to be called test_view2d() */ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize) { float totwidth, totheight, curwidth, curheight, width, height; @@ -994,7 +994,7 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, bool resiz printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d\n", (void *)v2d, width, - height); // XXX temp debug info + height); /* XXX temp debug info */ } return; } diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 38530fc4b5c..e4a7ad0d635 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1122,7 +1122,7 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op) } /* continuous zoom shouldn't move that fast... */ - if (U.viewzoom == USER_ZOOM_CONT) { // XXX store this setting as RNA prop? + if (U.viewzoom == USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */ const double time = PIL_check_seconds_timer(); const float time_step = (float)(time - vzd->timer_lastdraw); @@ -1406,7 +1406,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event * - Continuous zoom only depends on distance of mouse * to starting point to determine rate of change. */ - if (U.viewzoom != USER_ZOOM_CONT) { // XXX store this setting as RNA prop? + if (U.viewzoom != USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */ vzd->lastx = event->x; vzd->lasty = event->y; } diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index b91b3b92947..54ef5e6b8c5 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -222,12 +222,12 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) export_settings.keep_smooth_curves = keep_smooth_curves != 0; if (export_animation_type != BC_ANIMATION_EXPORT_SAMPLES) { - // When curves are exported then we can not export as matrix + /* When curves are exported then we can not export as matrix. */ export_settings.animation_transformation_type = BC_TRANSFORMATION_TYPE_DECOMPOSED; } if (export_settings.animation_transformation_type != BC_TRANSFORMATION_TYPE_DECOMPOSED) { - // Can not export smooth curves when Matrix export is enabled. + /* Can not export smooth curves when Matrix export is enabled. */ export_settings.keep_smooth_curves = false; } diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index b349def4637..b7ee50a9461 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -433,7 +433,7 @@ bool paintface_mouse_select( /* image window redraw */ paintface_flush_flags(C, ob, SELECT); - ED_region_tag_redraw(CTX_wm_region(C)); // XXX - should redraw all 3D views + ED_region_tag_redraw(CTX_wm_region(C)); /* XXX - should redraw all 3D views */ return true; } diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index 5ad1b5d67da..d5ddb7fc2c4 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -814,7 +814,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w mul_m4_v3(vc.obedit->obmat, ofs); /* view space */ ED_view3d_win_to_3d_int(vc.v3d, vc.region, ofs, event->mval, ofs); - mul_m4_v3(vc.obedit->imat, ofs); // back in object space + mul_m4_v3(vc.obedit->imat, ofs); /* back in object space */ sub_v3_v3(ofs, local_center); @@ -865,7 +865,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w copy_v3_v3(local_center, cursor); ED_view3d_win_to_3d_int(vc.v3d, vc.region, local_center, event->mval, local_center); - mul_m4_v3(vc.obedit->imat, local_center); // back in object space + mul_m4_v3(vc.obedit->imat, local_center); /* back in object space */ EDBM_op_init(vc.em, &bmop, op, "create_vert co=%v", local_center); BMO_op_exec(vc.em->bm, &bmop); diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 02bcf97c87f..d19e7799fbe 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -544,7 +544,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) switch (event->type) { case EVT_RETKEY: case EVT_PADENTER: - case LEFTMOUSE: /* confirm */ // XXX hardcoded + case LEFTMOUSE: /* confirm */ /* XXX hardcoded */ if (event->val == KM_PRESS) { return loopcut_finish(lcd, C, op); } @@ -552,7 +552,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) ED_region_tag_redraw(lcd->region); handled = true; break; - case RIGHTMOUSE: /* abort */ // XXX hardcoded + case RIGHTMOUSE: /* abort */ /* XXX hardcoded */ ED_region_tag_redraw(lcd->region); ringsel_exit(C, op); ED_workspace_status_text(C, NULL); diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 860876f4dc2..0ec7ca52263 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -285,7 +285,7 @@ float ED_object_new_primitive_matrix( return dia; } - // return 1.0f; + /* return 1.0f; */ } /** \} */ @@ -3085,7 +3085,7 @@ static Base *object_add_duplicate_internal(Main *bmain, /* 1) duplis should end up in same collection as the original * 2) Rigid Body sim participants MUST always be part of a collection... */ - // XXX: is 2) really a good measure here? + /* XXX: is 2) really a good measure here? */ if (ob->rigidbody_object || ob->rigidbody_constraint) { Collection *collection; for (collection = bmain->collections.first; collection; collection = collection->id.next) { diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 9b8a50cfe89..0f05608b82f 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -242,7 +242,7 @@ static char *buildmenu_pyconstraints(Main *bmain, Text *con_text, int *pyconinde } #endif /* WITH_PYTHON */ -#if 0 // UNUSED, until pyconstraints are added back. +#if 0 /* UNUSED, until pyconstraints are added back. */ /* this callback gets called when the 'refresh' button of a pyconstraint gets pressed */ static void update_pyconstraint_cb(void *arg1, void *arg2) { @@ -257,7 +257,7 @@ static void update_pyconstraint_cb(void *arg1, void *arg2) } # endif } -#endif // UNUSED +#endif /* UNUSED */ /** \} */ @@ -1747,8 +1747,8 @@ void POSE_OT_constraints_clear(wmOperatorType *ot) /* callbacks */ ot->exec = pose_constraints_clear_exec; - ot->poll = ED_operator_posemode_exclusive; // XXX - do we want to ensure there are selected - // bones too? + ot->poll = ED_operator_posemode_exclusive; /* XXX - do we want to ensure there are selected + * bones too? */ } static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) @@ -2333,7 +2333,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot) * \note Only for pose-channels. * \{ */ -// TODO: should these be here, or back in editors/armature/poseobject.c again? +/* TODO: should these be here, or back in editors/armature/poseobject.c again? */ /* present menu with options + validation for targets to use */ static int pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 69e734de8ee..0170e391708 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -24,7 +24,7 @@ #include <ctype.h> #include <float.h> #include <math.h> -#include <stddef.h> //for offsetof +#include <stddef.h> /* for offsetof */ #include <stdlib.h> #include <string.h> #include <time.h> @@ -114,7 +114,7 @@ #include "WM_toolsystem.h" #include "WM_types.h" -#include "object_intern.h" // own include +#include "object_intern.h" /* own include */ static CLG_LogRef LOG = {"ed.object.edit"}; diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index a0cfdac1ac6..cc3230dff7b 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -86,7 +86,7 @@ #include "BLF_api.h" -#include "object_intern.h" // own include +#include "object_intern.h" /* own include */ /* TODO(sebpa): unstable, can lead to unrecoverable errors. */ // #define USE_MESH_CURVATURE diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 5dfbaf583f6..d3b9c64913d 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -661,7 +661,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) } if (nr == OBJECT_SELECT_LINKED_IPO) { - // XXX old animation system + /* XXX old animation system */ // if (ob->ipo == 0) return OPERATOR_CANCELLED; // object_select_all_by_ipo(C, ob->ipo) return OPERATOR_CANCELLED; diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index 19fac707575..1bb0246deb5 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -53,7 +53,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #include "ED_mesh.h" #include "ED_object.h" diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index e2d043c3206..7d853745ad6 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -242,7 +242,7 @@ static void object_clear_rot(Object *ob, const bool clear_delta) copy_v3_v3(ob->rot, eul); } } - } // Duplicated in source/blender/editors/armature/editarmature.c + } /* Duplicated in source/blender/editors/armature/editarmature.c */ else { if (ob->rotmode == ROT_MODE_QUAT) { unit_qt(ob->quat); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 9eedba29aae..0cf9fd7768d 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -202,9 +202,10 @@ ParticleEditSettings *PE_settings(Scene *scene) static float pe_brush_size_get(const Scene *UNUSED(scene), ParticleBrushData *brush) { - // here we can enable unified brush size, needs more work... - // UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; - // float size = (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size; +#if 0 /* TODO: Here we can enable unified brush size, needs more work. */ + UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; + float size = (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size; +#endif return brush->size; } @@ -4560,7 +4561,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) (dx != 0 || dy != 0)) || bedit->first) { PEData data = bedit->data; - data.context = C; // TODO(mai): why isnt this set in bedit->data? + data.context = C; /* TODO(mai): why isnt this set in bedit->data? */ view3d_operator_needs_opengl(C); selected = (short)count_selected_keys(scene, edit); @@ -4783,7 +4784,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, const wmEvent *e RNA_collection_add(op->ptr, "stroke", &itemptr); RNA_float_set_array(&itemptr, "mouse", mouse); - RNA_boolean_set(&itemptr, "pen_flip", event->shift != false); // XXX hardcoded + RNA_boolean_set(&itemptr, "pen_flip", event->shift != false); /* XXX hardcoded */ /* apply */ brush_edit_apply(C, op, &itemptr); @@ -4807,7 +4808,7 @@ static int brush_edit_modal(bContext *C, wmOperator *op, const wmEvent *event) switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: - case RIGHTMOUSE: // XXX hardcoded + case RIGHTMOUSE: /* XXX hardcoded */ if (event->val == KM_RELEASE) { brush_edit_exit(op); return OPERATOR_FINISHED; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 26b5f7fb2af..32d2e39d6f6 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -60,7 +60,7 @@ #include "WM_types.h" #include "manta_fluid_API.h" -#include "physics_intern.h" // own include +#include "physics_intern.h" /* own include */ #include "DNA_fluid_types.h" #include "DNA_mesh_types.h" diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index f6943c25063..eb154b97eb0 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -32,7 +32,7 @@ #include "ED_physics.h" #include "ED_select_utils.h" -#include "physics_intern.h" // own include +#include "physics_intern.h" /* own include */ /***************************** particles ***********************************/ diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index b91385c502c..cb25363d2b2 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -531,7 +531,7 @@ void RIGIDBODY_OT_mass_calculate(wmOperatorType *ot) ot->description = "Automatically calculate mass values for Rigid Body Objects based on volume"; /* callbacks */ - ot->invoke = WM_menu_invoke; // XXX + ot->invoke = WM_menu_invoke; /* XXX */ ot->exec = rigidbody_objects_calc_mass_exec; ot->poll = ED_operator_rigidbody_active_poll; diff --git a/source/blender/editors/physics/rigidbody_world.c b/source/blender/editors/physics/rigidbody_world.c index 558a293ccbf..42f270874e3 100644 --- a/source/blender/editors/physics/rigidbody_world.c +++ b/source/blender/editors/physics/rigidbody_world.c @@ -180,7 +180,7 @@ static int rigidbody_world_export_invoke(bContext *C, wmOperator *op, const wmEv return rigidbody_world_export_exec(C, op); } - // TODO: use the actual rigidbody world's name + .bullet instead of this temp crap + /* TODO: use the actual rigidbody world's name + .bullet instead of this temp crap */ RNA_string_set(op->ptr, "filepath", "rigidbodyworld_export.bullet"); WM_event_add_fileselect(C, op); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 32bc1cff4a0..7ca711cd2b8 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -363,7 +363,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) RE_SetReports(re, NULL); - // no redraw needed, we leave state as we entered it + /* No redraw needed, we leave state as we entered it. */ ED_update_for_newframe(mainp, CTX_data_depsgraph_pointer(C)); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene); @@ -386,7 +386,7 @@ static void make_renderinfo_string(const RenderStats *rs, const char *error, char *str) { - char info_time_str[32]; // used to be extern to header_info.c + char info_time_str[32]; /* used to be extern to header_info.c */ uintptr_t mem_in_use, peak_memory; float megs_used_memory, megs_peak_memory; char *spos = str; @@ -526,7 +526,7 @@ static void render_image_update_pass_and_layer(RenderJob *rj, RenderResult *rr, LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { if (area->spacetype == SPACE_IMAGE) { SpaceImage *sima = area->spacedata.first; - // area->spacedata might be empty when toggling fullscreen mode. + /* area->spacedata might be empty when toggling full-screen mode. */ if (sima != NULL && sima->image == rj->image) { if (first_area == NULL) { first_area = area; @@ -944,9 +944,9 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even * since sequence rendering can call that recursively... (peter) */ BKE_sequencer_cache_cleanup(scene); - // store spare - // get view3d layer, local layer, make this nice api call to render - // store spare + /* store spare + * get view3d layer, local layer, make this nice api call to render + * store spare */ /* ensure at least 1 area shows result */ area = render_view_open(C, event->x, event->y, op->reports); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 80fa8082592..ed20d2895fc 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -90,8 +90,8 @@ # include "PIL_time.h" #endif -// TODO(sergey): Find better approximation of the scheduled frames. -// For really highres renders it might fail still. +/* TODO(sergey): Find better approximation of the scheduled frames. + * For really highres renders it might fail still. */ #define MAX_SCHEDULED_FRAMES 8 typedef struct OGLRender { diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c index 8156f48343f..706249a3f8b 100644 --- a/source/blender/editors/render/render_ops.c +++ b/source/blender/editors/render/render_ops.c @@ -29,7 +29,7 @@ #include "WM_api.h" -#include "render_intern.h" // own include +#include "render_intern.h" /* own include */ /***************************** render ***********************************/ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 6369b7bad43..4afa45893f9 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -111,7 +111,7 @@ ImBuf *get_brush_icon(Brush *brush) if (brush->flag & BRUSH_CUSTOM_ICON) { if (brush->icon_filepath[0]) { - // first use the path directly to try and load the file + /* First use the path directly to try and load the file. */ BLI_strncpy(path, brush->icon_filepath, sizeof(brush->icon_filepath)); BLI_path_abs(path, ID_BLEND_PATH_FROM_GLOBAL(&brush->id)); @@ -119,7 +119,7 @@ ImBuf *get_brush_icon(Brush *brush) /* use default colorspaces for brushes */ brush->icon_imbuf = IMB_loadiffname(path, flags, NULL); - // otherwise lets try to find it in other directories + /* otherwise lets try to find it in other directories */ if (!(brush->icon_imbuf)) { folder = BKE_appdir_folder_id(BLENDER_DATAFILES, "brushicons"); @@ -881,7 +881,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs sce->display.render_aa = SCE_DISPLAY_AA_SAMPLES_8; } - /* callbacs are cleared on GetRender() */ + /* Callbacks are cleared on GetRender(). */ if (ELEM(sp->pr_method, PR_BUTS_RENDER, PR_NODE_RENDER)) { RE_display_update_cb(re, sp, shader_preview_update); } @@ -907,7 +907,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* handle results */ if (sp->pr_method == PR_ICON_RENDER) { - // char *rct= (char *)(sp->pr_rect + 32*16 + 16); + // char *rct = (char *)(sp->pr_rect + 32 * 16 + 16); if (sp->pr_rect) { RE_ResultGet32(re, sp->pr_rect); @@ -917,12 +917,14 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* unassign the pointers, reset vars */ preview_prepare_scene(sp->bmain, sp->scene, NULL, GS(id->name), sp); - /* XXX bad exception, end-exec is not being called in render, because it uses local main */ - // if (idtype == ID_TE) { - // Tex *tex= (Tex *)id; - // if (tex->use_nodes && tex->nodetree) - // ntreeEndExecTree(tex->nodetree); - // } + /* XXX bad exception, end-exec is not being called in render, because it uses local main. */ +#if 0 + if (idtype == ID_TE) { + Tex *tex = (Tex *)id; + if (tex->use_nodes && tex->nodetree) + ntreeEndExecTree(tex->nodetree); + } +#endif } /* runs inside thread for material and icons */ @@ -1083,7 +1085,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat int source = deferred_data[0]; char *path = &deferred_data[1]; - // printf("generating deferred %d×%d preview for %s\n", sp->sizex, sp->sizey, path); + // printf("generating deferred %d×%d preview for %s\n", sp->sizex, sp->sizey, path); thumb = IMB_thumb_manage(path, THB_LARGE, source); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 6fed806c8af..60e5c2081fd 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -94,7 +94,7 @@ #include "engines/eevee/eevee_lightcache.h" -#include "render_intern.h" // own include +#include "render_intern.h" /* own include */ static bool object_materials_supported_poll_ex(bContext *C, const Object *ob); @@ -1092,7 +1092,7 @@ static int light_cache_bake_exec(bContext *C, wmOperator *op) EEVEE_lightbake_job(rj, &stop, &do_update, &progress); EEVEE_lightbake_job_data_free(rj); - // no redraw needed, we leave state as we entered it + /* No redraw needed, we leave state as we entered it. */ ED_update_for_newframe(bmain, CTX_data_depsgraph_pointer(C)); WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene); diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index 1ba32d3386d..ffb2d3991b7 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -64,7 +64,7 @@ #include "WM_api.h" -#include "render_intern.h" // own include +#include "render_intern.h" /* own include */ /***************************** Render Engines ********************************/ diff --git a/source/blender/editors/screen/screen_geometry.c b/source/blender/editors/screen/screen_geometry.c index 29e5f398ec3..50bfd6619e6 100644 --- a/source/blender/editors/screen/screen_geometry.c +++ b/source/blender/editors/screen/screen_geometry.c @@ -318,7 +318,7 @@ short screen_geom_find_area_split_point(const ScrArea *area, const short area_min_y = ED_area_headersize(); int area_min; - // area big enough? + /* area big enough? */ if ((dir == 'v') && (cur_area_width <= 2 * area_min_x)) { return 0; } @@ -326,7 +326,7 @@ short screen_geom_find_area_split_point(const ScrArea *area, return 0; } - // to be sure + /* to be sure */ CLAMP(fac, 0.0f, 1.0f); if (dir == 'h') { diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 3ac2b65f97a..fe16611a6eb 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -882,7 +882,7 @@ static int grab_clone_modal(bContext *C, wmOperator *op, const wmEvent *event) switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: - case RIGHTMOUSE: // XXX hardcoded + case RIGHTMOUSE: /* XXX hardcoded */ MEM_freeN(op->customdata); return OPERATOR_FINISHED; case MOUSEMOVE: diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 15ecaec5657..75f1e63ebb3 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3054,9 +3054,9 @@ static void project_paint_face_init(const ProjPaintState *ps, lt_uv_pxoffset[2][1] = lt_tri_uv[2][1] - yhalfpx; { - uv1co = lt_uv_pxoffset[0]; // was lt_tri_uv[i1]; - uv2co = lt_uv_pxoffset[1]; // was lt_tri_uv[i2]; - uv3co = lt_uv_pxoffset[2]; // was lt_tri_uv[i3]; + uv1co = lt_uv_pxoffset[0]; /* was lt_tri_uv[i1]; */ + uv2co = lt_uv_pxoffset[1]; /* was lt_tri_uv[i2]; */ + uv3co = lt_uv_pxoffset[2]; /* was lt_tri_uv[i3]; */ v1coSS = ps->screenCoords[lt_vtri[0]]; v2coSS = ps->screenCoords[lt_vtri[1]]; @@ -3414,7 +3414,7 @@ static void project_paint_face_init(const ProjPaintState *ps, } #else UNUSED_VARS(vCo, threaded); -#endif // PROJ_DEBUG_NOSEAMBLEED +#endif /* PROJ_DEBUG_NOSEAMBLEED */ } /** @@ -4221,7 +4221,7 @@ static bool project_paint_winclip(const ProjPaintState *ps, const ProjPaintFaceC (coSS->v1[1] > ps->screenMax[1] && coSS->v2[1] > ps->screenMax[1] && coSS->v3[1] > ps->screenMax[1]))); } -#endif // PROJ_DEBUG_WINCLIP +#endif /* PROJ_DEBUG_WINCLIP */ typedef struct PrepareImageEntry { struct PrepareImageEntry *next, *prev; @@ -4719,7 +4719,12 @@ static bool project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) const float radius = ps->brush_size; /* so we don't have a bucket bounds that is way too small to paint into */ - // if (radius < 1.0f) radius = 1.0f; // this doesn't work yet :/ +#if 0 + /* This doesn't work yet. */ + if (radius < 1.0f) { + radius = 1.0f; + } +#endif min_brush[0] = mval_f[0] - radius; min_brush[1] = mval_f[1] - radius; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 9bf1911aee8..d5745caa66a 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -57,7 +57,7 @@ #include "sculpt_intern.h" #include <string.h> -//#include <stdio.h> +// #include <stdio.h> #include <stddef.h> /* Brush operators */ @@ -144,7 +144,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) float scalar = RNA_float_get(op->ptr, "scalar"); if (brush) { - // pixel radius + /* pixel radius */ { const int old_size = BKE_brush_size_get(scene, brush); int size = (int)(scalar * old_size); @@ -161,11 +161,11 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) BKE_brush_size_set(scene, brush, size); } - // unprojected radius + /* unprojected radius */ { float unprojected_radius = scalar * BKE_brush_unprojected_radius_get(scene, brush); - if (unprojected_radius < 0.001f) { // XXX magic number + if (unprojected_radius < 0.001f) { /* XXX magic number */ unprojected_radius = 0.001f; } diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 287e1eb03d1..c67a3145be8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -55,7 +55,7 @@ #include "BKE_subsurf.h" #include "BKE_undo_system.h" -// XXX: Ideally should be no direct call to such low level things. +/* XXX: Ideally should be no direct call to such low level things. */ #include "BKE_subdiv_eval.h" #include "DEG_depsgraph.h" diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 9d9918a6daf..e5f6b61a2ae 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -126,7 +126,7 @@ static int sound_open_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -#else // WITH_AUDASPACE +#else /* WITH_AUDASPACE */ static int sound_open_exec(bContext *UNUSED(C), wmOperator *op) { @@ -410,10 +410,10 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, result); return OPERATOR_CANCELLED; } -#else // WITH_AUDASPACE +#else /* WITH_AUDASPACE */ (void)C; (void)op; -#endif // WITH_AUDASPACE +#endif /* WITH_AUDASPACE */ return OPERATOR_FINISHED; } @@ -493,7 +493,7 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op) return false; } -#endif // WITH_AUDASPACE +#endif /* WITH_AUDASPACE */ static int sound_mixdown_invoke(bContext *C, wmOperator *op, const wmEvent *event) { @@ -666,7 +666,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op) uiDefAutoButsRNA( layout, &ptr, sound_mixdown_draw_check_prop, NULL, NULL, UI_BUT_LABEL_ALIGN_NONE, false); } -#endif // WITH_AUDASPACE +#endif /* WITH_AUDASPACE */ static void SOUND_OT_mixdown(wmOperatorType *ot) { @@ -696,7 +696,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}, }; -#endif // WITH_AUDASPACE +#endif /* WITH_AUDASPACE */ /* identifiers */ ot->name = "Mixdown"; @@ -743,7 +743,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot) 0, "Split channels", "Each channel will be rendered into a mono file"); -#endif // WITH_AUDASPACE +#endif /* WITH_AUDASPACE */ } /* ******************************************************* */ diff --git a/source/blender/editors/space_action/action_buttons.c b/source/blender/editors/space_action/action_buttons.c index ed49a1ed6d6..5e1c205f1d4 100644 --- a/source/blender/editors/space_action/action_buttons.c +++ b/source/blender/editors/space_action/action_buttons.c @@ -54,7 +54,7 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "action_intern.h" // own include +#include "action_intern.h" /* own include */ /* ******************* action editor space & buttons ************** */ @@ -65,7 +65,7 @@ void action_buttons_register(ARegionType *UNUSED(art)) #if 0 PanelType *pt; - // TODO: AnimData / Actions List + /* TODO: AnimData / Actions List */ pt = MEM_callocN(sizeof(PanelType), "spacetype action panel properties"); strcpy(pt->idname, "ACTION_PT_properties"); diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c index d5b185302c1..e20be9c8328 100644 --- a/source/blender/editors/space_action/action_data.c +++ b/source/blender/editors/space_action/action_data.c @@ -757,7 +757,7 @@ static void action_layer_switch_strip( adt->flag |= ADT_NLA_SOLO_TRACK; nlt->flag |= NLATRACK_SOLO; - // TODO: Needs rest-pose flushing (when we get reference track) + /* TODO: Needs rest-pose flushing (when we get reference track) */ } } @@ -851,7 +851,7 @@ static int action_layer_next_exec(bContext *C, wmOperator *op) /* turn on NLA muting (to keep same effect) */ adt->flag |= ADT_NLA_EVAL_OFF; - // TODO: Needs rest-pose flushing (when we get reference track) + /* TODO: Needs rest-pose flushing (when we get reference track) */ } } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 73d272cff4f..e14e78912d7 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -286,7 +286,7 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) } /* set notifier that things have changed */ - // XXX err... there's nothing for frame ranges yet, but this should do fine too + /* XXX err... there's nothing for frame ranges yet, but this should do fine too */ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene); return OPERATOR_FINISHED; @@ -1107,7 +1107,7 @@ void ACTION_OT_clean(wmOperatorType *ot) ot->description = "Simplify F-Curves by removing closely spaced keyframes"; /* api callbacks */ - // ot->invoke = // XXX we need that number popup for this! + // ot->invoke = /* XXX we need that number popup for this! */ ot->exec = actkeys_clean_exec; ot->poll = ED_operator_action_active; diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index f40b792269b..c49bac58474 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -132,17 +132,17 @@ static void actkeys_list_element_to_keylist(bAnimContext *ac, summary_to_keylist(ac, anim_keys, 0); } else if (ale->type == ANIMTYPE_GROUP) { - // TODO: why don't we just give groups key_data too? + /* TODO: why don't we just give groups key_data too? */ bActionGroup *agrp = (bActionGroup *)ale->data; agroup_to_keylist(adt, agrp, anim_keys, 0); } else if (ale->type == ANIMTYPE_GPLAYER) { - // TODO: why don't we just give gplayers key_data too? + /* TODO: why don't we just give gplayers key_data too? */ bGPDlayer *gpl = (bGPDlayer *)ale->data; gpl_to_keylist(ads, gpl, anim_keys); } else if (ale->type == ANIMTYPE_MASKLAYER) { - // TODO: why don't we just give masklayers key_data too? + /* TODO: why don't we just give masklayers key_data too? */ MaskLayer *masklay = (MaskLayer *)ale->data; mask_to_keylist(ads, masklay, anim_keys); } @@ -1877,7 +1877,7 @@ void ACTION_OT_clickselect(wmOperatorType *ot) "extend", 0, "Extend Select", - "Toggle keyframe selection instead of leaving newly selected keyframes only"); // SHIFTKEY + "Toggle keyframe selection instead of leaving newly selected keyframes only"); /* SHIFTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, @@ -1892,7 +1892,7 @@ void ACTION_OT_clickselect(wmOperatorType *ot) "column", 0, "Column Select", - "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY + "Select all keyframes that occur on the same frame as the one under the mouse"); /* ALTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean( @@ -1900,7 +1900,7 @@ void ACTION_OT_clickselect(wmOperatorType *ot) "channel", 0, "Only Channel", - "Select all the keyframes in the channel under the mouse"); // CTRLKEY + ALTKEY + "Select all the keyframes in the channel under the mouse"); /* CTRLKEY + ALTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 8f049816941..ff0201f9702 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -801,7 +801,7 @@ static void action_refresh(const bContext *C, ScrArea *area) } /* region updates? */ - // XXX re-sizing y-extents of tot should go here? + /* XXX re-sizing y-extents of tot should go here? */ } static void action_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id) diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index fabccecd533..64f2afff782 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -64,7 +64,7 @@ #include "WM_api.h" -#include "buttons_intern.h" // own include +#include "buttons_intern.h" /* own include */ static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, StructRNA *type) { diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index dc35a0f3658..6f743eb1a6b 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -70,7 +70,7 @@ #include "../interface/interface_intern.h" -#include "buttons_intern.h" // own include +#include "buttons_intern.h" /* own include */ /************************* Texture User **************************/ diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c index c3323491085..135b7d1cb6c 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_ops.c +++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c @@ -43,7 +43,7 @@ #include "UI_view2d.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ static bool space_clip_dopesheet_poll(bContext *C) { diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 4759075555b..93c30c9a4ba 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -62,7 +62,7 @@ #include "BLF_api.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ /*********************** main area drawing *************************/ diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index b2c80faec0b..69b89d25a1a 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -65,7 +65,7 @@ #include "UI_view2d.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ /* ******** operactor poll functions ******** */ diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c index 4cf3e3e0798..e6fb6d75051 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.c +++ b/source/blender/editors/space_clip/clip_graph_draw.c @@ -45,7 +45,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ typedef struct TrackMotionCurveUserData { SpaceClip *sc; diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index ffd3241a30f..590f8efe105 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -44,7 +44,7 @@ #include "UI_view2d.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ /******************** common graph-editing utilities ********************/ diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 013731a50d6..26fa5b8a06c 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -76,7 +76,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ /* -------------------------------------------------------------------- */ /** \name View Navigation Utilities diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index cbf43bb7ff0..c7f2a027ba8 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -50,7 +50,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ bool clip_graph_value_visible(SpaceClip *sc, eClipCurveValueSource value_source) { diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c index afbca48bd45..66669527929 100644 --- a/source/blender/editors/space_clip/tracking_ops_track.c +++ b/source/blender/editors/space_clip/tracking_ops_track.c @@ -46,7 +46,7 @@ #include "DEG_depsgraph.h" -#include "clip_intern.h" // own include +#include "clip_intern.h" /* own include */ #include "tracking_ops_intern.h" /********************** Track operator *********************/ @@ -281,7 +281,7 @@ static void track_markers_endjob(void *tmv) tmj->clip->tracking_context = NULL; tmj->scene->r.cfra = BKE_movieclip_remap_clip_to_scene_frame(tmj->clip, tmj->lastfra); if (wm != NULL) { - // XXX: ... + /* XXX */ // ED_update_for_newframe(tmj->main, tmj->scene); } diff --git a/source/blender/editors/space_clip/tracking_ops_utils.c b/source/blender/editors/space_clip/tracking_ops_utils.c index 7579c9a49c6..1f959e94309 100644 --- a/source/blender/editors/space_clip/tracking_ops_utils.c +++ b/source/blender/editors/space_clip/tracking_ops_utils.c @@ -33,7 +33,7 @@ #include "WM_api.h" #include "WM_types.h" -#include "tracking_ops_intern.h" // own include +#include "tracking_ops_intern.h" /* own include */ void clip_tracking_clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip) { diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index f0d4a45a3dd..77f1111624d 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -131,7 +131,7 @@ static bool console_line_cursor_set(ConsoleLine *cl, int cursor) return true; } -#if 0 // XXX unused +#if 0 /* XXX unused */ static void console_lb_debug__internal(ListBase *lb) { ConsoleLine *cl; @@ -415,7 +415,8 @@ static int console_insert_exec(bContext *C, wmOperator *op) static int console_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event) { - // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ + /* Note, the "text" property is always set from key-map, + * so we can't use #RNA_struct_property_is_set, check the length instead. */ if (!RNA_string_length(op->ptr, "text")) { /* if alt/ctrl/super are pressed pass through except for utf8 character event * (when input method are used for utf8 inputs, the user may assign key event @@ -1108,7 +1109,7 @@ typedef struct SetConsoleCursor { int sel_init; } SetConsoleCursor; -// TODO, cursor placement without selection +/* TODO, cursor placement without selection */ static void console_cursor_set_to_pos( SpaceConsole *sc, ARegion *region, SetConsoleCursor *scu, const int mval[2], int UNUSED(sel)) { diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 4b554e0c5c0..a54faa41122 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -42,7 +42,7 @@ #include "UI_view2d.h" #include "GPU_framebuffer.h" -#include "console_intern.h" // own include +#include "console_intern.h" /* own include */ /* ******************** default callbacks for console space ***************** */ diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 7039eba7db1..4b277435f63 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -69,7 +69,7 @@ #include "filelist.h" -#include "file_intern.h" // own include +#include "file_intern.h" /* own include */ void ED_file_path_button(bScreen *screen, const SpaceFile *sfile, diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 7ac3c209f2d..7bbf27c1f1e 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1877,7 +1877,7 @@ static int file_next_exec(bContext *C, wmOperator *UNUSED(unused)) folderlist_pushdir(sfile->folders_prev, sfile->params->dir); folderlist_popdir(sfile->folders_next, sfile->params->dir); - // update folders_prev so we can check for it in folderlist_clear_next() + /* update folders_prev so we can check for it in #folderlist_clear_next() */ folderlist_pushdir(sfile->folders_prev, sfile->params->dir); ED_file_change_dir(C); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 8d0239a182d..84352127264 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -2640,7 +2640,7 @@ static void filelist_readjob_main_recursive(Main *bmain, FileList *filelist) ListBase *lb; int a, fake, idcode, ok, totlib, totbl; - // filelist->type = FILE_MAIN; // XXX TODO: add modes to filebrowser + // filelist->type = FILE_MAIN; /* XXX TODO: add modes to filebrowser */ BLI_assert(filelist->filelist.entries == NULL); diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index edc1e83e882..6ffe553e076 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -51,7 +51,7 @@ #include "UI_view2d.h" #include "GPU_framebuffer.h" -#include "file_intern.h" // own include +#include "file_intern.h" /* own include */ #include "filelist.h" #include "fsmenu.h" @@ -142,7 +142,7 @@ static void file_free(SpaceLink *sl) BLI_assert(sfile->previews_timer == NULL); if (sfile->files) { - // XXXXX would need to do thumbnails_stop here, but no context available + /* XXX would need to do thumbnails_stop here, but no context available */ filelist_freelib(sfile->files); filelist_free(sfile->files); MEM_freeN(sfile->files); diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index bbdca5280d4..be3e49fd810 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -64,7 +64,7 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "graph_intern.h" // own include +#include "graph_intern.h" /* own include */ /* ******************* graph editor space & buttons ************** */ @@ -644,7 +644,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *id_v, int event) } /* default for now */ - WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); // XXX could use better notifier + WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); /* XXX could use better notifier */ } /* callback to add a target variable to the active driver */ @@ -1120,7 +1120,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, 0.0, 0.0, TIP_("Invalid variable name, click here for details")); - UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, NULL); // XXX: reports? + UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, NULL); /* XXX: reports? */ } /* 1.3) remove button */ @@ -1316,9 +1316,9 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *panel) static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event) { switch (event) { - case B_FMODIFIER_REDRAW: // XXX this should send depsgraph updates too + case B_FMODIFIER_REDRAW: /* XXX this should send depsgraph updates too */ WM_event_add_notifier( - C, NC_ANIMATION, NULL); // XXX need a notifier specially for F-Modifiers + C, NC_ANIMATION, NULL); /* XXX need a notifier specially for F-Modifiers */ break; } } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index e99aeb82456..9fe6b4e06f6 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -243,7 +243,7 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) scene->r.pefra = round_fl_to_int(max); /* set notifier that things have changed */ - // XXX err... there's nothing for frame ranges yet, but this should do fine too + /* XXX err... there's nothing for frame ranges yet, but this should do fine too */ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene); return OPERATOR_FINISHED; @@ -258,7 +258,7 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot) /* api callbacks */ ot->exec = graphkeys_previewrange_exec; - // 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 */ @@ -514,7 +514,7 @@ void GRAPH_OT_ghost_curves_create(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - // todo: add props for start/end frames + /* TODO: add props for start/end frames */ } /* ******************** Clear Ghost-Curves Operator *********************** */ @@ -1069,7 +1069,8 @@ void GRAPH_OT_paste(wmOperatorType *ot) "frame"; /* api callbacks */ - // ot->invoke = WM_operator_props_popup; // better wait for graph redo panel + + // ot->invoke = WM_operator_props_popup; /* better wait for graph redo panel */ ot->exec = graphkeys_paste_exec; ot->poll = graphop_editable_keyframes_poll; @@ -1292,7 +1293,7 @@ void GRAPH_OT_clean(wmOperatorType *ot) ot->description = "Simplify F-Curves by removing closely spaced keyframes"; /* api callbacks */ - // ot->invoke = // XXX we need that number popup for this! + // ot->invoke = ???; /* XXX we need that number popup for this! */ ot->exec = graphkeys_clean_exec; ot->poll = graphop_editable_keyframes_poll; @@ -1828,7 +1829,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op)) } /* for now, init start/end from preview-range extents */ - // TODO: add properties for this + /* TODO: add properties for this */ scene = ac.scene; start = PSFRA; end = PEFRA; @@ -1837,7 +1838,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op)) bake_graph_curves(&ac, start, end); /* set notifier that keyframes have changed */ - // NOTE: some distinction between order/number of keyframes and type should be made? + /* NOTE: some distinction between order/number of keyframes and type should be made? */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); return OPERATOR_FINISHED; @@ -1851,14 +1852,14 @@ void GRAPH_OT_bake(wmOperatorType *ot) ot->description = "Bake selected F-Curves to a set of sampled points defining a similar curve"; /* api callbacks */ - ot->invoke = WM_operator_confirm; // FIXME... + ot->invoke = WM_operator_confirm; /* FIXME */ ot->exec = graphkeys_bake_exec; ot->poll = graphop_selected_fcurve_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - // todo: add props for start/end frames + /* TODO: add props for start/end frames */ } #ifdef WITH_AUDASPACE @@ -1974,7 +1975,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -#else // WITH_AUDASPACE +#else /* WITH_AUDASPACE */ static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op) { @@ -1983,7 +1984,7 @@ static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op) return OPERATOR_CANCELLED; } -#endif // WITH_AUDASPACE +#endif /* WITH_AUDASPACE */ static int graphkeys_sound_bake_invoke(bContext *C, wmOperator *op, const wmEvent *event) { @@ -2224,7 +2225,7 @@ static void setexpo_graph_keys(bAnimContext *ac, short mode) if (mode == MAKE_CYCLIC_EXPO) { /* only add if one doesn't exist */ if (list_has_suitable_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES, -1) == 0) { - // TODO: add some more preset versions which set different extrapolation options? + /* TODO: add some more preset versions which set different extrapolation options? */ add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES, fcu); } } @@ -3249,8 +3250,8 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op) /* filter data */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS); if (RNA_boolean_get(op->ptr, "only_active")) { - filter |= - ANIMFILTER_ACTIVE; // FIXME: enforce in this case only a single channel to get handled? + /* FIXME: enforce in this case only a single channel to get handled? */ + filter |= ANIMFILTER_ACTIVE; } else { filter |= (ANIMFILTER_SEL | ANIMFILTER_CURVE_VISIBLE); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 22c185e36e5..4d337fdeb5e 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -54,7 +54,7 @@ #include "WM_types.h" /* ************************** view-based operators **********************************/ -// XXX should these really be here? +/* XXX should these really be here? */ /* Set Cursor --------------------------------------------------------------------- */ /* The 'cursor' in the Graph Editor consists of two parts: diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 433d7d6774b..36c836b0a91 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -85,13 +85,13 @@ typedef enum eGraphVertIndex { } eGraphVertIndex; /* Tolerance for absolute radius (in pixels) of the vert from the cursor to use */ -// TODO: perhaps this should depend a bit on the size that the user set the vertices to be? +/* TODO: perhaps this should depend a bit on the size that the user set the vertices to be? */ #define GVERTSEL_TOL (10 * U.pixelsize) /* ....... */ /* check if its ok to select a handle */ -// XXX also need to check for int-values only? +/* XXX also need to check for int-values only? */ static bool fcurve_handle_sel_check(SpaceGraph *sipo, BezTriple *bezt) { if (sipo->flag & SIPO_NOHANDLES) { @@ -104,7 +104,7 @@ static bool fcurve_handle_sel_check(SpaceGraph *sipo, BezTriple *bezt) } /* check if the given vertex is within bounds or not */ -// TODO: should we return if we hit something? +/* TODO: should we return if we hit something? */ static void nearest_fcurve_vert_store(ListBase *matches, View2D *v2d, FCurve *fcu, @@ -158,7 +158,7 @@ static void nearest_fcurve_vert_store(ListBase *matches, nvi->frame = bezt->vec[1][0]; /* currently in global time... */ - nvi->sel = BEZT_ISSEL_ANY(bezt); // XXX... should this use the individual verts instead? + nvi->sel = BEZT_ISSEL_ANY(bezt); /* XXX... should this use the individual verts instead? */ /* add to list of matches if appropriate... */ if (replace == 0) { @@ -188,7 +188,7 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS); if (sipo->flag & - SIPO_SELCUVERTSONLY) { // FIXME: this should really be check for by the filtering code... + SIPO_SELCUVERTSONLY) { /* FIXME: this should really be check for by the filtering code... */ filter |= ANIMFILTER_SEL; } mapping_flag |= ANIM_get_normalization_flags(ac); @@ -257,7 +257,7 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L } } else if (fcu->fpt) { - // TODO; do this for samples too + /* TODO; do this for samples too */ } /* un-apply NLA mapping from all the keyframes */ @@ -1480,7 +1480,7 @@ static int mouse_graph_keys(bAnimContext *ac, } /* if points can be selected on this F-Curve */ - // TODO: what about those with no keyframes? + /* TODO: what about those with no keyframes? */ if (!curves_only && ((nvi->fcu->flag & FCURVE_PROTECTED) == 0)) { /* only if there's keyframe */ if (nvi->bezt) { @@ -1515,7 +1515,7 @@ static int mouse_graph_keys(bAnimContext *ac, } } else if (nvi->fpt) { - // TODO: need to handle sample points + /* TODO: need to handle sample points */ } } else { @@ -1609,7 +1609,7 @@ static int graphkeys_mselect_column(bAnimContext *ac, } /* get frame number on which elements should be selected */ - // TODO: should we restrict to integer frames only? + /* TODO: should we restrict to integer frames only? */ selx = nvi->frame; if (select_mode != SELECT_REPLACE) { @@ -1739,7 +1739,7 @@ void GRAPH_OT_clickselect(wmOperatorType *ot) 0, "Extend Select", "Toggle keyframe selection instead of leaving newly selected " - "keyframes only"); // SHIFTKEY + "keyframes only"); /* SHIFTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, @@ -1754,14 +1754,14 @@ void GRAPH_OT_clickselect(wmOperatorType *ot) 0, "Column Select", "Select all keyframes that occur on the same frame as the one under " - "the mouse"); // ALTKEY + "the mouse"); /* ALTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, "curves", 0, "Only Curves", - "Select all the keyframes in the curve"); // CTRLKEY + ALTKEY + "Select all the keyframes in the curve"); /* CTRLKEY + ALTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index ffac9f1c722..8463c21b1ad 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -46,7 +46,7 @@ #include "RNA_access.h" -#include "graph_intern.h" // own include +#include "graph_intern.h" /* own include */ /* ************************************************************** */ /* Set Up Drivers Editor */ @@ -141,7 +141,7 @@ bool graphop_visible_keyframes_poll(bContext *C) bool found = false; /* firstly, check if in Graph Editor */ - // TODO: also check for region? + /* TODO: also check for region? */ if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return found; } @@ -194,7 +194,7 @@ bool graphop_editable_keyframes_poll(bContext *C) bool found = false; /* firstly, check if in Graph Editor */ - // TODO: also check for region? + /* TODO: also check for region? */ if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return found; } @@ -246,7 +246,7 @@ bool graphop_active_fcurve_poll(bContext *C) bool has_fcurve = false; /* firstly, check if in Graph Editor */ - // TODO: also check for region? + /* TODO: also check for region? */ if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return has_fcurve; } @@ -299,7 +299,7 @@ bool graphop_selected_fcurve_poll(bContext *C) int filter; /* firstly, check if in Graph Editor */ - // TODO: also check for region? + /* TODO: also check for region? */ if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return false; } diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 97db9b756ad..791039498e8 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -60,7 +60,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "graph_intern.h" // own include +#include "graph_intern.h" /* own include */ /* ******************** default callbacks for ipo space ***************** */ @@ -317,7 +317,7 @@ static void graph_main_region_draw_overlay(const bContext *C, ARegion *region) ED_time_scrub_draw_current_frame(region, scene, sipo->flag & SIPO_DRAWTIME, draw_vert_line); /* scrollers */ - // FIXME: args for scrollers depend on the type of data being shown... + /* FIXME: args for scrollers depend on the type of data being shown. */ UI_view2d_scrollers_draw(v2d, NULL); /* scale numbers */ @@ -615,10 +615,13 @@ static void graph_listener(wmWindow *UNUSED(win), } break; - // XXX: restore the case below if not enough updates occur... - // default: - // if (wmn->data == ND_KEYS) - // ED_area_tag_redraw(area); +#if 0 /* XXX: restore the case below if not enough updates occur... */ + default: { + if (wmn->data == ND_KEYS) { + ED_area_tag_redraw(area); + } + } +#endif } } @@ -763,7 +766,7 @@ static void graph_refresh(const bContext *C, ScrArea *area) } /* region updates? */ - // XXX re-sizing y-extents of tot should go here? + /* XXX re-sizing y-extents of tot should go here? */ /* 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, diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 1f8dd7cfe44..0dcc090fa0e 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -725,9 +725,6 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, } } -// XXX HACK! -// static int packdummy=0; - typedef struct RNAUpdateCb { PointerRNA ptr; PropertyRNA *prop; diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 7a53e9b75b6..7a066adae77 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -603,7 +603,7 @@ static void image_main_region_init(wmWindowManager *wm, ARegion *region) { wmKeyMap *keymap; - // image space manages own v2d + /* Image space manages own v2d. */ // UI_view2d_region_reinit(®ion->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy); /* mask polls mode */ diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 30f36509b41..0544a2cbefa 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -161,7 +161,7 @@ static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(ev Main *bmain = CTX_data_main(C); Image *ima; - // first check for dirty images + /* First check for dirty images. */ for (ima = bmain->images.first; ima; ima = ima->id.next) { if (BKE_image_is_dirty(ima)) { break; diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index adc6391a0f6..3ba088018c3 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -100,15 +100,15 @@ int info_report_mask(const SpaceInfo *UNUSED(sinfo)) RPT_ERROR_ALL; } -// TODO, get this working again! static int report_replay_exec(bContext *C, wmOperator *UNUSED(op)) { - // SpaceInfo *sc = CTX_wm_space_info(C); - // ReportList *reports = CTX_wm_reports(C); - // int report_mask = info_report_mask(sc); - // Report *report; - + /* TODO, get this working again! */ #if 0 + SpaceInfo *sc = CTX_wm_space_info(C); + ReportList *reports = CTX_wm_reports(C); + int report_mask = info_report_mask(sc); + Report *report; + sc->type = CONSOLE_TYPE_PYTHON; for (report = reports->list.last; report; report = report->prev) { diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 130167f1bd0..db4e2dcdfba 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -51,7 +51,7 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "nla_intern.h" // own include +#include "nla_intern.h" /* own include */ /* ******************* nla editor space & buttons ************** */ @@ -91,7 +91,7 @@ bool nla_panel_context(const bContext *C, /* extract list of active channel(s), of which we should only take the first one * - we need the channels flag to get the active AnimData block when there are no NLA Tracks */ - // XXX: double-check active! + /* XXX: double-check active! */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); @@ -404,7 +404,7 @@ static void nla_panel_properties(const bContext *C, Panel *panel) row = uiLayoutRow(column, true); uiLayoutSetActive(row, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false); - uiItemR(row, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle? + uiItemR(row, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); /* XXX as toggle? */ /* settings */ column = uiLayoutColumnWithHeading(layout, true, IFACE_("Playback")); @@ -558,8 +558,8 @@ static void nla_panel_modifiers(const bContext *C, Panel *panel) row = uiLayoutRow(panel->layout, false); block = uiLayoutGetBlock(row); - // FIXME: we need to set the only-active property so that this - // will only add modifiers for the active strip (not all selected). + /* FIXME: we need to set the only-active property so that this + * will only add modifiers for the active strip (not all selected). */ uiItemMenuEnumO( row, (bContext *)C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index f6f3571018a..fbda0ff7bde 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -59,7 +59,7 @@ #include "UI_view2d.h" -#include "nla_intern.h" // own include +#include "nla_intern.h" /* own include */ /* *********************************************** */ /* Operators for NLA channels-list which need to be different @@ -103,7 +103,7 @@ static int mouse_nla_channels( } /* action to take depends on what channel we've got */ - // WARNING: must keep this in sync with the equivalent function in anim_channels_edit.c + /* WARNING: must keep this in sync with the equivalent function in anim_channels_edit.c */ switch (ale->type) { case ANIMTYPE_SCENE: { Scene *sce = (Scene *)ale->data; @@ -427,7 +427,7 @@ void NLA_OT_channels_click(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* props */ - prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); /* SHIFTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 9e43a8ce109..6fe980cf657 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -266,7 +266,7 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col } else if (strip->type == NLASTRIP_TYPE_META) { /* Meta Clip */ - // TODO: should temporary metas get different colors too? + /* TODO: should temporary metas get different colors too? */ if (strip->flag & NLASTRIP_FLAG_SELECT) { /* selected - use a bold purple color */ UI_GetThemeColor3fv(TH_NLA_META_SEL, color); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index d82a39786d9..fa27a6941ec 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -65,8 +65,8 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "nla_intern.h" // own include -#include "nla_private.h" // FIXME... maybe this shouldn't be included? +#include "nla_intern.h" /* own include */ +#include "nla_private.h" /* FIXME... maybe this shouldn't be included? */ /* *********************************************** */ /* Utilities exported to other places... */ @@ -381,7 +381,7 @@ static int nlaedit_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) scene->r.pefra = round_fl_to_int(max); /* set notifier that things have changed */ - // XXX err... there's nothing for frame ranges yet, but this should do fine too + /* XXX err... there's nothing for frame ranges yet, but this should do fine too */ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene); return OPERATOR_FINISHED; @@ -717,7 +717,7 @@ void NLA_OT_actionclip_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - // TODO: this would be nicer as an ID-pointer... + /* TODO: this would be nicer as an ID-pointer. */ prop = RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", ""); RNA_def_enum_funcs(prop, RNA_action_itemf); RNA_def_property_flag(prop, PROP_ENUM_NO_TRANSLATE); @@ -878,7 +878,8 @@ static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op)) ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* for each track, add sound clips if it belongs to a speaker */ - // TODO: what happens if there aren't any tracks... well that's a more general problem for later + /* TODO: what happens if there aren't any tracks, + * well that's a more general problem for later. */ for (ale = anim_data.first; ale; ale = ale->next) { Object *ob = (Object *)ale->id; /* may not be object until we actually check! */ @@ -1260,9 +1261,9 @@ void NLA_OT_delete(wmOperatorType *ot) /* ******************** Split Strips Operator ***************************** */ /* Splits the selected NLA-Strips into two strips at the midpoint of the strip */ -// TODO's? -// - multiple splits -// - variable-length splits? +/* TODO's? + * - multiple splits + * - variable-length splits? */ /* split a given Action-Clip strip */ static void nlaedit_split_strip_actclip( @@ -1440,7 +1441,7 @@ static int nlaedit_toggle_mute_exec(bContext *C, wmOperator *UNUSED(op)) for (strip = nlt->strips.first; strip; strip = strip->next) { if (strip->flag & NLASTRIP_FLAG_SELECT) { /* just flip the mute flag for now */ - // TODO: have a pre-pass to check if mute all or unmute all? + /* TODO: have a pre-pass to check if mute all or unmute all? */ strip->flag ^= NLASTRIP_FLAG_MUTED; /* tag AnimData to get recalculated */ @@ -2158,8 +2159,9 @@ void NLA_OT_clear_scale(wmOperatorType *ot) /* defines for snap keyframes tool */ static const EnumPropertyItem prop_nlaedit_snap_types[] = { {NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current Frame", ""}, - {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? - // XXX as single entry? + /* XXX as single entry? */ + {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, + /* XXX as single entry? */ {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, {NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""}, {0, NULL, 0, NULL, NULL}, @@ -2481,7 +2483,7 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op) continue; } - // TODO: when 'active' vs 'all' boolean is added, change last param! + /* TODO: when 'active' vs 'all' boolean is added, change last param! */ ok |= ANIM_fmodifiers_copy_to_buf(&strip->modifiers, 0); } } diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index ec41368b9f0..74e5f1cfdd0 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -49,7 +49,7 @@ #include "UI_interface.h" #include "UI_view2d.h" -#include "nla_intern.h" // own include +#include "nla_intern.h" /* own include */ /* ******************** Utilities ***************************************** */ @@ -100,7 +100,7 @@ static void deselect_nla_strips(bAnimContext *ac, short test, short sel) short smode; /* determine type-based settings */ - // FIXME: double check whether ANIMFILTER_LIST_VISIBLE is needed! + /* FIXME: double check whether ANIMFILTER_LIST_VISIBLE is needed! */ filter = (ANIMFILTER_DATA_VISIBLE); /* filter data */ @@ -728,7 +728,7 @@ void NLA_OT_click_select(wmOperatorType *ot) /* properties */ WM_operator_properties_generic_select(ot); - prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY + prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); /* SHIFTKEY */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 7a0cd35ece1..7e3f90b01ba 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -551,7 +551,7 @@ static void nla_listener(wmWindow *UNUSED(win), /* context changes */ switch (wmn->category) { case NC_ANIMATION: - // TODO: filter specific types of changes? + /* TODO: filter specific types of changes? */ ED_area_tag_refresh(area); break; case NC_SCENE: diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 9373c434b9b..10aa53abb01 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2369,7 +2369,7 @@ static void node_composit_buts_bokehimage(uiLayout *layout, bContext *UNUSED(C), static void node_composit_buts_bokehblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiItemR(layout, ptr, "use_variable_size", DEFAULT_FLAGS, NULL, ICON_NONE); - // uiItemR(layout, ptr, "f_stop", DEFAULT_FLAGS, NULL, ICON_NONE); // UNUSED + // uiItemR(layout, ptr, "f_stop", DEFAULT_FLAGS, NULL, ICON_NONE); /* UNUSED */ uiItemR(layout, ptr, "blur_max", DEFAULT_FLAGS, NULL, ICON_NONE); uiItemR(layout, ptr, "use_extended_bounds", DEFAULT_FLAGS, NULL, ICON_NONE); } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 8c9d477e864..894da811ed4 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -773,12 +773,12 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node, bool *r_acti } } else if (ntree->type == NTREE_TEXTURE) { - // XXX + /* XXX */ #if 0 if (node->id) { - // XXX BIF_preview_changed(-1); - // allqueue(REDRAWBUTSSHADING, 1); - // allqueue(REDRAWIPO, 0); + BIF_preview_changed(-1); + allqueue(REDRAWBUTSSHADING, 1); + allqueue(REDRAWIPO, 0); } #endif } @@ -1378,7 +1378,7 @@ void ED_node_select_all(ListBase *lb, int action) } /* ******************************** */ -// XXX some code needing updating to operators... +/* XXX some code needing updating to operators. */ /* goes over all scenes, reads render layers */ static int node_read_viewlayers_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 1a0b5dc9ee8..04e452d5270 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -256,9 +256,9 @@ void NODE_OT_cryptomatte_layer_remove(struct wmOperatorType *ot); extern const char *node_context_dir[]; -// XXXXXX +/* XXXXXX */ -// nodes draw without dpi - the view zoom is flexible +/* Nodes draw without dpi - the view zoom is flexible. */ #define HIDDEN_RAD (0.75f * U.widget_unit) #define BASIS_RAD (0.2f * U.widget_unit) #define NODE_DYS (U.widget_unit / 2) @@ -271,7 +271,7 @@ extern const char *node_context_dir[]; #define NODE_RESIZE_MARGIN (0.20f * U.widget_unit) #define NODE_LINK_RESOL 12 -// XXX button events (butspace) +/* Button events (butspace) */ enum eNodeSpace_ButEvents { B_NOP = 0, B_REDR = 1, diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 57fd84a4521..01b4de90084 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -993,7 +993,7 @@ void NODE_OT_link_make(wmOperatorType *ot) /* callbacks */ ot->exec = node_make_link_exec; - // XXX we need a special poll which checks that there are selected input/output sockets + /* XXX we need a special poll which checks that there are selected input/output sockets. */ ot->poll = ED_operator_node_editable; /* flags */ diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c index ce66740dc60..fca8086d36f 100644 --- a/source/blender/editors/space_node/node_view.c +++ b/source/blender/editors/space_node/node_view.c @@ -607,7 +607,7 @@ static int sample_modal(bContext *C, wmOperator *op, const wmEvent *event) { switch (event->type) { case LEFTMOUSE: - case RIGHTMOUSE: // XXX hardcoded + case RIGHTMOUSE: /* XXX hardcoded */ if (event->val == KM_RELEASE) { sample_exit(C, op); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 56f99d31cf1..bde7bdb77f1 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -39,7 +39,7 @@ #include "ED_screen.h" -#include "script_intern.h" // own include +#include "script_intern.h" /* own include */ #ifdef WITH_PYTHON # include "BPY_extern_run.h" diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index 3c3f7dc1e8e..3330ba14530 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -45,7 +45,7 @@ #endif #include "GPU_framebuffer.h" -#include "script_intern.h" // own include +#include "script_intern.h" /* own include */ // static script_run_python(char *funcname, ) @@ -85,8 +85,6 @@ static void script_free(SpaceLink *sl) #ifdef WITH_PYTHON /*free buttons references*/ if (sscript->but_refs) { - // XXX BPy_Set_DrawButtonsList(sscript->but_refs); - // BPy_Free_DrawButtonsList(); sscript->but_refs = NULL; } #endif @@ -164,9 +162,11 @@ static void script_main_region_listener(wmWindow *UNUSED(win), wmNotifier *UNUSED(wmn), const Scene *UNUSED(scene)) { - /* context changes */ - // XXX - Todo, need the ScriptSpace accessible to get the python script to run. - // BPY_run_script_space_listener() +/* context changes */ +/* XXX - Todo, need the ScriptSpace accessible to get the python script to run. */ +#if 0 + BPY_run_script_space_listener() +#endif } /* only called once, from space/spacetypes.c */ diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 962c4e4c59d..0725109944a 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -182,7 +182,7 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, i RNA_int_set(op->ptr, "frame_start", cfra); if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end") == 0) { - RNA_int_set(op->ptr, "frame_end", cfra + 25); // XXX arbitrary but ok for now. + RNA_int_set(op->ptr, "frame_end", cfra + 25); /* XXX arbitrary but ok for now. */ } if (!(flag & SEQPROP_NOPATHS)) { diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index e041ce3184e..0a4a1ae92d9 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -182,7 +182,7 @@ static void select_linked_time(ListBase *seqbase, Sequence *seq_link) } } -#if 0 // BRING BACK +#if 0 /* BRING BACK */ void select_surround_from_last(Scene *scene) { Sequence *seq = get_last_seq(scene); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index ec5175eae51..d3e6fd8f79c 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1094,7 +1094,7 @@ static void draw_documentation(const SpaceText *st, ARegion *region) i = 0; br = DOC_WIDTH; - lines = 0; // XXX -doc_scroll; + lines = 0; /* XXX -doc_scroll; */ for (p = docs; *p; p++) { if (*p == '\r' && *(++p) != '\n') { *(--p) = '\n'; /* Fix line endings */ @@ -1400,7 +1400,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi char ch; - // syntax_highlight must be on or else the format string will be null + /* syntax_highlight must be on or else the format string will be null */ if (!text->curl || !tdc->syntax_highlight) { return; } diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index c4052fcef84..c583634f440 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -113,7 +113,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) #if 0 { - // RMB + /* RMB */ uiPopupMenu *pup; @@ -140,7 +140,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) } { - // Alt+Shift+E + /* Alt+Shift+E */ uiPopupMenu *pup; @@ -152,7 +152,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) } { - // Alt+Shift+F + /* Alt+Shift+F */ uiPopupMenu *pup; @@ -174,7 +174,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) } { - // Alt+Shift+V + /* Alt+Shift+V */ uiPopupMenu *pup; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 2ae8d4cde7a..5c7f84ea386 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -407,7 +407,7 @@ void TEXT_OT_open(wmOperatorType *ot) FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); // XXX TODO, relative_path + FILE_SORT_ALPHA); /* TODO: relative_path. */ RNA_def_boolean( ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); } @@ -733,7 +733,7 @@ void TEXT_OT_save_as(wmOperatorType *ot) FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); // XXX TODO, relative_path + FILE_SORT_ALPHA); /* XXX TODO, relative_path. */ } /** \} */ @@ -1208,7 +1208,7 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op)) text_drawcache_tag_update(st, 0); - // double check tabs/spaces before splitting the line + /* Double check tabs/spaces before splitting the line. */ curts = txt_setcurr_tab_spaces(text, space); ED_text_undo_push_init(C); txt_split_curline(text); @@ -3463,7 +3463,8 @@ static int text_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event) { int ret; - // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ + /* Note, the "text" property is always set from key-map, + * so we can't use #RNA_struct_property_is_set, check the length instead. */ if (!RNA_string_length(op->ptr, "text")) { /* if alt/ctrl/super are pressed pass through except for utf8 character event * (when input method are used for utf8 inputs, the user may assign key event diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c index e073cb43962..0afa44b6f4f 100644 --- a/source/blender/editors/space_view3d/view3d_project.c +++ b/source/blender/editors/space_view3d/view3d_project.c @@ -776,7 +776,7 @@ void ED_view3d_ob_project_mat_get_from_obmat(const RegionView3D *rv3d, * a point in world space. */ void ED_view3d_project(const struct ARegion *region, const float world[3], float r_region_co[3]) { - // viewport is set up to make coordinates relative to the region, not window + /* Viewport is set up to make coordinates relative to the region, not window. */ RegionView3D *rv3d = region->regiondata; const int viewport[4] = {0, 0, region->winx, region->winy}; diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index fc71648acfb..3f758c0fda3 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2299,7 +2299,7 @@ static bool ed_object_select_pick(bContext *C, /* Set special modes for grease pencil * The grease pencil modes are not real modes, but a hack to make the interface * consistent, so need some tricks to keep UI synchronized */ - // XXX: This stuff needs reviewing (Aligorith) + /* XXX: This stuff needs reviewing (Aligorith) */ if (false && (((oldbasact) && oldbasact->object->type == OB_GPENCIL) || (basact->object->type == OB_GPENCIL))) { /* set cursor */ diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index 92d86f6bebb..dcb3179a46d 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -213,7 +213,7 @@ void view3d_region_operator_needs_opengl(wmWindow *UNUSED(win), ARegion *region) else { RegionView3D *rv3d = region->regiondata; - wmViewport(®ion->winrct); // TODO: bad + wmViewport(®ion->winrct); /* TODO: bad */ GPU_matrix_projection_set(rv3d->winmat); GPU_matrix_set(rv3d->viewmat); } diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index ef389918eb4..1d89b040b85 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -1450,7 +1450,7 @@ static int walk_modal(bContext *C, wmOperator *op, const wmEvent *event) WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, walk_object); } - // too frequent, commented with NDOF_WALK_DRAW_TOOMUCH for now + /* too frequent, commented with NDOF_WALK_DRAW_TOOMUCH for now */ // puts("redraw!"); ED_region_tag_redraw(CTX_wm_region(C)); } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index e2e7611a6b6..4e08b6b1c5d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -70,7 +70,7 @@ /* Disabling, since when you type you know what you are doing, * and being able to set it to zero is handy. */ -// #define USE_NUM_NO_ZERO +/* #define USE_NUM_NO_ZERO */ static void drawTransformApply(const struct bContext *C, ARegion *region, void *arg); @@ -269,7 +269,7 @@ void projectIntViewEx(TransInfo *t, const float vec[3], int adr[2], const eV3DPr SpaceAction *sact = t->area->spacedata.first; if (sact->flag & SACTION_DRAWTIME) { - //vec[0] = vec[0]/((t->scene->r.frs_sec / t->scene->r.frs_sec_base)); + // vec[0] = vec[0] / ((t->scene->r.frs_sec / t->scene->r.frs_sec_base)); /* same as below */ UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], &out[0], &out[1]); } @@ -447,7 +447,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t) } /* For real-time animation record - send notifiers recognized by animation editors */ - // XXX: is this notifier a lame duck? + /* XXX: is this notifier a lame duck? */ if ((t->animtimer) && IS_AUTOKEY_ON(t->scene)) { WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, NULL); } @@ -487,7 +487,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t) ED_area_tag_redraw(t->area); } else { - // XXX how to deal with lock? + /* XXX how to deal with lock? */ SpaceImage *sima = (SpaceImage *)t->area->spacedata.first; if (sima->lock) { WM_event_add_notifier(C, NC_GEOM | ND_DATA, OBEDIT_FROM_VIEW_LAYER(t->view_layer)->data); @@ -539,7 +539,7 @@ static void viewRedrawPost(bContext *C, TransInfo *t) WM_event_add_notifier(C, NC_SCENE | ND_TRANSFORM_DONE, CTX_data_scene(C)); } -#if 0 // TRANSFORM_FIX_ME +#if 0 /* TRANSFORM_FIX_ME */ if (t->spacetype == SPACE_VIEW3D) { allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); @@ -814,7 +814,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) applyMouseInput(t, &t->mouse, t->mval, t->values); - // Snapping mouse move events + /* Snapping mouse move events. */ t->redraw |= handleSnapping(t, event); handled = true; } @@ -854,7 +854,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) resetTransRestrictions(t); transform_mode_init(t, NULL, TFM_TRANSLATION); } - initSnapping(t, NULL); // need to reinit after mode change + initSnapping(t, NULL); /* need to reinit after mode change */ t->redraw |= TREDRAW_HARD; handled = true; } @@ -876,7 +876,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) resetTransModal(t); resetTransRestrictions(t); transform_mode_init(t, NULL, TFM_TRANSLATION); - initSnapping(t, NULL); // need to reinit after mode change + initSnapping(t, NULL); /* need to reinit after mode change */ t->redraw |= TREDRAW_HARD; handled = true; } @@ -895,7 +895,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) else { transform_mode_init(t, NULL, TFM_ROTATION); } - initSnapping(t, NULL); // need to reinit after mode change + initSnapping(t, NULL); /* need to reinit after mode change */ t->redraw |= TREDRAW_HARD; handled = true; } @@ -927,7 +927,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) resetTransModal(t); resetTransRestrictions(t); transform_mode_init(t, NULL, TFM_RESIZE); - initSnapping(t, NULL); // need to reinit after mode change + initSnapping(t, NULL); /* need to reinit after mode change */ t->redraw |= TREDRAW_HARD; handled = true; } @@ -1275,9 +1275,9 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa /* avoid doing connectivity lookups (when V3D_AROUND_LOCAL_ORIGINS is set) */ t->around = V3D_AROUND_CENTER_BOUNDS; - createTransData(C, t); // make TransData structs from selection + createTransData(C, t); /* make TransData structs from selection */ - t->around = centerMode; // override userdefined mode + t->around = centerMode; /* override userdefined mode */ if (t->data_len_all == 0) { success = false; @@ -1292,7 +1292,7 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa } if (cent3d) { - // Copy center from constraint center. Transform center can be local + /* Copy center from constraint center. Transform center can be local */ copy_v3_v3(cent3d, t->center_global); } } @@ -1447,7 +1447,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) t->orient[0].type = V3D_ORIENT_GLOBAL; } - // Save back mode in case we're in the generic operator + /* Save back mode in case we're in the generic operator */ if ((prop = RNA_struct_find_property(op->ptr, "mode"))) { RNA_property_enum_set(op->ptr, prop, t->mode); } @@ -1475,7 +1475,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) } } - // If modal, save settings back in scene if not set as operator argument + /* If modal, save settings back in scene if not set as operator argument */ if ((t->flag & T_MODAL) || (op->flag & OP_IS_REPEAT)) { /* save settings if not set in operator */ @@ -1753,7 +1753,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve SPACE_TYPE_ANY, RGN_TYPE_ANY, transform_draw_cursor_poll, transform_draw_cursor_draw, t); } - createTransData(C, t); // make TransData structs from selection + createTransData(C, t); /* Make #TransData structs from selection. */ if (t->data_len_all == 0) { postTrans(C, t); @@ -1812,7 +1812,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } } - initSnapping(t, op); // Initialize snapping data AFTER mode flags + initSnapping(t, op); /* Initialize snapping data AFTER mode flags */ initSnapSpatial(t, t->snap_spatial); @@ -1874,7 +1874,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve FOREACH_TRANS_DATA_CONTAINER (t, tc) { if ((((Mesh *)(tc->obedit->data))->flag & ME_AUTOSMOOTH)) { - BMEditMesh *em = NULL; // BKE_editmesh_from_object(t->obedit); + BMEditMesh *em = NULL; /* BKE_editmesh_from_object(t->obedit); */ bool do_skip = false; /* Currently only used for two of three most frequent transform ops, @@ -1916,7 +1916,7 @@ void transformApply(bContext *C, TransInfo *t) if ((t->redraw & TREDRAW_HARD) || (t->draw_handle_apply == NULL && (t->redraw & TREDRAW_SOFT))) { selectConstraint(t); if (t->transform) { - t->transform(t, t->mval); // calls recalcData() + t->transform(t, t->mval); /* calls recalcData() */ viewRedrawForce(C, t); } t->redraw = TREDRAW_NOTHING; @@ -1953,7 +1953,7 @@ int transformEnd(bContext *C, TransInfo *t) /* handle restoring objects */ if (t->state == TRANS_CANCEL) { exit_code = OPERATOR_CANCELLED; - restoreTransObjects(t); // calls recalcData() + restoreTransObjects(t); /* calls recalcData() */ } else { if (t->flag & T_CLNOR_REBUILD) { diff --git a/source/blender/editors/transform/transform_convert_action.c b/source/blender/editors/transform/transform_convert_action.c index 40e60544642..da68f9c13de 100644 --- a/source/blender/editors/transform/transform_convert_action.c +++ b/source/blender/editors/transform/transform_convert_action.c @@ -796,9 +796,9 @@ void special_aftertrans_update__actedit(bContext *C, TransInfo *t) /* free temp memory */ ANIM_animdata_freelist(&anim_data); } - else if (ac.datatype == ANIMCONT_ACTION) { // TODO: just integrate into the above... + else if (ac.datatype == ANIMCONT_ACTION) { /* TODO: just integrate into the above. */ /* Depending on the lock status, draw necessary views */ - // fixme... some of this stuff is not good + /* FIXME: some of this stuff is not good. */ if (ob) { if (ob->pose || BKE_key_from_object(ob)) { DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index dd35ed3cbf5..a14ff6c500d 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -99,7 +99,7 @@ static void autokeyframe_pose( bPoseChannel *pchan; FCurve *fcu; - // TODO: this should probably be done per channel instead... + /* TODO: this should probably be done per channel instead. */ if (!autokeyframe_cfra_can_key(scene, id)) { /* tag channels that should have unkeyed data */ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { @@ -337,7 +337,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) if (data->rootbone == 0) { for (bPoseChannel *pchan_iter = pchan; pchan_iter; pchan_iter = pchan_iter->parent) { /* here, we set ik-settings for bone from pchan->protectflag */ - // XXX: careful with quats/axis-angle rotations where we're locking 4d components + /* XXX: careful with quats/axis-angle rotations where we're locking 4d components. */ if (pchan_iter->protectflag & OB_LOCK_ROTX) { pchan_iter->ikflag |= BONE_IK_NO_XDOF_TEMP; } @@ -373,7 +373,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) /* we only include bones that are part of a continual connected chain */ do { /* here, we set ik-settings for bone from pchan->protectflag */ - // XXX: careful with quats/axis-angle rotations where we're locking 4d components + /* XXX: careful with quats/axis-angle rotations where we're locking 4d components. */ if (pchan->protectflag & OB_LOCK_ROTX) { pchan->ikflag |= BONE_IK_NO_XDOF_TEMP; } @@ -683,7 +683,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr td->ival = bone->dist; } else if (t->mode == TFM_BONESIZE) { - // abusive storage of scale in the loc pointer :) + /* Abusive storage of scale in the loc pointer :) */ td->loc = &bone->xwidth; copy_v3_v3(td->iloc, td->loc); td->val = NULL; @@ -957,8 +957,9 @@ void createTransArmatureVerts(TransInfo *t) for (ebo = edbo->first; ebo; ebo = ebo->next) { td_old = td; - ebo->oldlength = - ebo->length; // length==0.0 on extrude, used for scaling radius of bone points + + /* (length == 0.0) on extrude, used for scaling radius of bone points. */ + ebo->oldlength = ebo->length; if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) { if (t->mode == TFM_BONE_ENVELOPE) { @@ -1002,7 +1003,7 @@ void createTransArmatureVerts(TransInfo *t) td->ival = ebo->dist; } else { - // abusive storage of scale in the loc pointer :) + /* Abusive storage of scale in the loc pointer :). */ td->loc = &ebo->xwidth; copy_v3_v3(td->iloc, td->loc); td->val = NULL; @@ -1330,8 +1331,8 @@ static void pose_transform_mirror_update(TransInfo *t, TransDataContainer *tc, O /* We assume X-axis flipping for now. */ pchan->curve_in_x = pchan_orig->curve_in_x * -1; pchan->curve_out_x = pchan_orig->curve_out_x * -1; - pchan->roll1 = pchan_orig->roll1 * -1; // XXX? - pchan->roll2 = pchan_orig->roll2 * -1; // XXX? + pchan->roll1 = pchan_orig->roll1 * -1; /* XXX? */ + pchan->roll2 = pchan_orig->roll2 * -1; /* XXX? */ float pchan_mtx_final[4][4]; BKE_pchan_to_mat4(pchan_orig, pchan_mtx_final); @@ -1465,7 +1466,8 @@ void recalcData_pose(TransInfo *t) * (FPoints) instead of keyframes? */ if ((t->animtimer) && (t->context) && IS_AUTOKEY_ON(t->scene)) { int targetless_ik = - (t->flag & T_AUTOIK); // XXX this currently doesn't work, since flags aren't set yet! + (t->flag & + T_AUTOIK); /* XXX this currently doesn't work, since flags aren't set yet! */ animrecord_check_state(t, ob); autokeyframe_pose(t->context, t->scene, ob, t->mode, targetless_ik); @@ -1617,7 +1619,7 @@ static short apply_targetless_ik(Object *ob) segcount++; if (segcount == data->rootbone || segcount > 255) { - break; // 255 is weak + break; /* 255 is weak */ } } for (; segcount; segcount--) { diff --git a/source/blender/editors/transform/transform_convert_graph.c b/source/blender/editors/transform/transform_convert_graph.c index 8886be9ac85..7daa6498334 100644 --- a/source/blender/editors/transform/transform_convert_graph.c +++ b/source/blender/editors/transform/transform_convert_graph.c @@ -260,7 +260,7 @@ void createTransGraphEditData(bContext *C, TransInfo *t) ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* which side of the current frame should be allowed */ - // XXX we still want this mode, but how to get this using standard transform too? + /* XXX we still want this mode, but how to get this using standard transform too? */ if (t->mode == TFM_TIME_EXTEND) { t->frame_side = transform_convert_frame_side_dir_get(t, (float)CFRA); } diff --git a/source/blender/editors/transform/transform_convert_mesh_edge.c b/source/blender/editors/transform/transform_convert_mesh_edge.c index febfa4cd367..7bdd33192da 100644 --- a/source/blender/editors/transform/transform_convert_mesh_edge.c +++ b/source/blender/editors/transform/transform_convert_mesh_edge.c @@ -86,7 +86,7 @@ void createTransEdge(TransInfo *t) BM_mesh_cd_flag_ensure(em->bm, BKE_mesh_from_object(tc->obedit), ME_CDFLAG_EDGE_BWEIGHT); cd_edge_float_offset = CustomData_get_offset(&em->bm->edata, CD_BWEIGHT); } - else { // if (t->mode == TFM_CREASE) { + else { /* if (t->mode == TFM_CREASE) { */ BLI_assert(t->mode == TFM_CREASE); BM_mesh_cd_flag_ensure(em->bm, BKE_mesh_from_object(tc->obedit), ME_CDFLAG_EDGE_CREASE); cd_edge_float_offset = CustomData_get_offset(&em->bm->edata, CD_CREASE); diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c index afebf1c46a4..8f18f6a8c96 100644 --- a/source/blender/editors/transform/transform_convert_nla.c +++ b/source/blender/editors/transform/transform_convert_nla.c @@ -117,7 +117,7 @@ void createTransNlaData(bContext *C, TransInfo *t) /* only consider selected strips */ for (strip = nlt->strips.first; strip; strip = strip->next) { - // TODO: we can make strips have handles later on... + /* TODO: we can make strips have handles later on. */ /* transition strips can't get directly transformed */ if (strip->type != NLASTRIP_TYPE_TRANSITION) { if (strip->flag & NLASTRIP_FLAG_SELECT) { @@ -166,7 +166,7 @@ void createTransNlaData(bContext *C, TransInfo *t) /* only consider selected strips */ for (strip = nlt->strips.first; strip; strip = strip->next) { - // TODO: we can make strips have handles later on... + /* TODO: we can make strips have handles later on. */ /* transition strips can't get directly transformed */ if (strip->type != NLASTRIP_TYPE_TRANSITION) { if (strip->flag & NLASTRIP_FLAG_SELECT) { diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c index 97ef1e94d45..6664c41b0b6 100644 --- a/source/blender/editors/transform/transform_convert_object.c +++ b/source/blender/editors/transform/transform_convert_object.c @@ -251,8 +251,11 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) td->ext->irotAngle = ob->rotAngle; copy_v3_v3(td->ext->irotAxis, ob->rotAxis); - // td->ext->drotAngle = ob->drotAngle; // XXX, not implemented - // copy_v3_v3(td->ext->drotAxis, ob->drotAxis); // XXX, not implemented + /* XXX, not implemented. */ +#if 0 + td->ext->drotAngle = ob->drotAngle; + copy_v3_v3(td->ext->drotAxis, ob->drotAxis); +#endif } else { td->ext->rot = NULL; @@ -726,7 +729,7 @@ void createTransTexspace(TransInfo *t) ob = OBACT(view_layer); - if (ob == NULL) { // Shouldn't logically happen, but still... + if (ob == NULL) { /* Shouldn't logically happen, but still. */ return; } @@ -788,7 +791,7 @@ static void autokeyframe_object( ID *id = &ob->id; FCurve *fcu; - // TODO: this should probably be done per channel instead... + /* TODO: this should probably be done per channel instead. */ if (autokeyframe_cfra_can_key(scene, id)) { ReportList *reports = CTX_wm_reports(C); ToolSettings *ts = scene->toolsettings; diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 80ce4770984..307fbbdf80b 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -381,7 +381,7 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c if (!(t->state == TRANS_CANCEL)) { -#if 0 // default 2.4 behavior +#if 0 /* Default 2.4 behavior. */ /* flush to 2d vector from internally used 3d vector */ for (a = 0; a < t->total; a++, td++) { @@ -393,7 +393,7 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c seq_prev = seq; } -#else // durian hack +#else /* durian hack */ { int overlap = 0; diff --git a/source/blender/editors/transform/transform_data.h b/source/blender/editors/transform/transform_data.h index 726e70c5e4d..b59197fcd39 100644 --- a/source/blender/editors/transform/transform_data.h +++ b/source/blender/editors/transform/transform_data.h @@ -53,10 +53,12 @@ typedef struct TransDataMirror { typedef struct TransDataExtension { /** Initial object drot. */ float drot[3]; - // /* Initial object drotAngle, TODO: not yet implemented */ - // float drotAngle; - // /* Initial object drotAxis, TODO: not yet implemented */ - // float drotAxis[3]; +#if 0 /* TODO: not yet implemented */ + /* Initial object drotAngle */ + float drotAngle; + /* Initial object drotAxis */ + float drotAxis[3]; +#endif /** Initial object delta quat. */ float dquat[4]; /** Initial object delta scale. */ diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index e3ee6f51a26..1b8c9b47c04 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -390,7 +390,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } else if (t->spacetype == SPACE_IMAGE) { SpaceImage *sima = area->spacedata.first; - // XXX for now, get View2D from the active region + /* XXX for now, get View2D from the active region. */ t->view = ®ion->v2d; t->around = sima->around; @@ -409,7 +409,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve /* image not in uv edit, nor in mask mode, can happen for some tools */ } else if (t->spacetype == SPACE_NODE) { - // XXX for now, get View2D from the active region + /* XXX for now, get View2D from the active region. */ t->view = ®ion->v2d; t->around = V3D_AROUND_CENTER_BOUNDS; } @@ -432,9 +432,9 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } else { if (region) { - // XXX for now, get View2D from the active region + /* XXX for now, get View2D from the active region */ t->view = ®ion->v2d; - // XXX for now, the center point is the midpoint of the data + /* XXX for now, the center point is the midpoint of the data */ } else { t->view = NULL; @@ -715,7 +715,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } } - // Mirror is not supported with PET, turn it off. + /* Mirror is not supported with PET, turn it off. */ #if 0 if (t->flag & T_PROP_EDIT) { t->flag &= ~T_MIRROR; diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index 017cccdee15..a22f6c35139 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -915,7 +915,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, /* selection center */ if (totsel) { - mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid! + mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */ mul_m4_v3(obedit->obmat, tbounds->center); mul_m4_v3(obedit->obmat, tbounds->min); mul_m4_v3(obedit->obmat, tbounds->max); @@ -958,7 +958,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, MEM_freeN(objects); if (totsel) { - mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid! + mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */ mul_m4_v3(ob->obmat, tbounds->center); mul_m4_v3(ob->obmat, tbounds->min); mul_m4_v3(ob->obmat, tbounds->max); @@ -996,7 +996,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, /* selection center */ if (totsel) { - mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid! + mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */ } } } @@ -1044,7 +1044,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C, /* selection center */ if (totsel) { - mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid! + mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */ } } diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c index edc0781e18e..c525bc0e6ea 100644 --- a/source/blender/editors/transform/transform_mode.c +++ b/source/blender/editors/transform/transform_mode.c @@ -446,7 +446,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td) */ if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { /* scale val and reset size */ - return; // TODO: fix this case + return; /* TODO: fix this case */ } /* Reset val if SINGLESIZE but using a constraint */ @@ -505,7 +505,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td) /* copy results from cob->matrix */ if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { /* scale val and reset size */ - return; // TODO: fix this case + return; /* TODO: fix this case. */ } /* Reset val if SINGLESIZE but using a constraint */ @@ -605,7 +605,7 @@ void ElementRotation_ex(TransInfo *t, if (td->flag & TD_USEQUAT) { mul_m3_series(fmat, td->smtx, mat, td->mtx); - mat3_to_quat(quat, fmat); // Actual transform + mat3_to_quat(quat, fmat); /* Actual transform */ if (td->ext->quat) { mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat); @@ -628,31 +628,31 @@ void ElementRotation_ex(TransInfo *t, * has been computed, it has to be converted back into the bone's space. */ else if (t->flag & T_POSE) { - // Extract and invert armature object matrix + /* Extract and invert armature object matrix */ if ((td->flag & TD_NO_LOC) == 0) { sub_v3_v3v3(vec, td->center, center); - mul_m3_v3(tc->mat3, vec); // To Global space - mul_m3_v3(mat, vec); // Applying rotation - mul_m3_v3(tc->imat3, vec); // To Local space + mul_m3_v3(tc->mat3, vec); /* To Global space. */ + mul_m3_v3(mat, vec); /* Applying rotation. */ + mul_m3_v3(tc->imat3, vec); /* To Local space. */ add_v3_v3(vec, center); /* vec now is the location where the object has to be */ - sub_v3_v3v3(vec, vec, td->center); // Translation needed from the initial location + sub_v3_v3v3(vec, vec, td->center); /* Translation needed from the initial location */ /* special exception, see TD_PBONE_LOCAL_MTX definition comments */ if (td->flag & TD_PBONE_LOCAL_MTX_P) { /* do nothing */ } else if (td->flag & TD_PBONE_LOCAL_MTX_C) { - mul_m3_v3(tc->mat3, vec); // To Global space - mul_m3_v3(td->ext->l_smtx, vec); // To Pose space (Local Location) + mul_m3_v3(tc->mat3, vec); /* To Global space. */ + mul_m3_v3(td->ext->l_smtx, vec); /* To Pose space (Local Location). */ } else { - mul_m3_v3(tc->mat3, vec); // To Global space - mul_m3_v3(td->smtx, vec); // To Pose space + mul_m3_v3(tc->mat3, vec); /* To Global space. */ + mul_m3_v3(td->smtx, vec); /* To Pose space. */ } protectedTransBits(td->protectflag, vec); @@ -738,13 +738,13 @@ void ElementRotation_ex(TransInfo *t, constraintTransLim(t, td); /* rotation */ - if ((t->flag & T_V3D_ALIGN) == 0) { // align mode doesn't rotate objects itself + if ((t->flag & T_V3D_ALIGN) == 0) { /* Align mode doesn't rotate objects itself. */ /* euler or quaternion? */ if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) { /* can be called for texture space translate for example, then opt out */ if (td->ext->quat) { mul_m3_series(fmat, td->smtx, mat, td->mtx); - mat3_to_quat(quat, fmat); // Actual transform + mat3_to_quat(quat, fmat); /* Actual transform */ mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat); /* this function works on end result */ @@ -758,7 +758,7 @@ void ElementRotation_ex(TransInfo *t, axis_angle_to_quat(iquat, td->ext->irotAxis, td->ext->irotAngle); mul_m3_series(fmat, td->smtx, mat, td->mtx); - mat3_to_quat(quat, fmat); // Actual transform + mat3_to_quat(quat, fmat); /* Actual transform */ mul_qt_qtqt(tquat, quat, iquat); quat_to_axis_angle(td->ext->rotAxis, td->ext->rotAngle, tquat); @@ -1045,10 +1045,12 @@ void ElementResize(TransInfo *t, TransDataContainer *tc, TransData *td, float ma /** \name Transform Frame Utils * \{ */ -/* This function returns the snapping 'mode' for Animation Editors only +/** + * This function returns the snapping 'mode' for Animation Editors only. * We cannot use the standard snapping due to NLA-strip scaling complexities. + * + * TODO: these modifier checks should be key-mappable. */ -// XXX these modifier checks should be keymappable short getAnimEdit_SnapMode(TransInfo *t) { short autosnap = SACTSNAP_OFF; diff --git a/source/blender/editors/transform/transform_mode_bbone_resize.c b/source/blender/editors/transform/transform_mode_bbone_resize.c index 05c4bbedcb4..57e809a566a 100644 --- a/source/blender/editors/transform/transform_mode_bbone_resize.c +++ b/source/blender/editors/transform/transform_mode_bbone_resize.c @@ -142,7 +142,7 @@ static void applyBoneSize(TransInfo *t, const int UNUSED(mval[2])) } } - copy_m3_m3(t->mat, mat); // used in gizmo + copy_m3_m3(t->mat, mat); /* used in gizmo */ headerBoneSize(t, t->values_final, str); diff --git a/source/blender/editors/transform/transform_mode_resize.c b/source/blender/editors/transform/transform_mode_resize.c index 06d61dd9ec8..33303b82567 100644 --- a/source/blender/editors/transform/transform_mode_resize.c +++ b/source/blender/editors/transform/transform_mode_resize.c @@ -121,7 +121,7 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2])) headerResize(t, t->values_final, str); } - copy_m3_m3(t->mat, mat); // used in gizmo + copy_m3_m3(t->mat, mat); /* used in gizmo */ FOREACH_TRANS_DATA_CONTAINER (t, tc) { TransData *td = tc->data; diff --git a/source/blender/editors/transform/transform_mode_rotate.c b/source/blender/editors/transform/transform_mode_rotate.c index 943410e009d..d8857dbc31e 100644 --- a/source/blender/editors/transform/transform_mode_rotate.c +++ b/source/blender/editors/transform/transform_mode_rotate.c @@ -49,7 +49,7 @@ static float RotationBetween(TransInfo *t, const float p1[3], const float p2[3]) sub_v3_v3v3(start, p1, t->center_global); sub_v3_v3v3(end, p2, t->center_global); - // Angle around a constraint axis (error prone, will need debug) + /* Angle around a constraint axis (error prone, will need debug). */ if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) { float axis[3], tmp[3]; diff --git a/source/blender/editors/transform/transform_mode_shrink_fatten.c b/source/blender/editors/transform/transform_mode_shrink_fatten.c index 679584cbfee..af33c2bb090 100644 --- a/source/blender/editors/transform/transform_mode_shrink_fatten.c +++ b/source/blender/editors/transform/transform_mode_shrink_fatten.c @@ -116,7 +116,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) void initShrinkFatten(TransInfo *t) { - // If not in mesh edit mode, fallback to Resize + /* If not in mesh edit mode, fallback to Resize. */ if ((t->flag & T_EDIT) == 0 || (t->obedit_type != OB_MESH)) { initResize(t); } diff --git a/source/blender/editors/transform/transform_mode_timeslide.c b/source/blender/editors/transform/transform_mode_timeslide.c index 9d112013398..9636b4f6e42 100644 --- a/source/blender/editors/transform/transform_mode_timeslide.c +++ b/source/blender/editors/transform/transform_mode_timeslide.c @@ -147,7 +147,7 @@ static void applyTimeSlide(TransInfo *t, const int mval[2]) UI_view2d_region_to_view(v2d, t->mouse.imval[0], t->mouse.imval[1], &sval[0], &sval[1]); /* t->values_final[0] stores cval[0], which is the current mouse-pointer location (in frames) */ - // XXX Need to be able to repeat this + /* XXX Need to be able to repeat this. */ /* t->values_final[0] = cval[0]; */ /* UNUSED (reset again later). */ /* handle numeric-input stuff */ diff --git a/source/blender/editors/transform/transform_mode_tosphere.c b/source/blender/editors/transform/transform_mode_tosphere.c index de85d586550..f49462ccc65 100644 --- a/source/blender/editors/transform/transform_mode_tosphere.c +++ b/source/blender/editors/transform/transform_mode_tosphere.c @@ -121,7 +121,7 @@ void initToSphere(TransInfo *t) t->num.val_flag[0] |= NUM_NULL_ONE | NUM_NO_NEGATIVE; t->flag |= T_NO_CONSTRAINT; - // Calculate average radius + /* Calculate average radius */ FOREACH_TRANS_DATA_CONTAINER (t, tc) { TransData *td = tc->data; for (i = 0; i < tc->data_len; i++, td++) { diff --git a/source/blender/editors/transform/transform_mode_trackball.c b/source/blender/editors/transform/transform_mode_trackball.c index a0d3bbac8e3..32019e151a1 100644 --- a/source/blender/editors/transform/transform_mode_trackball.c +++ b/source/blender/editors/transform/transform_mode_trackball.c @@ -131,8 +131,8 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2])) mul_m3_m3m3(mat, smat, totmat); - // TRANSFORM_FIX_ME - //copy_m3_m3(t->mat, mat); // used in gizmo + /* TRANSFORM_FIX_ME */ + // copy_m3_m3(t->mat, mat); /* used in gizmo. */ #endif applyTrackballValue(t, axis1, axis2, phi); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 6b6cab5c2a4..b164d0d443f 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -414,9 +414,9 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event) const enum TfmMode mode_prev = t->mode; #if defined(WITH_INPUT_NDOF) && 0 - // stable 2D mouse coords map to different 3D coords while the 3D mouse is active - // in other words, 2D deltas are no longer good enough! - // disable until individual 'transformers' behave better + /* Stable 2D mouse coords map to different 3D coords while the 3D mouse is active + * in other words, 2D deltas are no longer good enough! + * disable until individual 'transformers' behave better. */ if (event->type == NDOF_MOTION) { return OPERATOR_PASS_THROUGH; @@ -520,7 +520,7 @@ static int transform_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* add temp handler */ WM_event_add_modal_handler(C, op); - op->flag |= OP_IS_MODAL_GRAB_CURSOR; // XXX maybe we want this with the gizmo only? + op->flag |= OP_IS_MODAL_GRAB_CURSOR; /* XXX maybe we want this with the gizmo only? */ /* Use when modal input has some transformation to begin with. */ TransInfo *t = op->customdata; @@ -888,7 +888,7 @@ static void TRANSFORM_OT_bend(struct wmOperatorType *ot) /* api callbacks */ ot->invoke = transform_invoke; - // ot->exec = transform_exec; // unsupported + // ot->exec = transform_exec; /* unsupported */ ot->modal = transform_modal; ot->cancel = transform_cancel; ot->poll = ED_operator_region_view3d_active; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 1ab81ada398..e461bcb88e9 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -280,7 +280,7 @@ eRedrawFlag handleSnapping(TransInfo *t, const wmEvent *event) { eRedrawFlag status = TREDRAW_NOTHING; -#if 0 // XXX need a proper selector for all snap mode +#if 0 /* XXX need a proper selector for all snap mode */ if (BIF_snappingSupported(t->obedit) && event->type == TABKEY && event->shift) { /* toggle snap and reinit */ t->settings->snap_flag ^= SCE_SNAP; @@ -370,7 +370,9 @@ void applyProject(TransInfo *t) } } - // XXX constraintTransLim(t, td); +#if 0 /* TODO: sipport this? */ + constraintTransLim(t, td); +#endif } } } @@ -447,8 +449,8 @@ void applySnapping(TransInfo *t, float *vec) activeSnap(t)) { double current = PIL_check_seconds_timer(); - // Time base quirky code to go around findnearest slowness - /* !TODO! add exception for object mode, no need to slow it down then */ + /* Time base quirky code to go around findnearest slowness */ + /* TODO: add exception for object mode, no need to slow it down then. */ if (current - t->tsnap.last >= 0.01) { t->tsnap.calcSnap(t, vec); t->tsnap.targetSnap(t); @@ -831,7 +833,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) float mval[2]; bool found = false; short snap_elem = 0; - float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here + float dist_px = SNAP_MIN_DISTANCE; /* Use a user defined value here. */ mval[0] = t->mval[0]; mval[1] = t->mval[1]; @@ -890,7 +892,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) else if (t->spacetype == SPACE_NODE) { if (t->tsnap.mode & (SCE_SNAP_MODE_NODE_X | SCE_SNAP_MODE_NODE_Y)) { float loc[2]; - float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here + float dist_px = SNAP_MIN_DISTANCE; /* Use a user defined value here. */ char node_border; if (snapNodesTransform(t, t->mval, loc, &dist_px, &node_border)) { @@ -981,7 +983,7 @@ static void TargetSnapActive(TransInfo *t) static void TargetSnapMedian(TransInfo *t) { - // Only need to calculate once + /* Only need to calculate once. */ if ((t->tsnap.status & TARGET_INIT) == 0) { int i_accum = 0; @@ -1024,7 +1026,7 @@ static void TargetSnapMedian(TransInfo *t) static void TargetSnapClosest(TransInfo *t) { - // Only valid if a snap point has been selected + /* Only valid if a snap point has been selected. */ if (t->tsnap.status & POINT_INIT) { float dist_closest = 0.0f; TransData *closest = NULL; @@ -1370,7 +1372,7 @@ void snapFrameTransform(TransInfo *t, break; case SACTSNAP_MARKER: /* snap to nearest marker */ - // TODO: need some more careful checks for where data comes from + /* TODO: need some more careful checks for where data comes from. */ val = ED_markers_find_nearest_marker_time(&t->scene->markers, (float)val); break; case SACTSNAP_SECOND: diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index a6eed5d54d1..9a2b346132e 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -273,7 +273,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event } } - // XXX node curve integration .. + /* XXX node curve integration. */ #if 0 { ScrArea *sa, *cur = curarea; @@ -512,7 +512,7 @@ int ED_imbuf_sample_modal(bContext *C, wmOperator *op, const wmEvent *event) { switch (event->type) { case LEFTMOUSE: - case RIGHTMOUSE: // XXX hardcoded + case RIGHTMOUSE: /* XXX hardcoded */ if (event->val == KM_RELEASE) { ED_imbuf_sample_exit(C, op); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h index de021adb4f0..0de792cb915 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.h +++ b/source/blender/editors/uvedit/uvedit_parametrizer.h @@ -20,7 +20,7 @@ * \ingroup eduv */ -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #ifdef __cplusplus extern "C" { |