Bevel Modifier / ProfileWidget:Working writing and reading of profile widget,
authorHans Goudey <h.goudey@me.com>
Mon, 24 Jun 2019 04:42:52 +0000 (00:42 -0400)
committerHans Goudey <h.goudey@me.com>
Mon, 24 Jun 2019 04:42:52 +0000 (00:42 -0400)
 and therefore bevel modifiers with custom profile enabled.

source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c

index 3f48b4e..ea681b3 100644 (file)
@@ -2704,7 +2704,6 @@ static void direct_link_curvemapping(FileData *fd, CurveMapping *cumap)
 /** \name Read ProfileWidget
  * \{ */
 
-/* HANS-TODO: Use this in bevel modifier load functions? */
 static void direct_link_profilewidget(FileData *fd, ProfileWidget *prwidget)
 {
   prwidget->profile->path = newdataadr(fd, prwidget->profile->path);
index cb01a11..57b4ddd 100644 (file)
@@ -958,8 +958,10 @@ static void write_curvemapping(WriteData *wd, CurveMapping *cumap)
 
 static void write_profilewidget(WriteData *wd, ProfileWidget *prwdgt)
 {
+  /* HANS-QUESTION: Why do I have to write the ProfilePath struct when the curvemapping write
+   * function doesn't have to do the analagous write? */
   writestruct(wd, DATA, ProfileWidget, 1, prwdgt);
-
+  writestruct(wd, DATA, ProfilePath, 1, prwdgt->profile);
   writestruct(wd, DATA, ProfilePoint, prwdgt->profile->totpoint, prwdgt->profile->path);
 }