Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-08 19:55:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-08 19:55:58 +0400
commit1bca7fe4927b2517cee02c43464df18144c8637e (patch)
treed99d2322d4940497b52a41d1cbf0a9c02f3a61d0 /source/blender/editors
parenteab80a40df94b2fedbf0f688248c654e215175f5 (diff)
parent76629c11ae4190b0eec2315360b1ec3379e751c3 (diff)
svn merge ^/trunk/blender -r48691:48729
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c24
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c50
-rw-r--r--source/blender/editors/animation/anim_draw.c6
-rw-r--r--source/blender/editors/animation/anim_filter.c24
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c18
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c6
-rw-r--r--source/blender/editors/animation/keyframes_draw.c16
-rw-r--r--source/blender/editors/animation/keyframing.c14
-rw-r--r--source/blender/editors/animation/keyingsets.c16
-rw-r--r--source/blender/editors/armature/armature_ops.c8
-rw-r--r--source/blender/editors/armature/editarmature.c16
-rw-r--r--source/blender/editors/armature/poseSlide.c24
-rw-r--r--source/blender/editors/armature/poseUtils.c2
-rw-r--r--source/blender/editors/armature/poselib.c26
-rw-r--r--source/blender/editors/armature/poseobject.c14
-rw-r--r--source/blender/editors/armature/reeb.c26
-rw-r--r--source/blender/editors/curve/editfont.c28
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c12
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c38
-rw-r--r--source/blender/editors/interface/interface.c12
-rw-r--r--source/blender/editors/interface/interface_anim.c12
-rw-r--r--source/blender/editors/interface/interface_draw.c32
-rw-r--r--source/blender/editors/interface/interface_handlers.c18
-rw-r--r--source/blender/editors/interface/interface_regions.c20
-rw-r--r--source/blender/editors/interface/interface_style.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c32
-rw-r--r--source/blender/editors/interface/interface_widgets.c12
-rw-r--r--source/blender/editors/interface/resources.c10
-rw-r--r--source/blender/editors/interface/view2d.c4
-rw-r--r--source/blender/editors/interface/view2d_ops.c4
-rw-r--r--source/blender/editors/io/io_collada.c4
-rw-r--r--source/blender/editors/io/io_ops.c2
-rw-r--r--source/blender/editors/mask/mask_editaction.c2
-rw-r--r--source/blender/editors/mesh/editface.c2
-rw-r--r--source/blender/editors/mesh/editmesh_bvh.c2
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c5
-rw-r--r--source/blender/editors/mesh/editmesh_select.c34
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
-rw-r--r--source/blender/editors/mesh/meshtools.c6
-rw-r--r--source/blender/editors/object/object_add.c14
-rw-r--r--source/blender/editors/object/object_constraint.c14
-rw-r--r--source/blender/editors/object/object_edit.c36
-rw-r--r--source/blender/editors/object/object_hook.c2
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_transform.c4
-rw-r--r--source/blender/editors/object/object_vgroup.c6
-rw-r--r--source/blender/editors/physics/physics_fluid.c8
-rw-r--r--source/blender/editors/render/render_opengl.c13
-rw-r--r--source/blender/editors/screen/area.c18
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c10
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/space_action/action_edit.c6
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c4
-rw-r--r--source/blender/editors/space_file/filelist.c20
-rw-r--r--source/blender/editors/space_file/filesel.c2
-rw-r--r--source/blender/editors/space_file/fsmenu.c10
-rw-r--r--source/blender/editors/space_graph/graph_edit.c24
-rw-r--r--source/blender/editors/space_graph/graph_select.c4
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c4
-rw-r--r--source/blender/editors/space_nla/nla_channels.c8
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c6
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/editors/transform/transform.c4
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c4
68 files changed, 416 insertions, 410 deletions
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) : "<None>");
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..c19904d39ac 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);
@@ -218,7 +218,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "SKETCH_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SKETCH_OT_finish_stroke", RIGHTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SKETCH_OT_cancel_stroke", ESCKEY, KM_PRESS, 0, 0);
- // Already part of view3d select
+ /* Already part of view3d select */
//WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
/* sketch poll checks mode */
@@ -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..2a3f2182fdf 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;
@@ -1402,7 +1402,7 @@ static void selectconnected_posebonechildren(Object *ob, Bone *bone, int extend)
if (!(bone->flag & BONE_CONNECTED) || (bone->flag & BONE_UNSELECTABLE))
return;
- // XXX old cruft! use notifiers instead
+ /* XXX old cruft! use notifiers instead */
//select_actionchannel_by_name (ob->action, bone->name, !(shift));
if (extend)
@@ -5404,7 +5404,7 @@ static int hide_unselected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr
bArmature *arm = ob->data;
if (arm->layer & bone->layer) {
- // hrm... typo here?
+ /* hrm... typo here? */
if ((bone->flag & BONE_SELECTED) == 0) {
bone->flag |= BONE_HIDDEN_P;
if (arm->act_bone == bone)
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/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 4e0398168d3..e2e3c49e7e0 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -185,7 +185,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob)
/* old optimize trick... this enforces to bypass the depgraph
* - note: code copied from transform_generics.c -> recalcData()
*/
- // FIXME: shouldn't this use the builtin stuff?
+ /* FIXME: shouldn't this use the builtin stuff? */
if ((arm->flag & ARM_DELAYDEFORM) == 0)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index ee54fc2c6fe..23c987c3536 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;
@@ -472,8 +472,8 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), sizeof(marker->name));
/* use Keying Set to determine what to store for the pose */
- // FIXME: in the past, the Keying Set respected selections (LocRotScale), but the current one doesn't (WholeCharacter)
- // so perhaps we need either a new Keying Set, or just to add overrides here...
+ /* FIXME: in the past, the Keying Set respected selections (LocRotScale), but the current one doesn't
+ * (WholeCharacter) so perhaps we need either a new Keying Set, or just to add overrides here... */
ANIM_apply_keyingset(C, NULL, act, ks, MODIFYKEY_MODE_INSERT, (float)frame);
/* store new 'active' pose number */
@@ -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..bb66b1f4347 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;
@@ -753,7 +753,7 @@ static int paste_selection(Object *obedit, ReportList *reports)
EditFont *ef = cu->editfont;
int len = wcslen(ef->copybuf);
- // Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT
+ /* Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT */
if (cu->len + len <= MAXTEXT) {
if (len) {
int size = (cu->len * sizeof(wchar_t)) - (cu->pos * sizeof(wchar_t)) + sizeof(wchar_t);
@@ -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);
}
@@ -1773,10 +1773,10 @@ static void *editFont_to_undoFont(void *ecu, void *UNUSED(obdata))
EditFont *ef = cu->editfont;
char *str;
- // The undo buffer includes [MAXTEXT+6]=actual string and [MAXTEXT+4]*sizeof(CharInfo)=charinfo
+ /* The undo buffer includes [MAXTEXT+6]=actual string and [MAXTEXT+4]*sizeof(CharInfo)=charinfo */
str = MEM_callocN((MAXTEXT + 6) * sizeof(wchar_t) + (MAXTEXT + 4) * sizeof(CharInfo), "string undo");
- // Copy the string and string information
+ /* Copy the string and string information */
memcpy(str + 4, ef->textbuf, (cu->len + 1) * sizeof(wchar_t));
memcpy(str + 4 + (cu->len + 1) * sizeof(wchar_t), ef->textbufinfo, cu->len * sizeof(CharInfo));
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 6d113cbb924..bc912fc8c76 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -683,7 +683,7 @@ void draw_gpencil_2dimage(const bContext *C)
{
/* just draw using standard scaling (settings here are currently ignored anyways) */
- // FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled
+ /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled */
offsx = 0;
offsy = 0;
sizex = ar->winx;
@@ -740,7 +740,7 @@ void draw_gpencil_view2d(const bContext *C, short onlyv2d)
if (gpd == NULL) return;
/* special hack for Image Editor */
- // FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled
+ /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled */
if (ELEM(sa->spacetype, SPACE_IMAGE, SPACE_CLIP))
dflag |= GP_DRAWDATA_IEDITHACK;
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 3f53f0403d7..949f92c68e9 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -93,8 +93,8 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
{
Object *ob = CTX_data_active_object(C);
- // TODO: we can include other data-types such as bones later if need be...
-
+ /* TODO: we can include other data-types such as bones later if need be... */
+
/* just in case no active object */
if (ob) {
/* for now, as long as there's an object, default to using that in 3D-View */
@@ -126,18 +126,18 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
SpaceSeq *sseq = (SpaceSeq *)CTX_wm_space_data(C);
/* for now, Grease Pencil data is associated with the space (actually preview region only) */
- // XXX our convention for everything else is to link to data though...
+ /* XXX our convention for everything else is to link to data though... */
if (ptr) RNA_pointer_create(screen_id, &RNA_SpaceSequenceEditor, sseq, ptr);
return &sseq->gpd;
}
break;
-
+
case SPACE_IMAGE: /* Image/UV Editor */
{
SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C);
-
+
/* for now, Grease Pencil data is associated with the space... */
- // XXX our convention for everything else is to link to data though...
+ /* XXX our convention for everything else is to link to data though... */
if (ptr) RNA_pointer_create(screen_id, &RNA_SpaceImageEditor, sima, ptr);
return &sima->gpd;
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 12b002ef612..fd98dd83a7d 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1623,12 +1623,12 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else
p = op->customdata;
-
- // TODO: set any additional settings that we can take from the events?
- // TODO? if tablet is erasing, force eraser to be on?
-
- // TODO: move cursor setting stuff to stroke-start so that paintmode can be changed midway...
-
+
+ /* TODO: set any additional settings that we can take from the events?
+ * TODO? if tablet is erasing, force eraser to be on? */
+
+ /* TODO: move cursor setting stuff to stroke-start so that paintmode can be changed midway... */
+
/* if eraser is on, draw radial aid */
if (p->paintmode == GP_PAINTMODE_ERASER) {
gpencil_draw_toggle_eraser_cursor(C, p, TRUE);
@@ -1692,8 +1692,8 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)
//printf("\t\tGP - start stroke\n");
/* we may need to set up paint env again if we're resuming */
- // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions
- // XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support
+ /* XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions */
+ /* XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support */
if (gp_session_initdata(C, p))
gp_paint_initstroke(p, p->paintmode);
@@ -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.c b/source/blender/editors/interface/interface.c
index 49d56d427ba..1c5cc7528fe 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -524,8 +524,8 @@ static void ui_draw_links(uiBlock *block)
uiBut *but;
uiLinkLine *line;
- // Draw the inactive lines (lines with neither button being hovered over).
- // As we go, remember if we see any active or selected lines.
+ /* Draw the inactive lines (lines with neither button being hovered over).
+ * As we go, remember if we see any active or selected lines. */
int foundselectline = 0;
int foundactiveline = 0;
for (but = block->buttons.first; but; but = but->next) {
@@ -542,8 +542,8 @@ static void ui_draw_links(uiBlock *block)
}
}
- // Draw any active lines (lines with either button being hovered over).
- // Do this last so they appear on top of inactive lines.
+ /* Draw any active lines (lines with either button being hovered over).
+ * Do this last so they appear on top of inactive lines. */
if (foundactiveline) {
for (but = block->buttons.first; but; but = but->next) {
if (but->type == LINK && but->link) {
@@ -2486,7 +2486,7 @@ static void ui_block_do_align_but(uiBut *first, short nr)
/* merge coordinates */
if (prev) {
- // simple cases
+ /* simple cases */
if (rows == 0) {
but->x1 = (prev->x2 + but->x1) / 2.0f;
prev->x2 = but->x1;
@@ -3432,7 +3432,7 @@ int uiButGetUnitType(uiBut *but)
/* own unit define always takes precedence over RNA provided, allowing for overriding
* default value provided in RNA in a few special cases (i.e. Active Keyframe in Graph Edit)
*/
- // XXX: this doesn't allow clearing unit completely, though the same could be said for icons
+ /* XXX: this doesn't allow clearing unit completely, though the same could be said for icons */
if ((ownUnit != 0) || (but->rnaprop == NULL)) {
return ownUnit << 16;
}
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index c7f8ad521fa..3099fcb2b40 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -141,7 +141,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
}
/* make sure we have animdata for this */
- // FIXME: until materials can be handled by depsgraph, don't allow drivers to be created for them
+ /* FIXME: until materials can be handled by depsgraph, don't allow drivers to be created for them */
id = (ID *)but->rnapoin.id.data;
if ((id == NULL) || (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) {
if (G.debug & G_DEBUG)
@@ -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..e576b71e442 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -441,7 +441,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
w = (rect->xmax - rect->xmin);
h = (rect->ymax - rect->ymin);
- // prevent drawing outside widget area
+ /* prevent drawing outside widget area */
glGetIntegerv(GL_SCISSOR_BOX, scissor);
glScissor(ar->winrct.xmin + rect->xmin, ar->winrct.ymin + rect->ymin, w, h);
#endif
@@ -509,7 +509,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
/* Set the font, in case it is not FO_BUILTIN_NAME font */
if (G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
- // Is the font file packed, if so then use the packed file
+ /* Is the font file packed, if so then use the packed file */
if (G.selfont->packedfile) {
pf = G.selfont->packedfile;
FTF_SetFont(pf->data, pf->size, 14.0);
@@ -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 30c5f2fbe40..18b256d061d 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -804,7 +804,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
break;
}
- // only works if the sensor and the actuator are from the same object
+ /* only works if the sensor and the actuator are from the same object */
if (!act_iter) return;
/* (3) add a new controller */
@@ -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) {
@@ -3810,7 +3810,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
static int in_scope_resize_zone(uiBut *but, int UNUSED(x), int y)
{
- // bottom corner return (x > but->x2 - SCOPE_RESIZE_PAD) && (y < but->y1 + SCOPE_RESIZE_PAD);
+ /* bottom corner return (x > but->x2 - SCOPE_RESIZE_PAD) && (y < but->y1 + SCOPE_RESIZE_PAD); */
return (y < but->y1 + SCOPE_RESIZE_PAD);
}
@@ -3833,7 +3833,7 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx
}
else {
/* scale histogram values */
- const float yfac = MIN2(powf(hist->ymax, 2.f), 1.f) * 0.5f;
+ const float yfac = minf(powf(hist->ymax, 2.0f), 1.0f) * 0.5f;
hist->ymax += dy * yfac;
CLAMP(hist->ymax, 1.f, 100.f);
@@ -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"),
@@ -4566,7 +4566,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
/* keyboard shortcuts */
if ((kmi) && ISKEYBOARD(kmi->type)) {
- // would rather use a block but, but gets weirdly positioned...
+ /* would rather use a block but, but gets weirdly positioned... */
//uiDefBlockBut(block, menu_change_shortcut, but, "Change Shortcut", 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, "");
but2 = uiDefIconTextBut(block, BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"),
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 9a965fa8f7f..f3acd970a57 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -91,7 +91,7 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
if (btheme) {
- // first check for ui buttons theme
+ /* first check for ui buttons theme */
if (colorid < TH_THEMEUI) {
switch (colorid) {
@@ -936,7 +936,7 @@ void UI_SetTheme(int spacetype, int regionid)
theme_regionid = RGN_TYPE_WINDOW;
}
else {
- // later on, a local theme can be found too
+ /* later on, a local theme can be found too */
theme_active = U.themes.first;
theme_spacetype = spacetype;
theme_regionid = regionid;
@@ -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;
@@ -1353,7 +1353,7 @@ void init_userdef_do_versions(void)
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
/* check for (alpha == 0) is safe, then color was never set */
if (btheme->ttime.back[3] == 0) {
- // copied from ui_theme_init_default
+ /* copied from ui_theme_init_default */
btheme->ttime = btheme->tv3d;
rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 392aae1632d..47e91f4c659 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -91,7 +91,7 @@ static void view2d_masks(View2D *v2d)
v2d->mask.ymax = v2d->winy - 1;
#if 0
- // XXX see above
+ /* XXX see above */
v2d->scroll &= ~(V2D_SCROLL_HORIZONTAL_HIDE | V2D_SCROLL_VERTICAL_HIDE);
/* check size if: */
if (v2d->scroll & V2D_SCROLL_HORIZONTAL)
@@ -203,7 +203,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
v2d->cur = v2d->tot;
/* scrollers - should we have these by default? */
- // XXX for now, we don't override this, or set it either!
+ /* XXX for now, we don't override this, or set it either! */
}
break;
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 129a47c7063..3be41d1f46e 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1133,7 +1133,7 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
*/
float zoom, center, size;
- // TODO: is this zoom factor calculation valid? It seems to produce same results everytime...
+ /* TODO: is this zoom factor calculation valid? It seems to produce same results everytime... */
if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) {
size = (v2d->cur.xmax - v2d->cur.xmin);
zoom = size / (rect.xmax - rect.xmin);
@@ -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/io/io_collada.c b/source/blender/editors/io/io_collada.c
index 77808d0a00d..6e4da6b7e88 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -174,7 +174,7 @@ void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
uiItemR(row, imfptr, "include_armatures", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected"));
- // Texture options
+ /* Texture options */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, FALSE);
uiItemL(row, IFACE_("Texture Options:"), ICON_TEXTURE_DATA);
@@ -192,7 +192,7 @@ void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
uiItemR(row, imfptr, "use_texture_copies", 1, NULL, ICON_NONE);
- // Armature options
+ /* Armature options */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, FALSE);
uiItemL(row, IFACE_("Armature Options:"), ICON_ARMATURE_DATA);
diff --git a/source/blender/editors/io/io_ops.c b/source/blender/editors/io/io_ops.c
index b724db6e737..d2b0ddd4e7e 100644
--- a/source/blender/editors/io/io_ops.c
+++ b/source/blender/editors/io/io_ops.c
@@ -37,7 +37,7 @@
void ED_operatortypes_io(void)
{
#ifdef WITH_COLLADA
- // Collada operators:
+ /* Collada operators: */
WM_operatortype_append(WM_OT_collada_export);
WM_operatortype_append(WM_OT_collada_import);
#endif
diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c
index 3836b393bf8..6124947e3b9 100644
--- a/source/blender/editors/mask/mask_editaction.c
+++ b/source/blender/editors/mask/mask_editaction.c
@@ -243,7 +243,7 @@ void ED_masklayer_frames_duplicate(MaskLayer *masklay)
mask_shape_dupe = BKE_mask_layer_shape_duplicate(masklay_shape);
masklay_shape->flag &= ~MASK_SHAPE_SELECT;
- // XXX - how to handle duplicate frames?
+ /* XXX - how to handle duplicate frames? */
BLI_insertlinkafter(&masklay->splines_shapes, masklay_shape, mask_shape_dupe);
}
}
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_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 2ceb8aeef26..882d3115ba0 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1400,9 +1400,10 @@ static float knife_snap_size(KnifeTool_OpData *kcd, float maxsize)
{
float density = (float)knife_sample_screen_density(kcd, maxsize * 2.0f);
- density = MAX2(density, 1);
+ if (density < 1.0f)
+ density = 1.0f;
- return MIN2(maxsize / (density * 0.5f), maxsize);
+ return minf(maxsize / (density * 0.5f), maxsize);
}
/* p is closest point on edge to the mouse cursor */
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/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index cdbf5751ea1..044c23092bd 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -265,11 +265,11 @@ int join_mesh_exec(bContext *C, wmOperator *op)
key->totkey++;
if (key->totkey == 1) key->refkey = kbn;
- // XXX 2.5 Animato
+ /* XXX 2.5 Animato */
#if 0
/* also, copy corresponding ipo-curve to ipo-block if applicable */
if (me->key->ipo && key->ipo) {
- // FIXME... this is a luxury item!
+ /* FIXME... this is a luxury item! */
puts("FIXME: ignoring IPO's when joining shapekeys on Meshes for now...");
}
#endif
@@ -530,7 +530,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* free temp copy of destination shapekeys (if applicable) */
if (nkey) {
- // XXX 2.5 Animato
+ /* XXX 2.5 Animato */
#if 0
/* free it's ipo too - both are not actually freed from memory yet as ID-blocks */
if (nkey->ipo) {
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..be25c79ba25 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) {
@@ -718,7 +718,7 @@ static void child_get_inverse_matrix(Scene *scene, Object *ob, bConstraint *con,
unit_m4(invmat);
/* try to find a pose channel - assume that this is the constraint owner */
- // TODO: get from context instead?
+ /* TODO: get from context instead? */
if (ob && ob->pose)
pchan = BKE_pose_channel_active(ob);
@@ -974,7 +974,7 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
ListBase *lb = get_constraint_lb(ob, con, NULL);
/* lets be nice and escape if its active already */
- // NOTE: this assumes that the stack doesn't have other active ones set...
+ /* NOTE: this assumes that the stack doesn't have other active ones set... */
if ((lb && con) && (con->flag & CONSTRAINT_ACTIVE))
return;
@@ -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 */
@@ -1787,7 +1787,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
bConstraint *con, *next;
- // TODO: should we be checking if these contraints were local before we try and remove them?
+ /* TODO: should we be checking if these contraints were local before we try and remove them? */
for (con = pchan->constraints.first; con; con = next) {
next = con->next;
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 35ee641d2c1..b5e85c3712b 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);
}
@@ -1145,7 +1145,7 @@ static int object_calculate_paths_invoke(bContext *C, wmOperator *op, wmEvent *U
}
/* show popup dialog to allow editing of range... */
- // FIXME: hardcoded dimensions here are just arbitrary
+ /* FIXME: hardcoded dimensions here are just arbitrary */
return WM_operator_props_dialog_popup(C, op, 200, 200);
}
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_modifier.c b/source/blender/editors/object/object_modifier.c
index aab3d8afb22..3d9e62b1a16 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -1353,7 +1353,7 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot)
ot->description = "Save displacements to an external file";
ot->idname = "OBJECT_OT_multires_external_save";
- // XXX modifier no longer in context after file browser .. ot->poll = multires_poll;
+ /* XXX modifier no longer in context after file browser .. ot->poll = multires_poll; */
ot->exec = multires_external_save_exec;
ot->invoke = multires_external_save_invoke;
ot->poll = multires_poll;
@@ -1375,7 +1375,7 @@ static int multires_external_pack_exec(bContext *C, wmOperator *UNUSED(op))
if (!CustomData_external_test(&me->ldata, CD_MDISPS))
return OPERATOR_CANCELLED;
- // XXX don't remove..
+ /* XXX don't remove.. */
CustomData_external_remove(&me->ldata, &me->id, CD_MDISPS, me->totloop);
return OPERATOR_FINISHED;
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/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index d37a16cb1bb..538b4b3884a 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -477,11 +477,9 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
const short view_context = (oglrender->v3d != NULL);
Object *camera = NULL;
- /* update animated image textures for gpu, etc,
- * call before BKE_scene_update_for_newframe so modifiers with textures don't lag 1 frame */
- ED_image_update_frame(bmain, scene->r.cfra);
-
/* go to next frame */
+ if (CFRA < oglrender->nfra)
+ CFRA++;
while (CFRA < oglrender->nfra) {
unsigned int lay = screen_opengl_layers(oglrender);
@@ -492,6 +490,10 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
CFRA++;
}
+ /* update animated image textures for gpu, etc,
+ * call before BKE_scene_update_for_newframe so modifiers with textures don't lag 1 frame */
+ ED_image_update_frame(bmain, CFRA);
+
BKE_scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
if (view_context) {
@@ -569,10 +571,9 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
/* go to next frame */
oglrender->nfra += scene->r.frame_step;
- scene->r.cfra++;
/* stop at the end or on error */
- if (scene->r.cfra > PEFRA || !ok) {
+ if (CFRA >= PEFRA || !ok) {
screen_opengl_render_end(C, op->customdata);
return 0;
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 9771fef2d58..a79d38d4081 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1149,7 +1149,7 @@ static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *hand
{
/* note, add-handler checks if it already exists */
- // XXX it would be good to have boundbox checks for some of these...
+ /* XXX it would be good to have boundbox checks for some of these... */
if (flag & ED_KEYMAP_UI) {
/* user interface widgets */
UI_add_region_handlers(handlers);
@@ -1654,7 +1654,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
- // don't jump back when panels close or hide
+ /* don't jump back when panels close or hide */
if (!newcontext)
y = MAX2(-y, -v2d->cur.ymin);
else
@@ -1669,14 +1669,14 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
//v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_KEEPOFS_Y);
v2d->scroll |= V2D_SCROLL_VERTICAL_HIDE;
v2d->scroll &= ~V2D_SCROLL_HORIZONTAL_HIDE;
-
- // don't jump back when panels close or hide
+
+ /* don't jump back when panels close or hide */
if (!newcontext)
x = MAX2(x, v2d->cur.xmax);
y = -y;
}
- // +V2D_SCROLL_HEIGHT is workaround to set the actual height
+ /* +V2D_SCROLL_HEIGHT is workaround to set the actual height */
UI_view2d_totRect_set(v2d, x + V2D_SCROLL_WIDTH, y + V2D_SCROLL_HEIGHT);
/* set the view */
@@ -1698,17 +1698,17 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
{
wmKeyMap *keymap;
- // XXX quick hacks for files saved with 2.5 already (i.e. the builtin defaults file)
- // scrollbars for button regions
+ /* XXX quick hacks for files saved with 2.5 already (i.e. the builtin defaults file)
+ * scrollbars for button regions */
ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
ar->v2d.scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
ar->v2d.scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
ar->v2d.keepzoom |= V2D_KEEPZOOM;
- // correctly initialized User-Prefs?
+ /* correctly initialized User-Prefs? */
if (!(ar->v2d.align & V2D_ALIGN_NO_POS_Y))
ar->v2d.flag &= ~V2D_IS_INITIALISED;
-
+
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy);
keymap = WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0);
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/filesel.c b/source/blender/editors/space_file/filesel.c
index adb3e7acca5..ef3e150b034 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -117,7 +117,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
const short is_directory = (RNA_struct_find_property(op->ptr, "directory") != NULL);
const short is_relative_path = (RNA_struct_find_property(op->ptr, "relative_path") != NULL);
- BLI_strncpy(params->title, RNA_struct_ui_name(op->type->srna), sizeof(params->title));
+ BLI_strncpy_utf8(params->title, RNA_struct_ui_name(op->type->srna), sizeof(params->title));
if (RNA_struct_find_property(op->ptr, "filemode"))
params->type = RNA_int_get(op->ptr, "filemode");
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_buttons.c b/source/blender/editors/space_image/image_buttons.c
index b92f4829cd3..1f4fc939818 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -372,7 +372,7 @@ static char *slot_menu(void)
static char *layer_menu(RenderResult *rr, short *UNUSED(curlay))
{
RenderLayer *rl;
- int len = 64 + 32 * BLI_countlist(&rr->layers);
+ int len = 64 + RE_MAXNAME * BLI_countlist(&rr->layers);
short a, nr = 0;
char *str = MEM_callocN(len, "menu layers");
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 28fe1459239..dba943589ba 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1695,7 +1695,7 @@ static int image_invert_exec(bContext *C, wmOperator *op)
Image *ima = CTX_data_edit_image(C);
ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL);
- // flags indicate if this channel should be inverted
+ /* flags indicate if this channel should be inverted */
const short r = RNA_boolean_get(op->ptr, "invert_r");
const short g = RNA_boolean_get(op->ptr, "invert_g");
const short b = RNA_boolean_get(op->ptr, "invert_b");
@@ -1703,7 +1703,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);
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index e6ea42aa5ba..3079719efe0 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1574,6 +1574,8 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
else if (bgpic->source == V3D_BGPIC_MOVIE) {
clip = NULL;
+ /* TODO: skip drawing when out of frame range (as image sequences do above) */
+
if (bgpic->flag & V3D_BGPIC_CAMERACLIP) {
if (scene->camera)
clip = BKE_object_movieclip_get(scene, scene->camera, 1);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 44860258c89..35281168c2e 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1392,8 +1392,8 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
float dx = t->mval[0] - cent[0], dy = t->mval[1] - cent[1];
float angle = atan2f(dy, dx);
float dist = sqrtf(dx * dx + dy * dy);
- float delta_angle = MIN2(15.0f / dist, (float)M_PI / 4.0f);
- float spacing_angle = MIN2(5.0f / dist, (float)M_PI / 12.0f);
+ float delta_angle = minf(15.0f / dist, (float)M_PI / 4.0f);
+ float spacing_angle = minf(5.0f / dist, (float)M_PI / 12.0f);
UI_ThemeColor(TH_WIRE);
setlinestyle(3);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index af0b33d58ae..d7241555cc7 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1829,7 +1829,7 @@ static void editmesh_set_connectivity_distance(BMEditMesh *em, float mtx[][3], f
d2 = d + len_v3(vec);
if (dists[BM_elem_index_get(v3)] != FLT_MAX)
- dists[BM_elem_index_get(v3)] = MIN2(d2, dists[BM_elem_index_get(v3)]);
+ dists[BM_elem_index_get(v3)] = minf(d2, dists[BM_elem_index_get(v3)]);
else
dists[BM_elem_index_get(v3)] = d2;
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 43f3e81ae92..5c2e57cf27f 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -403,7 +403,9 @@ static void stitch_island_calculate_edge_rotation(UvEdge *edge, StitchState *sta
edgecos = uv1[0] * uv2[0] + uv1[1] * uv2[1];
edgesin = uv1[0] * uv2[1] - uv2[0] * uv1[1];
- rotation = (edgesin > 0.0f) ? acosf(MAX2(-1.0f, MIN2(1.0f, edgecos))) : -acosf(MAX2(-1.0f, MIN2(1.0f, edgecos)));
+ rotation = (edgesin > 0.0f) ?
+ +acosf(maxf(-1.0f, minf(1.0f, edgecos))) :
+ -acosf(maxf(-1.0f, minf(1.0f, edgecos)));
island_stitch_data[element1->island].num_rot_elements++;
island_stitch_data[element1->island].rotation += rotation;