* Support for fgons (dont make wire on fgon edges)
* added new wire type (extra sharp)
* also fixed editnmesh problem
* mistake in previous commit log (mesh_solidifym meant mesh_wire)
Existing data is flagged with LIB_APPEND_TAG and all_local only has an option to only operate on un-flagged data.
If you append an object thats linked to a material alredy linked in your scene, the material will not be made local.
So at worst youll need to make local some of the datablocks.
This is fairly simple and though my tests show it to work, do some tests on your own libraries before assuming its problem free.
scripttemplate_mesh_edit wasnt updated with PyAPI changes and moved some functions into generic places.
* Added a keyword argument to mesh.transform() - "selected_only" so you can transform the selected verts. this wont break existing scripts.
* Documented these changes in epydocs.
* used these functions in BPyAddMesh
*add_mesh_simple* - add a mesh from vert/edge/face data.
It deals with setting the mesh rotation and location based on the cursor and view rotation, vertex and object selection etc.
so adding a python object works just like other blenders internal add functions, in editmode and object mode.
*write_mesh_script* - writes a Py script containing the active mesh, this can be put in the user scripts dir so users can define their own objects in the addd menu.
Currently neither of these are accessed by the user however heres a script that uses add_mesh_simple and was written with write_mesh_script.
http://members.optusnet.com.au/cjbarton/add_mesh_teapot.py
console - Ctrl+Tab was autocomplete but that conflicted with weightpaint. Use Ctrl+Enter and Shift+Enter for newline without executing.
also made console.py import bpy.
Changelog
0.5.7 : - Wash down of some handle problems.
0.5.8 : - 2007/3/9
Wash down of the last exec and correction of a
problem with the curve's first beztriple handle
which was not recorded at first time .
- Added some units managements
- Correction of the rotate matrix
- Correction of the skew matrix
- change in the wash_DATA function suggested by cambo
- added __slot__ in class Bez, ITEM and CURVE suggested by cambo
- remove unused properties in class ITEM and CURVE
0.5.9 : - 2007/3/28
- many improvements for faster and clearer code suggested by cambo and martin.
replacement of "%s" statement by str function.
- correction of an error in the scale transform management
- correction in the management of the stack transformation that rise an error
under python 2.5 but curiously not with python 2.4
.5.9a : - 2007/3/29
- Again a lot of minors corrections
- Backward to 0.5.8 of the function that manages float numbers exported
by the Adobe Illustrator's SVG. After a lot of tests it seems that this oldest
version is also faster too .
- correction (bad) on handle management with V and H commands.
.5.9b : - 2007/3/31
- one or two minor corrections :
now the new object curve is added in the current layer.
short modif in the scale menu...
import OBJ dosnt raise a Py Error when no image is given for a material
export FBX works much better, tested 179 models and dosnt crash on any now. tested import export with large scene, 375,000 tri's.
Mesh.py doc note about UV coords,,
editmesh_add minor typo
curve - added curve_type() to return the curve type
BPyModule & gen_library - works with text3d now, can also make new text3d through bpy.curves.new
Added Draw.Label() so scripts can draw can using freetype.
widgetwizard - use Draw.Label
* 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
[ #6450 ] Save UV Layout: Overflow Error
This error was caused by excentric UV faces being exported (I'm talking things like 3443870976 as UV coord, in a range of 0..1).
Edges with extreme coordinates are now ignored (for TGA only, they are exported to SVG) and a warning is printed (at most once) to the console.
I chose to still export them to SVG because they don't affect the running time of the script while exporting them to TGA is just insanely long.
packing 2400 rectanges is about 38x faster.
Use the C implimentation in uvcalc_lightmap and uvcalc_smart_project
Blender.c - filename returning None raises errors with existing scripts, just return "" so string functions on the filename dont raise an error.
bvh_import.py
- delaying IPO updates gives a significant speedup.
- IPO's use linear interpolation now
- Added an option to loop the animation.
- fix for own bug, importing to empties never worked.
- Updated ac3d exporter to use first material found in the mesh for loose edges (lines) color. Inspired by bug report from Stewart Andreason. Also made a few updates to very old parts of the code, got rid of two "try/except".
- Updated ac3d importer to be even more forgiving to bad data. Also added option to turn transparency on in the 3D View for models using materials with alpha < 1.0. Added optional support for ac3d's subdiv tag, works by adding a subsurf modifier to the imported model(s) that have this tag, so they appear as intended.
adding menu slot ScriptTemplate
new script scripttemplate_mesh_edit is a template for an editmesh script.
The function Text makeCurrent() is a dummy until I can get it working when the script runs from a menu.
object_sel2dupgroup, creates a dupliGroup from a set of selected objects, using the active as the transformation for the dupli-ob. The advantage of using thus script is that objects have this transformation removed.
* Redraw the 3d view only when importing. (Not all windows)
* Select all verts at once rather then 1 by 1.
* dont print polygons when importing. (Would be better to use the progress bar for this)
- A few imported .ac models had wrong uv's, as reported by Melchior Franz (thanks). Well known reason: the vertex indices order in new faces is rearranged if the 3rd or 4th vindex is equal to 0, because of how Blender checks for tris/quads.
Fixing with that old trick of adding a vertex at index 0 in mesh.verts, adding 1 to each face vertex index, then removing the extra vertex after the model has been imported.
- Minor updates to the ac3d importer to support bad files (with more data than reported, this time) and properly handle texture paths with win separators ('\') and spaces. Again, thanks Melchior Franz for testing and reporting.
- Fixing bug #5950 reported by Stewart Andreason (thanks):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=5950&group_id=9
Importing .ac models created Blender objects with user count equal to 2, instead of 1 (so they couldn't be deleted in Blender), because the script kept a second reference to each created Blender object and so Python didn't deallocate things properly at the end of the script.
Now these extra references are deleted in the script, preventing the problem. But this is surely something to fix in the API itself.
* moved from NMesh to Mesh
* added more error checking.
* tested with 1660 lightwave models
* faster dictionary usage.
BPyImage - disallowed recursive searching of '/' or a windows drive letter.
Mesh - removing UV or Color layers didnt check if the active object was in vpaint of uv mode, removing the last layer could crash blender - now switch to object mode if its the last layer like the UI.
- Making the ac3d importer discard bad faces in the imported model (faces that reference a vertex index more than once). Thanks Melchior Franz for reporting this one, too.
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.
disp_paint.py - Displacement modifier and sculpt mode replace.
uv_paint.py - making can be used to write colors to an image.
animation_empties2armature.py - Was made when BVH importer could not import direct to armature, Resulting animation has visible errors, errors have been known about for a long time and not fixed.
knife.py - Old slow code, No Multi-UV's, We now have a knife tool that has snap!
If anyone wants to maintain these scripts and have them added back in, mail the bf-python ML.
Scripts that are removed can be found here.
http://projects.blender.org/viewcvs/viewcvs.cgi/blender/release/scripts/Attic/?cvsroot=bf-blender
- Fixed a few bugs in the ac3d importer, found by Melchior Franz (thanks!). Also automatically turning on ztransp for materials with alpha < 1.0 and then also transp shadows for all imported materials.
* moved from NMesh to Mesh
* made newstyle classes (use less memory)
* optimized mesh creation
* Animation now imports and plays (Bugfix for 5834)
+ other small tweaks
Added mesh.key - was missing from docs
basic workings are the same but its generaly more efficient.
The main problem was it could get the data from every object across all scenes!
This means that on framechange, every mesh would be copied into an NMesh just to see the type was a camera.
* fixed errors with Null materials
* faster material exporting
* export with modifiers applied
* faces with invalid material indicies work now (maybe should be delt with in the Py API)
* removed per vert col code since all colors are pre face now.
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.
Also made some changes
- fly mode keys have changed and added snap key
- using "i=list.index(val)" is slow, use "for i,val in enumerate(list)" instead.
- dont use "i in range(start, end)" - silly to make a list when you can do "min < val < max"
JMS, please update from this version.
Turned out somehow I managed to miss adding the proper
type refs in Blender.Types for IDGroupType and IDArrayType,
which made the script not work. So, I've got it all fixed now.
Or at least hopefully :)
Misc updates to the ac3d importer and exporter:
- use Mesh instead of NMesh;
- properly export modified data and materials from either ob or obdata (thanks for mesh.getFromObject :) );
- option to export local rot and loc info;
- better import / export of hierarchies;
- + tiny updates here and there to support old or weird .ac files.
tex2uvbaker is now redundant with buitin functionality so thank you for maintaining this script in the past. nendo is a marginal format and the scripts are not maintained so removing
* use mesh.transform instead of a python matrix multiplication function.
* use the image filename rather then ID name for the URL
* use the scenes world rather then the first world for getting world data.
* mesh.verts.index(face.vert[i]) is extreamly slow!, use face.vert[i].index instead. also got rid of a face loop in a face loop that didnt do anything.
Still need to move this script to Mesh from NMesh
update by the script author - may have killed some changes cambo did to the previous version but the layout of the script is too significantly different to merge them.
Window.c was calling undo_push_mesh, even for non mesh objects, exiting editmode would crash for any non mesh object (found with the armature symmetry script), bad juju.
big speedup to loop detection
added support for skinning open loops (could be improved, dosnt work that well when open loops have different vert counts)
speedup elsewhere with LC's
the tip isnt used for a label anyway. added comments explaining whats going on. only effects clever numbuts internaly.
type fixes for weightpaint_envelope_assign.py
-Added missing access to Node win theme (thanks Mickaël Le-bihan for pointing) and also options group and group_active.
-Added Node space to Window.Types dict.
-Tiny update to the save theme script version numbers (keeping 2.42 for now to avoid popups, but should change to 2.43 right before release).
BTW: Happy New Year everyone :).
* added .iconTheme variable
* bugfix. drawType was not being saved because Py_BuildValue and __members__ was missing an "s"
* added Blender.Get('icondir')
scn.objects.selected = [] # deselect all
scn.objects.selected = scn.objects # select all
scn.objects.context = [ob1, ob2...]
Added epydoc examples and updates importer scripts to use this de-select-all method.
continual script stuff, minor stuff..
fix for bad return in group.
Added back group.objects.append/remove but print deprectaed warning. also some epydoc changes.
weightpaint_envelope_assign - can update active vgroup only
weightpaint_normalize - fixups
BKE_plugin_types - made the max length 32 ratehr then 16 so you can fill the text space in pupBlock