Commit Graph

617 Commits

Author SHA1 Message Date
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