AGAIN PLEAST USE TABS, lost quite some time with mixed tab/space adjustments alone.
Other then that, patch is very useful ;)
---Text from patch submission ---
Using a slightly revised BPy_Armature, this script takes any non-armature object type and creates an Action that keys
the object location (by default, for every frame). If it is an Armature, it goes into each bone and keys the locrot
of the bone. You can now edit the armature, but the motions still rotate the bones. This enables the next step, re-targeting,
which changes bone lengths to fit a mesh. High-level, we are working toward:
1. import mocap (bvh or c3d)
2. bake to make an action library (using this script)
3. re-target and use the actions to drive/deform any character mesh (theeth)
slight change to the fix suggested, the svg imported was assuming that
"fill:" and "#" being in a string meant there was "fill:#", but the # could be used for other properties.
This converts exceptions in Warning in selected points of the registry module.
While I couldn't reproduce the segfault ( I received the Py error as expected), this isn't a bad idea anyway, since the BPy C counterpart was discarding the error anyway, making it a warning is a bit more inline with its meaning.
The exception is not preventable nor fixable from a script's point of view, so better to silence it and print a warning to the console instead.
needed to add a small value to the baking distance for it to include faces of that distance (maybe should make this happen from the user interface too)
* Added Normalize option for diplacement so everything in the 'Dist' range is mapped 0-1
* Increased the maximum Dist and Bias to1000.0 (was 10.0)
* Added python utility function in BPyRender.py - bakeToPlane(...), to automate heightmap, normalmap generation for Crystalspace.
Scenes must be tagged to render, (old render daemon button) but selecting scenes in the data browser (shoft+f4) sets this also.
Using this script to generate jobs for the renderfarm much faster then loading blender.
0.5.9d : - 2007/4/5
- when a svg file containts several curves they can be imported in
separate object.
- managment of paths' name when paths are imported as separate curves.
- a menu was added to select between separate or joined curves
- management of colors
0.5.9e : - 2007/4/7
- corrected a scale problem that only appears when one uses beveldepth
- in separate curve option, name is also given to the curve data
- added the list of svg's color names (147) and modified the color's method
to work with.
0.5.9h : - 2007/5/2
- script was updated with the modifs by cambo
- removed all debug statements
- correction of a zero division error in the calc_arc function.
This means changing the active UV/VCol layers wont change what renders.
needed to adjust the minor version so old files will copy the active layer to the render-uv/vcol layer.
boxpack2d.py - redoen in C now, dont need python version.
using mface->flag for both.
Also found that the cdDM_drawMappedFaces and cdDM_drawFacesTex_common could get normals mixed up when rendering hidden faces. because hidden/invisible faces used continue without advancing to the next normal.
BPyMesh.py - own dumb error, was using dir as an arg (which is a py keyword)
object_drop.py - new script, the first to use UIBlock, it drops objects into terrain, either a group or the active object. on teh Z axis or view axis.
export_cal3d.py - option to export with baked animation from posebones, added popup UI with some options, fixed object scaling, get the meshes armature if its not selected.
export_fbx - export lamps, (point/spot/sun), Mesh edges, Dupli'Objects and static particles as edges. bug fix in material export and better reuse of some standard text chunks.
fly mode, added acceleration on mouse-wheel and +/- so flicking the mousewheel has more effect and dosnt feel so slugish.
BPySys.py - cleanName, dumb mistake.
BPyObject.py - function for getting an objects armature, look at both parent and modifier.
editmesh_add.c and BPyAddMesh.py - check for multires
filesel.c, Append/Link had a bug where files linked in, didnt have the LIB_APPEND_TAG unset, and appending these into a new blend file would link instead.
BKE_library.h, library.c - utility functions for flagging listbases flag_all_listbases_ids and and flag_listbase_ids
removing limits for now, no other areas of blenders API have limits like this (even if those limits make sense in most cases)
we may add warnings later.
also use faster dict syntax too.
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
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...
* 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
* 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.