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-07 03:56:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-07 03:56:59 +0400
commit84bf3e48c098d6971bab0ac55b4f413adc04708e (patch)
tree658323440a91d04948d0209053df24b6b728b6ca /source/blender/editors/interface
parent3a0593cc3d5de33248b3a7b913a45729c37dc1b4 (diff)
style cleanup: use c style comments in C code
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_anim.c10
-rw-r--r--source/blender/editors/interface/interface_draw.c28
-rw-r--r--source/blender/editors/interface/interface_handlers.c10
-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.c4
-rw-r--r--source/blender/editors/interface/view2d_ops.c2
9 files changed, 60 insertions, 60 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index c7f8ad521fa..de555d1d50e 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -160,9 +160,9 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
if (driver) {
/* set type of driver */
driver->type = DRIVER_TYPE_PYTHON;
-
+
/* set the expression */
- // TODO: need some way of identifying variables used
+ /* TODO: need some way of identifying variables used */
BLI_strncpy_utf8(driver->expression, str, sizeof(driver->expression));
/* updates */
@@ -187,12 +187,12 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
if (fcu && !driven) {
id = but->rnapoin.id.data;
-
- // TODO: this should probably respect the keyingset only option for anim
+
+ /* TODO: this should probably respect the keyingset only option for anim */
if (autokeyframe_cfra_can_key(scene, id)) {
ReportList *reports = CTX_wm_reports(C);
short flag = ANIM_get_keyframing_flags(scene, 1);
-
+
fcu->flag &= ~FCURVE_SELECTED;
insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index f173e7ce630..801daf6bb4b 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -537,27 +537,27 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glColor3ub(0, 0, 0);
for (y = 0; y < 6; y++) {
- // Do not draw more than the category allows
+ /* Do not draw more than the category allows */
if (cs > charmax) break;
for (x = 0; x < 12; x++)
{
- // Do not draw more than the category allows
+ /* Do not draw more than the category allows */
if (cs > charmax) break;
- // Draw one grid cell
+ /* Draw one grid cell */
glBegin(GL_LINE_LOOP);
glVertex2f(sx, sy);
glVertex2f(ex, sy);
glVertex2f(ex, ey);
glVertex2f(sx, ey);
- glEnd();
+ glEnd();
- // Draw character inside the cell
+ /* Draw character inside the cell */
memset(wstr, 0, sizeof(wchar_t) * 2);
memset(ustr, 0, 16);
- // Set the font to be either unicode or FO_BUILTIN_NAME
+ /* Set the font to be either unicode or FO_BUILTIN_NAME */
wstr[0] = cs;
if (strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
BLI_strncpy_wchar_as_utf8((char *)ustr, (wchar_t *)wstr, sizeof(ustr));
@@ -580,17 +580,17 @@ static void ui_draw_but_CHARTAB(uiBut *but)
float dx, dy;
float px, py;
- // Calculate the position
+ /* Calculate the position */
wid = FTF_GetStringWidth((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
FTF_GetBoundingBox((char *) ustr, &llx, &lly, &llz, &urx, &ury, &urz, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
dx = urx - llx;
dy = ury - lly;
- // This isn't fully functional since the but->aspect isn't working like I suspected
+ /* This isn't fully functional since the but->aspect isn't working like I suspected */
px = sx + ((butw / but->aspect) - dx) / 2;
py = sy + ((buth / but->aspect) - dy) / 2;
- // Set the position and draw the character
+ /* Set the position and draw the character */
ui_rasterpos_safe(px, py, but->aspect);
FTF_DrawString((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
}
@@ -598,8 +598,8 @@ static void ui_draw_but_CHARTAB(uiBut *but)
ui_rasterpos_safe(sx + butw / 2, sy + buth / 2, but->aspect);
UI_DrawString(but->font, (char *) ustr, 0);
}
-
- // Calculate the next position and character
+
+ /* Calculate the next position and character */
sx += butw; ex += butw;
cs++;
}
@@ -1571,9 +1571,9 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
if (tmpibuf->rect_float)
IMB_rect_from_float(tmpibuf);
- // XXX: for debug only
- // tmpibuf->ftype = PNG;
- // IMB_saveiff(tmpibuf, "sample.png", IB_rect);
+ /* XXX: for debug only
+ * tmpibuf->ftype = PNG;
+ * IMB_saveiff(tmpibuf, "sample.png", IB_rect); */
if (tmpibuf->rect)
scopes->track_preview = tmpibuf;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 3a64ad22062..78d0b6aa002 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3478,13 +3478,13 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
else if (event->type == WHEELDOWNMOUSE) {
float *hsv = ui_block_hsv_get(but->block);
hsv[2] = CLAMPIS(hsv[2] - 0.05f, 0.0f, 1.0f);
- ui_set_but_hsv(but); // converts to rgb
+ ui_set_but_hsv(but); /* converts to rgb */
ui_numedit_apply(C, block, but, data);
}
else if (event->type == WHEELUPMOUSE) {
float *hsv = ui_block_hsv_get(but->block);
hsv[2] = CLAMPIS(hsv[2] + 0.05f, 0.0f, 1.0f);
- ui_set_but_hsv(but); // converts to rgb
+ ui_set_but_hsv(but); /* converts to rgb */
ui_numedit_apply(C, block, but, data);
}
else if (event->type == MOUSEMOVE) {
@@ -4505,7 +4505,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
/* Keying Sets */
- // TODO: check on modifyability of Keying Set when doing this
+ /* TODO: check on modifyability of Keying Set when doing this */
if (is_anim) {
uiItemS(layout);
@@ -4529,8 +4529,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
/* Property Operators */
- //Copy Property Value
- //Paste Property Value
+ /*Copy Property Value
+ *Paste Property Value */
if (length) {
uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"),
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 40f28de50fa..5d6a331c466 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1454,21 +1454,21 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
/* when you are outside parent button, safety there should be smaller */
- // parent button to left
+ /* parent button to left */
if (midx < block->minx) block->safety.xmin = block->minx - 3;
else block->safety.xmin = block->minx - 40;
- // parent button to right
+ /* parent button to right */
if (midx > block->maxx) block->safety.xmax = block->maxx + 3;
else block->safety.xmax = block->maxx + 40;
-
- // parent button on bottom
+
+ /* parent button on bottom */
if (midy < block->miny) block->safety.ymin = block->miny - 3;
else block->safety.ymin = block->miny - 40;
- // parent button on top
+ /* parent button on top */
if (midy > block->maxy) block->safety.ymax = block->maxy + 3;
else block->safety.ymax = block->maxy + 40;
-
- // exception for switched pulldowns...
+
+ /* exception for switched pulldowns... */
if (dir1 && (dir1 & block->direction) == 0) {
if (dir2 == UI_RIGHT) block->safety.xmax = block->maxx + 3;
if (dir2 == UI_LEFT) block->safety.xmin = block->minx - 3;
@@ -1862,7 +1862,7 @@ static void ui_update_block_buts_rgb(uiBlock *block, const float rgb[3])
*/
rgb_to_hsv_compat_v(rgb, hsv);
- // this updates button strings, is hackish... but button pointers are on stack of caller function
+ /* this updates button strings, is hackish... but button pointers are on stack of caller function */
for (bt = block->buttons.first; bt; bt = bt->next) {
if (bt->rnaprop) {
@@ -2130,8 +2130,8 @@ static void uiBlockPicker(uiBlock *block, float rgba[4], PointerRNA *ptr, Proper
bt = uiDefButR_prop(block, NUMSLI, 0, IFACE_("B "), 0, -100, butwidth, UI_UNIT_Y, ptr, prop, 2, 0.0, 0.0, 0, 3, TIP_("Blue"));
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
- // could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", ICON_NONE);
- // but need to use uiButSetFunc for updating other fake buttons
+ /* could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", ICON_NONE);
+ * but need to use uiButSetFunc for updating other fake buttons */
/* HSV values */
uiBlockBeginAlign(block);
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 5d527667170..779341160c5 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -374,7 +374,7 @@ void uiStyleInit(void)
ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT);
}
- // XXX, this should be moved into a style, but for now best only load the monospaced font once.
+ /* XXX, this should be moved into a style, but for now best only load the monospaced font once. */
if (blf_mono_font == -1)
blf_mono_font = BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index e6a4c260d0f..49e3818fe08 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -587,7 +587,7 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co
uiItemL(row, "ID-Block:", ICON_NONE);
/* ID-Type Selector - just have a menu of icons */
- // FIXME: the icon-only setting doesn't work when we supply a blank name
+ /* FIXME: the icon-only setting doesn't work when we supply a blank name */
uiItemFullR(row, ptr, propType, 0, 0, UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
/* ID-Block Selector - just use pointer widget... */
@@ -622,7 +622,7 @@ void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propna
/* Path (existing string) Widget */
uiItemR(row, ptr, propname, 0, text, ICON_RNA);
- // TODO: attach something to this to make allow searching of nested properties to 'build' the path
+ /* TODO: attach something to this to make allow searching of nested properties to 'build' the path */
}
/************************ Modifier Template *************************/
@@ -741,7 +741,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND);
block = uiLayoutGetBlock(row);
/* VIRTUAL MODIFIER */
- // XXX this is not used now, since these cannot be accessed via RNA
+ /* XXX this is not used now, since these cannot be accessed via RNA */
BLI_snprintf(str, sizeof(str), "%s parent deform", md->name);
uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name");
@@ -821,7 +821,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
uiBlockEndAlign(block);
uiBlockSetEmboss(block, UI_EMBOSSN);
- // When Modifier is a simulation, show button to switch to context rather than the delete button.
+ /* When Modifier is a simulation, show button to switch to context rather than the delete button. */
if (modifier_can_delete(md) && !modifier_is_simulation(md))
uiItemO(row, "", ICON_X, "OBJECT_OT_modifier_remove");
if (modifier_is_simulation(md) == 1)
@@ -908,7 +908,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
/* find modifier and draw it */
cageIndex = modifiers_getCageIndex(scene, ob, &lastCageIndex, 0);
- // XXX virtual modifiers are not accesible for python
+ /* XXX virtual modifiers are not accesible for python */
vmd = modifiers_getVirtualModifierList(ob);
for (i = 0; vmd; i++, vmd = vmd->next) {
@@ -945,20 +945,20 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event)
switch (event) {
case B_CONSTRAINT_TEST:
- break; // no handling
+ break; /* no handling */
case B_CONSTRAINT_CHANGETARGET:
- if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ if (ob->pose) ob->pose->flag |= POSE_RECALC; /* checks & sorts pose channels */
DAG_scene_sort(bmain, scene);
break;
default:
break;
}
- // note: RNA updates now call this, commenting else it gets called twice.
- // if there are problems because of this, then rna needs changed update functions.
- //
- // object_test_constraints(ob);
- // if (ob->pose) BKE_pose_update_constraint_flags(ob->pose);
+ /* note: RNA updates now call this, commenting else it gets called twice.
+ * if there are problems because of this, then rna needs changed update functions.
+ *
+ * object_test_constraints(ob);
+ * if (ob->pose) BKE_pose_update_constraint_flags(ob->pose); */
if (ob->type == OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
else DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -1984,14 +1984,14 @@ static void handle_layer_buttons(bContext *C, void *arg1, void *arg2)
RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, i, FALSE);
}
}
-
+
/* view3d layer change should update depsgraph (invisible object changed maybe) */
/* see view3d_header.c */
}
-// TODO:
-// - for now, grouping of layers is determined by dividing up the length of
-// the array of layer bitflags
+/* TODO:
+ * - for now, grouping of layers is determined by dividing up the length of
+ * the array of layer bitflags */
void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname,
PointerRNA *used_ptr, const char *used_propname, int active_layer)
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 5ee89bb418f..7b139d81a1c 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1952,8 +1952,8 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], const int type, const floa
int a;
float h = hsv[0], s = hsv[1], v = hsv[2];
float dx, dy, sx1, sx2, sy;
- float col0[4][3]; // left half, rect bottom to top
- float col1[4][3]; // right half, rect bottom to top
+ float col0[4][3]; /* left half, rect bottom to top */
+ float col1[4][3]; /* right half, rect bottom to top */
/* draw series of gouraud rects */
glShadeModel(GL_SMOOTH);
@@ -2542,12 +2542,12 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
round_box_edges(&wtb, roundboxalign, rect, 5.0f);
ui_get_but_vectorf(but, col);
-
+
if (state & (UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN | UI_BUT_REDALERT)) {
- // draw based on state - color for keyed etc
+ /* draw based on state - color for keyed etc */
widgetbase_draw(&wtb, wcol);
-
- // inset to draw swatch color
+
+ /* inset to draw swatch color */
rect->xmin += SWATCH_KEYED_BORDER;
rect->xmax -= SWATCH_KEYED_BORDER;
rect->ymin += SWATCH_KEYED_BORDER;
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 407b2308af8..2e8117ea640 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1295,8 +1295,8 @@ void init_userdef_do_versions(void)
/* transform widget settings */
if (U.tw_hotspot == 0) {
U.tw_hotspot = 14;
- U.tw_size = 20; // percentage of window size
- U.tw_handlesize = 16; // percentage of widget radius
+ U.tw_size = 20; /* percentage of window size */
+ U.tw_handlesize = 16; /* percentage of widget radius */
}
if (U.pad_rot_angle == 0)
U.pad_rot_angle = 15;
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 129a47c7063..a1f9ad08378 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1266,7 +1266,7 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_
}
/* check if mouse is in or past either handle */
- // TODO: check if these extents are still valid or not
+ /* TODO: check if these extents are still valid or not */
in_max = ( (mouse >= (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse <= (sh_max + V2D_SCROLLER_HANDLE_SIZE)) );
in_min = ( (mouse <= (sh_min + V2D_SCROLLER_HANDLE_SIZE)) && (mouse >= (sh_min - V2D_SCROLLER_HANDLE_SIZE)) );
in_bar = ( (mouse < (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse > (sh_min + V2D_SCROLLER_HANDLE_SIZE)) );