Updated the indent, sorry!

This commit is contained in:
2011-07-04 19:22:37 +00:00
parent e814f2c71d
commit 830fe8af84
13 changed files with 74 additions and 77 deletions

View File

@@ -87,9 +87,9 @@ typedef struct bNodeType {
void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
/* this line is set on startup of blender */
void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
const char *(*labelfunc)(struct bNode *);
void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
const char *(*labelfunc)(struct bNode *);
void (*initfunc)(struct bNode *);
void (*freestoragefunc)(struct bNode *);

View File

@@ -3156,9 +3156,9 @@ static void force_hidden_passes(bNode *node, int passflag)
if(!(passflag & SCE_PASS_INDIRECT)) sock->flag |= SOCK_UNAVAIL;
sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXOB);
if(!(passflag & SCE_PASS_INDEXOB)) sock->flag |= SOCK_UNAVAIL;
sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXMA);
if(!(passflag & SCE_PASS_INDEXMA)) sock->flag |= SOCK_UNAVAIL;
sock= BLI_findlink(&node->outputs, RRES_OUT_MIST);
sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXMA);
if(!(passflag & SCE_PASS_INDEXMA)) sock->flag |= SOCK_UNAVAIL;
sock= BLI_findlink(&node->outputs, RRES_OUT_MIST);
if(!(passflag & SCE_PASS_MIST)) sock->flag |= SOCK_UNAVAIL;
sock= BLI_findlink(&node->outputs, RRES_OUT_EMIT);
if(!(passflag & SCE_PASS_EMIT)) sock->flag |= SOCK_UNAVAIL;

View File

@@ -423,7 +423,7 @@ static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *
/* only once called */
static void node_shader_set_butfunc(bNodeType *ntype)
{
ntype->uifuncbut = NULL;
ntype->uifuncbut = NULL;
switch(ntype->type) {
/* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
@@ -473,7 +473,7 @@ static void node_shader_set_butfunc(bNodeType *ntype)
default:
ntype->uifunc= NULL;
}
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
}
/* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */
@@ -1040,31 +1040,28 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C
}
static void node_composit_buts_colorbalance_but(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "correction_method", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "correction_method", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "correction_method")== 0) {
if (RNA_enum_get(ptr, "correction_method")== 0) {
uiTemplateColorWheel(layout, ptr, "lift", 1, 1, 0, 1);
uiItemR(layout, ptr, "lift", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "lift", 1, 1, 0, 1);
uiItemR(layout, ptr, "lift", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "gamma", 1, 1, 1, 1);
uiItemR(layout, ptr, "gamma", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "gamma", 1, 1, 1, 1);
uiItemR(layout, ptr, "gamma", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "gain", 1, 1, 1, 1);
uiItemR(layout, ptr, "gain", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "gain", 1, 1, 1, 1);
uiItemR(layout, ptr, "gain", 0, NULL, ICON_NONE);
} else {
uiTemplateColorWheel(layout, ptr, "offset", 1, 1, 0, 1);
uiItemR(layout, ptr, "offset", 0, NULL, ICON_NONE);
} else {
uiTemplateColorWheel(layout, ptr, "offset", 1, 1, 0, 1);
uiItemR(layout, ptr, "offset", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "power", 1, 1, 0, 1);
uiItemR(layout, ptr, "power", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "slope", 1, 1, 0, 1);
uiItemR(layout, ptr, "slope", 0, NULL, ICON_NONE);
}
uiTemplateColorWheel(layout, ptr, "power", 1, 1, 0, 1);
uiItemR(layout, ptr, "power", 0, NULL, ICON_NONE);
uiTemplateColorWheel(layout, ptr, "slope", 1, 1, 0, 1);
uiItemR(layout, ptr, "slope", 0, NULL, ICON_NONE);
}
}
@@ -1081,7 +1078,7 @@ static void node_composit_buts_ycc(uiLayout *layout, bContext *UNUSED(C), Pointe
/* only once called */
static void node_composit_set_butfunc(bNodeType *ntype)
{
ntype->uifuncbut = NULL;
ntype->uifuncbut = NULL;
switch(ntype->type) {
/* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
@@ -1215,9 +1212,9 @@ static void node_composit_set_butfunc(bNodeType *ntype)
ntype->uifunc=node_composit_buts_view_levels;
break;
case CMP_NODE_COLORBALANCE:
ntype->uifunc=node_composit_buts_colorbalance;
ntype->uifuncbut=node_composit_buts_colorbalance_but;
break;
ntype->uifunc=node_composit_buts_colorbalance;
ntype->uifuncbut=node_composit_buts_colorbalance_but;
break;
case CMP_NODE_HUECORRECT:
ntype->uifunc=node_composit_buts_huecorrect;
break;
@@ -1231,7 +1228,7 @@ static void node_composit_set_butfunc(bNodeType *ntype)
default:
ntype->uifunc= NULL;
}
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
}

View File

@@ -118,8 +118,8 @@ static void active_node_panel(const bContext *C, Panel *pa)
uiItemS(layout);
/* draw this node's settings */
if (node->typeinfo && node->typeinfo->uifuncbut)
node->typeinfo->uifuncbut(layout, (bContext *)C, &ptr);
if (node->typeinfo && node->typeinfo->uifuncbut)
node->typeinfo->uifuncbut(layout, (bContext *)C, &ptr);
}
/* ******************* node buttons registration ************** */

View File

@@ -480,11 +480,11 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc
te->name= "Index Object";
te->directdata= &srl->passflag;
te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXMA));
te->name= "Index Material";
te->directdata= &srl->passflag;
te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_INDEXMA));
te->name= "Index Material";
te->directdata= &srl->passflag;
te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_RGBA));
te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_RGBA));
te->name= "Color";
te->directdata= &srl->passflag;

View File

@@ -1676,10 +1676,10 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexMA render pass");
RNA_def_property_update(prop, NC_OBJECT, NULL);
prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexMA render pass");
RNA_def_property_update(prop, NC_OBJECT, NULL);
/* flags */

View File

@@ -388,8 +388,8 @@ static void rna_def_render_pass(BlenderRNA *brna)
{SCE_PASS_MIST, "MIST", 0, "Mist", ""},
{SCE_PASS_EMIT, "EMIT", 0, "Emit", ""},
{SCE_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""},
{SCE_PASS_INDEXMA, "MATERIAL_INDEX", 0, "Material Index", ""},
{0, NULL, 0, NULL, NULL}};
{SCE_PASS_INDEXMA, "MATERIAL_INDEX", 0, "Material Index", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RenderPass", NULL);
RNA_def_struct_ui_text(srna, "Render Pass", "");

View File

@@ -1515,13 +1515,13 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA);
RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA);
RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");

View File

@@ -53,8 +53,8 @@ static bNodeSocketType cmp_node_rlayers_out[]= {
{ SOCK_RGBA, 0, "Refract", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Indirect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "IndexOB", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "IndexMA", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "Mist", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "IndexMA", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 0, "Mist", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Emit", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Environment",0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
@@ -212,9 +212,9 @@ static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack *
out[RRES_OUT_INDIRECT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDIRECT);
if(out[RRES_OUT_INDEXOB]->hasoutput)
out[RRES_OUT_INDEXOB]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXOB);
if(out[RRES_OUT_INDEXMA]->hasoutput)
out[RRES_OUT_INDEXMA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXMA);
if(out[RRES_OUT_MIST]->hasoutput)
if(out[RRES_OUT_INDEXMA]->hasoutput)
out[RRES_OUT_INDEXMA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXMA);
if(out[RRES_OUT_MIST]->hasoutput)
out[RRES_OUT_MIST]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_MIST);
if(out[RRES_OUT_EMIT]->hasoutput)
out[RRES_OUT_EMIT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_EMIT);
@@ -329,7 +329,7 @@ static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, in
CompBuf *buf;
int buftype= CB_VEC3;
if(ELEM4(passcode, SCE_PASS_Z, SCE_PASS_INDEXOB, SCE_PASS_MIST, SCE_PASS_INDEXMA))
if(ELEM4(passcode, SCE_PASS_Z, SCE_PASS_INDEXOB, SCE_PASS_MIST, SCE_PASS_INDEXMA))
buftype= CB_VAL;
else if(passcode==SCE_PASS_VECTOR)
buftype= CB_VEC4;
@@ -376,8 +376,8 @@ static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStac
out[RRES_OUT_INDIRECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDIRECT);
if(out[RRES_OUT_INDEXOB]->hasoutput)
out[RRES_OUT_INDEXOB]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXOB);
if(out[RRES_OUT_INDEXMA]->hasoutput)
out[RRES_OUT_INDEXMA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXMA);
if(out[RRES_OUT_INDEXMA]->hasoutput)
out[RRES_OUT_INDEXMA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXMA);
if(out[RRES_OUT_MIST]->hasoutput)
out[RRES_OUT_MIST]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_MIST);
if(out[RRES_OUT_EMIT]->hasoutput)

View File

@@ -383,11 +383,11 @@ static const char *get_pass_name(int passtype, int channel)
if(channel==-1) return "IndexOB";
return "IndexOB.X";
}
if(passtype == SCE_PASS_INDEXMA) {
if(channel==-1) return "IndexMA";
return "IndexMA.X";
}
if(passtype == SCE_PASS_MIST) {
if(passtype == SCE_PASS_INDEXMA) {
if(channel==-1) return "IndexMA";
return "IndexMA.X";
}
if(passtype == SCE_PASS_MIST) {
if(channel==-1) return "Mist";
return "Mist.Z";
}
@@ -452,8 +452,8 @@ static int passtype_from_name(char *str)
if(strcmp(str, "IndexOB")==0)
return SCE_PASS_INDEXOB;
if(strcmp(str, "IndexMA")==0)
return SCE_PASS_INDEXMA;
if(strcmp(str, "IndexMA")==0)
return SCE_PASS_INDEXMA;
if(strcmp(str, "Mist")==0)
return SCE_PASS_MIST;

View File

@@ -515,15 +515,15 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
*fp= (float)shi->obr->ob->index;
}
break;
case SCE_PASS_INDEXMA:
/* no filter */
if(shi->vlr) {
fp= rpass->rect + offset;
if(*fp==0.0f)
*fp= (float)shi->mat->index;
}
break;
case SCE_PASS_MIST:
case SCE_PASS_INDEXMA:
/* no filter */
if(shi->vlr) {
fp= rpass->rect + offset;
if(*fp==0.0f)
*fp= (float)shi->mat->index;
}
break;
case SCE_PASS_MIST:
/* */
col= &shr->mist;
pixsize= 1;

View File

@@ -1455,7 +1455,7 @@ int shade_samples(ShadeSample *ssamp, PixStr *ps, int x, int y)
shade_samples_do_AO(ssamp);
/* if shade (all shadepinputs have same passflag) */
if(ssamp->shi[0].passflag & ~(SCE_PASS_Z|SCE_PASS_INDEXOB|SCE_PASS_INDEXMA)) {
if(ssamp->shi[0].passflag & ~(SCE_PASS_Z|SCE_PASS_INDEXOB|SCE_PASS_INDEXMA)) {
for(samp=0; samp<ssamp->tot; samp++, shi++, shr++) {
shade_input_set_shade_texco(shi);

View File

@@ -3497,7 +3497,7 @@ static void add_transp_obindex(RenderLayer *rl, int offset, Object *ob)
RenderPass *rpass;
for(rpass= rl->passes.first; rpass; rpass= rpass->next) {
if(rpass->passtype == SCE_PASS_INDEXOB||rpass->passtype == SCE_PASS_INDEXMA) {
if(rpass->passtype == SCE_PASS_INDEXOB||rpass->passtype == SCE_PASS_INDEXMA) {
float *fp= rpass->rect + offset;
*fp= (float)ob->index;
break;
@@ -3820,7 +3820,7 @@ static int shade_tra_samples(ShadeSample *ssamp, StrandShadeCache *cache, int x,
shade_samples_do_AO(ssamp);
/* if shade (all shadepinputs have same passflag) */
if(shi->passflag & ~(SCE_PASS_Z|SCE_PASS_INDEXOB|SCE_PASS_INDEXMA)) {
if(shi->passflag & ~(SCE_PASS_Z|SCE_PASS_INDEXOB|SCE_PASS_INDEXMA)) {
for(samp=0; samp<ssamp->tot; samp++, shi++, shr++) {
shade_input_set_shade_texco(shi);
shade_input_do_shade(shi, shr);