[Bf-blender-cvs] [a646a7de9f] app-templates: Use lighting and font paths from template
Campbell Barton
noreply at git.blender.org
Thu Mar 16 20:28:11 CET 2017
Commit: a646a7de9f265bc04ec60c42fe6ef36be2817765
Author: Campbell Barton
Date: Fri Mar 17 06:31:43 2017 +1100
Branches: app-templates
https://developer.blender.org/rBa646a7de9f265bc04ec60c42fe6ef36be2817765
Use lighting and font paths from template
===================================================================
M source/blender/blenkernel/intern/blender.c
===================================================================
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index d89e1ae7c1..5d5c099d12 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -236,17 +236,26 @@ void BKE_blender_userdef_set_template(UserDef *userdef)
* - various minor settings (add as needed).
*/
-#define LIST_OVERRIDE(dst, src) { \
- BLI_freelistN(dst); \
- BLI_movelisttolist(dst, src); \
+#define LIST_OVERRIDE(id) { \
+ BLI_freelistN(&U.id); \
+ BLI_movelisttolist(&U.id, &userdef->id); \
} ((void)0)
- LIST_OVERRIDE(&U.uistyles, &userdef->uistyles);
- LIST_OVERRIDE(&U.uifonts, &userdef->uifonts);
- LIST_OVERRIDE(&U.themes, &userdef->themes);
- LIST_OVERRIDE(&U.addons, &userdef->addons);
+#define MEMCPY_OVERRIDE(id) \
+ memcpy(U.id, userdef->id, sizeof(U.id));
+
+ LIST_OVERRIDE(uistyles);
+ LIST_OVERRIDE(uifonts);
+ LIST_OVERRIDE(themes);
+ LIST_OVERRIDE(addons);
+
+ MEMCPY_OVERRIDE(light);
+
+ MEMCPY_OVERRIDE(font_path_ui);
+ MEMCPY_OVERRIDE(font_path_ui_mono);
#undef LIST_OVERRIDE
+#undef MEMCPY_OVERRIDE
}
/* ***************** testing for break ************* */
More information about the Bf-blender-cvs
mailing list