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_nla.c
parente3f2034e7b925bc7e31e65051842cf26d70a20bc (diff)
Cleanup: style, use braces in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_nla.c')
-rw-r--r--source/blender/makesrna/intern/rna_nla.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index c3192b4f850..6f55fb4e24c 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -199,8 +199,9 @@ static void rna_NlaStrip_end_frame_set(PointerRNA *ptr, float value)
len = data->end - data->start;
actlen = data->actend - data->actstart;
- if (IS_EQF(actlen, 0.0f))
+ if (IS_EQF(actlen, 0.0f)) {
actlen = 1.0f;
+ }
/* now, adjust the 'scale' setting to reflect this (so that this change can be valid) */
data->scale = len / ((actlen)*data->repeat);
@@ -257,8 +258,9 @@ static void rna_NlaStrip_blend_out_set(PointerRNA *ptr, float value)
CLAMP(value, 0, len);
/* it also cannot overlap with blendin */
- if ((len - value) < data->blendin)
+ if ((len - value) < data->blendin) {
value = len - data->blendin;
+ }
data->blendout = value;
}
@@ -301,14 +303,16 @@ static int rna_NlaStrip_action_editable(PointerRNA *ptr, const char **UNUSED(r_i
if (adt) {
/* active action is only editable when it is not a tweaking strip */
- if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact))
+ if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact)) {
return 0;
+ }
}
}
/* check for clues that strip probably shouldn't be used... */
- if (strip->flag & NLASTRIP_FLAG_TWEAKUSER)
+ if (strip->flag & NLASTRIP_FLAG_TWEAKUSER) {
return 0;
+ }
/* should be ok, though we may still miss some cases */
return PROP_EDITABLE;
@@ -348,8 +352,9 @@ static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, bool value)
data->flag |= NLASTRIP_FLAG_USR_INFLUENCE;
BKE_nlastrip_validate_fcurves(data);
}
- else
+ else {
data->flag &= ~NLASTRIP_FLAG_USR_INFLUENCE;
+ }
}
static void rna_NlaStrip_animated_time_set(PointerRNA *ptr, bool value)
@@ -361,8 +366,9 @@ static void rna_NlaStrip_animated_time_set(PointerRNA *ptr, bool value)
data->flag |= NLASTRIP_FLAG_USR_TIME;
BKE_nlastrip_validate_fcurves(data);
}
- else
+ else {
data->flag &= ~NLASTRIP_FLAG_USR_TIME;
+ }
}
static FCurve *rna_NlaStrip_fcurve_find(NlaStrip *strip,
@@ -419,15 +425,17 @@ static NlaStrip *rna_NlaStrip_new(ID *id,
* track's parents until we fall off. */
nlt_p = track;
nlt = track;
- while ((nlt = nlt->prev) != NULL)
+ while ((nlt = nlt->prev) != NULL) {
nlt_p = nlt;
+ }
adt.nla_tracks.first = nlt_p;
/* do the same thing to find the last track */
nlt_p = track;
nlt = track;
- while ((nlt = nlt->next) != NULL)
+ while ((nlt = nlt->next) != NULL) {
nlt_p = nlt;
+ }
adt.nla_tracks.last = nlt_p;
/* now we can just auto-name as usual */