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.
---------------------------------------------------
Snappy stuff
* Align rotation with snapping target: rotate the object, aligning it with the target (object mode only - temporarily) (New icon in the header when snap is turned on)
* Snap to different mesh elements (face, edge, vertice): snapping target slide on faces and edge or use exact position of vertice. When using Align rotation with edge snapping, the normal is interpolated as you slide along.
Snaps correctly to derived mesh (sculpt, modifiers, ...) and duplis. In object and edit mode.
NOTE: The snapping code is now based on faces, so even if you're snapping to vertices or edges, it will not work on meshes without faces. This might change if needed.
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 means when moving large projects with many images/videos/sounds is possible with 'File, External Data, Find Missing Files'.
- needed so we can put peach animatic, glrenders & testrenders on the dvd.
also datatoc.c - brecht's fixes from apricot.
This replaces the hard-coded '%PROFILE%\Application Data\..." path
with the correct language-dependant CSIDL_APPDATA.
PLEASE NOTE!
Checks for the previous location have now been REMOVED. Any data
saved in the old hard-coded location will no longer be found by
Blender (this will only affect users of non-english windows.)
The installer has been updated to help the user to migrate their data
to the new location of their choice, if necessary.
Order of preference for .blender on windows is now the following:
1) %HOME% environment var
2) Installation Directory (location of blender.exe)
3) "Current User" (CSIDL_APPDATA)
4) "All Users" (CSIDL_COMMON_APPDATA)
[#8067] external texture plugin thread-safe modifications
Submitted By: David Anderson (davywavy)
It makes it so the "result" array is passed in, instead of a global var.
I expanded the patch so it will play nice with older plugins that are not
thread safe as well.
I also updated the existing plugins in the release, so they are thread safe.
--------------- What do people think of this.... ------------------
This should maybe be talked about in the functionality board or something,
but what do people think of adding in default texture/sequence plugins.
or making a seperate tree like lib for plugins.
The reason I ask is we have had a couple of upgrades to the plugin system.
(supporting float buffers for sequencer, and this one for textures)
http://www.cs.umn.edu/~mein/blender/plugins does not store revisions of
plugins I just make sure they work with the latest version. This is
getting messy. I haven't upgraded a lot of them to use floats (I know,
I'm lazy, and now this will also make modifications to the plugins)
It would be nice to have some of the standard ones under revision control.
We also seem to be having an explosion of platforms supported. It would
be nice to have platform maintainers compiling plugins as well for releases.
(Its getting to be more work for me to keep up with things...)
I'll go back to my corner now and be quite. ;)
Kent
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...)
The latter is now obsolete and will be soon
removed.
Some tiny build tweaks for darwin committed
in preparation of bigger changes for proper
SDK suport both on intel and ppc
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
Several transform bugs in the flt importer have been fixed. This included
parent/child relationships and matrices not importing correctly along with
some problems with the import scale option.
it is now in a state where it can be safely
merged with trunk.
Note: basic icons were provided but I'm not
an icondesigner and working in a 16x15 grid
is way too small for me, so feel free to
change them.
[#8428] 'Editmesh_active' theme colour not accessible via Python
bugfix problem where saving a theme would raise and error when ~/.blender didnt exist.
bugfix for file selector staying open (introduced with own undo resistant scripts)
Creates (or modifies) a DOF node based upon the active object.
Requires two selected objects, the non-active one will get its
DOF coordinate system from the active selected object. This assumes
that 1 Blender unit == 10 meters
Maya uses OBJ's UV's to generate seams, some people complained that models imported from blender didnt work well in maya.
It was faster to write every faces UV (without doing a remove doubles), but sharing UV coords makes smaller files and might also be more efficient in other applications.
* 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.
added icon for 'Toggle Bookmark Area'
disabled the bookmarks for databrowse
allow to add path inside .blend file (could be nice to use as material library for example)
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.
This means you can have 100's of objects animations run by animating an empty over them, (needs docs to explain really) ... Easy to setup and time a Mexican wave for instance ;)
v1.0.12: 2008.01.17 by migius
a8 lately used INI-dir/filename persistently stored in Registry
a8 lately used DXF-dir/filename persistently stored in Registry
a7 fix missing layersmap{} for dxf-files without "section:layer"
a6 added support for XREF external referenced BLOCKs
a6 check for bug in AutoCAD2002:DXFr12export: ELLIPSE->POLYLINE_ARC fault angles
a6 support VIEWs and VPORTs as cameras: ortho and perspective mode
a6 save resources through ignoring unused BLOCKs (not-inserted or on frozen/blocked layers)
a6 added try_finally: f.close() for all IO-files
a6 added handling for TypeError raise
a5 bugfix f_getOCS for (0,0,z!=1.0) (ellipse in Kai's dxf)
a4 added to analyzeTool: report about VIEWs, VPORTs, unused/xref BLOCKs
a4 bugfix: individual support for 2D/3DPOLYLINE/POLYMESH
a4 added to UI: (*wip)BLOCK-(F): name filtering for BLOCKs
a4 added to UI: BLOCK-(n): filter anoname/hatch BLOCKs *X...
a2 g_scale_as is no more GUI_A-variable
a2 bugfix "material": negative sign color_index
a2 added support for BLOCKs defined with origin !=(0,0,0)
a1 added 'global.reLocation-vector' option
v1.0.11: 2007.11.24 by migius
c8 added 'curve_resolution_U' option
c8 added context_sensitivity for some UI-buttons
c8 bugfix ELLIPSE rotation, added closed_variant and caps
c7 rebuild UI: new layout, grouping and meta-buttons
c6 rewritten support for ELLIPSE mesh & curve representation
c6 restore selector-buttons for DXF-drawTypes: LINE & Co
c6 change header of INI/INF-files: # at begin
c6 apply scale(1,1,1) after glob.Scale for all mesh objects, not for curve objects.
c5 fixing 'material_on' option
from BKE_blender.h
Now we just need to update the other build methods to use the script.
Once thats done we can remove the VERSION file since it will no longer
be needed.
Kent
* MDD export failed when using a particle-instance modifier due to the use of different ways of retrieving a mesh to count it's vertices.
* MDD importer now shows up in menu of importers again
Based on feedback from Ton, I've recoded the way "PoseLibs" are implemented/exposed. Therefore, quite a bit of code has been changed to fit this in better.
Now, ANY ACTION can be a "PoseLib". A set of Markers which belong to the Action (it's taken a year, but they're finally back), are used to tag "poses" in the Action. These markers are shown using diamond-shaped blue icons (designed by Matt Ebb) in three shades - unselected/normal, selected, active.
Notes:
* Each Armature Object has an Action which acts as a PoseLib.
* Improved UI presented in buttons panel for this
-- added proper buttons for action assigning
-- renamed "Validate PoseLib" to "Auto-Sync PoseLib" (this option auto-tags poses based on keyframes found)
Like in the 3d-view, use the hotkeys:
* Shift-L to add a local marker
* Ctrl-Shift-L to rename a local marker
* Alt-L to delete selected local markers
Note: transforms, etc. are not currently available with these markers
== PoseLib Preview ==
Added a few features here:
* Left/Right-Arrow keys now change the poses too (previous and next respectively)
* Up/Down-Arrow keys also change the poses, but "jump" to a pose 5 steps away in their respective directions
editmode was not exited, and vertex normals would not write at all! (probably own error)
- Edited tooltip for texture DVar (was some user confusion in the studio as to its purpose)
- Set render border is disabled when it has no area - so drawing a box outside the camera disables .
[#7660] Solaris 10 x86 support (Makefiles)
Hopefully it will not mess up anything for anyone else. I removed
some hardcoded static libs and made NAN_*_LIB definitions so they could be
overridden, to allow greater flexability.
Let me know if there are any problems/questions.
Kent
modifier.c, BKE_modifier.h - flag for modifiers to say they use pointcache, also new func modifiers_usesPointCache
renamed //pointcache to //blendcache_blendfilename so blendfiles in the same dir dont conflict, and other to show this dir isnt limited to pointcache only (nodes way want to use this)
wizard_curve2tree.py - better defaults for pretty tree's
Object panels were using object_data_is_libdata, which meant linked obdata could not have object settings changed.
curve2tree
- option to face leaves up or down
- random pitch and roll options
- place 2 leaves on a point for denser leaves
- random seed entry so you can get reproducible results
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewritehttp://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
Mesh.c - mesh.faces.extend([..., smooth=True]) - smooth keyword argument, in a number of places was looping through all faces just to smooth them.
mesh_skin.py - smooth by default
You can find the update v1.0.11 on http://wiki.blender.org/index.php/Scripts/Manual/Import/DXF-3D
changelog:
c4 added "analyse DXF-file" UI-option: print LAYER/BLOCK-dependences into a textfile
c3 human-formating of data in INI-Files
c2 added "caps" for closed Bezier-curves
c2 added "set elevation" UI-option
c1 rewrite POLYLINE2d-arc-segments Bezier-interpreter
b9 many bugs fixed
b9 rewrite POLYLINE2d-arc-segments trimming (clean-trim)
b8 added "import from frozen layers" UI-option
b8 added "import from paper space" UI-option
b8 support Bezier curves for LINEs incl.thickness(0.0-10.0)
b8 added meshSmooth_on for circle/arc/polyline
b8 added vertexGroups for circle/arc
b7 added width_force for ARCs/CIRCLEs = "thin_box" option
b3 cleanup code, rename f_drawArc/Bulg->f_calcArc/Bulg
b2 fixing material assignment by LAYER+COLOR
b1 fixing Bezier curves representation of POLYLINEs-arc-segments
b0 added global_scale_presets: "yard/feet/inch to meter"
- gravity (like particles)
- follow parent (like gravity but use the parent normal)
- limit the number of twigs on each branch
- limit the radius that a twig may be placed on a branch
- trim the base of branches in a way that better deals with small branches on large branches
* Mesh.c bugfix, "mesh.verts = None" didn't set the mesh->mselect pointer to NULL, wizard_curve2tree so would crash when in editmode.
* Texture.py - MTex.uvlayer doc was missing
* buttons_shading.c - Stencil tooltip was stupid.
'Twigs' - branch's added to the existing, made from blending existing branches into new ones.
Some user settings for scale, orientation randomness, number of twigs and recursive twigs.
- armature only - so when using weight groups for other things only armature groups are affected,
- Active only - so you can normalize all weight groups
Tree From Curve,
- report error when nurbs or poly curves are used.
- don't throw errors when >4 branch's per segment are used. also try deal with this better. though no nice solution exists.
- default speed is 10x slower then before.
Was converting into a mesh and then doing location checks, to figure out what the radius should be and then interpolating. this was the slowest part of the script and it made a mesh every time.
Now use blenders bezier interpolation function and calculate points like blender does.
fixed a driver syntax error for the Z axis (typo)
Once again, I've recoded the constraints system. This time, the goals were:
* To make it more future-proof by 'modernising' the coding style. The long functions filled with switch statements, have given way to function-pointers with smaller functions for specific purposes.
* To make it support constraints which use multiple targets more readily that it did. In the past, it was assumed that constraints could only have at most one target.
As a result, a lot of code has been shuffled around, and modified. Also, the subversion number has been bumped up.
Known issues:
* PyConstraints, which were the main motivation for supporting multiple-targets, are currently broken. There are some bimport() error that keeps causing problems. I've also temporarily removed the doDriver support, although it may return in another form soon.
* Constraints BPy-API is currently has a few features which currently don't work yet
* Outliner currently only displays the names of the constraints instead of the fancy subtarget/target/constraint-name display it used to do. What gets displayed here needs further investigation, as the old way was certainly not that great (and is not compatible with the new system too)
build.
This is bug [#7387] Release files pack the .svn metadata directories
I took a breif look at the scons files and it looks like it has a fix
for them already. It would be great if someone that uses scons could
just do a quick double check and let me know if there are problems with it
and or just fix whatever slips through.
Kent
using the last selected face was almost good enough however when selecting verts and edges the last selected face would become inactive and the space image would flicker about too much.
The active face is used for getting the space image at the moment and keeps scripts that use this flag working also.
This has 2 commands to get and set, so the variable is not accessed directly.
all "UV Calculate" scripts work now
last commit crashed when in solid draw mode, it seems subsurf modifier is ignoring the displayMask since MTFACE is available. just made it do a null check for now.
uvcalc_follow_active_coords.py - should be done inC and put in the snap menu.
Changed how the sticky setting is stored in DNA - (as a char rather then 2 flags).
replaced the UV/FACE icon with another needed for the sticky menu.
removed 2 unused icons.
commented the UV transform panel since it only had 2 buttons in it.
depgraph update calls needed to be added to Ctrl+V/E/F menu's because some commands were crashing.
blender-2.44-linux-glibc2.5-x86_64.tar.bz2
is now:
blender-2.44-linux-glibc2.5-x86_64-py2.5.tar.bz2
I know know the same as scons builds but its cleaner with the Makefiles
this way. I could make it like the scons versions but will be more hackish
Kent
Initial commit of imagebrowser in trunk.
BIG COMMIT!
Main changes:
* completely reworked imasel space
* creation and storage of the preview images for materials, textures, world and lamp
* thumbnails of images and movie files when browsing in the file system
* loading previews from external .blend when linking or appending
* thumbnail caching according to the Thumbnail Managing Standard: http://jens.triq.net/thumbnail-spec/
* for now just kept imasel access mostly as old imgbrowser (CTRL+F4, CTRL+F1) a bit hidden still.
* filtering of file types (images, movies, .blend, py,...)
* preliminary managing of bookmarks ('B' button to add, XKEY while bookmark active to delete)
More detailed info which will be updated here: http://wiki.blender.org/index.php/User:Elubie/PreviewImageBrowser
Places that need special review (and probably fixes):
* BLO_blendhandle_get_previews in readblenentry
* readfile.c: do_version and refactorings of do_library_append
* UI integration
TODO and known issues still:
* Accented characters do not display correctly with international fonts
* Crash was reported when browsing in directory with movie files
* Bookmark management still needs some UI work (second scrollbar?), feedback here is welcome!
Credits:
Samir Bharadwaj (samirbharadwaj@yahoo.com) for the icon images.
Many thanks to everyone who gave feedback and helped so far!
However meshes that use an armature cant use object animation.
faster exporting for non modifier applied, armature meshes (transform all verts using wrapped C func)
* made name string cleaning function allow chars ,.()[]{} in fbx model names
* clamped export lamp intensity to 200
* each mesh only links to the image-textures it uses. (before it linked to ALL textures)
* added support for AllSame mapping, this means when a material or texture only uses one, a single mapping index can be given rather then a big list with the same value in it.
* improved material and texture mapping method
* material indicies were incorrectly exported
* export object materials using colbits
* scaled armatures would scale bones twice
* scenes with no world would raise an error
Additions
* added options for global scaling and rotating, defaults will load correctly in MotionBuilder
* modifiers can be applied to skinned meshes, the armatures are set to their rest positions for python to get the un-deformed mesh. This makes exporting a mesh with subsurf and armature applied work as expected.
* meshes with parent bones are exported as weighted meshes.
* use lamp modes for cast light and cast shadow FBX settings.
* batch exporter, scenes or groups can be exporter to a file each.
* help button to load the wiki exporter page.
* added a user interface
* added support for exporting multiple actions as FBX's 'Takes'
* added support for one armature effecting multiple meshes
* added support for multiple armatures (bone names wont have namespace collisions)
So it can be used to export walk cycles etc.
Animated armatures also work (import BVH and export as FBX for instance)
Pose data is transformation is key'd on every frame at the moment, so IK's and constraints are applied but blenders keyframes are not used.
at the moment one armature applied multiple meshes wont work properly and armatures cant have transformation.
I've added the ability for PyConstraints to define a function (doDriver) that is able to directly modify values of the owner/target, so that certain setups can be created reliably. Users should take note that this is against the basic concept of what a constraint does, and that under no circumstances may they set the values of any variables controlling the transforms. For more details, check out the information in the PyConstraint template script.
I've also updated PyConstraints to be aware of geometry targets. The script template has been updated with this information.
This averages the weights of vert groups per island (based on face connectivity)
Nice for making scales and works well with new dual-quat interpolation
This also helped me pinpoint a couple of off by one errors in the UV rasterizing code. One especially noteworthy was that all UV at 1.0 (on the 0..1 scale) didn't render properly.
its not hard coded if it trys to do a static build or not. It
uses the same vars that decide if your building a static blender to
determine if it should make a static package.
I also found a typo on OSX for make release and thats fixed now
Kent
Added new defines for the icons used to show this, on the request of Matt Ebb. For now, the eye icons have simply been duplicated to the new spaces, but 'more descriptive' icons should be made.
Here is a script template for the "Script Templates" menu in the Text Editor. It provides you with the necessary functions for a PyConstraint set up, and also includes descriptions on what is required in each function.
* Finally cleaned up the NSIS installer creation process
This is now a proper action and command, with simple printout
The 'nsis' target (only on Windows) now properly depends on
all the build process, and will be done as very last.
* Make LZMA (Solid) default compressor for installer (= the best)
Also removed the use of list.index() all over the place where the index was known. (saves searching the file and the possibility of duplicates messing it up)
Lattice.c - removed warning
Mesh.c - (own error) when running me.update(key="...") didnt update the right keyframe.
mesh_cleanup.py - Bugfix from a report by plumiferos that started uncovering all the memory leaks.
Removing NAN verts didnt work with mesh keyframes.