Commit Graph

834 Commits

Author SHA1 Message Date
Campbell Barton
02893ff5ae Blenders installs where the scripts dir was not writable could not load the console. This should fix it. 2007-05-20 07:41:21 +00:00
Chris Want
c80b2ef9b1 'Copy Images' option for the .obj exporter would fail.
Changing Material ==> Blender.Material fixed it.
2007-05-16 22:30:20 +00:00
Campbell Barton
5dc3878707 had debugging test enabled. 2007-05-09 07:03:05 +00:00
Campbell Barton
22da7d6829 updates from JMS. scripts assumed new data would be last in the list. 2007-05-06 20:03:18 +00:00
Willian Padovani Germano
e85f145c19 Scripts:
- Scripts config editor was not working due to changes in module BPyRegistry.py.
- AC3D exporter: a little cleanup + small improvements like sorting objects.
2007-05-06 15:47:07 +00:00
Campbell Barton
b2c888545c corrected wrong variabel name 2007-05-06 09:54:17 +00:00
Campbell Barton
32c87c61da many 3ds files would not open in other applications because of the 12 character limit of names and filenames in 3ds files.
fixed this and optimized dictionary access some.
2007-05-06 02:19:43 +00:00
Campbell Barton
66ffd1d207 more epy doc updates
added a constant dict "Blender.Object.IpoKeyTypes" to pass to ob.insertIpoKey(keytype), previously these constants were not documented well and added to Blender.Object directly
2007-05-05 06:09:03 +00:00
Campbell Barton
98d797f156 Update to svg import from JMS
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.
2007-05-03 00:06:07 +00:00
Campbell Barton
b0852bee2c bug fixed when calculating animation bone offsets 2007-05-02 23:45:09 +00:00
Campbell Barton
98bdbab495 rewrote most of this script.
* Export edges instead of faces
* dont export fgon edges
* export all objects (not just active) including Dupli Objects and static particles
* use PupBlock rather then a gui that uses a window.
* write the file normaly rather then redirecting stdout
2007-05-02 03:33:49 +00:00
Campbell Barton
c24aa10561 Made it so blender has an active render layer for Uv and Vertex color mesh layers.
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.
2007-05-02 00:01:23 +00:00
Campbell Barton
ab77b4aade uvcalc_smart_project.py - fixed error in rare cases.
xfig_export.py - NMesh to Mesh, minor improvements/cleanup.
unweld.py - fixed error when a vert had no faces, also some small speedups and changes.
2007-05-01 09:40:10 +00:00
Campbell Barton
a61638013e header_filesel - pressing buttons made the file select header title change color.
scripttemplate_object_edit.py - new script template for objects.
2007-05-01 06:57:20 +00:00
Campbell Barton
e81471f91f fix for adding a 0,0,0 dummy vertex, pointed out in [ #6607 ] 2007-05-01 00:30:48 +00:00
Campbell Barton
7d47189518 Patch [ #6623 ] Fixed one error, one typo in mesh_cleanup.py
Also added an option to remove all white vcol layers. this is usefull when loading old blend files where every mesh has vcolor's even if they are all white (because of how texface used to be stored before vcol layers)
2007-04-29 16:00:08 +00:00
Campbell Barton
99135b0674 dont use tface hide or select anymore, since maintaining 2 sets of hide/select data for each face is annoying.
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.
2007-04-29 13:39:46 +00:00
Campbell Barton
1d181b9108 removed doc_browser.py - since it covers ~half the BPY api, not documenting any of blenders data types.
replaced with a help_bpy_api.py, that opens a web browser at the Blender Python API page.
Camera.c - added a veriable .angle to camera, same as .lens but adjusts the camera angle in degrees (like the D button)
export_fbx.py - use the the camera angle property.
object_cookie_cutter.py - use PointInTriangle2D rather then own function.
buttons_shading.c - added OB: and tooltip to object world mapping.
interface_draw.c - (Simple theme) text buttons looked exactly like normal buttons (more confusing when they had no text), made the text and ID buttons render inset so you can tell them apart.
2007-04-28 17:21:00 +00:00
Campbell Barton
3bd0d2e227 Draw.c - error setting the callback button values when using UIBlock (was not offset)
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.
2007-04-27 23:54:30 +00:00
Campbell Barton
c84d18a679 export_cal3d - exporting all actions (option) wasnt working
export_fbx - blender cameras now work properly (converted lens angle, rotate to the right axis)
	Made meshes, armatures and cameras use the same namespace.
DirectX8Exporter - update from David Teviotdale, change names of exported objects so some DX readers dont fail
xsi_export - Null materials made the export fail (python error).
	This may not be a correct solution since material indicies could be messed up now. I have no way of reading these files.
2007-04-27 17:19:26 +00:00
Campbell Barton
0a9dc31c8b added blender-camera export to fbx
py api was massing shiftX/Y
2007-04-27 00:33:07 +00:00
Campbell Barton
2e134e84ab drawview.c - Passepartout, only do GL alpha when not 1.0 alpha
buttons_editing.c - negative camera lense was possible with (Deg) button enabled
export_cal3d.c - minor changes
object_batch_name_edit.py - check for data and object libdata before renaming.
2007-04-26 19:05:22 +00:00
Campbell Barton
b655d5e817 fixed many errors in Cal3D that didnt show up with the testmodel I was using.
Mostly problems with vertex index, and splitting off new verts.

removing truespace_export.py truespace_import.py, (decieded by letterrip and myself)
both truespace and blender have enough formats in common that we dont need to support this format thats spesific to truespace and not used for 3d data interchange.
2007-04-25 23:51:53 +00:00
Campbell Barton
dae5f38f55 darn, had some debug stuff left in. 2007-04-25 21:19:43 +00:00
Campbell Barton
19be3ff7c1 rewrote vertex/face creation (should be faster now)
* added support for blenders materials
* added support for multiple materials per mesh
* added Multiple UV's per vert, as well as using multiple images (Blenders TEXFace)
2007-04-25 21:17:49 +00:00
Campbell Barton
3f153c25be hiding objects in texture paint mode was buggy - (you couldnt exit texxture paint) - so only hide/show objects in object mode.
removed radiosity support.

According to the author -

"The Radiosity file format is my own personal format. I created it to
learn how meshes and vertex colors were stored. See IO-Examples.zip, the
example *.radio files on my web page."
2007-04-25 14:47:29 +00:00
Campbell Barton
d2fb4afb7c BPyArmature - has a function that gets final pose locations/rotations. the data it returns can be swaped with IPO curve/locations, so exporters can use this to export bones with IK's/constraints.
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.
2007-04-25 05:13:03 +00:00
Campbell Barton
77f08ddc12 editface.c & buttons_logic.c & Draw.c & verse_session.c - added missing header
Bone.c - return an empty list rather then None for bone.children bone.getAllChildren()
Draw.c - per button callbacks are now have (event, value) passed
2007-04-24 17:28:40 +00:00
Campbell Barton
1ad4f024c8 had debug oprions enabled for cal3d, small updates to epydoc 2007-04-24 02:09:25 +00:00
Campbell Barton
54b494540b Cal3d exporter
Updated this script to work with the new python API, Mesh from NMesh and lots of other improvements + some bug fixes.
2007-04-24 02:05:40 +00:00
Campbell Barton
60af30ec8a lightwave_import - tested with many more new files, fixed a rare error (probably bad file)
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.
2007-04-21 11:23:45 +00:00
Campbell Barton
d76778f0e4 2 new python functions for the NLA.
action.getChannelNames() and action.renameChannel(from, to)

editaction.c - maximum new name length was too short
2007-04-20 23:33:56 +00:00
Campbell Barton
c7b1e5c11d export_fbx.py - support scene start/end frames, fpx, mist settings, better default camera writing.
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
2007-04-20 18:48:30 +00:00
Campbell Barton
60b3268c32 adding a python function for cleaning strings (for filenames and export names) BPySys.py - used fotr obj and fbx export.
view.c - missed one smoothview/camera.
Brigg's hide object patch didnt change the object selection flag, other minor changes also.
2007-04-19 20:58:09 +00:00
Campbell Barton
238ab04297 update for exporting material settings, everything was exporting green,
now use spec,diffuse,ambient,alpha,shadeless settings as well as some others that match
2007-04-19 17:27:18 +00:00
Campbell Barton
0f2e46d2be selecting all new faces broke this, fixed and optimized a bit. 2007-04-19 12:31:12 +00:00
Campbell Barton
3e1a5ce7a2 PyAPI.
moved bpy into bpy.data and bpy will be eventually replace the root level 'Blender' module.
currently we have bpy.library bpy.config and bpy.data
2007-04-18 14:40:01 +00:00
Campbell Barton
063605b279 Python API registry SetKey() had a limit of 60 that would keep counting up every time you used SetKey() until it would always be 60 and nothing would save.
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.
2007-04-17 14:23:19 +00:00
Campbell Barton
a6113b0059 Made X11 use _NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT when opening (if -p isnt given as an arg)
gsr and myself both wrote a patch for this, using gsr's.

import_obj - another error in splitting fixed.
2007-04-15 05:01:34 +00:00
Campbell Barton
14e6497d8b import_obj - bugfix, split by groups didnt work.
disabled lamp panel and camera panel from editing lib data
2007-04-14 17:44:50 +00:00
Campbell Barton
0a411c4704 added missing 'import bpy' from uvcalc_smart_project
removed 2 unused vars from DNA_object_types.h
2007-04-14 10:37:58 +00:00
Campbell Barton
384f7a7875 mesh_wire, fixed error with zero area edges
Holding Ctrl flips the align view in editmode. (patch from BeBraw)
2007-04-11 14:00:11 +00:00
Campbell Barton
bd142ac2f4 Anti - NMesh commit.
unweld - warn that this tool destroys MultiUV/Col's (because of NMesh)
API_intro and NMesh - note that NMesh is maintained but deprecated.
2007-04-09 07:03:26 +00:00
Campbell Barton
55d0bf6b33 mesh_wire.py
* Support for fgons (dont make wire on fgon edges)
* added new wire type (extra sharp)
* also fixed editnmesh problem

* mistake in previous commit log (mesh_solidifym meant mesh_wire)
2007-04-09 01:43:33 +00:00
Campbell Barton
ec52983146 mesh_solidify - added a different wire type, can make 4 and 6 sided wire segments. also made solid wire an option.
uvcalc_smart_project - removed import of Main, was causing error
2007-04-08 20:40:08 +00:00
Campbell Barton
244c925421 Adding a 'solid wire' script.
http://members.optusnet.com.au/cjbarton/teapot.jpg
2007-04-08 09:35:05 +00:00
Campbell Barton
76420c2fec appending libdata no longer breaks all external references.
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.
2007-04-07 17:35:47 +00:00
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
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
Campbell Barton
1021949c3a removing this script- has been added back with correct spelling. 2007-02-13 18:34:31 +00:00
Willian Padovani Germano
caa671c2c7 Scripts:
- A few imported .ac models had wrong uv's, as reported by Melchior Franz (thanks). Well known reason: the vertex indices order in new faces is rearranged if the 3rd or 4th vindex is equal to 0, because of how Blender checks for tris/quads.

Fixing with that old trick of adding a vertex at index 0 in mesh.verts, adding 1 to each face vertex index, then removing the extra vertex after the model has been imported.
2007-02-13 17:37:32 +00:00
Willian Padovani Germano
b2ce8ec9c9 Scripts:
- Minor updates to the ac3d importer to support bad files (with more data than reported, this time) and properly handle texture paths with win separators ('\')  and spaces. Again, thanks Melchior Franz for testing and reporting.
2007-02-12 17:24:09 +00:00
Willian Padovani Germano
148b8d8014 Scripts:
- Fixing bug #5950 reported by Stewart Andreason (thanks):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=5950&group_id=9

Importing .ac models created Blender objects with user count equal to 2, instead of 1 (so they couldn't be deleted in Blender), because the script kept a second reference to each created Blender object and so Python didn't deallocate things properly at the end of the script.

Now these extra references are deleted in the script, preventing the problem. But this is surely something to fix in the API itself.
2007-02-10 15:11:11 +00:00
Robert Holcomb
f9ff156800 Fixed extra tab at beginning. Don't know how that got there. 2007-02-09 14:19:14 +00:00
Robert Holcomb
c02a71e211 Fixed missing '#' and tab errors 2007-02-08 19:16:43 +00:00
Stephen Swaney
b61d40c14c added a comment char in front of a comment to fix a syntax error.
added a newline at end of file.
2007-02-08 01:03:21 +00:00
Campbell Barton
bc15d06cfe * own error, importer would never load images.
* 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.
2007-02-08 00:27:01 +00:00
Campbell Barton
b3e6a6a9c1 animation_trajectory - was printing deprecation warnings. cleaned up some of its code too.
Mesh - removing UV or Color layers didnt check if the active object was in vpaint of uv mode, removing the last layer could crash blender - now switch to object mode if its the last layer like the UI.
2007-02-07 07:43:10 +00:00
Willian Padovani Germano
0bbe1b393e Scripts:
-Another update to the ac3d importer to handle models with wrong face data. Thanks Melchior Franz for reporting.
2007-02-06 19:40:13 +00:00
Campbell Barton
35e96bc991 added messages to scripts, stopping them from modifying multires meshes.
object_cookie_cutter - can now also use curves to cut holes in a mesh.
2007-02-06 11:16:49 +00:00
Tom Musgrove
461e4786c8 = rvk1 to rvk2 update=
script update from jms
2007-02-05 01:04:05 +00:00
Campbell Barton
42d09a59b9 update to 1.9g of JMS's kml/kmz importer,
with a change only in the menu title to comply with the existing naming convention.
2007-02-03 12:50:01 +00:00
Campbell Barton
f08aab441b used slightly faster text cleaning, fixed benchmark not to include time spent selecting a file. 2007-02-02 14:27:36 +00:00
Campbell Barton
50a7ec114d merges some of jms's updates from kmz_ImportWithMesh.py version 1.9f 2007-02-02 09:14:56 +00:00
Campbell Barton
1d5aa3faea tidy up this script as well as 2 new options - "fix nan verts" and "fix nan uvs" 2007-02-01 19:02:18 +00:00
Campbell Barton
80315d0c9b faces in face select mode can be selected and hidden, check that faces are not hidden as well as being selected. 2007-02-01 11:38:38 +00:00
Campbell Barton
5817876307 fixed nieve use of type()..
type(foo) == type(list()) can be done as
type(foo) == list:
2007-02-01 05:27:49 +00:00
Willian Padovani Germano
1f4af00c94 Scripts:
- Making the ac3d importer discard bad faces in the imported model (faces that reference a vertex index more than once). Thanks Melchior Franz for reporting this one, too.
2007-02-01 01:34:51 +00:00
Campbell Barton
ed24fe31d1 fixed a python error in the exporter, small changes for the importer. 2007-01-31 11:34:41 +00:00
Campbell Barton
9cf602b949 3ds_export - enabled textures as an option since it works with some appliactions (only way to get textured models from blender to google sketchup)
3ds_import - added option to disable recursive image searching (could be slow somtimes)
export_obj - when making group/object names only use both object and mesh name when they differ.
weightpaint_clean, weightpaint_grow_shrink - minor updates.
Render.py - own error in epydocs.
2007-01-31 01:18:51 +00:00
Willian Padovani Germano
2d14f8c224 Scripts:
- Fixing another bug in the ac3d import script, thanks again Melchior Franz for testing and reporting.
2007-01-30 20:12:30 +00:00
Campbell Barton
dcc834f3fa updated render settings to support recent changes.
options like saveBuffers are available from Python and threads can be set from 1 to 8
usefull for python based renderfarms.
2007-01-30 03:02:58 +00:00
Campbell Barton
45d486f0f3 Update to JMS's latest version of google earth 3 importer.
also made some changes
* redraw in the 3d view only
* create all objects in visible layers
* other small tweaks and speedups, removed debug print's
2007-01-30 00:16:05 +00:00
Campbell Barton
5db31cb571 removing redundant scripts because of new features in blender after discussion with LetterRip.
disp_paint.py - Displacement modifier and sculpt mode replace.
uv_paint.py - making can be used to write colors to an image.
animation_empties2armature.py - Was made when BVH importer could not import direct to armature, Resulting animation has visible errors, errors have been known about for a long time and not fixed.
knife.py - Old slow code, No Multi-UV's, We now have a knife tool that has snap!

If anyone wants to maintain these scripts and have them added back in, mail the bf-python ML.

Scripts that are removed can be found here.
http://projects.blender.org/viewcvs/viewcvs.cgi/blender/release/scripts/Attic/?cvsroot=bf-blender
2007-01-29 10:20:21 +00:00
Campbell Barton
803d66a3a5 removed copy_facedata_multilayer from BPyMesh since it changes the selection and flips the faces (needed for solidify) but not for general purpose use. 2007-01-29 06:56:30 +00:00
Campbell Barton
996294e18a fixed own bug indroduced when switching to use f.edge_keys
MultiUV/Color support - all layers are copied to new faces. as well as hole filling faces.
2007-01-29 06:38:30 +00:00
Robert Holcomb
2133d87d21 Fixed accelerated openGL command list tri-strip generation for geometry. UV coordinates are still off a bit. Fixed bad frame list loading. I'm sleepy and need a snack. 2007-01-29 00:11:18 +00:00
Willian Padovani Germano
cd2e2d231f Scripts:
- Fixed a few bugs in the ac3d importer, found by Melchior Franz (thanks!). Also automatically turning on ztransp for materials with alpha < 1.0 and then also transp shadows for all imported materials.
2007-01-28 20:03:42 +00:00
Campbell Barton
5943ad8f65 update to the md2 importer.
* moved from NMesh to Mesh
* made newstyle classes (use less memory)
* optimized mesh creation
* Animation now imports and plays (Bugfix for 5834)
+ other small tweaks

Added mesh.key - was missing from docs
2007-01-28 12:33:04 +00:00
Campbell Barton
321cafa714 updated this script (one of the most out of date)
basic workings are the same but its generaly more efficient.

The main problem was it could get the data from every object across all scenes!
This means that on framechange, every mesh would be copied into an NMesh just to see the type was a camera.
2007-01-28 03:36:33 +00:00
Campbell Barton
7f5908f95a bug 5857, python 2.3 compat fix + minor changes. 2007-01-28 01:36:21 +00:00
Campbell Barton
8f075f9518 minor tweaks from testing scripts. correction in my last commit. 2007-01-27 04:58:09 +00:00
Campbell Barton
853785782e Updated docs not to use Object.New() in examples, use scn.objects.*
Bugfix from ZanQdo, MOT files wouldent load in lightwave. also made some minor improvements.
2007-01-27 02:15:14 +00:00
Campbell Barton
bc6fc72209 * nmesh to mesh
* fixed errors with Null materials
* faster material exporting
* export with modifiers applied
* faces with invalid material indicies work now (maybe should be delt with in the Py API)
* removed per vert col code since all colors are pre face now.
2007-01-26 10:37:18 +00:00
Campbell Barton
624030165b fixed some errors, small usability enhancements. 2007-01-26 07:32:29 +00:00
Campbell Barton
7239784b17 added option "morph target" since many people complain that verts are re-ordered with some options enabled. 2007-01-26 07:01:30 +00:00
Campbell Barton
0decfd140b fixed an obscure bug in obj import (possibly in Mesh.c) that made adding edges as faces mess up.
export obj now dosnt remove double UV's, its too slow.

updated version numbers to 243 and other minor changes.
2007-01-26 06:02:21 +00:00
Campbell Barton
2a829b87e2 use better Python 2.4 syntax sorting (in a try so py 2.3 still works)
use new scene/object creation for making temp objects.
2007-01-25 04:18:09 +00:00
Campbell Barton
29813971b1 applied patch 5779 with some modifications to fix own error, (uv indicies could be out of order)
removed image support, Blender could import but not 3dsmax :/ - even managed to get 3dsdump to report a blender and max file to have the same data but max still dosnt like.
2007-01-22 17:31:34 +00:00
Campbell Barton
32676b66a4 fixed error on hole filling (http://blender.org/forum/viewtopic.php?p=59062#59062) 2007-01-22 09:48:03 +00:00
Campbell Barton
e64afa6c17 Update by JMS for the hotkey script.
Also made some changes
- fly mode keys have changed and added snap key
- using "i=list.index(val)" is slow, use "for i,val in enumerate(list)" instead.
- dont use "i in range(start, end)" - silly to make a list when you can do "min < val < max"

JMS, please update from this version.
2007-01-21 23:14:57 +00:00
Tom Musgrove
898fccf463 = line ending fix =
these files all had non unix line endings...
2007-01-18 08:39:31 +00:00
Campbell Barton
848e93ce41 error in generating projections fixed.
also modified the margin value so you dont need to have values like 0.001
and added an option not to use face areas to weight projections.
2007-01-18 01:10:48 +00:00
Campbell Barton
6d0089237e dont use python keywords as variable names. 2007-01-16 15:19:04 +00:00
Campbell Barton
05ecd017ca cleaned up uv island projection generation and added an option 'Init from view' - to use the view vector as one of the first projections 2007-01-16 14:33:32 +00:00
Campbell Barton
dc00d9c5de set the render aspect correctly when rendering non square images. 2007-01-16 06:39:15 +00:00
Campbell Barton
dced690915 wasnt working for mixed modes 2007-01-16 02:49:58 +00:00
Willian Padovani Germano
feb63d7d3b Scripts:
More small updates to the ac3d importer, to calculate normals for the created meshes and to avoid problems with older .ac files.
2007-01-16 00:50:31 +00:00
Campbell Barton
72de9a64c9 was missing a check for the end edge that made skinning it raise an error. 2007-01-15 23:37:34 +00:00
Campbell Barton
a77178467b when a vert is shared by more then 1 vertloop give a nice error and exit 2007-01-15 07:59:29 +00:00
Joseph Eagar
7a19fe19f6 =ID Property Script update and api bugfix=
Turned out somehow I managed to miss adding the proper
type refs in Blender.Types for IDGroupType and IDArrayType,
which made the script not work.  So, I've got it all fixed now.
Or at least hopefully :)
2007-01-15 07:54:08 +00:00
Willian Padovani Germano
82bfd281f2 Scripts:
Misc updates to the ac3d importer and exporter:
- use Mesh instead of NMesh;
- properly export modified data and materials from either ob or obdata (thanks for mesh.getFromObject :) );
- option to export local rot and loc info;
- better import / export of hierarchies;
- + tiny updates here and there to support old or weird .ac files.
2007-01-14 18:13:47 +00:00
Campbell Barton
c6a57fb4b0 import_obj - name imported objects/mesh data
weightpaint_clean - report how many verts removed from groups
save_theme - no need to do type(''), just use type(vat) == str
2007-01-13 03:07:04 +00:00
Campbell Barton
0b89910800 disp_paint - was raising an error when the mesh had no image and texuv was selected, or when the image had no data.
discombobulator - updated to use newer API functions
object_random_loc_sz_rot - improved layout and use new Scene objects.context
2007-01-13 02:03:38 +00:00
Tom Musgrove
74291cc503 = removed nendo import/export and tex2uvbaker =
tex2uvbaker is now redundant with buitin functionality so thank you for maintaining this script in the past.  nendo is a marginal format and the scripts are not maintained so removing
2007-01-12 09:08:00 +00:00
Campbell Barton
54863a2fef error, camera scale couldnt be set. bpyrender now sets ortho properly 2007-01-12 00:31:18 +00:00
Campbell Barton
3c578fbe12 tested export scripts with a large scene and resolved errors that came up as well as some speedups- mostly problems with lightwave_export 2007-01-11 09:39:16 +00:00
Campbell Barton
34c11de62a improved this script
* use mesh.transform instead of a python matrix multiplication function.
* use the image filename rather then ID name for the URL
* use the scenes world rather then the first world for getting world data.
* mesh.verts.index(face.vert[i]) is extreamly slow!, use face.vert[i].index instead. also got rid of a face loop in a face loop that didnt do anything.

Still need to move this script to Mesh from NMesh
2007-01-11 06:48:25 +00:00
Campbell Barton
99857e40e3 some PLY files dont have faces, made these import without raising an error. 2007-01-11 02:09:45 +00:00
Tom Musgrove
20413f17bb = dxf update =
update by the script author - may have killed some changes cambo did to the previous version but the layout of the script is too significantly different to merge them.
2007-01-10 11:37:19 +00:00
Campbell Barton
4b9051501f forgot to remove when I changed the name. 2007-01-09 16:58:39 +00:00
Campbell Barton
e2da632f8f ply export patch 5576 applied with parts rewritten.
BPyMesh getMeshFromObject bugfix in some cases non mesh object types could be a problem.
2007-01-09 16:01:38 +00:00
Campbell Barton
9065f0b55a Made skinning between 2 open edge loops work better 2007-01-09 09:24:20 +00:00
Campbell Barton
ca97ede0cd fixes spelling of filename.
Window.c was calling undo_push_mesh, even for non mesh objects, exiting editmode would crash for any non mesh object (found with the armature symmetry script), bad juju.
2007-01-09 05:28:37 +00:00
Campbell Barton
d01374b4d0 image_auto_layout update to use new UV coords, bugfix #5624 thenaks (fredz)
added some text to mesh_boneweight_copy
2007-01-09 00:36:42 +00:00
Campbell Barton
713f42dc3c Metaball - docs were wrong
Sound - needed t ohave the PyType as extern
3ds_export can now export derived objects (dupli's)
2007-01-07 15:33:28 +00:00
Campbell Barton
95a202322d made python 2.3 compat again. 2007-01-07 07:33:40 +00:00
Campbell Barton
0306a86d94 bugfix, would make bow-tie faces when skinning more then 2 loops.
big speedup to loop detection
added support for skinning open loops (could be improved, dosnt work that well when open loops have different vert counts)
speedup elsewhere with LC's
2007-01-05 16:41:04 +00:00
Campbell Barton
330efd46fa standard set of minor improvements, tho this is a good script and not much to change.
faster dict/list operations.
use layer flags ratehr then lists.
2007-01-05 03:49:54 +00:00
Tom Musgrove
85c2a0a9b7 = mdd import update =
changed menu location from animation menu to import menu
2007-01-05 01:45:54 +00:00
Tom Musgrove
aaf91787c2 = mdd export update =
changed menu location from animation menu to export menu
2007-01-05 01:42:19 +00:00
Tom Musgrove
e586ec7bcd ==dxf import script ==
script for DXF import by kitsu (Ed Blake) - provide superior import to our native DXF import for many files
2007-01-05 00:51:12 +00:00
Campbell Barton
d26d0e2889 Update to JMSs scripts fixed bug 5419.
Optimized 3ds_export.py
  newstyle classes and fixed an error where objects with no material would fail to export.
2007-01-04 20:44:33 +00:00
Campbell Barton
eb424ec18d 3ds_export now exports Texface UV images to 3ds's materials - supports material images as well
3ds_import - made it support image maps without a file chunk. unlikely but possible.
2007-01-04 15:20:28 +00:00
Campbell Barton
7cacb35845 toolbox.c - for the label in VarStruct use the tooltip for the text to get around the 15 char limit that only allowed you to fill about half of the available area on the clever numbuts panel,
the tip isnt used for a label anyway. added comments explaining whats going on. only effects clever numbuts internaly.

type fixes for weightpaint_envelope_assign.py
2007-01-04 11:43:13 +00:00
Campbell Barton
50edac630b removed blender2cal3d.py, this is the second time where nobody has been able to maintain this script to fix minor bugs, aparently the cal3d/soya guys maintain their own scripts anyhow.
Adding switchDirection() for curNurbs. simple function and double checked to make sure its ok.
2007-01-04 10:18:37 +00:00
Campbell Barton
6d5b24fcb8 bugfix for #5167 images are now exported from the material, (todo - texface) thanks to digiboy
Also found that the exported UV coords were scrambled, now fixed.
2007-01-04 05:59:23 +00:00
Campbell Barton
426cc6dca3 weightpaint_envelope_assign - was making an error checking a null vgroup
API_intro - changed URL from elysuin
others - added __copy__() docs.
2007-01-02 13:12:23 +00:00
Willian Padovani Germano
91b2bc5c23 Python API:
-Added missing access to Node win theme (thanks Mickaël Le-bihan for pointing) and also options group and group_active.
-Added Node space to Window.Types dict.
-Tiny update to the save theme script version numbers (keeping 2.42 for now to avoid popups, but should change to 2.43 right before release).

BTW: Happy New Year everyone :).
2006-12-30 18:28:49 +00:00
Campbell Barton
98f607e127 use new edge/face keys ittributes 2006-12-30 09:40:05 +00:00
Campbell Barton
5af67129f8 * theme save script now saves iconThemes and supports string types.
* added .iconTheme variable
* bugfix. drawType was not being saved because Py_BuildValue and __members__ was missing an "s"
* added Blender.Get('icondir')
2006-12-30 07:32:58 +00:00
Joseph Eagar
4763c3817b =IDProperties Python Test GUI Script update=
Another stupid little coding mistake, made switching
idblock types (like from object to scene) crash the
script.
2006-12-29 21:17:57 +00:00
Campbell Barton
60544bb7cc JMS's latest SVG importer with his compatibility fixes and optimizations.
http://blenderartists.org/forum/showthread.php?t=66207
2006-12-29 11:09:29 +00:00
Campbell Barton
9ca61ba44d Scene.c - deprecation warning for getScene
bvh_import.py - use old slow method of adding keyframes. setting IPO's was having problems.
2006-12-29 08:57:33 +00:00
Campbell Barton
37c42e2949 adding this script that takes 3 clicks to set the selected faces projections.
Will try to add visual guides to make this easier to understand before release.

http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Click_project_from_face
2006-12-29 00:25:56 +00:00
Campbell Barton
c95eda7a8b added a call to mesh calcNormals so smooth faces look right 2006-12-28 22:56:24 +00:00
Campbell Barton
2feea3dcc3 made scn.objects more flexible... you can now things like...
scn.objects.selected = [] # deselect all
scn.objects.selected = scn.objects # select all
scn.objects.context = [ob1, ob2...]

Added epydoc examples and updates importer scripts to use this de-select-all method.
2006-12-28 11:09:36 +00:00
Campbell Barton
de04849752 mesh skin was flipping the skin between 2 loops because of an error in AngleBetweenVecs python function that always returned 180d 2006-12-28 06:51:44 +00:00
Campbell Barton
ab06e52343 Mech cleanup use new edge_keys
continual script stuff, minor stuff..

fix for bad return in group.
Added back group.objects.append/remove but print deprectaed warning. also some epydoc changes.
2006-12-28 05:00:35 +00:00
Campbell Barton
7b93fff204 Added a function to BPyMesh - getFaceLoopEdges(faces, seams=[])
returns all face loops as a list of their edge keys

Used this in uvcalc_follow_active_coords to speed it from 5.53sec to 0.098 on a 1000 face mesh.
2006-12-27 15:21:34 +00:00
Campbell Barton
84f60b19c8 weightpaint_clean, option to clean all vgroups
weightpaint_envelope_assign - can update active vgroup only
weightpaint_normalize - fixups
BKE_plugin_types - made the max length 32 ratehr then 16 so you can fill the text space in pupBlock
2006-12-27 09:31:28 +00:00
Campbell Barton
470f91b506 object_cookie_cutter - use edge keys
widgetwizard - made a mistake in last commit, works and also dosnt creash with bug.
https://projects.blender.org/tracker/index.php?func=detail&aid=5289&group_id=9&atid=125
Can others test so we can close?

Object_join was messing up object usercounts
2006-12-26 01:45:58 +00:00
Campbell Barton
8f010d2a58 mesh_skin updated to use ed.key, other minor cleanups.
updated the url in other scripts
2006-12-25 23:14:48 +00:00
Campbell Barton
604defd8f2 somehow pasted some text by mistake that raised an error. 2006-12-25 10:53:00 +00:00
Campbell Barton
859b7f207e modified scripts from using older/depricated Python API commands, deprecated scn.getChildren() in the docs. 2006-12-25 09:17:23 +00:00
Campbell Barton
7816c3ca07 adding this script that makes surrounding quads follow the mapping of the active face.
Added a new mode that generaly gives better results. "Loop Average" -
It gives good results for mapping roads that are more then just 1 quad wide.
Thanks LucidMonkey for pointing this out.

See the bottom of these docs.
http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Follow_active_quads
2006-12-23 10:42:34 +00:00
Campbell Barton
ea837b25e3 Added Draw.BeginAlign(), Draw.EndAlign()
added align to a few scripts where it looks nice.
2006-12-23 00:56:40 +00:00
Campbell Barton
9197b25490 removed typo from Render
added extFromFormat to BPyRender to get the extension for a format
2006-12-22 07:07:20 +00:00
Campbell Barton
60ebff78ab rewrote this script, it was the most out of date script and had some errors that are solved in the new script.
- moved to the weightpaint menu
- Use a group for envelope objects, no special names.
- Can use non mesh data for envalopes (anything that can be converted into a mesh - metaballs, text, surface)
- Dosnt rely on applying loc/size/rot for it to work properly
- Uses a good point-inside-mesh method (optimized with mesh and face bounding checks)
- uses Mesh instead of NMesh

todo, only update active vgroup
2006-12-22 00:19:45 +00:00
Campbell Barton
b3eb2d19a9 fix for bevel center as pointed out of the forums 2006-12-21 22:13:14 +00:00
Campbell Barton
0325ee8f22 boxpack2d - python 2.3 compat fix, thanks brecht
gen_utils - needed to include BKE_library.h
off_import - use ed.key
2006-12-21 21:56:11 +00:00
Campbell Barton
04fc326371 Updated to use face.edge_keys,
fixed problem with merging islands not detecting an island in an island (wrong offset)
better island merging from user input
2006-12-21 04:20:07 +00:00
Joseph Eagar
6acadfe982 =IDProperties Python Test GUI Script update=
Stupid typo in script, you couldn't go into
a subgroup if it was the first property in 
the list.

Also, name collision code needed a little work.
This could result in overwriting properties
with the New button, which should instead
work as the rest of blender and add .XXX
to the name.
2006-12-17 01:08:47 +00:00
Joseph Eagar
36bfa35b9e =IDProperties Python update=
Added a test gui script for ID Properties.  To use,
just select ID Property Browser from the help menu.
You can browse, create and edit ID Properties
for several library block types.  Should be
fairly straightforward to use.

This is a test gui script; once an actual ID property
gui is implemented in blender it will be removed.  It
is *not* going to be in the release, obviously, so once
the real gui is implemented this script will be removed.
Also, this being a testing non-release script it seems to me
to be okay to add it without all the proper review stuff.  If
not, I can remove it.

I believe a test script is really, really needed to properly
test/review id properties, so I feel this is worth it.
2006-12-17 00:51:07 +00:00
Campbell Barton
08e3f8b1da Use ed.key and face.edge_keys to build connectivity data faster. 2006-12-17 00:08:05 +00:00
Campbell Barton
711a1f8686 made editmode select grouped work with mixed selections - can show select grouped items for vert/edges/faces all at once.
bad comment in Axiscopy and spelling fix in export_obj
2006-12-16 10:39:08 +00:00
Campbell Barton
827cce172c update to Axiscopy, more error checking. basic functionality the same.
- Dont allow it to apply the matrix twice to a linked-dupe. (Same as Apply Loc/Size/Rot)
- Make sure that the source object is active, not just the first selected object.
- Use Mesh instead of NMesh.
- use mesh.transform(mat) rather then vert by vert vec*mat

Other scripts had pupBlock changes for better layout.
2006-12-15 22:14:33 +00:00
Campbell Barton
0369f08299 made the hax height of the clever_numbers 8 rather then 5, was wrapping on too many scripts.
bvh import was having errors on joints with no animation.
typo in uvcopy from my previous commit.
2006-12-15 20:22:59 +00:00
Campbell Barton
65d5b47a10 removing uvcalc_from_adjacent for review on Sunday's meeting.
image_dump2path is a stopgap util. We need to look into making Pack/Unpack use filenames, not IDnames. or have some other datamanagement utility.
2006-12-15 09:25:57 +00:00
Campbell Barton
e4340d1b58 Shift flips the current axis your draging.
uv's and mocified vertex coords are now in a big list rather then stored be faces, should be faster
2006-12-15 04:49:06 +00:00
Campbell Barton
0254065f3b Updated, optimizations and cleanup.
* accurate mouse to mapping using ray intersect,
* right clicking cancels and returns original coords

Doc is here
http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Click_project_from_face
2006-12-15 04:14:09 +00:00
Campbell Barton
f631c2d49e new Uv-Calculation tool,
Click project, a nifty 3 click way to use a face to set a projection aurientation and then 2 more clicks for the U and V scales
with realtime updating as you move the mouse
should be faster then using view project all the time because you dont have to line the view up with the faces.
2006-12-14 19:36:37 +00:00
Campbell Barton
b995593eee faster sorting syntax in python, try/except for py 2.3 backwards compat
ls.sort(key = lambda v: v.foo)
rather then
  ls.sort(lambda a,b: cmp(a.foo, b.foo))
2006-12-14 14:53:32 +00:00
Campbell Barton
3a739d9bd2 fixed mouseViewRay in BPyWindow, was not applying the objects matrix to the mouse direction correctly.
VCol and Weight gradient work again.
2006-12-14 09:56:56 +00:00
Campbell Barton
c5fba51131 object_apply_def - use new BPy Object API funcs, no error in localview
off_export - minor changes
uv_archimap - cleanup. slightly slower but less duplicate code
uv_from_adjacent - nothing

BPY_menus - renamed py slot UvCalculation to UVCalculation to be consistant
2006-12-14 03:43:02 +00:00
Campbell Barton
824f391c75 mesh_edges2curves - edge key optimize and made use of scn.objects rather then Object.New()..
Object.py - passIndex mistake
2006-12-12 21:38:04 +00:00
Campbell Barton
09e4fa8f6a simple change, made
Changed...
  me = NMesh.GetRaw(ob.data.name)
To
  me = NMesh.GetRaw(ob.getData(name_only=1))

The line above converts the entire mesh to a python thick wrapper just to get its name, then only to that that same mesh again??
A lot of older scripts did this but theres no reason to do it.

in most (all?) cases..
  me = ob.data - should be ok, but theres a subtle difference and I dont want to break anything.

xfig_export, xsi_export and videoscape_export need error checking too.
2006-12-12 10:38:43 +00:00
Campbell Barton
848d3ae617 popup error if the active objects datatype cant have keys as well as other cases where it would quit,
use Mesh rather then NMesh to get the keyblock, enable restrictRender for driver objects.
2006-12-12 08:05:08 +00:00
Campbell Barton
6959e689be added many checks to uvcopy so it dosnt raise errors.
Minor changes to radiosity_export, updated to work with the new API (vertexColors MTFace)
obdatacopier - was getting the selection but not using it. made it ignore some read only properties.
BPyMesh - minor change: use face iterator rather then making a tuple()
2006-12-12 07:28:20 +00:00
Campbell Barton
8063417de5 bevel_center.py - avoid 2 python errors. (doing recursive before bevel, now UI prevents this)
console.py - if the scriptdir didnt exist it would do an error, now just ignore and dont try to do the console_autoexec.py stuff
doc_browser.py - If you typed in an invalid module it would give an error and exit, now have a message instead.
2006-12-12 05:29:42 +00:00
Campbell Barton
e22feb7d6e made the script work with no images, redraw when done and some optimizations. 2006-12-12 04:34:35 +00:00
Campbell Barton
97b6a65c74 Added a new Python slot "UvCalculate", moved Archimap and "UVs from adjacent" into it.
Removed 1/2 1/4 1/8 uv mapping options.
made re-evaluating the py-scripts dir use the wait cursor (could take a while at times)
2006-12-12 04:18:45 +00:00
Campbell Barton
5841ba740a dont remove dummy 0 index verts to workaround me.verts.delete([...]) being buggy (since tface > mtface conversion) 2006-12-11 23:03:14 +00:00
Campbell Barton
9c3cacd283 added the flag group_exclusive to material
added restrictDraw/Select/Render to objects in python
updated group and scene docs for last commit
made 3ds import use new scn.objects rather then Object.New() - (removed import as instance for now)
fixes off import error from this report http://blenderartists.org/forum/showthread.php?t=84182
2006-12-11 08:57:39 +00:00
Campbell Barton
d9c68666f3 Adding a function that gets a list of polylines from a curve object
curve2vecs(ob, WORLDSPACE= True):
'''
Takes a curve object and returns a list of vec lists (polylines)
one list per curve

This is usefull as a way to get a polyline per curve
so as not to have to deal with the spline types directly
'''
2006-12-07 15:22:55 +00:00
Campbell Barton
93e920aea9 UV islands are now detected by edge connection (was using verts) - added support for seams to delimit UV islands. 2006-12-02 09:44:40 +00:00
Campbell Barton
4b982acf17 Made work with new vertex colors 2006-11-30 21:32:32 +00:00
Campbell Barton
0d5a152094 request from malefico - select faces based on there weight in the active group.
Access from the face select menu
2006-11-28 21:26:00 +00:00
Campbell Barton
a314527e20 when importing am OBJ referencing an unknown image (PSD in linux for eg) - it creates a dummy image.
checking the .depth of this dummy image raised an error. now a check for has_data is done.
2006-11-27 23:59:53 +00:00
Joseph Eagar
7101e76d9c =md2_export.py small fix=
There was an integer division error in md2_export.py,
where values were getting clamped to either 0 or 1.
Fixed it by putting the appropriate vars in float().

Reported by deltab on IRC.
2006-11-27 01:05:44 +00:00
Campbell Barton
703647d08b previous commit to fix this script with VCols didnt work, should be ok now. 2006-11-26 23:47:53 +00:00
Campbell Barton
b36bafe524 removing image bake scripts to make room for Ton's built in baking stuff. 2006-11-26 19:08:19 +00:00
Campbell Barton
d2c482115e minor change so other scripts can call image_edit.edit_extern(img) to edit an image in the gimp, photoshop etc. 2006-11-26 18:40:04 +00:00
Ed Halley
8292e4ac1a Was crashing the import_obj script when using Python 2.3.
Python 2.4+ supports large list processing with generators, but
Python 2.3 will break if you use that syntax.  Until we depend on
the newer versions, I have commented out the generator syntax and
only use the list-comprehension type instead.
2006-11-25 17:34:57 +00:00
Campbell Barton
909cb06dfe modified to support new vcol operation (separate from tface)
updated name and tooltip
minor fixes
2006-11-24 07:35:53 +00:00
Ken Hughes
7b9fac49f5 Bugfix #5289: "Shape Wizard Widget" script was using non-existant key:
changed so "Key 0" is substituted for "Basis".  This may not be correct...
Also, fix to make ob.setEuler() accept a tuple again.
2006-11-23 00:28:09 +00:00
Chris Want
27c42ee062 A fix for an indentation error, and better handling of faces with
images when materials are defined for the face (i.e., only use
the image as a texture in this case if 'Texface' is selected
for the material).
2006-11-17 16:11:03 +00:00
Campbell Barton
a84f60a3bd fixed error that was caused by 2 vertex loops center being 0.0 distance apart, also made the python 2.3 syntax default. 2006-11-15 21:12:53 +00:00
Martin Poirier
51fa185ec5 == Script: UV Export ==
* SVG export support (thanks to Jarod's patch in the tracker)
* Faster tga export (from Jarod's patch too)
* Fixes from the review thread and the wiki:
** No longer adds the extension (tga or svg) if already there
** Adds the object name in between the filename and extension (and not after the extension if it was already present)
** Renamed options here and there.
2006-11-14 00:56:46 +00:00
Campbell Barton
26ef99157e made mesh.getFromObject() accept a python object as well as the object name.
accepting the name only was causing big problems when exporting library data, because duplicate names are possible the wrong data was exporting.
2006-11-13 17:37:01 +00:00
Chris Want
05c59da48f Fix for bug #4922
The VRML97 exporter was rounding a lot of stuff to three decimal points.
This is silly, since the spec says single-precision floats are used for
most things, which gives about 7 decimal points precision.
2006-11-11 19:12:43 +00:00
Campbell Barton
daec99c470 new image names were being created with 2 ..'s
added a function to BPyMesh.py to get faces in linked groups (like split by loose parts) - but returns lists of faces only.
2006-11-10 02:23:30 +00:00
Campbell Barton
2dcf23c327 added Jiri as a contributer to the obj importer
Added a new script - 'Dump All Images to Path'

This script copies all the images used by 1 blend to a spesified path and references the new images from Blender
Usefull for moving projects between computers or when you reference many images. naming collisions and multiple images using the same image path are delt with properly only creating new image names when needed.

Blender images will reference the newly copied files - So be mindfull when you save your blend after running the script.

Notes, images with the path "Untitled will be ignored"

Image path collisions are managed by enumerating the path names so images will never be overwritten at the target path.
2006-11-03 20:04:56 +00:00
Campbell Barton
5ee546f053 added batch import back in - Hold shift as you click import 2006-11-02 17:42:30 +00:00
Campbell Barton
0dbac3ab69 attempt to make zero area faces result in NAN or INF loc verts happen less. 2006-11-02 00:13:38 +00:00
Campbell Barton
55d1618990 check for devide by zero error 2006-10-30 16:01:38 +00:00
Campbell Barton
8177125b0f An arg was left in that should have been removed, raised an error for reflect MTL files. 2006-10-29 19:56:52 +00:00
Campbell Barton
9b7125fafc added the option to rename objects to their DupGroups name. 2006-10-25 01:32:46 +00:00
Campbell Barton
23eb8b7a1f added the option to poly reduce all visible selected objects 2006-10-21 19:38:42 +00:00
Campbell Barton
a43bfad9e5 removed this script since Briggs ported it to C 2006-10-20 00:17:34 +00:00
Campbell Barton
1730b7b41d Fix from Bob Holcomb, some materials could be floating point value, I have only had this from Cararra generated 3ds files. 2006-10-19 21:56:11 +00:00
Campbell Barton
7a88ffd922 fix for [ #5093 ] OBJ importer gives errors on usage
extending a list was using a python 2.4 compatible syntax but failed with 2.3
2006-10-13 05:48:50 +00:00
Campbell Barton
de3c54569d BPyRender sets renderlayers right now
Object groups were get/set without user counts changeing.
2006-10-11 10:33:34 +00:00
Campbell Barton
27dc45ba24 BPyRender.imageFromObjectsOrtho's now sets all layers visible,
an error in Scene.c - scn.Layers disallowd all layer bits to be set.

made image_billboard.py rotate all images to be verticle for more efficient packing, added the option not to pack resulting images into 1.
2006-10-09 04:29:24 +00:00