[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38962] branches/soc-2011-onion/source/ blender/editors/sculpt_paint/paint_brushlib.cpp: ignore 'group' properties in myp files.
Jason Wilkins
Jason.A.Wilkins at gmail.com
Wed Aug 3 03:42:33 CEST 2011
Revision: 38962
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38962
Author: jwilkins
Date: 2011-08-03 01:42:26 +0000 (Wed, 03 Aug 2011)
Log Message:
-----------
ignore 'group' properties in myp files. beginnings of handling version 1 files, but its low priority
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_brushlib.cpp
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_brushlib.cpp
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_brushlib.cpp 2011-08-03 01:22:31 UTC (rev 38961)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_brushlib.cpp 2011-08-03 01:42:26 UTC (rev 38962)
@@ -466,7 +466,8 @@
static int load_brush(Brush *brush, const char *filepath)
{
struct entry_t { const char *name; int index; };
-
+ bool first= true;
+ int version= 1;
std::ifstream infile(filepath);
if (infile) {
@@ -479,7 +480,7 @@
return 0;
}
- if (strcmp(id_name, "version") == 0) {
+ if (first && strcmp(id_name, "version") == 0) {
float version;
if (!parse_num(infile, version))
@@ -491,6 +492,15 @@
}
}
else {
+ char group[MAX_SIZE];
+
+ if (strcmp(id_name, "group") == 0) {
+ if (parse_id(infile, group, MAX_SIZE))
+ continue;
+ else
+ return 0;
+ }
+
int id;
for (id= 0; id < BRUSH_SETTINGS_COUNT; id++) {
@@ -619,6 +629,8 @@
return 0;
}
}
+
+ first= false;
}
return 1;
More information about the Bf-blender-cvs
mailing list