Commit Graph

20 Commits

Author SHA1 Message Date
Campbell Barton
b9c66e88ea added encoding "# coding: utf-8" to the headers of scripts that python would not run with execfile('....'), python would also riase the error, though there is no practicle use
for running these scripts outside blender.

The error looked like this.
SyntaxError: Non-ASCII character '\xe4' in file ./3ds_export.py on line 10, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
2008-05-11 12:41:12 +00:00
Campbell Barton
b2c888545c corrected wrong variabel name 2007-05-06 09:54:17 +00:00
Campbell Barton
32c87c61da many 3ds files would not open in other applications because of the 12 character limit of names and filenames in 3ds files.
fixed this and optimized dictionary access some.
2007-05-06 02:19:43 +00:00
Campbell Barton
3e1a5ce7a2 PyAPI.
moved bpy into bpy.data and bpy will be eventually replace the root level 'Blender' module.
currently we have bpy.library bpy.config and bpy.data
2007-04-18 14:40:01 +00:00
Campbell Barton
2b8bed8598 py api
* stopped bpy from importing automaticaly as decieded in the meeting.
* removed Blender.Main, since we agree it will be called bpy, renamed files also.
* updated epydocs from this and last commit.
* updated scripts to use bpy.*, and bugfix's for widgetwizard
2007-03-26 19:44:44 +00:00
Campbell Barton
9759a373d7 Updating own scripts to use Blender.Main, remove Base files. 2007-02-22 15:48:26 +00:00
Campbell Barton
9cf602b949 3ds_export - enabled textures as an option since it works with some appliactions (only way to get textured models from blender to google sketchup)
3ds_import - added option to disable recursive image searching (could be slow somtimes)
export_obj - when making group/object names only use both object and mesh name when they differ.
weightpaint_clean, weightpaint_grow_shrink - minor updates.
Render.py - own error in epydocs.
2007-01-31 01:18:51 +00:00
Campbell Barton
0decfd140b fixed an obscure bug in obj import (possibly in Mesh.c) that made adding edges as faces mess up.
export obj now dosnt remove double UV's, its too slow.

updated version numbers to 243 and other minor changes.
2007-01-26 06:02:21 +00:00
Campbell Barton
29813971b1 applied patch 5779 with some modifications to fix own error, (uv indicies could be out of order)
removed image support, Blender could import but not 3dsmax :/ - even managed to get 3dsdump to report a blender and max file to have the same data but max still dosnt like.
2007-01-22 17:31:34 +00:00
Campbell Barton
3c578fbe12 tested export scripts with a large scene and resolved errors that came up as well as some speedups- mostly problems with lightwave_export 2007-01-11 09:39:16 +00:00
Campbell Barton
713f42dc3c Metaball - docs were wrong
Sound - needed t ohave the PyType as extern
3ds_export can now export derived objects (dupli's)
2007-01-07 15:33:28 +00:00
Campbell Barton
d26d0e2889 Update to JMSs scripts fixed bug 5419.
Optimized 3ds_export.py
  newstyle classes and fixed an error where objects with no material would fail to export.
2007-01-04 20:44:33 +00:00
Campbell Barton
eb424ec18d 3ds_export now exports Texface UV images to 3ds's materials - supports material images as well
3ds_import - made it support image maps without a file chunk. unlikely but possible.
2007-01-04 15:20:28 +00:00
Campbell Barton
6d5b24fcb8 bugfix for #5167 images are now exported from the material, (todo - texface) thanks to digiboy
Also found that the exported UV coords were scrambled, now fixed.
2007-01-04 05:59:23 +00:00
Campbell Barton
8f010d2a58 mesh_skin updated to use ed.key, other minor cleanups.
updated the url in other scripts
2006-12-25 23:14:48 +00:00
Campbell Barton
859b7f207e modified scripts from using older/depricated Python API commands, deprecated scn.getChildren() in the docs. 2006-12-25 09:17:23 +00:00
Campbell Barton
d360c4fadf fix for bug 4307, keyframe data was being written and that was buggy somewhere, so commented it out and it works ;)
Theres some other error that only happens when exporting fairly high poly meshes, but this problem is with the old exporter also.

Also added export for non mesh objects as meshes- text, metaballs etc and null material slots dont stop the script.
2006-07-05 07:10:03 +00:00
Campbell Barton
b817c78b0d Applied patch 4188 with some modifications.
https://projects.blender.org/tracker/index.php?func=detail&aid=4188&group_id=9&atid=127
* Sped up export of UV coords,
* Use Mesh instead of NMesh
* Use BPyMesh GetMeshFromObject so correct object materials are exported as well as modifiers applied.
2006-05-14 03:11:55 +00:00
Campbell Barton
444e4e36fe Commited 3ds export enhancements from Mark Stijnman (beowulff)
Will need to do some updates, Mesh over NMesh and optimize some areas but it works and is a big improvement.

from
https://projects.blender.org/tracker/index.php?func=detail&aid=4156&group_id=9&atid=127

Detailed description:
Modified the 3ds export script 3ds_export.py:
- It now exports face UV correctly. 3ds only supports one UV coordinate per vertex. The script now duplicates vertices that had multiple UV pairs assigned to them so that each duplicate now only contains one and only one UV. Faces have their vertex indices adjusted accordingly.
- Quads are now split into triangles better. 3ds only supports triangles, so quads need to be split into two triangles. Instead of rather arbitrarily splitting along the diagonal between points 0 and 2, the script now splits along the shortest diagonal. This creates a higher quality triangular mesh, as well as better preservation of symmetry.
- Now creates an object node block, exporting object nodes, needed by some 3D importers. Among others, allows one to export object hierarchy.
- Now exports Empties as 3ds Dummies.

To be able to add all of the above new features, the script has been mostly rewritten and strongly restructured.

Motivation for the rewrite was the desire to be able to use Blender to produce custom 3d cars for Trackmania:Sunrise (TM:S). Previously, the TM:S importer could not correctly handle the 3ds files from the Blender 3ds export script. With this version, one can export cars complete with UV textures, correct wheel placement and light placement. To my knowledge, this script would make Blender the first fully free 3d modeller that allows one to export 3ds models for TM:S (expect a tutorial soon). The ability to have proper UV coordinates exported into the 3ds file should also be very welcome to many.

Add A Comment: Notepad
2006-05-02 11:26:32 +00:00
Willian Padovani Germano
b662fcb694 Scripts:
- added import and export scripts for 3ds and md2 (Quake 2) models
contributed by author Bob Holcomb. Thanks!
- updated ac3d importer to be more forgiving and exporter to get rid of
deprecated call.

More additions and possibly fixes to come.

Note: we're forming a group to take care of importers and exporters and
improve the situation as a whole in Blender. Discussions should happen
at the bf-scripts-dev mailing list:
http://projects.blender.org/mailman/listinfo/bf-scripts-dev

Thanks Tom Musgrove (LetterRip) for helping a lot with scripts.
2005-12-15 01:42:45 +00:00