The VRML97 exporter was rounding a lot of stuff to three decimal points.
This is silly, since the spec says single-precision floats are used for
most things, which gives about 7 decimal points precision.
export would cause a problem since the temporary meshes created
would often reuse the same name for many objects. This fix mangles
the object name and uses this for the temporary mesh name to avoid
this problem. (The naming is important, since vrml has 'DEF' and 'USE'
statements that are used like C macros, so if two meshes have the
same name the exporter will try to 'recycle' data to keep file sizes
low).
for export depending on whether the object containing the data has
modifiers or not. For an object without modifiers, things are nice since
the mesh can be properly instanced and reused. For an object with
modifiers there are problems, since a new Mesh has to be created,
akin to doing an Alt-C on the mesh, and we end up using more memory
after the use of the script than we used beforehand. (I wonder if
I would be better off porting the thing to C.)
* a misuse of the Mesh module meant that I kept creating new
meshes each time the script was run;
* the commas in the vertex color export looked weird.
Changes include, but may not be limited to:
* Support for meshes with multiple materials/face images
* Mode modular design that more closely reflects Blender's
internal workings
* Position, scale, and orientations are now exclusively dealt
with in Transform nodes, making the math more unified and
way easier to understand.
* vertex colors either written when mesh has SHARED_COL
face property, or when mesh has vertex colors and
first material with VCOL_PAINT (a little crufty, but
maybe will try a better way later)
* Support for debugging output to the console by setting
the 'rt' button to 42 (for mild verbosity) or 43 (for more
verbosity)
* Potentially long lists like vertex coordinates, face indices,
etc. are now unindented (why potentially waste thousands of
tab characters?)
* All lines in the script are under 79 characters (as per the
python style guide).
A major revision will usually beget major bugs, so
please test, test, test to make sure I haven't broken your favorite
feature in this script! (I've done a number of tests loading
output into the Bitmanagement viewer and into 3DSMax.)
vertex it would potentially loop through every face). This fix speeds
it up a bit (only loops through all faces once, at the cost of some
additional memory). An example of export times for a mesh with 6266
verts and 12528 faces:
Before: 2m56s
After: 8s
The orange -> HEAD merge reverted some scripts to older versions. This only
affected the ones that already existed before the orange branch.
Minor issue, easy to fix.
All in all, kudos to kaito, Hos and others for all the hard work in
bringing (coding, merging) all these changes to the main branch.
Fixes:
- naming of Transform instead of Shape node
X3D exporter: line 431 and 432
VRML exporter: line 430 and 433
- wrong import of modules in the X3D exporter
line 72
- fixing bug reported by Paolo Colombo: space handler slinks set for a 3d view were not set when the area got maximized;
- Blender.Object: added object.isSB() method to know if an object is a soft body (has ob->soft != NULL). Used in fixfromarmature.py.
Scripts:
- updates: batch_name_edit (Campbell), fixfromarmature (JMS);
- additions:
X3D exporter by Bart;
Envelope Suite by Jonas Petersen;
BVH 2 Armature by Jean-Baptiste Perin;
Camera Changer by Regis Montoya (3R);
Interactive Console by Campbell (ideasman).
- tiny updates in other scripts.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.