Please commit to 2.47 branch
patch history:
v1.12 - 2008.08.03
c2 warningfix: relocating of globals: layersmap, oblist
c2 modif UI: buttons newScene+targetLayer moved to start panel
v1.12 - 2008.07.04
c1 added control Curve's OrderU parameter
c1 modif UI: preset buttons X-2D-3D moved to start panel
b6 added handling exception of not registered LAYERs (Hammer-HL-editor DXF output)
b5 rebuild UI: global preset 2D for Curve-Import
b5 added UI-options: PL-MESH N+N plmesh_flip and normals_out
b5 added support for SPLINEs, added control OrderU parameter
b5 rewrote draw module for NURBS_curve and Bezier_curve
v1.12 - 2008.06.22
b4 change versioning system 1.0.12 -> 1.12
b4 print at start version-info to console
b3 bugfix: ob.name conflict with existing meshes (different ob.name/mesh.name)
Text.setCursorPos(row, col) now pops the text into view if it is in the active window space. The outliner uses this to jump to any definition in a script; it is invoked with Ctrl+T.
Space types that are to support shortcuts like this should call BPY_menu_do_shortcut(...) from the event queue read method (See winqreadtextspace in drawtext.c for example)
[#16494] Animation Bake Constraints update
links cloned children to cloned parents, useful for ik target baking. whitespace, capitalization.
[#15032] C3D Import script cleanup/IK
Changed code to put IK constraints on a user-defined layer, separate from Markers. cleaned up module naming convention.
removed questionable sloc. add revision history. forced the TrackTo constraint to use a valid marker, and not make up
one on its own.
import Blender
from Blender import *
| <- cursor here suggests globals
Blender.Draw.gl| <- cursor here suggests all Draw members starting gl
Currently suggestions are listed in the console when the space is redrawn but will be presented as a menu-style list soon. Also to add are shortcut/activation keys to allow plugins to respond to certain key strokes.
patch from Masaru Nemoto (mnemoto)
Made some modifications to the patch, use reduce() to get total face verts and some speedup for face vcol looping, also don't write vcol alpha since its used by brushes internally and has no useful meaning.
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)
c3d importer for motion capture data
This could do with some improvements but for now its acceptable.
- Note, could people please not mix tabs and spaces.
-Text copied from the patch submission-
The c3d_import with 2.46 was able to import a mocap cloud for some c3d files. I have improved it:
Version History:
0.4: PERIN Released under Blender Artistic Licence
0.5: WICKES used marker names, fixed 2.45 depricated call
0.6: WICKES creates armature for each subject
0.7: WICKES constrains armature to follow the empties (markers). Verified for shake hands s
0.8: WICKES resolved DEC support issue
see also http://wiki.blender.org/index.php/Tutorials%5CMoCap-Section_3 for how this program gets the mocap data into
Blender and creates an armature, like the BVH script does.
I'd like someone to test and verify, and if accepted, replace the current c3d_import.py
--- See patch url for example files http://projects.blender.org/tracker/index.php?func=detail&aid=14392&group_id=9&atid=127
Faulty indentation of a line sometimes caused a bunch of empty lines to
be printed into the TextureCoordinate and texCoodIndex fields
(benign error, just ugly).
Patch #10569 from Michalis Kamburelis (sorry for the delay).
This patch adds a popup menu that lets the user choose whether
they want to export selected, whether thay wanted to export
compressed, and whether they want to export the file from
blender's "Z up" coordinates to VRML's "Y up".
I'm not too crazy about the caching to disk of these options
via GetRegistry/SetRegistry, but since this seems to occur
in many of the other export scripts I'll leave it as is.
New faceweld code broke the import of meshes with loose
vertices. Also added exception handling to the importer
and exporter so that UI doesnt quite when errors are encountered.
Instead traceback is printed to stderr and control returns to
the script UI
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
1) Bug #6692 is actually a feature request. While I do think that
Michalis' patch is a worthy change, we don't have time to test
this at this stage in the release cycle (and svn is supposedly
closed to new features anyways). I'm sorry Michalis, this will
have to wait until after release.
2) I have looked at bug #8814 a while ago, but I have not yet found
a good solution (and perhaps the solution is to *not* export faces
without materials assigned). I don't have time to assess whether
revision 14774 presents a worthwhile change or not, and I have no
time to test before release. Also I don't like that the 'fix' for
#8814 is mixed with a fix for a previous faulty commit.
3) Again, another commit to a script I maintain without consulting
me first. Not cool!
Chris
null materials were not exported, but would also mess up the assignment of materials for any valid materials after the empty slots.
also made a mistake last recently that Michalis Kamburelis pointed out, changing the default orientation incorrectly. this is now set
back to what it was in Michalis's patch.
* option to export modifier applied objects
* option to export quads as tri's
* added back compress option (will default to enabled if you use .x3dz as the extension)
[bf-blender-Bug Tracker][6693] x3d export bug in V2.44 release
[bf-blender-Bug Tracker][7773] .x3d exporter problems (moving meshes away)
Updated how objects are transformed, and use Mesh rather then NMesh.
also removed vertex color saving since it was really slow and vcolors are stored per face in blender.
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)
Extension node attributes are now read and stored as ID
props for the following Node types:
-Object Nodes
-Group Nodes
-LOD Nodes
-DOF Nodes
-Inline Light Point Nodes
The extension data is written back out on export.
Note that this commit only adds support for attribute extensions.
Completely new node types via the extension record are still
unsupported.
Replaced the use of remove doubles with some new custom 'face welding'
code that wil clean up meshes on import.This will not remove any faces
or do any edge collapse and so is a more suitable method of cleaning
up imported meshes. This same code could potentially be of use when
importing other formats as well (such as DXF...)
A new tool for for fixing colors on meshes imported from other files with
conflicting color palettes has been added to the FLT toolbar script. This
will find the closest match for all the colors in the faces of selected
meshes and update their baked vertex color representation.
Also added a small tweak to the 'update all' tool which will fix black faces