Cleanup: style, use braces for gpencil modifiers
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user