[Bf-blender-cvs] [e41f2c12387] blenloader-api: improve naming

Jacques Lucke noreply at git.blender.org
Sat Mar 7 19:09:26 CET 2020


Commit: e41f2c123872bee05aa7fd5a51f4457f68e4c169
Author: Jacques Lucke
Date:   Sat Mar 7 16:33:54 2020 +0100
Branches: blenloader-api
https://developer.blender.org/rBe41f2c123872bee05aa7fd5a51f4457f68e4c169

improve naming

===================================================================

M	source/blender/blenkernel/BKE_colortools.h
M	source/blender/blenkernel/BKE_curveprofile.h
M	source/blender/blenkernel/BKE_pointcache.h
M	source/blender/blenkernel/intern/colortools.c
M	source/blender/blenkernel/intern/curveprofile.c
M	source/blender/blenkernel/intern/pointcache.c
M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h
index def5eedd43b..1b374ce232b 100644
--- a/source/blender/blenkernel/BKE_colortools.h
+++ b/source/blender/blenkernel/BKE_colortools.h
@@ -55,7 +55,7 @@ void BKE_curvemapping_set_black_white(struct CurveMapping *cumap,
                                       const float white[3]);
 void BKE_curvemapping_blo_write_ptr(struct BloWriter *writer, struct CurveMapping *cumap);
 void BKE_curvemapping_blo_write_struct(struct BloWriter *writer, struct CurveMapping *cumap);
-void BKE_curvemapping_read_file(struct BloReader *reader, struct CurveMapping *cumap);
+void BKE_curvemapping_blo_read_struct(struct BloReader *reader, struct CurveMapping *cumap);
 
 enum {
   CURVEMAP_SLOPE_NEGATIVE = 0,
diff --git a/source/blender/blenkernel/BKE_curveprofile.h b/source/blender/blenkernel/BKE_curveprofile.h
index 13c18e78aba..ce291670a01 100644
--- a/source/blender/blenkernel/BKE_curveprofile.h
+++ b/source/blender/blenkernel/BKE_curveprofile.h
@@ -81,7 +81,7 @@ void BKE_curveprofile_evaluate_length_portion(const struct CurveProfile *profile
                                               float *y_out);
 
 void BKE_curveprofile_blo_write_ptr(struct BloWriter *writer, const struct CurveProfile *profile);
-void BKE_curveprofile_read_file(struct BloReader *reader, struct CurveProfile *profile);
+void BKE_curveprofile_blo_read_struct(struct BloReader *reader, struct CurveProfile *profile);
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 0e3801fe35d..908d9b10db7 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -343,10 +343,10 @@ int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old);
 int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra);
 
 void BKE_ptcache_blo_write_list(struct BloWriter *writer, struct ListBase *ptcaches);
-void BKE_ptcache_file_read(struct BloReader *reader,
-                           struct ListBase *ptcaches,
-                           struct PointCache **ocache,
-                           int force_disk);
+void BKE_ptcache_blo_read(struct BloReader *reader,
+                          struct ListBase *ptcaches,
+                          struct PointCache **ocache,
+                          int force_disk);
 
 /******************* Allocate & free ***************/
 struct PointCache *BKE_ptcache_add(struct ListBase *ptcaches);
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 53fbdf84827..f2d4548091a 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -193,7 +193,7 @@ void BKE_curvemapping_blo_write_struct(BloWriter *writer, CurveMapping *cumap)
   }
 }
 
-void BKE_curvemapping_read_file(struct BloReader *reader, struct CurveMapping *cumap)
+void BKE_curvemapping_blo_read_struct(struct BloReader *reader, struct CurveMapping *cumap)
 {
   cumap->flag &= ~CUMA_PREMULLED;
 
diff --git a/source/blender/blenkernel/intern/curveprofile.c b/source/blender/blenkernel/intern/curveprofile.c
index 1f1ce5cbda9..62427294ba1 100644
--- a/source/blender/blenkernel/intern/curveprofile.c
+++ b/source/blender/blenkernel/intern/curveprofile.c
@@ -1079,7 +1079,7 @@ void BKE_curveprofile_blo_write_ptr(BloWriter *writer, const CurveProfile *profi
   BLO_write_struct_array(writer, CurveProfilePoint, profile->path_len, profile->path);
 }
 
-void BKE_curveprofile_read_file(BloReader *reader, CurveProfile *profile)
+void BKE_curveprofile_blo_read_struct(BloReader *reader, CurveProfile *profile)
 {
   BLO_read_update_address(reader, profile->path);
   profile->table = NULL;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 1fe2df48b9a..d2d3a893d35 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -3448,10 +3448,10 @@ static void file_read_pointcache(BloReader *reader, PointCache *cache)
   cache->cached_frames_len = 0;
 }
 
-void BKE_ptcache_file_read(struct BloReader *reader,
-                           struct ListBase *ptcaches,
-                           struct PointCache **ocache,
-                           int force_disk)
+void BKE_ptcache_blo_read(struct BloReader *reader,
+                          struct ListBase *ptcaches,
+                          struct PointCache **ocache,
+                          int force_disk)
 {
   if (ptcaches->first) {
     PointCache *cache = NULL;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c9097aa59ad..f65d00b81d4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2765,7 +2765,7 @@ static void direct_link_brush(FileData *fd, Brush *brush)
   brush->gradient = newdataadr(fd, brush->gradient);
 
   if (brush->curve) {
-    BKE_curvemapping_read_file(wrap_reader(fd), brush->curve);
+    BKE_curvemapping_blo_read_struct(wrap_reader(fd), brush->curve);
   }
   else {
     BKE_brush_curve_preset(brush, CURVE_PRESET_SHARP);
@@ -2781,15 +2781,16 @@ static void direct_link_brush(FileData *fd, Brush *brush)
     brush->gpencil_settings->curve_jitter = newdataadr(fd, brush->gpencil_settings->curve_jitter);
 
     if (brush->gpencil_settings->curve_sensitivity) {
-      BKE_curvemapping_read_file(wrap_reader(fd), brush->gpencil_settings->curve_sensitivity);
+      BKE_curvemapping_blo_read_struct(wrap_reader(fd),
+                                       brush->gpencil_settings->curve_sensitivity);
     }
 
     if (brush->gpencil_settings->curve_strength) {
-      BKE_curvemapping_read_file(wrap_reader(fd), brush->gpencil_settings->curve_strength);
+      BKE_curvemapping_blo_read_struct(wrap_reader(fd), brush->gpencil_settings->curve_strength);
     }
 
     if (brush->gpencil_settings->curve_jitter) {
-      BKE_curvemapping_read_file(wrap_reader(fd), brush->gpencil_settings->curve_jitter);
+      BKE_curvemapping_blo_read_struct(wrap_reader(fd), brush->gpencil_settings->curve_jitter);
     }
   }
 
@@ -3499,7 +3500,7 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
         case CMP_NODE_HUECORRECT:
         case TEX_NODE_CURVE_RGB:
         case TEX_NODE_CURVE_TIME: {
-          BKE_curvemapping_read_file(wrap_reader(fd), node->storage);
+          BKE_curvemapping_blo_read_struct(wrap_reader(fd), node->storage);
           break;
         }
         case SH_NODE_SCRIPT: {
@@ -3888,7 +3889,7 @@ static void direct_link_light(FileData *fd, Light *la)
 
   la->curfalloff = newdataadr(fd, la->curfalloff);
   if (la->curfalloff) {
-    BKE_curvemapping_read_file(wrap_reader(fd), la->curfalloff);
+    BKE_curvemapping_blo_read_struct(wrap_reader(fd), la->curfalloff);
   }
 
   la->preview = direct_link_preview_image(fd, la->preview);
@@ -4410,15 +4411,15 @@ static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
 
   part->clumpcurve = newdataadr(fd, part->clumpcurve);
   if (part->clumpcurve) {
-    BKE_curvemapping_read_file(wrap_reader(fd), part->clumpcurve);
+    BKE_curvemapping_blo_read_struct(wrap_reader(fd), part->clumpcurve);
   }
   part->roughcurve = newdataadr(fd, part->roughcurve);
   if (part->roughcurve) {
-    BKE_curvemapping_read_file(wrap_reader(fd), part->roughcurve);
+    BKE_curvemapping_blo_read_struct(wrap_reader(fd), part->roughcurve);
   }
   part->twistcurve = newdataadr(fd, part->twistcurve);
   if (part->twistcurve) {
-    BKE_curvemapping_read_file(wrap_reader(fd), part->twistcurve);
+    BKE_curvemapping_blo_read_struct(wrap_reader(fd), part->twistcurve);
   }
 
   part->effector_weights = newdataadr(fd, part->effector_weights);
@@ -4563,7 +4564,7 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
       psys->clmd->solver_result = NULL;
     }
 
-    BKE_ptcache_file_read(wrap_reader(fd), &psys->ptcaches, &psys->pointcache, 0);
+    BKE_ptcache_blo_read(wrap_reader(fd), &psys->ptcaches, &psys->pointcache, 0);
     if (psys->clmd) {
       psys->clmd->point_cache = psys->pointcache;
     }
@@ -5296,7 +5297,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob)
       clmd->sim_parms = newdataadr(fd, clmd->sim_parms);
       clmd->coll_parms = newdataadr(fd, clmd->coll_parms);
 
-      BKE_ptcache_file_read(wrap_reader(fd), &clmd->ptcaches, &clmd->point_cache, 0);
+      BKE_ptcache_blo_read(wrap_reader(fd), &clmd->ptcaches, &clmd->point_cache, 0);
 
       if (clmd->sim_parms) {
         if (clmd->sim_parms->presets > 10) {
@@ -5344,7 +5345,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob)
           mmd->domain->effector_weights = BKE_effector_add_weights(NULL);
         }
 
-        BKE_ptcache_file_read(
+        BKE_ptcache_blo_read(
             wrap_reader(fd), &(mmd->domain->ptcaches[0]), &(mmd->domain->point_cache[0]), 1);
 
         /* Manta sim uses only one cache from now on, so store pointer convert */
@@ -5408,8 +5409,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob)
           for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) {
             surface->canvas = pmd->canvas;
             surface->data = NULL;
-            BKE_ptcache_file_read(
-                wrap_reader(fd), &(surface->ptcaches), &(surface->pointcache), 1);
+            BKE_ptcache_blo_read(wrap_reader(fd), &(surface->ptcaches), &(surface->pointcache), 1);
 
             if (!(surface->effector_weights = newdataadr(fd, surface->effector_weights))) {
               surface->effector_weights = BKE_effector_add_weights(NULL);
@@ -5470,7 +5470,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb, Object *ob)
 
       hmd->curfalloff = newdataadr(fd, hmd->curfalloff);
       if (hmd->curfalloff) {
-        BKE_curvemapping_read_file(wrap_reader(fd), hmd->curfalloff);
+        BKE_curvemapping_blo_read_struct(wrap_reader(fd), hmd->curfalloff);
       }
     }
     else if (md->type == eModifierType_ParticleSystem) {
@@ -55

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list