Cleanup: style, use braces for gpencil modifiers

This commit is contained in:
Campbell Barton
2019-04-22 09:16:44 +10:00
parent 775c8ce332
commit bba60bb564
6 changed files with 18 additions and 9 deletions

View File

@@ -126,8 +126,9 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
bGPdata *gpd = (bGPdata *)ob->data;
int oldframe = (int)DEG_get_ctime(depsgraph);
if (mmd->object == NULL)
if (mmd->object == NULL) {
return;
}
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {

View File

@@ -113,12 +113,14 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
Material *mat = give_current_material(ob, gps->mat_nr + 1);
if (mat == NULL)
if (mat == NULL) {
continue;
}
MaterialGPencilStyle *gp_style = mat->gp_style;
/* skip stroke if it doesn't have color info */
if (ELEM(NULL, gp_style))
if (ELEM(NULL, gp_style)) {
continue;
}
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);

View File

@@ -271,8 +271,9 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
bGPdata *gpd = ob->data;
int oldframe = (int)DEG_get_ctime(depsgraph);
if (mmd->object == NULL)
if (mmd->object == NULL) {
return;
}
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {

View File

@@ -117,8 +117,9 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
bGPdata *gpd = ob->data;
int oldframe = (int)DEG_get_ctime(depsgraph);
if (mmd->object == NULL)
if (mmd->object == NULL) {
return;
}
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {

View File

@@ -134,12 +134,14 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
Material *mat = give_current_material(ob, gps->mat_nr + 1);
if (mat == NULL)
if (mat == NULL) {
continue;
}
MaterialGPencilStyle *gp_style = mat->gp_style;
/* skip stroke if it doesn't have color info */
if (ELEM(NULL, gp_style))
if (ELEM(NULL, gp_style)) {
continue;
}
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);

View File

@@ -122,12 +122,14 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
Material *mat = give_current_material(ob, gps->mat_nr + 1);
if (mat == NULL)
if (mat == NULL) {
continue;
}
MaterialGPencilStyle *gp_style = mat->gp_style;
/* skip stroke if it doesn't have color info */
if (ELEM(NULL, gp_style))
if (ELEM(NULL, gp_style)) {
continue;
}
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);