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-10-03 00:31:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-03 00:32:28 +0300
commitc07eaa3384dfe90bc2671a9bb3be2b77ad33297d (patch)
tree0fdb4d7c21b10fa24a95be35aeab9dc58063403b /source/blender/blenloader/intern/versioning_legacy.c
parentfcdd851858a61dbc7ec8cf79c0b9d022bb68f896 (diff)
Cleanup: argument naming, redundant NULL checks
Diffstat (limited to 'source/blender/blenloader/intern/versioning_legacy.c')
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 62bd605a2c2..1b30c7371a2 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -1705,19 +1705,17 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
/* add default radius values to old curve points */
for (cu = bmain->curves.first; cu; cu = cu->id.next) {
for (nu = cu->nurb.first; nu; nu = nu->next) {
- if (nu) {
- if (nu->bezt) {
- for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) {
- if (!bezt->radius) {
- bezt->radius = 1.0;
- }
+ if (nu->bezt) {
+ for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) {
+ if (!bezt->radius) {
+ bezt->radius = 1.0;
}
}
- else if (nu->bp) {
- for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
- if (!bp->radius) {
- bp->radius = 1.0;
- }
+ }
+ else if (nu->bp) {
+ for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
+ if (!bp->radius) {
+ bp->radius = 1.0;
}
}
}
@@ -2515,17 +2513,15 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
for (cu = bmain->curves.first; cu; cu = cu->id.next) {
for (nu = cu->nurb.first; nu; nu = nu->next) {
- if (nu) {
- nu->radius_interp = 3;
-
- /* resolu and resolv are now used differently for surfaces
- * rather than using the resolution to define the entire number of divisions,
- * use it for the number of divisions per segment
- */
- if (nu->pntsv > 1) {
- nu->resolu = MAX2(1, (int)(((float)nu->resolu / (float)nu->pntsu) + 0.5f));
- nu->resolv = MAX2(1, (int)(((float)nu->resolv / (float)nu->pntsv) + 0.5f));
- }
+ nu->radius_interp = 3;
+
+ /* resolu and resolv are now used differently for surfaces
+ * rather than using the resolution to define the entire number of divisions,
+ * use it for the number of divisions per segment
+ */
+ if (nu->pntsv > 1) {
+ nu->resolu = MAX2(1, (int)(((float)nu->resolu / (float)nu->pntsu) + 0.5f));
+ nu->resolv = MAX2(1, (int)(((float)nu->resolv / (float)nu->pntsv) + 0.5f));
}
}
}