* fix two typos in RenderLayer API (renderosiy -> renderosity in two places. Will break .py's saved with render_save_layers.py, just fix passRadiosiy and passRadiosiyXOR)
* add some docs on RenderLayer API
* fix some copy/paste leftover in render_save_layers.py
Bug: [#17734] Loading a python script's help dosn't work
reported by Rian Tut (thanks).
Actual problem: scripts with spaces in their filenames were not supported by the code that registers scripts in menus and runs them. Added support w/o breaking eventual, rare scripts that parse the Bpymenus file. They will still need an update to support filenames with spaces, like done here for these scripts: Scripts Help Browser and Scripts Config Editor.
PS: tested on Linux. Please test on other platforms: just make sure scripts still appear in menus (the File->Export, for example), even after re-registering them (Scripts window -> Scripts Menu -> Update Menus) and that the Scripts Help Browser still works.
Built on "Stanis Python Library for generating dxf drawing":
History:
v1.25 - 2008.09.28 by migius
- modif FACE class for r12
- add mesh-polygon -> Bezier-curve converter (Yorik's code)
- add support for curves ->POLYLINEs
- add "3d-View to Flat" - geometry projection to XY-plane
v1.24 - 2008.09.27 by migius
- add start UI with preferences
- modif POLYLINE class for r12
- changing output format from r9 to r12(AC1009)
v1.23 - 2008.09.26 by migius
- add finish message-box
v1.22 - 2008.09.26 by migius
- add support for curves ->LINEs
- add support for mesh-edges ->LINEs
v1.21 - 2008.06.04 by migius
- initial adaptation for Blender
v1.1 (20/6/2005) by www.stani.be/python/sdxf
- Python library to generate dxf drawings
Submitted by: Lorenzo Pierfederici (lento)
This patch adds the CTRL-ALT-A hotkey to align bones in armature edit mode.
It works the same way as parenting: selected bones will be aligned with active bone, if only one bone is selected it
will be aligned with its parent (if any)
Thanks!
- calling Text_reset within C/Api funcs didnt decref the Py_None Text_reset returned.
- Text_delete wasnt checking if the input was an int.
- a number of functions wernt checking if the text was removed.
console.py
- added clear output
- command history leaves empty command before wrapping
- add imports as dummy user input so commands written to a text file will run.
- faster writing of output to a textblock.
- renamed the 'morph target' option to 'keep vertex order'
- enabled 'keep vertex order' by default
This should improve usability for importing and exporting shape keys, point caches, mdds ,etc.
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
- Added a centralized function for resolving targets (aaa.bbb.ccc)
- Added documentation support for locally defined classes and methods
- The time taken to parse now dictates how long to use the cache before parsing again
- Other tweaks and comments and support for numeric var types
The text plugin scripts have been updated to make use of these features.
FLT files written by the FLT exporter would
reference external files (other FLT files,
texture maps, ect) with standard backslash
seperators on win32. However, many tools
that deal with FLT files expect directory
seperators to always be forward slashes
regardless of platform.
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
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.
[#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.
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
* 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
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 .
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
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)
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.
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