Commit Graph

28 Commits

Author SHA1 Message Date
Campbell Barton
9ea630196c Fixed up naming new objects/meshes when that name alredy existed - faster and better new names. 2006-01-18 22:57:55 +00:00
Campbell Barton
9cbf04ca9a Added user interface to OBJ import.
With options.
	('Material (*.mtl)', IMPORT_MTL, 'Imports material settings and images from the obj\'s .mtl file'),\
	('All *.obj\'s in dir', IMPORT_DIR, 'Import all obj files in this dir (avoid overlapping data with "Create scene")'),\
	('Create scene', IMPORT_NEW_SCENE, 'Imports each obj into its own scene, named from the file'),\
	'Geometry...',\
	('Edges', IMPORT_EDGES, 'Import faces with 2 verts as in edge'),\
	('Smooths all faces', IMPORT_SMOOTH_ALL, 'Smooth all faces even if they are not in a smoothing group'),\
2006-01-16 06:33:55 +00:00
Campbell Barton
cc183db483 Hopefully clear up the last of the obj import bugs.
* 8% speedup by using list comprehension.
* Slightly better smoothing group import.
* Handles bug in python that puts spaces before every line with '\r\n' line endings.
2006-01-16 05:28:34 +00:00
Campbell Barton
afb0f2ff24 In fixing for negative indicies I broke positive indicies. Fixed. not helped by the fact the files I had for testing were 32 and 70 meg..
ALso modified the MTL loader for Object.Get's new ValueError.
- Should be good for release now.
2006-01-15 17:56:40 +00:00
Campbell Barton
1752c03441 Fixed bug in importing OBJ files with negative indicies (UV and VERTS, normals are ignored)
Have alredy tested 100's of obj files and cant believe this is the first I have found with negative coords.
May fix the UI before 2.41, Importing a whole dir isnt very user friendly. and may want to support sequence import.
- Cam
2006-01-13 15:26:15 +00:00
Campbell Barton
664f6026d5 update to obj export:
Added options.
	pup_block = [\
	('Apply Modifiers', EXPORT_APPLY_MODIFIERS, 'Use transformed mesh data from each object. May break vert order for morph targets.'),\
	('Selection Only', EXPORT_SEL_ONLY, 'Only export objects in visible selection.'),\
	('Edges', EXPORT_EDGES, 'Edges not connected to faces.'),\
	('Normals', EXPORT_NORMALS, 'Export vertex normal data (Ignored on import).'),\
	('Materials', EXPORT_MTL, 'Write a seperate MTL file with the OBJ.'),\
	('All Scenes', EXPORT_ALL_SCENES, 'Each scene as a seperate OBJ file.'),\
	('Animation', EXPORT_ANIMATION, 'Each frame as a seperate OBJ file.'),\
	('Copy Images', EXPORT_COPY_IMAGES, 'Copy image files to the export directory, never everwrite.'),\
	]

Obj import was updated to import edges (2 vert faces), will update some more later.
2006-01-11 09:47:17 +00:00
Willian Padovani Germano
b970eadedf Scripts:
- updating some bundled scripts, thanks to authors Jean-Michel Soler, Campbell Barton and Anthony D'Agostino.

BPython:
- removing wrong fix from BGL.c's glDrawPixels.

note: applied guitargeek's setName patch to Blender.Key, but saw that he updated it with more functionality and assigned to stivs, so I won't commit this old version.
2005-10-11 02:32:58 +00:00
Willian Padovani Germano
399f670ac7 Scripts updated:
- Jean-Michel Soler: paths import -- ai and svg modules;
- Jean-Baptiste PERIN: bvh to armatures (note: should not work until we re-wrap armatures in bpython);
- Campbell Barton: obj importer.

Thanks guys, excuse me the delay.

- tiny doc update.
2005-07-11 02:41:08 +00:00
Willian Padovani Germano
3d4438dcd7 Scripts:
- Campbell Barton updated his Wavefront obj importer;
- Jean-Michel Soler updated his paths import (eps part).

BPython bug fixes:

- oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c):
http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127

- Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch:
http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127

- doc updates (suggested by Campbell)

Thanks guys.
2005-06-12 05:54:15 +00:00
Willian Padovani Germano
6cec51b259 BPython bug fixes:
- #2646 reported by Campbell: Python/Fileselector (moving from fileselector called by script to another space caused script to hang around open but not accessible)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2646&group_id=9

- #2676 reported by Wim Van Hoydonck: 2.37 python scripts gui: event 8 ignored (thanks Ton for discussing / pointing what to do, Ken Hughes for also working on a fix)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2676&group_id=9

- gui-less scripts with calls to progress bar inside fileselector callbacks didn't return to the previous space on exit (staying on Scripts win), requiring an event to do so (mouse movement, for example).  Quick fix for now, will rework a little after 2.37a for a better alternative, not needing to move to the Scripts win at all.

- added syntax colors access to Window.Theme module.

Scripts:

- updates by Jean-Michel Soler: svg2obj (svg paths import), tex2uvbaker, fixfromarmature;
- updates by Campbell Barton: obj import / export, console;
- tiny: converted vrml97 export to unix line endings;
- updates in ac3d exporter, help browser, save theme.

Thanks all mentioned above.
2005-06-11 05:30:14 +00:00
Willian Padovani Germano
4b99e61cf2 No "release ahoy" yet, so it's probably still ok for these last minute updates (excuse me anyway):
Script bug fixes:
- Paths import: SVG update sent by author Jean-Michel Soler;
- Wavefront OBJ import / export updates sent by author Campbell Barton.
2005-05-30 02:26:40 +00:00
Jiri Hnidek
7e4daad9fa - bug fix reported by LetterRip at IRC (just typo: expant isn't expand) 2004-12-12 15:28:38 +00:00
Willian Padovani Germano
f6aaafe868 Scripts:
-- Campbell Barton updated some of his contributions, thanks!
2004-12-01 04:49:04 +00:00
Willian Padovani Germano
6d9c02be4c Scripts:
- Fixes by Jean-Michel Soler: mod_ai2obj.py, mod_svg2obj.py;
- Fixes by Campbell Barton: obj_import.py;
- Small fix to mod_meshtools.py (fixes bug #1605: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1605&group_id=9);
- Updates by Jean-Baptiste (Jiba) to his blender2cal3d.py;
- Updates to all his import / export scripts (added doc data) by Anthony D'Agostino;
- Update to off_import: support for uv data, by Arne Schmitz.

BPython:
- Removed Object.get and .getSelected (deprecated long ago, we use .Get and .GetSelected) -- fixes #1861: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1861&group_id=9
- Applied patch by Michael Reimpell: quat.c - fix for wrong initialization with newQuaternionObject; Mathutils documentation improvements.
- Stani reported a wrong return msg in IpoCurve.Get (that is unimplemented).

Thanks to all coders mentioned above!
2004-11-30 02:27:46 +00:00
Willian Padovani Germano
c702b237d5 Scripts:
-- adding help_browser.py to show help for installed scripts;
-- updated scripts to include basic doc info to be shown with above script:
    script authors can / will / should update with more info, of course;
-- updated some scripts to newer versions: disp_paint, fixfromarmature, hotkeys, etc.
2004-11-07 16:31:13 +00:00
Jiri Hnidek
4b5203e29e - Cam fixed bug reported by Manuel Bastioni (thanks)
- I fixed one bug too.
2004-09-21 09:09:58 +00:00
Jiri Hnidek
d70197262b - Cam added function getUniqueName, which preserve overwriting of existing mesh.
- I removed fixed identing. It uses only tab for identing so Cam will not be fussed anymore:-).
2004-09-18 21:04:23 +00:00
Jiri Hnidek
163f1e967b - bug fix #1560
https://projects.blender.org/tracker/?func=detail&aid=1560&group_id=9&atid=125

- Cam did some speedup: he replaced eval() with float() and int()

- it fix some other minor bugs too
2004-09-11 13:45:17 +00:00
Willian Padovani Germano
446e1fae7c ** Note: two new files added, projectfiles will need an update.
Scripts:
  Campbell Barton (Ideasman, thanks) updated his Wavefront OBJ importer.
BPython:
- Finally committed pending contributions:
    Chris Keith wrote the Blender.Sound module -- still some testing to do this week;
    Joseph (joeedh) added the OnLoad scene script event;
    Satish Goda added 6 GLU functions to Blender.BGL.  Great additions, thanks all!
- Small changes to Blender.Load (leave editmode as Blender wants) and Window.EditMode (allow definition of "undo string");
- Fixed bug #1539: Window.RedrawAll() crashed Blender if an empty spacescript was available while using it in a gui-less script.
- doc updates.
2004-08-17 04:26:00 +00:00
Willian Padovani Germano
452c8cf838 Done.
Scripts:
- Jean-Michel Soler probably lost some hours of sleep since Sunday,
  but he managed to send me the updated path import scripts a few
  hours ago.  My tests with Inkscape .svg and .ps and Gimp worked fine.
  He also tested a lot and sent me info about what is already
  supported.  I'll send Ton a doc about bundled scripts including this
  info.  Importers: .ai, .svg, .eps/.ps, Gimp 1-1.2.5 / 2.0.

- Jean-Michel also contributed his Texture Baker script.

- Campbell Barton contributed two new scripts: a mesh cleaner and a
  vloop skinning / lofting script.  He also sent updates to his obj
  import / export ones.

- A Vanpoucke (xand) contributed his Axis Orientation Copy script.

And that makes 8 last minute additions.  Thanks a lot to the authors
and special thanks to JMS and Campbell for their hard work : ).

BPython:

- tiny addition (I'm forced to call it a showstopper bug ;) so JMS's
path import scripts (that actually convert to obj and make Blender
load the .obj curves) can use Blender.Load() and not rename G.sce,
the default filename.  Blender.Load(filename, 1) doesn't update G.sce.
Nothing should break because of this, Load(filename) still works fine.

- Made Blender complain again if script is for a newer Blender version than the one running it.
2004-08-04 06:16:46 +00:00
Jiri Hnidek
ee07502a04 - Scripts:
small update of ideasman's obj import/export scripts (added support for smooth faces)
2004-06-21 20:32:07 +00:00
Willian Padovani Germano
a41759cb8b - Scripts:
Campbell Barton updated his Wavefront OBJ scripts and Ben Omari updated his DirectX 7 and 8 ones (thanks both).  The other listed scripts had minor updates to accomodate the menu changes.
- Scripts in menus:
  renamed Tools to Object, Generators to Add, and Modifiers to Mesh (Metaball, Curve, Surface can be added later), to integrate better in the interface.
- Fixed a bug in Blender.sys.makename: last letter of file extension was being cut out.
2004-06-21 12:01:23 +00:00
Jiri Hnidek
3406c81a6b - some bug fix: some vert tVerts and normals are seperated by
1/2/3 OR 1//2//3

- some files for testing could be found at: http://e-learning.vslib.cz/hnidek/misc/objs/
2004-06-15 09:45:29 +00:00
Jiri Hnidek
317e067ecb - Campbell Barton's (AKA Ideasman) obj importer script (some split improvements)
- I added support of material and texture import (.mtl files) Textures are assigned to faces and materials too.
2004-06-14 20:51:09 +00:00
Matt Ebb
d34f89b755 * Edited and consistent-ified the File->Import menu item labels and fileselect button labels, as discussed on the forums.
* Added items for importing DXF, VRML, etc. in the File->Import menu, that just call the normal Open function. Most people don't even know that you can open these formats through the normal Open fileselect, so this will make it more obvious.

* Removed the 'Export Selected' menu, and put poor old lonely STL in the Import and Export menus too. Most of the exporters export only the selected object anyway, so it's not really a necessary distinction to make.
2004-06-11 02:12:37 +00:00
Willian Padovani Germano
a6d077bae2 Scripts:
- tiny updates for better behavior, unix line endings, cvs Id tags;
- Updated DX7 exporter (thanks to author Ben Omari who's also working on a DX8 one);
- added sysinfo script;

Interface (scripts):

- changed behavior for which win is chosen for script guis:
    Now there's a smarter order, guis will use either:
    - Scripts win
    - Buttons win (if not a script from groups Wizards or Utils)
    - Text win
    - Closest bigger area
- Added a button to the scripts header so that it's faster to return to the buttons win (this can be made general), if that was the previous win used.
2004-06-10 03:27:46 +00:00
Willian Padovani Germano
a15b430d71 Scripts: Campbell (ideasman) updated his obj wavefront scripts. 2004-06-08 04:43:40 +00:00
Willian Padovani Germano
b82be27659 Bundled scripts:
-starting updates and new additions for Blender 2.34:
  Some of the new scripts require Python modules not builtin with Blender, so you either need a full Python install or the needed extra modules.  This is an ongoing work, there should be more scripts, better testing and also proper ways to tell users they don't have all expected modules.  It's expected that Win users won't need full Python installs, since we can provide a minimal zip with the needed modules from 2.34 on.

Thanks to Anthony D'Agostino (scorpius), Jean-Michel Soler (jms) and Campbell Barton (Cam / ideasman) for donating the scripts now added / updated.

BPython:
-added two new script menu groups: Tools and Utils.  We still need to find places elsewhere in the gui where the groups can be put.
2004-06-07 01:34:15 +00:00