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>2019-06-03 17:21:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-03 17:24:38 +0300
commit1f650c402d3b43eee7cb51c7d4f373ba82ac2116 (patch)
treeba2432fe9424ae545d3758d37ec8ebb0419a2ba5 /source/blender/makesrna/intern/rna_gpencil.c
parente3f2034e7b925bc7e31e65051842cf26d70a20bc (diff)
Cleanup: style, use braces in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c45
1 files changed, 30 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 276b685e93f..f2560527f39 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -207,10 +207,12 @@ static void UNUSED_FUNCTION(rna_GPencil_onion_skinning_update)(Main *bmain,
}
}
- if (enabled)
+ if (enabled) {
gpd->flag |= GP_DATA_SHOW_ONIONSKINS;
- else
+ }
+ else {
gpd->flag &= ~GP_DATA_SHOW_ONIONSKINS;
+ }
/* Now do standard updates... */
rna_GPencil_update(bmain, scene, ptr);
@@ -245,10 +247,12 @@ static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr, const char **
bGPDlayer *gpl = (bGPDlayer *)ptr->data;
/* surely there must be other criteria too... */
- if (gpl->flag & GP_LAYER_LOCKED)
+ if (gpl->flag & GP_LAYER_LOCKED) {
return 0;
- else
+ }
+ else {
return PROP_EDITABLE;
+ }
}
/* set parent */
@@ -503,10 +507,12 @@ static bGPDstroke *rna_GPencil_stroke_point_find_stroke(const bGPdata *gpd,
return NULL;
}
- if (r_gpl)
+ if (r_gpl) {
*r_gpl = NULL;
- if (r_gpf)
+ }
+ if (r_gpf) {
*r_gpf = NULL;
+ }
/* there's no faster alternative than just looping over everything... */
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
@@ -514,10 +520,12 @@ static bGPDstroke *rna_GPencil_stroke_point_find_stroke(const bGPdata *gpd,
for (gps = gpl->actframe->strokes.first; gps; gps = gps->next) {
if ((pt >= gps->points) && (pt < &gps->points[gps->totpoints])) {
/* found it */
- if (r_gpl)
+ if (r_gpl) {
*r_gpl = gpl;
- if (r_gpf)
+ }
+ if (r_gpf) {
*r_gpf = gpl->actframe;
+ }
return gps;
}
@@ -543,10 +551,12 @@ static void rna_GPencil_stroke_point_select_set(PointerRNA *ptr, const bool valu
gps = rna_GPencil_stroke_point_find_stroke(gpd, pt, NULL, NULL);
if (gps) {
/* Set the new selection state for the point */
- if (value)
+ if (value) {
pt->flag |= GP_SPOINT_SELECT;
- else
+ }
+ else {
pt->flag &= ~GP_SPOINT_SELECT;
+ }
/* Check if the stroke should be selected or not... */
BKE_gpencil_stroke_sync_selection(gps);
@@ -682,17 +692,21 @@ static void rna_GPencil_stroke_select_set(PointerRNA *ptr, const bool value)
int i;
/* set new value */
- if (value)
+ if (value) {
gps->flag |= GP_STROKE_SELECT;
- else
+ }
+ else {
gps->flag &= ~GP_STROKE_SELECT;
+ }
/* ensure that the stroke's points are selected in the same way */
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
- if (value)
+ if (value) {
pt->flag |= GP_SPOINT_SELECT;
- else
+ }
+ else {
pt->flag &= ~GP_SPOINT_SELECT;
+ }
}
}
@@ -817,8 +831,9 @@ static void rna_GpencilVertex_groups_begin(CollectionPropertyIterator *iter, Poi
rna_iterator_array_begin(
iter, (void *)dvert->dw, sizeof(MDeformWeight), dvert->totweight, 0, NULL);
}
- else
+ else {
rna_iterator_array_begin(iter, NULL, 0, 0, 0, NULL);
+ }
}
static char *rna_GreasePencilGrid_path(PointerRNA *UNUSED(ptr))