Commit Graph

747 Commits

Author SHA1 Message Date
Campbell Barton
341ba1e28b Export object loc,size,rot rather then apply the matrix to the mesh. 2007-04-05 17:55:07 +00:00
Campbell Barton
985fb03478 * Changed mesh so all new data is selected (fits in with blender's UI and other areas of Python API), this could break existing scripts that count on new data being unselected (unlikely)
* 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
2007-04-05 07:45:11 +00:00
Campbell Barton
083afdfb74 ZanQdo made the mesh import rge right way up,
I updated to use new API calls and removed unneeded debug print thrashing.
2007-04-04 09:11:03 +00:00
Campbell Barton
5371d956df curve center didnt update curve data.
add_mesh_torus - print's wernt removed
others, changed user visible text to american spelling - center
2007-04-03 08:20:17 +00:00
Campbell Barton
70869641df Python Add Mesh Script, adds a Torus with radius and segment options. 2007-04-03 05:57:04 +00:00
Campbell Barton
b2084d49ff This script 2 functions for use with the add mesh slot in the menu.
*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
2007-04-02 18:51:17 +00:00
Campbell Barton
bf2907288c editmesh_add - cone, cylinder and circle remember their 'Cap Ends' setting, each type remembers its own cap ends setting per session. adding a Cylinder with cap ends disabled names a new object cube.
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.
2007-04-02 16:32:05 +00:00
Campbell Barton
11d727aae0 This script is accessed from the object menu, used for finding an object by the data its linked to.
obdata/group/dupgroup/image/material/texture

This or similar functionality should eventualy be added to the outliner.
2007-04-01 17:08:05 +00:00
Campbell Barton
417498a865 added multilayer vertexColor support to fbx and removed videoscape_export.py 2007-03-31 12:23:46 +00:00
Campbell Barton
71843bf103 Updating JMS's SVG Importer script from 0.5.6 to 0.5.9b
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...
2007-03-31 11:19:18 +00:00
Campbell Barton
3aec899828 Mesh.py - Updated doc and example about faceUV/vertexColor
image_billboard.py - was broken because textures dont accept the antialias flag anymore
2007-03-31 04:20:00 +00:00
Campbell Barton
f40d675437 added named multilayer UV Layer export. 2007-03-29 17:51:32 +00:00
Campbell Barton
cfdef7a88a ICVS: ----------------------------------------------------------------------
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
2007-03-29 14:35:01 +00:00
Campbell Barton
bcaea04fde fixed a bug was writing 1 extra UV index, thus crashed the FBX SDK 2007-03-29 06:01:03 +00:00
Campbell Barton
c8d53d8620 FBX Exporter, blender can write meshes with materials, textures and UV coords.
Armatures bone weights and animation not supported yet.
2007-03-28 07:08:18 +00:00
Campbell Barton
30fb777971 py api
bpy.*libBlickSeq*.new() - name is now an optiona arg.
moved some more scripts to bpy.* api.
2007-03-27 14:49:37 +00:00
Campbell Barton
66238eab7c PyAPI
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
2007-03-27 11:37:54 +00:00
Campbell Barton
2b8bed8598 py api
* 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
2007-03-26 19:44:44 +00:00
Martin Poirier
c78947d2d1 === Export UV Layout ===
[ #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.
2007-03-26 15:55:23 +00:00
Campbell Barton
59f0b2fb43 Matthew Chadwick's update to the mesh unfolder, minor tidyups and stopped an error when brightness setting was used with no vertex colors.
made some very minor edits myself.
2007-03-26 08:54:03 +00:00
Campbell Barton
a9d69b332e had 1 char missing 2007-03-25 12:15:06 +00:00
Campbell Barton
5b860cb1e6 added options to this script to
* lightmaps for all selected objects
* add new blank images
* use 1 image for all mesh objects
and some other less important ones.
2007-03-25 10:27:37 +00:00
Stephen Swaney
8aafed560a change script to use the proper form of Scene.GetCurrent(). 2007-03-22 20:08:10 +00:00
Campbell Barton
83a9a84498 BoxPack2D example in epydocs, small cleanup on Geometry.c 2007-03-20 12:07:02 +00:00
Campbell Barton
a51477093b Geometry.c - rewrote my python box-packer algo in C,
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.
2007-03-20 07:23:09 +00:00
Campbell Barton
9477a7bc5c added mesh skin to the face key menu and added a python slot here. 2007-03-19 03:22:42 +00:00
Campbell Barton
15de493426 excellent mesh unolder script by Matthew Chadwick
http://celeriac.net/unfolder/
2007-03-18 12:08:51 +00:00
Campbell Barton
5d234230bf apply the 3ds matrix to the mesh, This fixes some 3ds files and breaks others, but it seems to follow the 3ds format. for the files it messes up, just remove transformation. 2007-03-14 06:01:59 +00:00
Campbell Barton
0745133528 removed videoscape support, a format from 1988 that nobody uses anymore. 2007-03-13 10:00:27 +00:00
Campbell Barton
aa33c4fad7 mesh_skin - syntax error stopped ths script from working.
svg2obj.py update from JMS
 - Exec was removed from the collect_ATTRIBUTS function .
 - Other uses was evaluated.
2007-03-05 13:07:31 +00:00
Campbell Barton
8437b84c45 Pose.c - added option not to update IPO's when adding a keyframe to a bone.
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.
2007-03-03 01:29:22 +00:00
Campbell Barton
52f105b32e new script seams from islands, adds seams at the boundries of existing UV islands.
uvcalc_smart_project - needed to import Main
2007-03-01 05:32:06 +00:00
Campbell Barton
d53570e44c quake map exporter, supports lamps, cubes as brushes, complex meshes face per brush, nurbs surfaces as a patch
texture mapping dosnt work yet.
2007-03-01 02:25:20 +00:00
Campbell Barton
488b317265 fixes to this script pointed out by JMS 2007-02-28 22:49:20 +00:00
Campbell Barton
b7e314c558 plumiferos request,
Simple script to copy the active vertex group, also has the option to only copy the selected faces into the new group.
2007-02-28 03:07:07 +00:00
Campbell Barton
9d7ace2654 x3d_export.py - fix for bug 6120
Sound.c - moved to getseters
2007-02-27 06:39:48 +00:00
Campbell Barton
a3320f209c console.py
* improved autocompleation
* faster dictionary usage

Types.c
* type(scene.getTimeLine()) # old bug, will crash blender
2007-02-26 02:24:04 +00:00
Willian Padovani Germano
bdf75bfbef Scripts:
- 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.
2007-02-22 20:19:58 +00:00
Campbell Barton
9759a373d7 Updating own scripts to use Blender.Main, remove Base files. 2007-02-22 15:48:26 +00:00
Campbell Barton
f71458b904 adding menu slot Armature
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.
2007-02-21 11:17:17 +00:00
Campbell Barton
95ac2acf39 uvcalc_lightmap, UVCalc menu, usefull for using the most texture area when baking lightmaps
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.
2007-02-19 10:54:33 +00:00
Chris Want
de9a4bcdf1 Script removed by the request of the author 2007-02-15 22:43:08 +00:00
Ton Roosendaal
806692a41b Part 2 of 2.43 release commit 2007-02-15 21:32:30 +00:00
Simon Clitherow
b5ca98f143 Added windows NSIS installer script to scons. Not pretty, but it works :)
To use:

Make sure NSIS is in your %PATH% and type 'scons nsis'

It doesn't currently compile blender first, so make sure you do a
normal 'scons' before this.
2007-02-15 17:00:22 +00:00
Campbell Barton
14e4d46112 added a reference to the original scripts location to comply with the GPL. 2007-02-15 12:23:26 +00:00
Campbell Barton
3c78f0daec * renamed to 'Consolidate into one image' and improved tooltips
* check for the faces TEX mode as well as the image
* use Scene.objects
* use 2 threads for rendering
2007-02-15 12:13:13 +00:00
Campbell Barton
97cc5db444 Added text noting this is a modified work, to comply with the GPL. 2007-02-15 00:57:58 +00:00
Campbell Barton
594026e70e re-enabled printing text to the console (since its optional)
Also added some descriptive text to the option and renamed "display time" to "Display Update" - since it also redraws in the 3d view.
2007-02-15 00:00:59 +00:00
Campbell Barton
5a3f1675a3 Commiting JMS's Latest KMZ minor changes.
* 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)
2007-02-14 21:08:58 +00:00
Campbell Barton
c7a8f6cd9d Added GPL Headers to some of my scipts that were missing it. also changed the header of a few others.
Only code change is cookie cut from View now only uses 3d curves to cut.
2007-02-14 01:03:32 +00:00