Commit Graph

261 Commits

Author SHA1 Message Date
Campbell Barton
7f3ce43f04 removed numerious spelling mistakes 2006-06-26 07:54:10 +00:00
Campbell Barton
cd87c75a2f removing this script because editmode select group replaces it. 2006-06-26 03:42:38 +00:00
Campbell Barton
b2dd3db414 Made 3ds import remove 0,0,0 dummy vert (Thanks Ken)
removed set() from BpyMesh and added some uv utility functions.
2006-06-19 01:27:41 +00:00
Willian Padovani Germano
2ca99a5e09 Scripts:
- Jean-Michel Soler updated the svg to obj module used by Paths
Importer (thanks!)
- user request: added option to control whether user prefers per face
(uv face select "TwoSided" toggle) or per mesh ("Double Sided") single /
double face info in ac3d exporter.

BPY:
- Blender_ShowHelp() was now crashing Blender when called for the
second time, due to EXPP_dict_set_item_str decrementing the reference
count of an object passed as argument to Blender_ShowHelp() (so not
owned by that function).
2006-06-18 19:05:51 +00:00
Campbell Barton
a4c2492d6e Updated this script and added some functions, this wont effect eny existing python tools.
added functions
pickMeshRayFace(me, orig, dir):
pickMeshGroupWeight(me, act_group, orig, dir):
pickMeshGroupVCol(me, orig, dir):
facePlanerIslands(me):
edgeFaceUserCount(me, faces= None):
2006-06-16 10:59:56 +00:00
Campbell Barton
be22b6e8e8 Cleanum, remove unneeded 'raise's
Stupid hack- added 0,0,0 dummyvert so UVs import right (unrotated).
This script aparently dosent work on powerpc... (endian issues Im guessing)
2006-06-16 10:41:21 +00:00
Martin Poirier
8008783e27 == UV Export ==
Based on Ed Halley's report.
* Default size is now 512, min is 64, max 8192
* Loading saved params check that Editor path is valid.
2006-06-15 22:27:36 +00:00
Willian Padovani Germano
0604c3a4ec BUG #4323:
Help->System->Benchmark (the Tkey benchmark) returned timings  even if
user cancelled the pupmenu. Was just missing a check
for -1 in toets.c -- wonder how old this one was... Reported by Wim Van
Hoydonck.

Scripts:
- Updated Jean-Michel's hotkeys script for Blender 2.42.
- Followed Pieter Visser's suggestion and added version info to the menu
names of the older collada scripts (v1.3.1).

Thanks guys!

Note for builders: nevermind if you already compiled 2.42RC1, these
updates are not critical at all and can be left for the release or RC2.
2006-06-14 21:04:53 +00:00
Willian Padovani Germano
7cad5ce842 Bug #4279: doc browser script broken.
http://projects.blender.org/tracker/?func=detail&aid=4279&group_id=9&atid=125

Thanks Wim Van Hoydonck for report / fix.
2006-06-11 21:35:14 +00:00
Campbell Barton
b7b99be387 use f.area where possible over python function and use len(mface) over len(mface.v) 2006-06-07 02:10:10 +00:00
Campbell Barton
d435b02930 1 liner, bug that raised an error with textureless materials. 2006-06-06 18:12:29 +00:00
Campbell Barton
be2f840c7d Added the option to import as a group instance (creates own scene) - works the same as OBJ Import. 2006-06-06 09:59:36 +00:00
Campbell Barton
f657c05469 JMS Updates the script, and I did some fixes too. now works with more models. 2006-06-06 02:58:36 +00:00
Campbell Barton
8466ba9a3a Removed wings support, both apps are free and have good obj support. wings import was not maintainded and would not load some files. 2006-06-05 01:36:32 +00:00
Campbell Barton
6fceac6ce4 * removed lint functions
* replaced foobar==[]: with if foobar: - no reason to make empty lists for comparison.
* Would raise an error is importing a mesh with a blender that had objects in more then 1 scene.
* sped up some of the XML reading functions.
2006-06-04 18:38:58 +00:00
Tom Musgrove
d589afbac0 ==kmz importer==
This script adds support for importing kmz mesh files (google maps model format) - the script was written by jmz, thanks
2006-06-04 17:19:04 +00:00
Tom Musgrove
5bd324140d ==bvh removal for cambo==
removing to fix some commit problems - cambo will add them back
2006-06-04 15:19:40 +00:00
Campbell Barton
73e5693bea Fixed mistake in calculating the collapse position (surprising it worked as well as it did) 2006-06-04 09:35:35 +00:00
Campbell Barton
6f44fc5c1a Added an option to OBJ import "As Instance" - so people can import all the objs objects into a new scene and have a group instanced in the current scene.
some extra details in Epydocs about how groups work.
2006-06-03 07:46:56 +00:00
Campbell Barton
6632745a25 Simple fix, args from the UI were out of allignment 2006-06-02 06:34:13 +00:00
Campbell Barton
68ca6eac61 Bit the bullet and put a py2.3 blender on my system :/ ro fix http://projects.blender.org/tracker/index.php?func=detail&aid=3959&group_id=9&atid=125
py2.4 set issue with bevel_center.py (use dicts for now) - set's commented.
2006-05-31 04:03:50 +00:00
Campbell Barton
a7c61f96f6 Braught back saveRenderedImage now I have a clue about what it does.
Cleaned up functions and optimized loops, extra checks and better defaults.
2006-05-30 10:15:01 +00:00
Campbell Barton
e7767e39bb saveRenderedImage is broken? - isnt working anymore for some resion. switched back to renderAnim.
More efficient texture usage, packer now rotates the convex hull of the UV's for each image to fit the most image into the smallest rectangle.
2006-05-28 10:48:50 +00:00
Campbell Barton
98b2e98c79 Added a 2d convex hull function to BPyMathutils
Added a 2D Line intersection function
Added a function to BPyMesh that gets the mesh space vertex location of a Faces UV Pixel.
2006-05-28 10:44:29 +00:00
Campbell Barton
e47719d253 comments on how edge weighting for collapsing works.
uv_auto_layout_tex now uses the recently fixed saveRenderedImage - I needed to make clean and make to get it working.
2006-05-28 02:12:49 +00:00
Campbell Barton
83105911bf Use Kens hide/sel mesh props to save some python looping. 2006-05-28 01:52:16 +00:00
Campbell Barton
8baa88da9b Poly reduction fixes
Added remove doubles as a keyword option,
Fixed Triangulate (need to select the faces first)
Fixed boundry weighting (defaults reduced boundries first more then
non boundry verts!)
Made face area weighting give better results.
2006-05-27 14:27:52 +00:00
Tom Musgrove
222844b87c ==md2 export update==
[ #4237 ] MD2 export Light Normal is rotated incorrectly fixed by Bob Holcomb
2006-05-26 00:21:02 +00:00
Tom Musgrove
ab38a1c317 ==md2 export update==
centers object to export correctly by Bob Holcomb
2006-05-25 11:59:35 +00:00
Campbell Barton
55755954ed optional reuse list for meshCalcNormals, which makes decimation abt 5% faster.
Workaround for a problem where badly predicted positions are further then half the edge length, on these cases just collapse to the weighted middle of teh edge.
Added docs for "PolyReduce" (Uses BPyMesh_Redux) and WIP Docs for AutoTex Layout.
http://mediawiki.blender.org/index.php/Manual/PartXIII/Modelling_Scripts
2006-05-20 23:24:26 +00:00
Chris Want
62420c88fd Hrmm, this is a bit nasty: I am now using a different call to get a mesh
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.)
2006-05-19 17:28:17 +00:00
Campbell Barton
4475c4211a From __bpydoc__
This script makes a new image from the used areas of all the images mapped to the selected mesh objects.
Image are packed into 1 new image that is assigned to the original faces.
This is usefull for game models where 1 image is faster then many, and saves the labour of manual texture layout in an image editor.

- Realy needs an image example to see why this is usefull.
2006-05-19 15:56:14 +00:00
Chris Want
594b0bf041 Two issues:
* 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.
2006-05-18 20:47:39 +00:00
Chris Want
d41fd9079d A fairly major revision of the VRML97 export script.
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.)
2006-05-18 17:34:41 +00:00
Campbell Barton
2f337b6e62 Stoped a list that didint need to be made.
~20% faster and memory saved by re-using the face and edge lists and their classes each pass rather then __init__'ing new ones.
Stupid mistake- was only collapsing edges with UV's
2006-05-18 14:13:47 +00:00
Campbell Barton
8537a4d471 Fixed some evil bugs in the poly reducer messing up UV's every now and then.
Added support for "Weighted Collapse" Before an edge could only collapse into its middle,
Now the edge collapses into a point bias'd by the 2 verts Concave/Convec "Pointyness" value as well as boundry weighting.
This works much better for boundry verts. - UV's Vcols and Weights are correctly interpolated into the new location.

Added a tool in the mesh menu for accessing the poly reduction tool.
2006-05-18 02:22:05 +00:00
Campbell Barton
fc6597fdcf Made import set the object layer to the current scene layer, applied the 3ds name to the object and the mesh. 2006-05-17 00:47:00 +00:00
Campbell Barton
0d8f85eda8 made some changes to vrml97_export, this script needs to be re-written, until then fixed some incorrect assumtions it made- was using the first world in the list for AMB color no matter what world was being used, was also using the image name rather then the file name for its image URL references. 2006-05-16 22:57:24 +00:00
Tom Musgrove
ac5ad70b7c ==md2 export==
typo fix by Antonio Ospite
2006-05-16 02:56:14 +00:00
Campbell Barton
3d2701178e Win32 image opening was broken with the default settings. 2006-05-16 01:41:54 +00:00
Campbell Barton
aad369c8f9 fixed devide by zero error with zero length edges.
added a minimum edge length option
2006-05-15 17:42:01 +00:00
Campbell Barton
51eb744807 BPyImage had a problem with a path being returned as None
BPyMesh would make NAN coords for collapsed edges.
2006-05-15 13:33:30 +00:00
Campbell Barton
90c10ab910 BPyRegistry was throwing errors with blank config files. made it check for this and be quiet.
fixed some bugs in BPyMesh_redux, tweaked to work well for test cases. much better use of error levels for edge weighting. better collapsing to the desired target. triangulates before reduction be default now.
2006-05-15 07:29:28 +00:00
Campbell Barton
265c0af49f * New faster algo for finding the new collapse location using normals rather then edge connectivity data.
* Much improved, slower edge collapse weighting method that makes this script about 2.5x slower, but brings it up to the quality of qslim (lightwave's decimator), without the manifold' errors.
Probably worth adding a UI front end to this function.
2006-05-14 18:28:27 +00:00
Campbell Barton
6c1aee79a5 Allow to see in real time trajectory of selected object.
You can grag the keyframes around from anywhere in the animation.
Keyframe dragging would be less of a hack if we could do an event handeler and a redraw space handeler in 1.

This kind of functionality could be nice to see in Blender.
2006-05-14 11:55:52 +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
d790049639 fixed, bugs with selection & remove doubles. 2006-05-13 17:50:47 +00:00
Campbell Barton
b0c5df16f6 Made editmesh remove_doubles work with vertex colours,
added vertex colour support to BPyMesh_redux polygon reducing function.
2006-05-13 12:36:48 +00:00
Campbell Barton
2bcf11defb BPyMesh_redux: Fixed a rare bug in mesh redux's, collapsed location.
BPyMesh_redux:  made redux support non UV Meshes.
vertexpaint_selfshadow_ao:  turned vertex selfshadow scale into radius.
2006-05-13 05:24:58 +00:00
Chris Want
baf69d3a73 Making the vrml exporter use the Ken Hughes Mesh module, rather
than NMesh.
2006-05-12 15:26:38 +00:00