From 84bf3e48c098d6971bab0ac55b4f413adc04708e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Jul 2012 23:56:59 +0000 Subject: style cleanup: use c style comments in C code --- .../editors/animation/anim_channels_defines.c | 24 +++++------ .../blender/editors/animation/anim_channels_edit.c | 50 +++++++++++----------- source/blender/editors/animation/anim_draw.c | 6 +-- source/blender/editors/animation/anim_filter.c | 24 +++++------ source/blender/editors/animation/anim_ipo_utils.c | 18 ++++---- source/blender/editors/animation/fmodifier_ui.c | 6 +-- source/blender/editors/animation/keyframes_draw.c | 16 +++---- source/blender/editors/animation/keyframing.c | 14 +++--- source/blender/editors/animation/keyingsets.c | 16 +++---- source/blender/editors/armature/armature_ops.c | 6 +-- source/blender/editors/armature/editarmature.c | 12 +++--- source/blender/editors/armature/poseSlide.c | 24 +++++------ source/blender/editors/armature/poselib.c | 22 +++++----- source/blender/editors/armature/poseobject.c | 14 +++--- source/blender/editors/armature/reeb.c | 26 +++++------ source/blender/editors/curve/editfont.c | 22 +++++----- source/blender/editors/gpencil/gpencil_paint.c | 22 +++++----- source/blender/editors/interface/interface_anim.c | 10 ++--- source/blender/editors/interface/interface_draw.c | 28 ++++++------ .../blender/editors/interface/interface_handlers.c | 10 ++--- .../blender/editors/interface/interface_regions.c | 20 ++++----- source/blender/editors/interface/interface_style.c | 2 +- .../editors/interface/interface_templates.c | 32 +++++++------- .../blender/editors/interface/interface_widgets.c | 12 +++--- source/blender/editors/interface/resources.c | 4 +- source/blender/editors/interface/view2d_ops.c | 2 +- source/blender/editors/mesh/editface.c | 2 +- source/blender/editors/mesh/editmesh_bvh.c | 2 +- source/blender/editors/mesh/editmesh_select.c | 34 +++++++-------- source/blender/editors/mesh/editmesh_tools.c | 2 +- source/blender/editors/object/object_add.c | 14 +++--- source/blender/editors/object/object_constraint.c | 8 ++-- source/blender/editors/object/object_edit.c | 34 +++++++-------- source/blender/editors/object/object_hook.c | 2 +- source/blender/editors/object/object_transform.c | 4 +- source/blender/editors/object/object_vgroup.c | 6 +-- source/blender/editors/physics/physics_fluid.c | 8 ++-- source/blender/editors/sculpt_paint/paint_cursor.c | 10 ++--- source/blender/editors/sculpt_paint/paint_image.c | 4 +- source/blender/editors/space_action/action_edit.c | 6 +-- .../blender/editors/space_buttons/buttons_header.c | 4 +- source/blender/editors/space_file/filelist.c | 20 ++++----- source/blender/editors/space_file/fsmenu.c | 10 ++--- source/blender/editors/space_graph/graph_edit.c | 24 +++++------ source/blender/editors/space_graph/graph_select.c | 4 +- source/blender/editors/space_image/image_ops.c | 2 +- source/blender/editors/space_nla/nla_channels.c | 8 ++-- source/blender/editors/space_view3d/drawanimviz.c | 6 +-- source/blender/editors/space_view3d/drawobject.c | 2 +- 49 files changed, 329 insertions(+), 329 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index f6b301c4594..a21154bde1b 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -3009,28 +3009,28 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float offset += ICON_WIDTH; } } - + /* step 5) draw name ............................................... */ - // TODO: when renaming, we might not want to draw this, especially if name happens to be longer than channel + /* TODO: when renaming, we might not want to draw this, especially if name happens to be longer than channel */ if (acf->name) { char name[ANIM_CHAN_NAME_SIZE]; /* hopefully this will be enough! */ - + /* set text color */ - // XXX: if active, highlight differently? + /* XXX: if active, highlight differently? */ if (selected) UI_ThemeColor(TH_TEXT_HI); else UI_ThemeColor(TH_TEXT); - + /* get name */ acf->name(ale, name); - + offset += 3; UI_DrawString(offset, ytext, name); - + /* draw red underline if channel is disabled */ if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_DISABLED)) { - // FIXME: replace hardcoded color here, and check on extents! + /* FIXME: replace hardcoded color here, and check on extents! */ glColor3f(1.0f, 0.0f, 0.0f); glLineWidth(2.0); fdrawline((float)(offset), yminc, @@ -3038,13 +3038,13 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float glLineWidth(1.0); } } - + /* step 6) draw backdrops behidn mute+protection toggles + (sliders) ....................... */ /* reset offset - now goes from RHS of panel */ offset = 0; - - // 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) { short draw_sliders = 0; float color[3]; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 5c57407d14e..9cd2b29afa6 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -400,7 +400,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn /* compare data, and type as main way of identifying the channel */ if ((ale->data == ale_setting->data) && (ale->type == ale_setting->type)) { /* we also have to check the ID, this is assigned to, since a block may have multiple users */ - // TODO: is the owner-data more revealing? + /* TODO: is the owner-data more revealing? */ if (ale->id == ale_setting->id) { match = ale; break; @@ -576,13 +576,13 @@ static int animedit_poll_channels_active(bContext *C) ScrArea *sa = CTX_wm_area(C); /* channels region test */ - // TODO: could enhance with actually testing if channels region? + /* TODO: could enhance with actually testing if channels region? */ if (ELEM(NULL, sa, CTX_wm_region(C))) return 0; /* animation editor test */ if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0) return 0; - + return 1; } @@ -591,9 +591,9 @@ static int animedit_poll_channels_nla_tweakmode_off(bContext *C) { ScrArea *sa = CTX_wm_area(C); Scene *scene = CTX_data_scene(C); - + /* channels region test */ - // TODO: could enhance with actually testing if channels region? + /* TODO: could enhance with actually testing if channels region? */ if (ELEM(NULL, sa, CTX_wm_region(C))) return 0; /* animation editor test */ @@ -1314,16 +1314,16 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op)) /* make all the selected channels visible */ filter = (ANIMFILTER_SEL | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); - + for (ale = anim_data.first; ale; ale = ale->next) { /* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */ - // TODO: find out why this is the case, and fix that + /* TODO: find out why this is the case, and fix that */ if (ale->type == ANIMTYPE_OBJECT) continue; - + /* enable the setting */ ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD); - + /* now, also flush selection status up/down as appropriate */ ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, 1); } @@ -1394,13 +1394,13 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o /* Now set the flags */ for (ale = anim_data.first; ale; ale = ale->next) { /* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */ - // TODO: find out why this is the case, and fix that + /* TODO: find out why this is the case, and fix that */ if (ale->type == ANIMTYPE_OBJECT) continue; - + /* change the setting */ ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, vis); - + /* now, also flush selection status up/down as appropriate */ ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, (vis == ACHANNEL_SETFLAG_ADD)); } @@ -1734,9 +1734,9 @@ static void ANIM_OT_channels_collapse(wmOperatorType *ot) static int animchannels_enable_poll(bContext *C) { ScrArea *sa = CTX_wm_area(C); - + /* channels region test */ - // TODO: could enhance with actually testing if channels region? + /* TODO: could enhance with actually testing if channels region? */ if (ELEM(NULL, sa, CTX_wm_region(C))) return 0; @@ -2103,17 +2103,17 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in BLI_freelistN(&anim_data); return 0; } - + /* selectmode -1 is a special case for ActionGroups only, which selects all of the channels underneath it only... */ - // TODO: should this feature be extended to work with other channel types too? + /* TODO: should this feature be extended to work with other channel types too? */ if ((selectmode == -1) && (ale->type != ANIMTYPE_GROUP)) { /* normal channels should not behave normally in this case */ BLI_freelistN(&anim_data); return 0; } - + /* action to take depends on what channel we've got */ - // WARNING: must keep this in sync with the equivalent function in nla_channels.c + /* WARNING: must keep this in sync with the equivalent function in nla_channels.c */ switch (ale->type) { case ANIMTYPE_SCENE: { @@ -2152,9 +2152,9 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in } else { Base *b; - + /* deselect all */ - // TODO: should this deselect all other types of channels too? + /* TODO: should this deselect all other types of channels too? */ for (b = sce->base.first; b; b = b->next) { b->flag &= ~SELECT; b->object->flag = b->flag; @@ -2438,10 +2438,10 @@ void ED_operatortypes_animchannels(void) WM_operatortype_append(ANIM_OT_channels_setting_enable); WM_operatortype_append(ANIM_OT_channels_setting_disable); WM_operatortype_append(ANIM_OT_channels_setting_toggle); - + WM_operatortype_append(ANIM_OT_channels_delete); - - // XXX does this need to be a separate operator? + + /* XXX does this need to be a separate operator? */ WM_operatortype_append(ANIM_OT_channels_editable_toggle); WM_operatortype_append(ANIM_OT_channels_move); @@ -2463,11 +2463,11 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf) /* selection */ /* click-select */ - // XXX for now, only leftmouse.... + /* XXX for now, only leftmouse.... */ WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", TRUE); - + /* rename */ WM_keymap_add_item(keymap, "ANIM_OT_channels_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index ddc4f4d943c..0d48bf19c9e 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -381,11 +381,11 @@ float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short rest return RAD2DEGF(1.0f); /* radians to degrees */ } } - - // TODO: other rotation types here as necessary + + /* TODO: other rotation types here as necessary */ } } - + /* no mapping needs to occur... */ return 1.0f; } diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index a6d1ac64bbe..e239719d894 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -164,21 +164,21 @@ static short actedit_get_context(bAnimContext *ac, SpaceAction *saction) ac->mode = saction->mode; return 1; - - case SACTCONT_GPENCIL: /* Grease Pencil */ // XXX review how this mode is handled... + + case SACTCONT_GPENCIL: /* Grease Pencil */ /* XXX review how this mode is handled... */ /* update scene-pointer (no need to check for pinning yet, as not implemented) */ saction->ads.source = (ID *)ac->scene; - + ac->datatype = ANIMCONT_GPENCIL; ac->data = &saction->ads; - + ac->mode = saction->mode; return 1; - - case SACTCONT_MASK: /* Grease Pencil */ // XXX review how this mode is handled... + + case SACTCONT_MASK: /* Grease Pencil */ /* XXX review how this mode is handled... */ /* update scene-pointer (no need to check for pinning yet, as not implemented) */ { - // TODO, other methods to get the mask + /* 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; @@ -1890,9 +1890,9 @@ static size_t animdata_filter_ds_obanim(bAnimContext *ac, ListBase *anim_data, b AnimData *adt = ob->adt; short type = 0, expanded = 1; 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(ob, { /* AnimData - no channel, but consider data */ }, { /* NLA - no channel, but consider data */ }, @@ -2122,11 +2122,11 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_d if ((ntree) && !(ads->filterflag & ADS_FILTER_NONTREE)) { tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)sce, ntree, filter_mode); } - - // TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here + + /* TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here */ } END_ANIMFILTER_SUBCHANNELS; - + /* if we collected some channels, add these to the new list... */ if (tmp_items) { /* firstly add object expander if required */ diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index a73651d7664..35782c3b3ae 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -143,15 +143,15 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* no array index */ arrayname = ""; } - + /* putting this all together into the buffer */ - // XXX we need to check for invalid names... - // XXX the name length limit needs to be passed in or as some define + /* XXX we need to check for invalid names... + * XXX the name length limit needs to be passed in or as some define */ if (structname) - BLI_snprintf(name, 256, "%s%s (%s)", arrayname, propname, structname); + BLI_snprintf(name, 256, "%s%s (%s)", arrayname, propname, structname); else - BLI_snprintf(name, 256, "%s%s", arrayname, propname); - + BLI_snprintf(name, 256, "%s%s", arrayname, propname); + /* free temp name if nameprop is set */ if (free_structname) MEM_freeN((void *)structname); @@ -170,11 +170,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) else { /* invalid path */ BLI_snprintf(name, 256, "\"%s[%d]\"", fcu->rna_path, fcu->array_index); - + /* icon for this should be the icon for the base ID */ - // TODO: or should we just use the error icon? + /* TODO: or should we just use the error icon? */ icon = RNA_struct_ui_icon(id_ptr.type); - + /* tag F-Curve as disabled - as not usable path */ fcu->flag |= FCURVE_DISABLED; } diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 8c1e2bedd86..91cc602c838 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -506,10 +506,10 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh row = uiLayoutRow(col, TRUE); uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE); uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE); - + /* control points header */ - // TODO: move this control-point control stuff to using the new special widgets for lists - // the current way is far too cramped + /* TODO: move this control-point control stuff to using the new special widgets for lists + * the current way is far too cramped */ row = uiLayoutRow(layout, FALSE); block = uiLayoutGetBlock(row); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 46a89963ad9..84711b97729 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -673,23 +673,23 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa /* draw keys */ if (keys) { /* locked channels are less strongly shown, as feedback for locked channels in DopeSheet */ - // TODO: allow this opacity factor to be themed? + /* TODO: allow this opacity factor to be themed? */ float kalpha = (channelLocked) ? 0.35f : 1.0f; - + for (ak = keys->first; ak; ak = ak->next) { - /* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw + /* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw * - this might give some improvements, since we current have to flip between view/region matrices */ if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax) == 0) continue; - + /* draw using OpenGL - uglier but faster */ - // NOTE1: a previous version of this didn't work nice for some intel cards - // NOTE2: if we wanted to go back to icons, these are icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3; + /* NOTE1: a previous version of this didn't work nice for some intel cards + * NOTE2: if we wanted to go back to icons, these are icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3; */ draw_keyframe_shape(ak->cfra, ypos, xscale, 5.0f, (ak->sel & SELECT), ak->key_type, KEYFRAME_SHAPE_BOTH, kalpha); - } + } } - + glDisable(GL_BLEND); } diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 0c9a6ff6bf1..7600e1d4690 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -134,9 +134,9 @@ bAction *verify_adt_action(ID *id, short add) printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : ""); return NULL; } - + /* init action if none available yet */ - // TODO: need some wizardry to handle NLA stuff correct + /* TODO: need some wizardry to handle NLA stuff correct */ if ((adt->action == NULL) && (add)) { char actname[sizeof(id->name) - 2]; BLI_snprintf(actname, sizeof(actname), "%sAction", id->name + 2); @@ -256,8 +256,8 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag) dst->f1 = bezt->f1; dst->f2 = bezt->f2; dst->f3 = bezt->f3; - - // TODO: perform some other operations? + + /* TODO: perform some other operations? */ } } /* keyframing modes allow to not replace keyframe */ @@ -1691,11 +1691,11 @@ static short object_frame_has_keyframe(Object *ob, float frame, short filter) /* 1. test for relative (with keyframes) */ if (id_frame_has_keyframe((ID *)key, frame, filter)) return 1; - + /* 2. test for time */ - // TODO... yet to be implemented (this feature may evolve before then anyway) + /* TODO... yet to be implemented (this feature may evolve before then anyway) */ } - + /* try materials */ if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOMAT) ) { /* if only active, then we can skip a lot of looping */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index cd914f9ff9a..04fd7f677b0 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -597,13 +597,13 @@ void ANIM_keyingset_info_register(KeyingSetInfo *ksi) void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi) { KeyingSet *ks, *ksn; - + /* find relevant builtin KeyingSets which use this, and remove them */ - // TODO: this isn't done now, since unregister is really only used atm when we - // reload the scripts, which kindof defeats the purpose of "builtin"? + /* TODO: this isn't done now, since unregister is really only used atm when we + * reload the scripts, which kindof defeats the purpose of "builtin"? */ for (ks = builtin_keyingsets.first; ks; ks = ksn) { ksn = ks->next; - + /* remove if matching typeinfo name */ if (strcmp(ks->typeinfo, ksi->idname) == 0) { Scene *scene; @@ -791,8 +791,8 @@ short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) /* get the associated 'type info' for this KeyingSet */ if (ksi == NULL) return 0; - // TODO: check for missing callbacks! - + /* TODO: check for missing callbacks! */ + /* check if it can be used in the current context */ return (ksi->poll(ksi, C)); } @@ -878,8 +878,8 @@ short ANIM_validate_keyingset(bContext *C, ListBase *dsources, KeyingSet *ks) /* get the associated 'type info' for this KeyingSet */ if (ksi == NULL) return MODIFYKEY_MISSING_TYPEINFO; - // TODO: check for missing callbacks! - + /* TODO: check for missing callbacks! */ + /* check if it can be used in the current context */ if (ksi->poll(ksi, C)) { /* if a list of data sources are provided, run a special iterator over them, diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index 59ee90c553b..173f74a1db7 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -191,8 +191,8 @@ void ED_operatormacros_armature(void) RNA_enum_set(otmacro->ptr, "proportional", 0); } - // XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate? - // that would require fixing a properties bug 19733 + /* XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate? + * that would require fixing a properties bug 19733 */ ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); @@ -321,7 +321,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_apply", AKEY, KM_PRESS, KM_CTRL, 0); - // TODO: clear pose + /* TODO: clear pose */ WM_keymap_add_item(keymap, "POSE_OT_rot_clear", RKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "POSE_OT_loc_clear", GKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 6cef843d828..d4c28b2fb6d 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -657,12 +657,12 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata(); return OPERATOR_CANCELLED; } - + /* helpful warnings... */ - // TODO: add warnings to be careful about actions, applying deforms first, etc. - if (ob->adt && ob->adt->action) + /* TODO: add warnings to be careful about actions, applying deforms first, etc. */ + if (ob->adt && ob->adt->action) BKE_report(op->reports, RPT_WARNING, "Actions on this armature will be destroyed by this new rest pose as the transforms stored are relative to the old rest pose"); - + /* Get editbones of active armature to alter */ ED_armature_to_edit(ob); @@ -1192,9 +1192,9 @@ static int separate_armature_exec(bContext *C, wmOperator *UNUSED(op)) * 4. fix constraint links * 5. make original armature active and enter editmode */ - + /* 1) only edit-base selected */ - // TODO: use context iterators for this? + /* TODO: use context iterators for this? */ CTX_DATA_BEGIN(C, Base *, base, visible_bases) { if (base->object == obedit) base->flag |= 1; diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index 51700793791..cdcb3ab4683 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -243,32 +243,32 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val) * - numerator should be larger than denominator to 'expand' the result * - perform this weighting a number of times given by the percentage... */ - int iters = (int)ceil(10.0f * pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed - + int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */ + while (iters-- > 0) { (*val) = (-((sVal * w2) + (eVal * w1)) + ((*val) * 6.0f) ) / 5.0f; } } break; - + case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */ { /* perform a weighted average here, favoring the middle pose * - numerator should be smaller than denominator to 'relax' the result * - perform this weighting a number of times given by the percentage... */ - int iters = (int)ceil(10.0f * pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed - + int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */ + while (iters-- > 0) { (*val) = ( ((sVal * w2) + (eVal * w1)) + ((*val) * 5.0f) ) / 6.0f; } } break; - + case POSESLIDE_BREAKDOWN: /* make the current pose slide around between the endpoints */ { /* perform simple linear interpolation - coefficient for start must come from pso->percentage... */ - // TODO: make this use some kind of spline interpolation instead? + /* TODO: make this use some kind of spline interpolation instead? */ (*val) = ((sVal * w2) + (eVal * w1)); } break; @@ -415,11 +415,11 @@ static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl) } else if (pso->mode == POSESLIDE_PUSH) { float quat_diff[4], quat_orig[4]; - + /* calculate the delta transform from the previous to the current */ - // TODO: investigate ways to favour one transform more? + /* TODO: investigate ways to favour one transform more? */ sub_qt_qtqt(quat_diff, pchan->quat, quat_prev); - + /* make a copy of the original rotation */ copy_qt_qt(quat_orig, pchan->quat); @@ -428,8 +428,8 @@ static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl) } else { float quat_interp[4], quat_orig[4]; - int iters = (int)ceil(10.0f * pso->percentage); // TODO: maybe a sensitivity ctrl on top of this is needed - + int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */ + /* perform this blending several times until a satisfactory result is reached */ while (iters-- > 0) { /* calculate the interpolation between the endpoints */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index ee54fc2c6fe..4c19161576c 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -306,11 +306,11 @@ static int poselib_sanitize_exec(bContext *C, wmOperator *op) BLI_dlrbTree_init(&keys); action_to_keylist(NULL, act, &keys, NULL); BLI_dlrbTree_linkedlist_sync(&keys); - + /* for each key, make sure there is a corresponding pose */ for (ak = keys.first; ak; ak = ak->next) { /* check if any pose matches this */ - // TODO: don't go looking through the list like this every time... + /* TODO: don't go looking through the list like this every time... */ for (marker = act->markers.first; marker; marker = marker->next) { if (IS_EQ(marker->frame, (double)ak->cfra)) { marker->flag = -1; @@ -819,12 +819,12 @@ static void poselib_backup_restore(tPoseLib_PreviewData *pld) for (plb = pld->backups.first; plb; plb = plb->next) { /* copy most of data straight back */ memcpy(plb->pchan, &plb->olddata, sizeof(bPoseChannel)); - + /* just overwrite values of properties from the stored copies (there should be some) */ if (plb->oldprops) IDP_SyncGroupValues(plb->pchan->prop, plb->oldprops); - - // TODO: constraints settings aren't restored yet, even though these could change (though not that likely) + + /* TODO: constraints settings aren't restored yet, even though these could change (though not that likely) */ } } @@ -832,10 +832,10 @@ static void poselib_backup_restore(tPoseLib_PreviewData *pld) static void poselib_backup_free_data(tPoseLib_PreviewData *pld) { tPoseLib_Backup *plb, *plbn; - + for (plb = pld->backups.first; plb; plb = plbn) { plbn = plb->next; - + /* free custom data */ if (plb->oldprops) { IDP_FreeProperty(plb->oldprops); @@ -1658,11 +1658,11 @@ void POSELIB_OT_apply_pose(wmOperatorType *ot) /* callbacks */ ot->exec = poselib_preview_exec; ot->poll = has_poselib_pose_data_poll; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - - /* properties */ - // TODO: make the pose_index into a proper enum instead of a cryptic int... + + /* properties */ + /* TODO: make the pose_index into a proper enum instead of a cryptic int... */ ot->prop = RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 9bcbf313f13..f837d8a726e 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -103,7 +103,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base) return; } - // XXX: disabled as this would otherwise cause a nasty loop... + /* XXX: disabled as this would otherwise cause a nasty loop... */ //ED_object_toggle_modes(C, ob->mode); } @@ -253,14 +253,14 @@ static int pose_calculate_paths_exec(bContext *C, wmOperator *op) animviz_verify_motionpaths(op->reports, scene, ob, pchan); } CTX_DATA_END; - + /* calculate the bones that now have motionpaths... */ - // TODO: only make for the selected bones? + /* TODO: only make for the selected bones? */ ED_pose_recalculate_paths(scene, ob); - + /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); - + return OPERATOR_FINISHED; } @@ -299,9 +299,9 @@ static int pose_update_paths_exec(bContext *C, wmOperator *UNUSED(op)) if (ELEM(NULL, ob, scene)) return OPERATOR_CANCELLED; - + /* calculate the bones that now have motionpaths... */ - // TODO: only make for the selected bones? + /* TODO: only make for the selected bones? */ ED_pose_recalculate_paths(scene, ob); /* notifiers for updates */ diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 20b95ea55d6..af252ffe60c 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1753,18 +1753,18 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) #endif arc->angle = avg_angle; - + if (avg_angle > threshold) merging = 1; - + if (merging) { ReebNode *terminalNode = NULL; ReebNode *middleNode = NULL; ReebNode *newNode = NULL; ReebNode *removedNode = NULL; int merging = 0; - - // Assign terminal and middle nodes + + /* Assign terminal and middle nodes */ if (arc->head->degree == 1) { terminalNode = arc->head; middleNode = arc->tail; @@ -1773,31 +1773,31 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) terminalNode = arc->tail; middleNode = arc->head; } - - // If middle node is a normal node, merge to terminal node + + /* If middle node is a normal node, merge to terminal node */ if (middleNode->degree == 2) { merging = 1; newNode = terminalNode; removedNode = middleNode; } - // Otherwise, just plain remove of the arc + /* Otherwise, just plain remove of the arc */ else { merging = 0; newNode = middleNode; removedNode = terminalNode; } - - // Merging arc + + /* Merging arc */ if (merging) { filterArc(rg, newNode, removedNode, arc, 1); } else { - // removing arc, so we need to decrease the degree of the remaining node - //newNode->degree--; + /* removing arc, so we need to decrease the degree of the remaining node + *newNode->degree--; */ NodeDegreeDecrement(rg, newNode); } - - // Reset nextArc, it might have changed + + /* Reset nextArc, it might have changed */ nextArc = arc->next; BLI_remlink(&rg->arcs, arc); diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 83f6b1d1824..d0c5774a200 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -215,16 +215,16 @@ static void update_string(Curve *cu) EditFont *ef = cu->editfont; int len; - // Free the old curve string + /* Free the old curve string */ MEM_freeN(cu->str); - // Calculate the actual string length in UTF-8 variable characters + /* Calculate the actual string length in UTF-8 variable characters */ len = BLI_wstrlen_utf8(ef->textbuf); - // Alloc memory for UTF-8 variable char length string + /* Alloc memory for UTF-8 variable char length string */ cu->str = MEM_callocN(len + sizeof(wchar_t), "str"); - // Copy the wchar to UTF-8 + /* Copy the wchar to UTF-8 */ BLI_strncpy_wchar_as_utf8(cu->str, ef->textbuf, len + 1); } @@ -362,8 +362,8 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename) strp = MEM_callocN(filelen + 4, "tempstr"); - // fread() instead of read(), because windows read() converts text - // to DOS \r\n linebreaks, causing double linebreaks in the 3d text + /* fread() instead of read(), because windows read() converts text + * to DOS \r\n linebreaks, causing double linebreaks in the 3d text */ filelen = fread(strp, 1, filelen, fp); fclose(fp); strp[filelen] = 0; @@ -1452,12 +1452,12 @@ void make_editText(Object *obedit) ef->oldstrinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "oldstrbuf"); } - // Convert the original text to wchar_t + /* Convert the original text to wchar_t */ BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 4); /* length is bogus */ wcscpy(ef->oldstr, ef->textbuf); - + cu->len = wcslen(ef->textbuf); - + memcpy(ef->textbufinfo, cu->strinfo, (cu->len) * sizeof(CharInfo)); memcpy(ef->oldstrinfo, cu->strinfo, (cu->len) * sizeof(CharInfo)); @@ -1467,8 +1467,8 @@ void make_editText(Object *obedit) cu->curinfo = ef->textbufinfo[cu->pos - 1]; else cu->curinfo = ef->textbufinfo[0]; - - // Convert to UTF-8 + + /* Convert to UTF-8 */ update_string(cu); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 12b002ef612..8c20d2a9450 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1727,17 +1727,17 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, wmEvent *event) tGPsdata *p = op->customdata; int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */ - // if (event->type == NDOF_MOTION) - // return OPERATOR_PASS_THROUGH; - // ------------------------------- - // [mce] Not quite what I was looking - // for, but a good start! GP continues to - // draw on the screen while the 3D mouse - // moves the viewpoint. Problem is that - // the stroke is converted to 3D only after - // it is finished. This approach should work - // better in tools that immediately apply - // in 3D space. + /* if (event->type == NDOF_MOTION) + * return OPERATOR_PASS_THROUGH; + * ------------------------------- + * [mce] Not quite what I was looking + * for, but a good start! GP continues to + * draw on the screen while the 3D mouse + * moves the viewpoint. Problem is that + * the stroke is converted to 3D only after + * it is finished. This approach should work + * better in tools that immediately apply + * in 3D space. */ //printf("\tGP - handle modal event...\n"); diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index c7f8ad521fa..de555d1d50e 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -160,9 +160,9 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) if (driver) { /* set type of driver */ driver->type = DRIVER_TYPE_PYTHON; - + /* set the expression */ - // TODO: need some way of identifying variables used + /* TODO: need some way of identifying variables used */ BLI_strncpy_utf8(driver->expression, str, sizeof(driver->expression)); /* updates */ @@ -187,12 +187,12 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) if (fcu && !driven) { id = but->rnapoin.id.data; - - // TODO: this should probably respect the keyingset only option for anim + + /* TODO: this should probably respect the keyingset only option for anim */ if (autokeyframe_cfra_can_key(scene, id)) { ReportList *reports = CTX_wm_reports(C); short flag = ANIM_get_keyframing_flags(scene, 1); - + fcu->flag &= ~FCURVE_SELECTED; insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag); WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index f173e7ce630..801daf6bb4b 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -537,27 +537,27 @@ static void ui_draw_but_CHARTAB(uiBut *but) glColor3ub(0, 0, 0); for (y = 0; y < 6; y++) { - // Do not draw more than the category allows + /* Do not draw more than the category allows */ if (cs > charmax) break; for (x = 0; x < 12; x++) { - // Do not draw more than the category allows + /* Do not draw more than the category allows */ if (cs > charmax) break; - // Draw one grid cell + /* Draw one grid cell */ glBegin(GL_LINE_LOOP); glVertex2f(sx, sy); glVertex2f(ex, sy); glVertex2f(ex, ey); glVertex2f(sx, ey); - glEnd(); + glEnd(); - // Draw character inside the cell + /* Draw character inside the cell */ memset(wstr, 0, sizeof(wchar_t) * 2); memset(ustr, 0, 16); - // Set the font to be either unicode or FO_BUILTIN_NAME + /* Set the font to be either unicode or FO_BUILTIN_NAME */ wstr[0] = cs; if (strcmp(G.selfont->name, FO_BUILTIN_NAME)) { BLI_strncpy_wchar_as_utf8((char *)ustr, (wchar_t *)wstr, sizeof(ustr)); @@ -580,17 +580,17 @@ static void ui_draw_but_CHARTAB(uiBut *but) float dx, dy; float px, py; - // Calculate the position + /* Calculate the position */ wid = FTF_GetStringWidth((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8); FTF_GetBoundingBox((char *) ustr, &llx, &lly, &llz, &urx, &ury, &urz, FTF_USE_GETTEXT | FTF_INPUT_UTF8); dx = urx - llx; dy = ury - lly; - // This isn't fully functional since the but->aspect isn't working like I suspected + /* This isn't fully functional since the but->aspect isn't working like I suspected */ px = sx + ((butw / but->aspect) - dx) / 2; py = sy + ((buth / but->aspect) - dy) / 2; - // Set the position and draw the character + /* Set the position and draw the character */ ui_rasterpos_safe(px, py, but->aspect); FTF_DrawString((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8); } @@ -598,8 +598,8 @@ static void ui_draw_but_CHARTAB(uiBut *but) ui_rasterpos_safe(sx + butw / 2, sy + buth / 2, but->aspect); UI_DrawString(but->font, (char *) ustr, 0); } - - // Calculate the next position and character + + /* Calculate the next position and character */ sx += butw; ex += butw; cs++; } @@ -1571,9 +1571,9 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc if (tmpibuf->rect_float) IMB_rect_from_float(tmpibuf); - // XXX: for debug only - // tmpibuf->ftype = PNG; - // IMB_saveiff(tmpibuf, "sample.png", IB_rect); + /* XXX: for debug only + * tmpibuf->ftype = PNG; + * IMB_saveiff(tmpibuf, "sample.png", IB_rect); */ if (tmpibuf->rect) scopes->track_preview = tmpibuf; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 3a64ad22062..78d0b6aa002 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3478,13 +3478,13 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle else if (event->type == WHEELDOWNMOUSE) { float *hsv = ui_block_hsv_get(but->block); hsv[2] = CLAMPIS(hsv[2] - 0.05f, 0.0f, 1.0f); - ui_set_but_hsv(but); // converts to rgb + ui_set_but_hsv(but); /* converts to rgb */ ui_numedit_apply(C, block, but, data); } else if (event->type == WHEELUPMOUSE) { float *hsv = ui_block_hsv_get(but->block); hsv[2] = CLAMPIS(hsv[2] + 0.05f, 0.0f, 1.0f); - ui_set_but_hsv(but); // converts to rgb + ui_set_but_hsv(but); /* converts to rgb */ ui_numedit_apply(C, block, but, data); } else if (event->type == MOUSEMOVE) { @@ -4505,7 +4505,7 @@ static int ui_but_menu(bContext *C, uiBut *but) } /* Keying Sets */ - // TODO: check on modifyability of Keying Set when doing this + /* TODO: check on modifyability of Keying Set when doing this */ if (is_anim) { uiItemS(layout); @@ -4529,8 +4529,8 @@ static int ui_but_menu(bContext *C, uiBut *but) /* Property Operators */ - //Copy Property Value - //Paste Property Value + /*Copy Property Value + *Paste Property Value */ if (length) { uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"), diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 40f28de50fa..5d6a331c466 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1454,21 +1454,21 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, /* when you are outside parent button, safety there should be smaller */ - // parent button to left + /* parent button to left */ if (midx < block->minx) block->safety.xmin = block->minx - 3; else block->safety.xmin = block->minx - 40; - // parent button to right + /* parent button to right */ if (midx > block->maxx) block->safety.xmax = block->maxx + 3; else block->safety.xmax = block->maxx + 40; - - // parent button on bottom + + /* parent button on bottom */ if (midy < block->miny) block->safety.ymin = block->miny - 3; else block->safety.ymin = block->miny - 40; - // parent button on top + /* parent button on top */ if (midy > block->maxy) block->safety.ymax = block->maxy + 3; else block->safety.ymax = block->maxy + 40; - - // exception for switched pulldowns... + + /* exception for switched pulldowns... */ if (dir1 && (dir1 & block->direction) == 0) { if (dir2 == UI_RIGHT) block->safety.xmax = block->maxx + 3; if (dir2 == UI_LEFT) block->safety.xmin = block->minx - 3; @@ -1862,7 +1862,7 @@ static void ui_update_block_buts_rgb(uiBlock *block, const float rgb[3]) */ rgb_to_hsv_compat_v(rgb, hsv); - // this updates button strings, is hackish... but button pointers are on stack of caller function + /* this updates button strings, is hackish... but button pointers are on stack of caller function */ for (bt = block->buttons.first; bt; bt = bt->next) { if (bt->rnaprop) { @@ -2130,8 +2130,8 @@ static void uiBlockPicker(uiBlock *block, float rgba[4], PointerRNA *ptr, Proper bt = uiDefButR_prop(block, NUMSLI, 0, IFACE_("B "), 0, -100, butwidth, UI_UNIT_Y, ptr, prop, 2, 0.0, 0.0, 0, 3, TIP_("Blue")); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); - // could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", ICON_NONE); - // but need to use uiButSetFunc for updating other fake buttons + /* could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", ICON_NONE); + * but need to use uiButSetFunc for updating other fake buttons */ /* HSV values */ uiBlockBeginAlign(block); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 5d527667170..779341160c5 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -374,7 +374,7 @@ void uiStyleInit(void) ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT); } - // XXX, this should be moved into a style, but for now best only load the monospaced font once. + /* XXX, this should be moved into a style, but for now best only load the monospaced font once. */ if (blf_mono_font == -1) blf_mono_font = BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index e6a4c260d0f..49e3818fe08 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -587,7 +587,7 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co uiItemL(row, "ID-Block:", ICON_NONE); /* ID-Type Selector - just have a menu of icons */ - // FIXME: the icon-only setting doesn't work when we supply a blank name + /* FIXME: the icon-only setting doesn't work when we supply a blank name */ uiItemFullR(row, ptr, propType, 0, 0, UI_ITEM_R_ICON_ONLY, "", ICON_NONE); /* ID-Block Selector - just use pointer widget... */ @@ -622,7 +622,7 @@ void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propna /* Path (existing string) Widget */ uiItemR(row, ptr, propname, 0, text, ICON_RNA); - // TODO: attach something to this to make allow searching of nested properties to 'build' the path + /* TODO: attach something to this to make allow searching of nested properties to 'build' the path */ } /************************ Modifier Template *************************/ @@ -741,7 +741,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND); block = uiLayoutGetBlock(row); /* VIRTUAL MODIFIER */ - // XXX this is not used now, since these cannot be accessed via RNA + /* XXX this is not used now, since these cannot be accessed via RNA */ BLI_snprintf(str, sizeof(str), "%s parent deform", md->name); uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name"); @@ -821,7 +821,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, uiBlockEndAlign(block); uiBlockSetEmboss(block, UI_EMBOSSN); - // When Modifier is a simulation, show button to switch to context rather than the delete button. + /* When Modifier is a simulation, show button to switch to context rather than the delete button. */ if (modifier_can_delete(md) && !modifier_is_simulation(md)) uiItemO(row, "", ICON_X, "OBJECT_OT_modifier_remove"); if (modifier_is_simulation(md) == 1) @@ -908,7 +908,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr) /* find modifier and draw it */ cageIndex = modifiers_getCageIndex(scene, ob, &lastCageIndex, 0); - // XXX virtual modifiers are not accesible for python + /* XXX virtual modifiers are not accesible for python */ vmd = modifiers_getVirtualModifierList(ob); for (i = 0; vmd; i++, vmd = vmd->next) { @@ -945,20 +945,20 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event) switch (event) { case B_CONSTRAINT_TEST: - break; // no handling + break; /* no handling */ case B_CONSTRAINT_CHANGETARGET: - if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels + if (ob->pose) ob->pose->flag |= POSE_RECALC; /* checks & sorts pose channels */ DAG_scene_sort(bmain, scene); break; default: break; } - // note: RNA updates now call this, commenting else it gets called twice. - // if there are problems because of this, then rna needs changed update functions. - // - // object_test_constraints(ob); - // if (ob->pose) BKE_pose_update_constraint_flags(ob->pose); + /* note: RNA updates now call this, commenting else it gets called twice. + * if there are problems because of this, then rna needs changed update functions. + * + * object_test_constraints(ob); + * if (ob->pose) BKE_pose_update_constraint_flags(ob->pose); */ if (ob->type == OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); else DAG_id_tag_update(&ob->id, OB_RECALC_OB); @@ -1984,14 +1984,14 @@ static void handle_layer_buttons(bContext *C, void *arg1, void *arg2) RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, i, FALSE); } } - + /* view3d layer change should update depsgraph (invisible object changed maybe) */ /* see view3d_header.c */ } -// TODO: -// - for now, grouping of layers is determined by dividing up the length of -// the array of layer bitflags +/* TODO: + * - for now, grouping of layers is determined by dividing up the length of + * the array of layer bitflags */ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *used_ptr, const char *used_propname, int active_layer) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 5ee89bb418f..7b139d81a1c 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1952,8 +1952,8 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], const int type, const floa int a; float h = hsv[0], s = hsv[1], v = hsv[2]; float dx, dy, sx1, sx2, sy; - float col0[4][3]; // left half, rect bottom to top - float col1[4][3]; // right half, rect bottom to top + float col0[4][3]; /* left half, rect bottom to top */ + float col1[4][3]; /* right half, rect bottom to top */ /* draw series of gouraud rects */ glShadeModel(GL_SMOOTH); @@ -2542,12 +2542,12 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat round_box_edges(&wtb, roundboxalign, rect, 5.0f); ui_get_but_vectorf(but, col); - + if (state & (UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN | UI_BUT_REDALERT)) { - // draw based on state - color for keyed etc + /* draw based on state - color for keyed etc */ widgetbase_draw(&wtb, wcol); - - // inset to draw swatch color + + /* inset to draw swatch color */ rect->xmin += SWATCH_KEYED_BORDER; rect->xmax -= SWATCH_KEYED_BORDER; rect->ymin += SWATCH_KEYED_BORDER; diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 407b2308af8..2e8117ea640 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1295,8 +1295,8 @@ void init_userdef_do_versions(void) /* transform widget settings */ if (U.tw_hotspot == 0) { U.tw_hotspot = 14; - U.tw_size = 20; // percentage of window size - U.tw_handlesize = 16; // percentage of widget radius + U.tw_size = 20; /* percentage of window size */ + U.tw_handlesize = 16; /* percentage of widget radius */ } if (U.pad_rot_angle == 0) U.pad_rot_angle = 15; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 129a47c7063..a1f9ad08378 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1266,7 +1266,7 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ } /* check if mouse is in or past either handle */ - // TODO: check if these extents are still valid or not + /* TODO: check if these extents are still valid or not */ in_max = ( (mouse >= (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse <= (sh_max + V2D_SCROLLER_HANDLE_SIZE)) ); in_min = ( (mouse <= (sh_min + V2D_SCROLLER_HANDLE_SIZE)) && (mouse >= (sh_min - V2D_SCROLLER_HANDLE_SIZE)) ); in_bar = ( (mouse < (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse > (sh_min + V2D_SCROLLER_HANDLE_SIZE)) ); diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index b592449fff5..addd0b14916 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -329,7 +329,7 @@ void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2] if (me == NULL || me->totpoly == 0) return; if (mode == 0 || mode == 1) { - // XXX - Causes glitches, not sure why + /* XXX - Causes glitches, not sure why */ #if 0 if (!facesel_face_pick(C, me, mval, &index, 1)) return; diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c index 2cb03104874..549032f7286 100644 --- a/source/blender/editors/mesh/editmesh_bvh.c +++ b/source/blender/editors/mesh/editmesh_bvh.c @@ -55,7 +55,7 @@ typedef struct BMBVHTree { BMesh *bm; BVHTree *tree; float epsilon; - float maxdist; //for nearest point search + float maxdist; /* for nearest point search */ float uv[2]; /* stuff for topological vert search */ diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 5404eb3bea6..a9912b90aef 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1498,25 +1498,25 @@ int mouse_mesh(bContext *C, const int mval[2], short extend, short deselect, sho BMVert *eve = NULL; BMEdge *eed = NULL; BMFace *efa = NULL; - + /* setup view context for argument to callbacks */ em_setup_viewcontext(C, &vc); vc.mval[0] = mval[0]; vc.mval[1] = mval[1]; - + if (unified_findnearest(&vc, &eve, &eed, &efa)) { - - // Deselect everything + + /* Deselect everything */ if (extend == 0 && deselect == 0 && toggle == 0) EDBM_flag_disable_all(vc.em, BM_ELEM_SELECT); - + if (efa) { if (extend) { - // set the last selected face + /* set the last selected face */ BM_active_face_set(vc.em->bm, efa); - - // Work-around: deselect first, so we can guarantee it will - // be active even if it was already selected + + /* Work-around: deselect first, so we can guarantee it will */ + /* be active even if it was already selected */ BM_select_history_remove(vc.em->bm, efa); BM_face_select_set(vc.em->bm, efa, FALSE); BM_select_history_store(vc.em->bm, efa); @@ -1527,9 +1527,9 @@ int mouse_mesh(bContext *C, const int mval[2], short extend, short deselect, sho BM_face_select_set(vc.em->bm, efa, FALSE); } else { - // set the last selected face + /* set the last selected face */ BM_active_face_set(vc.em->bm, efa); - + if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) { BM_select_history_store(vc.em->bm, efa); BM_face_select_set(vc.em->bm, efa, TRUE); @@ -1542,8 +1542,8 @@ int mouse_mesh(bContext *C, const int mval[2], short extend, short deselect, sho } else if (eed) { if (extend) { - // Work-around: deselect first, so we can guarantee it will - // be active even if it was already selected + /* Work-around: deselect first, so we can guarantee it will */ + /* be active even if it was already selected */ BM_select_history_remove(vc.em->bm, eed); BM_edge_select_set(vc.em->bm, eed, FALSE); BM_select_history_store(vc.em->bm, eed); @@ -1566,8 +1566,8 @@ int mouse_mesh(bContext *C, const int mval[2], short extend, short deselect, sho } else if (eve) { if (extend) { - // Work-around: deselect first, so we can guarantee it will - // be active even if it was already selected + /* Work-around: deselect first, so we can guarantee it will */ + /* be active even if it was already selected */ BM_select_history_remove(vc.em->bm, eve); BM_vert_select_set(vc.em->bm, eve, FALSE); BM_select_history_store(vc.em->bm, eve); @@ -1588,9 +1588,9 @@ int mouse_mesh(bContext *C, const int mval[2], short extend, short deselect, sho } } } - + EDBM_selectmode_flush(vc.em); - + /* change active material on object */ if (efa && efa->mat_nr != vc.obedit->actcol - 1) { vc.obedit->actcol = efa->mat_nr + 1; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 0f13df4c777..4c7545fa4fa 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -443,7 +443,7 @@ static int edbm_extrude_mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe nr = 3; // pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4"); else if (em->bm->totfacesel == 1) nr = 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3|Only Vertices%x4"); - else + else nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4"); } else if (em->selectmode & SCE_SELECT_EDGE) { diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index ba26b92f354..7ab20033239 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -558,8 +558,8 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) unsigned int layer; float loc[3], rot[3]; float mat[4][4]; - - object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called + + object_add_generic_invoke_options(C, op); /* XXX these props don't get set right when only exec() is called */ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; @@ -629,7 +629,7 @@ static int object_add_text_exec(bContext *C, wmOperator *op) unsigned int layer; float loc[3], rot[3]; - object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called + object_add_generic_invoke_options(C, op); /* XXX these props don't get set right when only exec() is called */ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; @@ -669,18 +669,18 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) int enter_editmode; unsigned int layer; float loc[3], rot[3]; - - object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called + + object_add_generic_invoke_options(C, op); /* XXX these props don't get set right when only exec() is called */ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; - + if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) { obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer); ED_object_enter_editmode(C, 0); newob = 1; } else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); - + if (obedit == NULL) { BKE_report(op->reports, RPT_ERROR, "Cannot create editmode armature"); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index a38c69fba8a..4e1c8df975c 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -462,7 +462,7 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) if (type == CONSTRAINT_OBTYPE_BONE) { if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), ct->subtarget)) { /* bone must exist in armature... */ - // TODO: clear subtarget? + /* TODO: clear subtarget? */ curcon->flag |= CONSTRAINT_DISABLE; } else if (strcmp(pchan->name, ct->subtarget) == 0) { @@ -1518,16 +1518,16 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase /* do type-specific tweaking to the constraint settings */ switch (type) { - case CONSTRAINT_TYPE_PYTHON: // FIXME: this code is not really valid anymore + case CONSTRAINT_TYPE_PYTHON: /* FIXME: this code is not really valid anymore */ { #ifdef WITH_PYTHON char *menustr; int scriptint = 0; /* popup a list of usable scripts */ menustr = buildmenu_pyconstraints(NULL, &scriptint); - // XXX scriptint = pupmenu(menustr); + /* XXX scriptint = pupmenu(menustr); */ MEM_freeN(menustr); - + /* only add constraint if a script was chosen */ if (scriptint) { /* add constraint */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 35ee641d2c1..e48fe8d3eda 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -408,12 +408,12 @@ void ED_object_enter_editmode(bContext *C, int flag) ScrArea *sa = CTX_wm_area(C); View3D *v3d = NULL; int ok = 0; - + if (scene->id.lib) return; - + if (sa && sa->spacetype == SPACE_VIEW3D) v3d = sa->spacedata.first; - + if ((flag & EM_IGNORE_LAYER) == 0) { base = CTX_data_active_base(C); /* active layer checked here for view3d */ @@ -428,12 +428,12 @@ void ED_object_enter_editmode(bContext *C, int flag) if (ELEM3(NULL, base, base->object, base->object->data)) return; ob = base->object; - + if (BKE_object_obdata_is_libdata(ob)) { error_libdata(); return; } - + if (flag & EM_WAITCURSOR) waitcursor(1); ob->restore_mode = ob->mode; @@ -444,7 +444,7 @@ void ED_object_enter_editmode(bContext *C, int flag) ED_object_toggle_modes(C, ob->mode); ob->mode = OB_MODE_EDIT; - + if (ob->type == OB_MESH) { BMEditMesh *em; ok = 1; @@ -457,7 +457,7 @@ void ED_object_enter_editmode(bContext *C, int flag) /* order doesn't matter */ EDBM_mesh_normals_update(em); BMEdit_RecalcTessellation(em); - + BM_mesh_select_mode_flush(em->bm); } @@ -482,48 +482,48 @@ void ED_object_enter_editmode(bContext *C, int flag) scene->obedit = ob; ED_armature_to_edit(ob); /* to ensure all goes in restposition and without striding */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX: should this be OB_RECALC_DATA? + DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* XXX: should this be OB_RECALC_DATA? */ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_ARMATURE, scene); } else if (ob->type == OB_FONT) { - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ ok = 1; make_editText(ob); WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_TEXT, scene); } else if (ob->type == OB_MBALL) { - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ ok = 1; make_editMball(ob); WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_MBALL, scene); } else if (ob->type == OB_LATTICE) { - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ ok = 1; make_editLatt(ob); - + WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_LATTICE, scene); } else if (ob->type == OB_SURF || ob->type == OB_CURVE) { ok = 1; - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ make_editNurb(ob); - + WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_CURVE, scene); } - + if (ok) { DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { - scene->obedit = NULL; // XXX for context + scene->obedit = NULL; /* XXX for context */ ob->mode &= ~OB_MODE_EDIT; WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene); } - + if (flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode"); if (flag & EM_WAITCURSOR) waitcursor(0); } diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index e9341d90e86..65dd9a12d3b 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -397,7 +397,7 @@ static void object_hook_select(Object *ob, HookModifierData *hmd) } /* special poll operators for hook operators */ -// TODO: check for properties window modifier context too as alternative? +/* TODO: check for properties window modifier context too as alternative? */ static int hook_op_edit_poll(bContext *C) { Object *obedit = CTX_data_edit_object(C); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 07557d8ea4c..83d92b9df27 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -119,7 +119,7 @@ static void object_clear_rot(Object *ob) if ((ob->protectflag & OB_LOCK_ROTZ) == 0) ob->quat[3] = ob->dquat[3] = 0.0f; - // TODO: does this quat need normalizing now? + /* TODO: does this quat need normalizing now? */ } else { /* the flag may have been set for the other modes, so just ignore the extra flag... */ @@ -133,7 +133,7 @@ static void object_clear_rot(Object *ob) } else { /* perform clamping using euler form (3-components) */ - // FIXME: deltas are not handled for these cases yet... + /* FIXME: deltas are not handled for these cases yet... */ float eul[3], oldeul[3], quat1[4] = {0}; if (ob->rotmode == ROT_MODE_QUAT) { diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index b5a0451b507..2e9652686da 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1007,7 +1007,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in } } bestIndex = -1; - // find the best change with an acceptable horizontal change + /* find the best change with an acceptable horizontal change */ for (i = 0; i < totweight; i++) { if (fabs(changes[i][0]) > fabs(changes[i][1] * 2.0f)) { bestIndex = i; @@ -1016,8 +1016,8 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in } if (bestIndex != -1) { wasChange = TRUE; - // it is a good place to stop if it tries to move the opposite direction - // (relative to the plane) of last time + /* it is a good place to stop if it tries to move the opposite direction + * (relative to the plane) of last time */ if (lastIndex != -1) { if (wasUp != upDown[bestIndex]) { wasChange = FALSE; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 2e58fa85a11..1fe533eb23f 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -203,7 +203,7 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char elbeemSimplifyChannelFloat(channel, &channelSize); } else { - // invalid, cant happen? + /* invalid, cant happen? */ } fprintf(file, " CHANNEL %s =\n", str); @@ -651,16 +651,16 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF FluidsimSettings *domainSettings= fluidmd->fss; FILE *fileCfg; int dirExist = 0; - char newSurfdataPath[FILE_MAX]; // modified output settings + char newSurfdataPath[FILE_MAX]; /* modified output settings */ const char *suffixConfigTmp = FLUID_SUFFIX_CONFIG_TMP; int outStringsChanged = 0; - // prepare names... + /* prepare names... */ const char *relbase= modifier_path_relbase(fsDomain); BLI_strncpy(targetDir, domainSettings->surfdataPath, FILE_MAXDIR); BLI_strncpy(newSurfdataPath, domainSettings->surfdataPath, FILE_MAXDIR); /* if 0'd out below, this value is never used! */ - BLI_path_abs(targetDir, relbase); // fixed #frame-no + BLI_path_abs(targetDir, relbase); /* fixed #frame-no */ /* .tmp: don't overwrite/delete original file */ BLI_join_dirfile(targetFile, FILE_MAX, targetDir, suffixConfigTmp); diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 5ca436b07b2..7f51f54ee4b 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -294,7 +294,7 @@ static int project_brush_radius(ViewContext *vc, ED_view3d_global_to_vector(vc->rv3d, location, view); - // create a vector that is not orthogonal to view + /* create a vector that is not orthogonal to view */ if (fabsf(view[0]) < 0.1f) { nonortho[0] = view[0] + 1.0f; @@ -312,19 +312,19 @@ static int project_brush_radius(ViewContext *vc, nonortho[2] = view[2] + 1.0f; } - // get a vector in the plane of the view + /* get a vector in the plane of the view */ cross_v3_v3v3(ortho, nonortho, view); normalize_v3(ortho); - // make a point on the surface of the brush tagent to the view + /* make a point on the surface of the brush tagent to the view */ mul_v3_fl(ortho, radius); add_v3_v3v3(offset, location, ortho); - // project the center of the brush, and the tangent point to the view onto the screen + /* project the center of the brush, and the tangent point to the view onto the screen */ project_float(vc->ar, location, p1); project_float(vc->ar, offset, p2); - // the distance between these points is the size of the projected brush in pixels + /* the distance between these points is the size of the projected brush in pixels */ return len_v2v2(p1, p2); } diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 6a8f7db5fc9..f6c17c97758 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1455,8 +1455,8 @@ static float project_paint_uvpixel_mask( } /* otherwise no mask normal is needed, were within the limit */ } - // This only works when the opacity dosnt change while painting, stylus pressure messes with this - // so don't use it. + /* This only works when the opacity dosnt change while painting, stylus pressure messes with this + * so don't use it. */ // if (ps->is_airbrush==0) mask *= BKE_brush_alpha_get(ps->brush); return mask; diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index b5cd49cc15c..dbde950188d 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -489,15 +489,15 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - + /* copy keyframes */ if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { - // FIXME... + /* FIXME... */ BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for Grease Pencil mode"); return OPERATOR_CANCELLED; } else if (ac.datatype == ANIMCONT_MASK) { - // FIXME... + /* FIXME... */ BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for mask mode"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index b13ba9a1aa3..199875fdc7b 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -116,8 +116,8 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiBlockSetEmboss(block, UI_EMBOSS); xco -= UI_UNIT_X; - - // Default panels + + /* Default panels */ uiBlockBeginAlign(block); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index fb12ea8417a..a23cb86bb76 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -351,11 +351,11 @@ void filelist_filter(FileList *filelist) { int num_filtered = 0; int i, j; - + if (!filelist->filelist) return; - // How many files are left after filter ? + /* How many files are left after filter ? */ for (i = 0; i < filelist->numfiles; ++i) { struct direntry *file = &filelist->filelist[i]; if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) { @@ -428,7 +428,7 @@ void folderlist_popdir(struct ListBase *folderlist, char *dir) folder = folderlist->last; if (folder) { - // remove the current directory + /* remove the current directory */ MEM_freeN(folder->foldername); BLI_freelinkN(folderlist, folder); @@ -438,7 +438,7 @@ void folderlist_popdir(struct ListBase *folderlist, char *dir) BLI_strncpy(dir, prev_dir, FILE_MAXDIR); } } - // delete the folder next or use setdir directly before PREVIOUS OP + /* delete the folder next or use setdir directly before PREVIOUS OP */ } void folderlist_pushdir(ListBase *folderlist, const char *dir) @@ -446,21 +446,21 @@ void folderlist_pushdir(ListBase *folderlist, const char *dir) struct FolderList *folder, *previous_folder; previous_folder = folderlist->last; - // check if already exists + /* check if already exists */ if (previous_folder && previous_folder->foldername) { if (BLI_path_cmp(previous_folder->foldername, dir) == 0) { return; } } - // create next folder element + /* create next folder element */ folder = (FolderList *)MEM_mallocN(sizeof(FolderList), "FolderList"); folder->foldername = (char *)MEM_mallocN(sizeof(char) * (strlen(dir) + 1), "foldername"); folder->foldername[0] = '\0'; BLI_strncpy(folder->foldername, dir, FILE_MAXDIR); - // add it to the end of the list + /* add it to the end of the list */ BLI_addtail(folderlist, folder); } @@ -468,16 +468,16 @@ int folderlist_clear_next(struct SpaceFile *sfile) { struct FolderList *folder; - // if there is no folder_next there is nothing we can clear + /* if there is no folder_next there is nothing we can clear */ if (!sfile->folders_next) return 0; - // if previous_folder, next_folder or refresh_folder operators are executed it doesn't clear folder_next + /* if previous_folder, next_folder or refresh_folder operators are executed it doesn't clear folder_next */ folder = sfile->folders_prev->last; if ((!folder) || (BLI_path_cmp(folder->foldername, sfile->params->dir) == 0)) return 0; - // eventually clear flist->folders_next + /* eventually clear flist->folders_next */ return 1; } diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 0366043aaa0..a127e2ca2bc 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -179,15 +179,15 @@ void fsmenu_insert_entry(struct FSMenu *fsmenu, FSMenuCategory category, const c } } else { - // if we're bookmarking this, file should come - // before the last separator, only automatically added - // current dir go after the last sep. + /* if we're bookmarking this, file should come + * before the last separator, only automatically added + * current dir go after the last sep. */ if (save) { break; } } } - + fsme = MEM_mallocN(sizeof(*fsme), "fsme"); fsme->path = BLI_strdup(path); fsme->save = save; @@ -247,7 +247,7 @@ void fsmenu_write_file(struct FSMenu *fsmenu, const char *filename) } fprintf(fp, "[Recent]\n"); nskip = fsmenu_get_nentries(fsmenu, FS_CATEGORY_RECENT) - FSMENU_RECENT_MAX; - // skip first entries if list too long + /* skip first entries if list too long */ for (fsme = fsmenu_get_category(fsmenu, FS_CATEGORY_RECENT); fsme && (nskip > 0); fsme = fsme->next, --nskip) { /* pass */ } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index dbc66b81874..b1e1b6e411a 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -260,8 +260,8 @@ void GRAPH_OT_view_all(wmOperatorType *ot) /* api callbacks */ ot->exec = graphkeys_viewall_exec; - ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier... - + ot->poll = ED_operator_graphedit_active; /* XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier... */ + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -279,7 +279,7 @@ void GRAPH_OT_view_selected(wmOperatorType *ot) /* api callbacks */ ot->exec = graphkeys_view_selected_exec; - ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier... + ot->poll = ED_operator_graphedit_active; /* XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier... */ /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -1641,7 +1641,7 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op) int f; /* sanity check: ensure that there are enough F-Curves to work on in this group */ - // TODO: also enforce assumption that there be a full set of keyframes at each position by ensuring that totvert counts are same? + /* TODO: also enforce assumption that there be a full set of keyframes at each position by ensuring that totvert counts are same? */ if (ELEM3(NULL, euf->fcurves[0], euf->fcurves[1], euf->fcurves[2])) { /* report which components are missing */ BKE_reportf(op->reports, RPT_WARNING, @@ -1655,9 +1655,9 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op) failed++; continue; } - + /* simple method: just treat any difference between keys of greater than 180 degrees as being a flip */ - // FIXME: there are more complicated methods that will be needed to fix more cases than just some + /* FIXME: there are more complicated methods that will be needed to fix more cases than just some */ for (f = 0; f < 3; f++) { FCurve *fcu = euf->fcurves[f]; BezTriple *bezt, *prev = NULL; @@ -2217,10 +2217,10 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op) /* if this exists, call the copy F-Modifiers API function */ if (ale && ale->data) { FCurve *fcu = (FCurve *)ale->data; - - // 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(&fcu->modifiers, 0); - + /* free temp data now */ MEM_freeN(ale); } @@ -2272,11 +2272,11 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op) /* paste modifiers */ for (ale = anim_data.first; ale; ale = ale->next) { FCurve *fcu = (FCurve *)ale->data; - - // TODO: do we want to replace existing modifiers? add user pref for that! + + /* TODO: do we want to replace existing modifiers? add user pref for that! */ ok += ANIM_fmodifiers_paste_from_buf(&fcu->modifiers, 0); } - + /* clean up */ BLI_freelistN(&anim_data); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 33e32363cf5..52a7f9b115c 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -961,9 +961,9 @@ static void nearest_fcurve_vert_store(ListBase *matches, View2D *v2d, FCurve *fc } } else if (fpt) { - // TODO... + /* TODO... */ } -} +} /* helper for find_nearest_fcurve_vert() - build the list of nearest matches */ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], ListBase *matches) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 3dc1fbd738f..4ddb336a9f7 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1660,7 +1660,7 @@ static int image_invert_exec(bContext *C, wmOperator *op) int i; - if (ibuf == NULL) // TODO: this should actually never happen, but does for render-results -> cleanup + if (ibuf == NULL) /* TODO: this should actually never happen, but does for render-results -> cleanup */ return OPERATOR_CANCELLED; /* TODO: make this into an IMB_invert_channels(ibuf,r,g,b,a) method!? */ diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index e3c831824f1..af790443928 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -140,9 +140,9 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor } else { Base *b; - + /* deselect all */ - // TODO: should this deselect all other types of channels too? + /* TODO: should this deselect all other types of channels too? */ for (b = sce->base.first; b; b = b->next) { b->flag &= ~SELECT; b->object->flag = b->flag; @@ -268,8 +268,8 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) { if (nlaedit_is_tweakmode_on(ac) == 0) { /* 'push-down' action - only usable when not in TweakMode */ - // TODO: make this use the operator instead of calling the function directly - // however, calling the operator requires that we supply the args, and that works with proper buttons only + /* TODO: make this use the operator instead of calling the function directly + * however, calling the operator requires that we supply the args, and that works with proper buttons only */ BKE_nla_action_pushdown(adt); } else { diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index f8d942b4fd1..4fc3edb521e 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -63,9 +63,9 @@ /* ************************************ Motion Paths ************************************* */ -// TODO: -// - options to draw paths with lines -// - include support for editing the path verts +/* TODO: + * - options to draw paths with lines + * - include support for editing the path verts */ /* Set up drawing environment for drawing motion paths */ void draw_motion_paths_init(View3D *v3d, ARegion *ar) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 339b5560711..7f7970382bc 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2118,7 +2118,7 @@ static void drawSelectedVertices__mapFunc(void *userData, int index, const float if (!(mv->flag & ME_HIDE)) { const char sel = mv->flag & SELECT; - // TODO define selected color + /* TODO define selected color */ if (sel) { glColor3f(1.0f, 1.0f, 0.0f); } -- cgit v1.2.3