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-03-24 10:38:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 10:38:07 +0400
commitab4a2aaf4a4b2b4e416aa1f113b30362cbe0dec3 (patch)
tree81af4c18519181490074508dbe9a8d515eab634f /source/blender/editors/space_info/info_ops.c
parent5a90ea77bc1333efe4e1e54984a080550ed3f707 (diff)
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/editors/space_info/info_ops.c')
-rw-r--r--source/blender/editors/space_info/info_ops.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index bceb7c3d747..3157b920ff0 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -85,16 +85,16 @@ static int pack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
ImBuf *ibuf;
// first check for dirty images
- for(ima=bmain->image.first; ima; ima=ima->id.next) {
- if(ima->ibufs.first) { /* XXX FIX */
+ for (ima=bmain->image.first; ima; ima=ima->id.next) {
+ if (ima->ibufs.first) { /* XXX FIX */
ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
+ if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
break;
}
}
- if(ima) {
+ if (ima) {
uiPupMenuOkee(C, "FILE_OT_pack_all", "Some images are painted on. These changes will be lost. Continue?");
return OPERATOR_CANCELLED;
}
@@ -132,7 +132,7 @@ static int unpack_all_exec(bContext *C, wmOperator *op)
Main *bmain= CTX_data_main(C);
int method= RNA_enum_get(op->ptr, "method");
- if(method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */
+ if (method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */
G.fileflags &= ~G_AUTOPACK;
return OPERATOR_FINISHED;
@@ -148,13 +148,13 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
count = countPackedFiles(bmain);
- if(!count) {
+ if (!count) {
BKE_report(op->reports, RPT_WARNING, "No packed files. Autopack disabled");
G.fileflags &= ~G_AUTOPACK;
return OPERATOR_CANCELLED;
}
- if(count == 1)
+ if (count == 1)
strcpy(title, "Unpack 1 file");
else
BLI_snprintf(title, sizeof(title), "Unpack %d files", count);
@@ -193,7 +193,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
- if(!G.relbase_valid) {
+ if (!G.relbase_valid) {
BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file");
return OPERATOR_CANCELLED;
}
@@ -225,7 +225,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
- if(!G.relbase_valid) {
+ if (!G.relbase_valid) {
BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file");
return OPERATOR_CANCELLED;
}
@@ -339,7 +339,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
int send_note= 0;
/* escape if not our timer */
- if( (reports->reporttimer==NULL) ||
+ if ( (reports->reporttimer==NULL) ||
(reports->reporttimer != event->customdata) ||
((report= BKE_reports_last_displayable(reports))==NULL) /* may have been deleted */
) {
@@ -363,15 +363,17 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
if (rti->widthfac == 0.0f) {
/* initialize colors based on report type */
- if(report->type & RPT_ERROR_ALL) {
+ if (report->type & RPT_ERROR_ALL) {
rti->col[0] = 1.0;
rti->col[1] = 0.2;
rti->col[2] = 0.0;
- } else if(report->type & RPT_WARNING_ALL) {
+ }
+ else if (report->type & RPT_WARNING_ALL) {
rti->col[0] = 1.0;
rti->col[1] = 1.0;
rti->col[2] = 0.0;
- } else if(report->type & RPT_INFO_ALL) {
+ }
+ else if (report->type & RPT_INFO_ALL) {
rti->col[0] = 0.3;
rti->col[1] = 0.45;
rti->col[2] = 0.7;
@@ -384,7 +386,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
color_progress = (float)reports->reporttimer->duration / color_timeout;
/* save us from too many draws */
- if(color_progress <= 1.0f) {
+ if (color_progress <= 1.0f) {
send_note= 1;
/* fade colors out sharply according to progress through fade-out duration */
@@ -399,7 +401,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
send_note= 1;
}
- if(send_note) {
+ if (send_note) {
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL);
}