Commit Graph

1131 Commits

Author SHA1 Message Date
Campbell Barton
96c5f36eff OBJ import support for nurbs curves
Imports nurbs with orderU and endpointU (inferred from weights).

No support for vert-weights, surfaces, 2D curves or non-bspline's yet.

fix for exporting closed nurbs, was overlapping too much of the curve.
2009-06-12 04:16:12 +00:00
Campbell Barton
8225caa9fb update from Aaron Keith, fixes normal flipping 2009-06-11 10:46:13 +00:00
Campbell Barton
8347a9f21b Option to export curves as OBJ native curves (rather then a bunch of edges)
- nurbs and polyline (not bezier)
- closed / open curves
- OrderU works as expected
- Endpoint U works too.
2009-06-10 19:14:05 +00:00
Campbell Barton
8adb155e98 Built in limitations for script scanning was making python fail on meta-androcto script pack.
If a total of 30 subdirs was hit, or 4 dirs deep was hit - script scanning would quit, skipping files in the root scripts path too.

To work around this the script pack included some of blenders scripts twice just so they would get into the menu but this is a dodgy workaround.

* dont stop scanning for scripts when limits are reached (just dont scan further).
* global 30 dir limit per scan is silly - removed.
* limit recursive depth is kept but keep scanning at lower depths.
* bumped recursive limit from 4 to 6

* flt_properties.py had #!BPY without a menu header.
2009-06-09 18:21:48 +00:00
Campbell Barton
e4b427bb59 [#18847] Material.c Python API calls
Adds access to...
- Anisotropy
- Mirr Threshold
- Trans Threshold

Breaks rule of no additions but python data access is quite safe, vray exporter needed these attributes.

[#18891] BGE Convert script Python 2.5 compatible
2009-06-09 12:18:20 +00:00
Remigiusz Fiedler
983ffa63d7 DXF-Exporter script update
v1.34 - 2009.06.08
- export Lamps and Cameras as POINTs
- export passepartout for perspective projection
- added option for export objects only from visible layers
2009-06-08 01:29:58 +00:00
Remigiusz Fiedler
0940a28b07 DXF-Exporter script update
v1.34 - 2009.06.07 by migius
- cleaning code for release
- fix nasty bug in getExtrusion()
- support text-objects, also in ortho/persp-projection
- support XYmirrored 2d-curves to 2dPOLYLINEs
2009-06-07 14:57:50 +00:00
Remigiusz Fiedler
8ed66c5691 DXF exporter: dxfLibrary.py update
v1.32 - 2009.06.06
 - modif Style class: changed defaults to widthFactor=1.0, obliqueAngle=0.0
 - modif Text class: alignment parameter reactivated
2009-06-06 13:24:06 +00:00
Remigiusz Fiedler
bcbe2fbb9d DXF exporter: library
v1.32 - 2009.06.06
 - modif Text class: alignment parameter reactivated
2009-06-06 10:33:10 +00:00
Remigiusz Fiedler
3cb4547b80 bugfix and updates for DXF-Importer/Exporter scripts
DXF-Library log:
v1.31 - 2009.06.02 by migius
 - modif _Entity class: added paperspace,elevation
v1.30 - 2009.05.28 by migius
 - bugfix 3dPOLYLINE/POLYFACE: VERTEX needs x,y,z coordinates, index starts with 1 not 0

DXF-Importer: minor changes

DXF-Exporter log:
v1.34 - 2009.06.02 by migius
- support XYmirrored 2d-curves to POLYLINEs: works correct only for rotX,rotY==0.0
- support thickness and elevation for curve-objects
- fix extrusion 210-code (3d orientation vector)
- fix POLYFACE export, synchronized with dxfLibrary.py
- changed to the new 2.49 method Vector.cross()
- output style manager (first try)
v1.33 - 2009.05.25 by migius
- bugfix flipping normals in mirrored mesh-objects
- added UI-Button for future Shadow Generator
- support curve objects in projection-2d mode
- UI stuff: camera selector/manager
2009-06-04 19:49:19 +00:00
Campbell Barton
cf6ed23578 BGE small fixes
- script template use new property syntax
- Python could set the axis/hat to a negative index and crash blender (nobody complained)
- Servo control UI had overlapping text
2009-06-04 07:42:03 +00:00
Campbell Barton
903722299d BGE PyAPI fixes
- CValue warning ShowDeprecationWarning("val = ob.attr", "val = ob['attr']"); had false positives because of python using getattr() internally. Only show the wanring now when a CValue is found.
- Py functions that accepted a vector and a GameObject were slowed down by PySequence_Check() first called on the GameObject, though this would fail it would try and get attributes from the game object - ending up in ~8 attribute lookups each time. Avoiding PySequence_Check() makes ob.getDistanceTo(otherOb) over twice as fast.

- Joystick hat events could crash the BGE for joysticks with more then 4 hats.
- PLY Import failed on PLY files from Carve, added some extra types.
2009-06-03 04:12:59 +00:00
Remigiusz Fiedler
9c158175ab bugfix and update DXF-Exporter scripts
please get it in 2.49 release
2009-05-29 06:50:31 +00:00
Remigiusz Fiedler
4026e6341e bugfix: added import Curve module 2009-05-28 20:28:52 +00:00
Remigiusz Fiedler
059b4bf8fc DXF-importer second update: v1.12 - 2009.05.26 by migius
- changed to the new 2.49 method Vector.cross()
2009-05-27 13:32:09 +00:00
Remigiusz Fiedler
00ff608991 DXF-importer update: v1.12 - 2009.05.26 by migius
- bugfix WORLDY(1,1,0) to (0,1,0)
2009-05-27 11:57:39 +00:00
Campbell Barton
7ba91ddcc3 BGE Script template for a python module (set EOL to native this time)
BGE PyAPI use defines for error return values
 - del gameOb['var'] error message was wrong.
2009-05-26 07:41:34 +00:00
Campbell Barton
ca8497d001 * UI tweaks to python controller (more space for module name), setParent actuator use less space
* object_drop.py - option to orient to face normal (useful for scattering objects over terrain), accounts for normal flipping and can adjust the orientation %.
2009-05-25 11:39:09 +00:00
Campbell Barton
48abe5a66e utility script for cleaning ipos animation curves,
used in YoFrankie to reduce file size for large actions
2009-05-25 00:30:06 +00:00
Dalai Felinto
45f2463c83 Patch #18815: BGE: More updates to deprecation documentation and 2.49 conversion script by Alex Frases(z0r)
- Fixed some deprecation warnings in documentation.
 - Added more conversions to script.
 - Added more attributes to script todo list.
 - Print out name of text buffer when encountering an error in batch mode.
 - Refactor: Simplified attribute map.
 - Added notImplemented function to print warnings for missing conversions. References documentation.
2009-05-24 04:45:10 +00:00
Campbell Barton
cfa2b4f0a5 [#18802] BGE conversion script: more attributes; updated GameTypes.py
Patch from Alex Fraser (z0r)

 - All attributes in the conversion map have been checked against the docs. More ambiguities have been resolved.
 - Added option to convert all text buffers in Blender.
 - Updated GameTypes.py: there were inconsistencies.

The script works well (causes no errors) with 0_FPS_Template.blend and vehicle_demo.blend from the
physics-2.43-physics-testfiles pack.

Caveats:
 - Conversions were checked against other deprecated attributes. I may have missed some cases where a deprecated attribute
has the same name as a non-deprecated attribute. I did catch a few though.
 - As with the last version, the conversion is purely text-based and doesn't compile the code. It's easy to create a
script that would break on conversion.

Still, it should get you 90% of the way to a converted script.
2009-05-23 03:19:47 +00:00
Campbell Barton
794826feae Update to the bolt/nut script, I also replaced some loops with list-comprehension and use mesh.transform(matrix) rather then transforming every vert in a loop.
V2.00 22/05/09 by Aaron Keith

- Better error checking.
- Lock Nut and Hex Nut meshes added.
- Pre-sets for common metric bolts and nuts.
- Improved GUI.
- Meshes scaled to a smaller size
- Fixed bug when using crest and root percent other than 10%
- Can now create meshes in Edit Mode.  This will add to the 
  current mesh and align with the current view.
2009-05-22 12:31:27 +00:00
Campbell Barton
612f3b3266 Removed use of CrossVecs, DotVecs, CrossQuats and DotQuats
for all scripts except import_dxf and colladaImEx/translator.py
2009-05-22 03:45:46 +00:00
Remigiusz Fiedler
d54126f78e rvk1_torvk2.py patch committed by jean-michel soler (jms)
[#18765] Update of the rvk1_torvk2.py bundled script:
The script has been modified to use the last management of the modifiers in the python api and corrected too. Now it
can copy the mesh object when it is alone and also a shape keys to the second one if needed.
2009-05-21 17:54:45 +00:00
Campbell Barton
3daa8bd4ef fix for [#18772] c3d_import script crashes
Patch from Roger Wickes update to 2.48 sFrame, eFrame, fps.


[#18794] GE API conversion script: 2.48 -> 2.49
patch from Alex Fraser (z0r), will test further in the next few days.
 --- 
This is text plug in and standalone script that updates Blender 2.48 Game Engine scripts to be compatible with the 2.49
API.

The script contains a mapping of attribute names to functions that do the conversion. Most of the mappings were extracted
from the documentation in GameTypes.py. Where the conversion is ambiguous, the script will not change the source except
to insert a warning as a comment. This means that the script does not completely automate the conversion process, but
will do a lot of the work.

The script still needs a fair bit of testing. Many of the mappings have not been tested and could result in broken scripts.
I'm submitting this patch now to start the review process early. I think I might need help if it is to be included in
2.49.
2009-05-20 23:31:58 +00:00
Campbell Barton
fc9f893306 remove module that was never used. 2009-05-20 03:30:50 +00:00
Campbell Barton
bd7b92bfb5 Need to export the mesh-object into the bind-pose otherwise Maya complains the FBX has errors. 2009-05-18 04:33:33 +00:00
Campbell Barton
5a16f0b60c Bugfix for FBX export for animations
in 2.48 constant interpolations meant that wasnt a problem but since it now uses linear interp. you can notice errors with animated characters because the 2 eulers are not compatible.

Added optional euler_compat argument to matrix.toEuler(eul) and quat.toEuler(eul) so when getting the euler rotations from a list of matrices the animation curve will be continues.
Also added euler.makeCompatible(euler).

- warning silenced for imagepaint.c
2009-05-18 04:11:54 +00:00
Ken Hughes
83006e51f8 Scripts
-------
Fix some typos in script tooltips and descriptions-- no code changes.
2009-05-15 21:27:13 +00:00
Campbell Barton
240aa6d34d * More updates to game engine type docs from Roelf de Kock
* FBX Bugfix, was exporting all animation curves as 'Constant' type (no docs for this so could only guess), Thanks to Sander Brandenburg for spotting this problem.
Also improved keyframe removal to work on animation curves an angle
2009-05-13 22:52:31 +00:00
Campbell Barton
c19baf85cc [#18694] Added support for Wavefront OBJ groups for both the import and export scripts
from Paolo Ciccone (pciccone) 

Im not that keen on this functionality since vertex groups in blender are for weight painting and OBJ's groups are more like sub-objects, The conversion between these is a poor approximation (one vertex group per face).
But this is still useful for using blender with poser so accepting these 2 patches.

Made some changes from the patch
*Export*
- vgroup off by default, since this is mainly useful for corner cases
- findVertexGroupName() - changed how exporting selects a vertex group for a face, use the highest combind weight for each group instead of  the number of checking how many times the verts are in a group because they could have a zero weight.
- findVertexGroupName() - would fail if a faces verts were not in any groups, now return a (null) group
- Allow modifiers to export with vgroups

*Import*
- disable by default
- ignore (null) groups
- fixed a problem where the patch broke SPLIT_GROUPS
- move the group definition out of global namespace, breaks importing as a module.

--- Patch submission info
The import/export scripts included with Blender 2.48 don't save/preserve groups defined in OBJ file. This presents a
couple of issues: users loading an obj file with groups are not able to use a rather important set of data. When the
file is then saved the groups are lost bringing up both the issue of data loss and loss of functionality as groups are
used for rigging and morph target creation for Poser/DAZ Studio and all compatible applications. Of course other
animation/modeling packages that use OBJ files might be affected.

The solution that I present here simply patches the excellent python scripts written by Campbell Barton and Jiri Hnidek.
The new code implements the preservation of groups by creating Blender vertex groups during import and by re-writing
those groups in the OBJ file during export. Of course group ownership is idetermined at the face/polygon level and not
at the vertex level.

This rather simple solution makes Blender instantly one of the better tools to create Poser Morph targets (Full Body
Morphs) and conforming figures and clothing.  Of course it's also adding a more complete support for the whole OBJ spec.

The patches are fitting well inside the established logic, have a minimal impact and are totally transparent to the
user. See the attached video (about 7 minutes long) for more details.

I noticed that the original scripts are formatted with tabs. I think it would be a good idea to follow the standard
Python recommendation and convert the scripts to use spaces. I didn't want to do it on my side as it would generate
a patch that replaces the whole file, not something that I wanted to do with my first submission :) But it would help
if people with access to SVN could do it.

Here is a short video that demonstrates the updates:
http://www.paolociccone.com/blender_obj_scripts.html

Cheers!
----
2009-05-13 00:20:14 +00:00
Campbell Barton
7002faac31 Another Noise Tool svn commit is complaining about mixed line endings so after 16 attempts I wont include the full message 2009-05-11 12:38:24 +00:00
Campbell Barton
0a17250dca going out on a limb and removing this without asking anyone.
nobody seriously uses this format for graphics these days, and if they did, the export from blender is unlikely be to be useful, its just different views of the mesh edges projected into a 2D xfig file (quantized to int's too).
2009-05-11 05:47:14 +00:00
Campbell Barton
a220ae2f60 2D Cutout Image Importer
from Kevin Morgan (forTe)

imports images as quads in the 3D view

made some changes
- images that fail to import give an error popup rather then a script error
- extension input is only shown for batch directory importing
- extension comparison is now case insensitive
- importing images from "/" failed, (bug in Blender.sys.dirname), use os.path.dirname since os is needed for batch import in other places.
- disable Esc for quitting because escaping from the file selector would quit the script too.
2009-05-11 05:35:32 +00:00
Campbell Barton
dcee43b449 bolt wizard from Aaron Keith (Spudmn), edits from Brendon and myself.
Minor changes are...
- default size is smaller then it was but still too big IMHO, presets are huge.
- deselect all objects and make the new bolt active
- place the new bolt at the 3D cursor location
2009-05-11 05:10:09 +00:00
Campbell Barton
1a8bbba7bd new script to copy the active object to all other selected objects transformation.
When turning many assets into DupliGroups there was no way to do this other then manually copying the loc/size/rot for each object manually.
2009-05-11 00:56:48 +00:00
Campbell Barton
da3bdefb7a update script templates for new BGE api attributes 2009-05-11 00:19:55 +00:00
Campbell Barton
cdba1ddd5d BGE Python owned proxies had a problem being decref'd twice, this would crash on freeing KX_Vertex/Poly Proxy types when python was compiled with debug options enabled.
add_mesh_torus.py wasnt tested from update, will go through all edited scripts and test :\
2009-05-07 22:06:27 +00:00
Campbell Barton
3d60c4e746 [#18702] FBX exported hemi light crashes maya
- bugfix, off by 1 when clamping lamp types, caused blender to write an invalid lamp type
- error in last commit (renamed function)
2009-05-06 21:47:24 +00:00
Campbell Barton
899c669557 [#18328] FBX exporter not exporting multi-texture materials properly
even though the format allows materials and textures to be written separately the textures wont load right in maya or 3dsmax unless each texture has its own material.
2009-05-06 06:01:09 +00:00
Campbell Barton
de4f811b4b - Export hard edge and face info
- Use Edges field rather then 2 vert faces (worked in some apps but crashed maya)
2009-05-06 04:24:01 +00:00
Remigiusz Fiedler
7a0841cbb6 dxfLibrary.py - modif in POLYLINE class 2009-05-06 02:19:16 +00:00
Campbell Barton
4bc6749403 [#18695] Replace python errors with useful messages when no full python installation is found
from Philipp Oeser (lichtwerk)
2009-05-05 21:51:54 +00:00
Campbell Barton
2bce9ff1d1 DXF export with a single nurbs curve failed 2009-05-05 21:47:58 +00:00
Campbell Barton
e29e329885 [#18650] fbx export assigning textures to wrong materials...
also fixed an error that made this script fail when python wasnt found.
2009-05-04 21:49:25 +00:00
Ken Hughes
40fa6b0f37 Fix some spelling errors. 2009-05-04 16:03:54 +00:00
Campbell Barton
3226b33e48 python geometry function Geometry.BezierInterp(vec_knot_1, vec_handle_1, vec_handle_2, vec_knot_2, resolution)
can use 2D-4D vectors

Also made 3ds import give a message when no python installed
2009-05-04 13:01:18 +00:00
Campbell Barton
22b501c791 fixes for bugs submitted by BGE users, fixes by myself and Mitchell Stokes
- when the attribute check function failed it didnt set an error raising a SystemError instead
- Rasterizer.getMaterialMode would never return KX_BLENDER_MULTITEX_MATERIAL
- PropertySensor value attribute checking function was always returning a fail.
- Vertex Self Shadow python script didnt update for meshes with modifiers.
2009-05-03 09:21:58 +00:00
Campbell Barton
3bc02088e8 remove uneeded checks and testMethod from KX_ConstraintWrapper, typo in import_obj 2009-04-29 10:24:12 +00:00
Campbell Barton
dd21e9b626 patch from michael williamson, export multiple UV layers to lightwave
[#18575] remove unused local variables
2009-04-25 17:52:04 +00:00
Campbell Barton
113b438dce [#18611] console.py linewrap
from Jim Hi8ll (jthill)
2009-04-25 17:41:17 +00:00
Remigiusz Fiedler
b4abca0daa patch for paths_svg2obj.py by author J.M.Soler:
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_import_svg_en.htm
This patch adds support for Patterns.
2009-04-23 23:44:43 +00:00
Campbell Barton
0d347e12ea [#11172] md2 export bug(s)
export with object transformations applied.
2009-04-23 11:59:13 +00:00
Campbell Barton
95038048a2 [#18577] LightWave (.lwo) Exporter Object Names are Incorrect
patch from Philip Alldredge (cilcoder), slightly modified
2009-04-22 09:08:57 +00:00
Campbell Barton
34a617e308 [#7789] 3DS Import , Mesh not correct since Blender 2.44
There is a problem importing 3ds files where I cant find a way to check if the transforms are applied to the vertex locations or not.
Since 2.44 I made the importer assume they were not since you can manually remove transformations, but not reverse.

Nevertheless most 3ds files have the matrix applied, better not give a bad import by default.
Did some research and other 3ds importers (lib3ds for eg), have the same problem and just assume the transformations applied.

3dsMax imports both correctly so there must be a way to tell but I could not link it to the 3ds version or other mesh options.
Added an option to workaround this problem in rare cases where its needed.

- KX_GameObject.cpp & KX_Scene.cpp, clear the dict before removing the reference in case there is a circular reference.
2009-04-15 07:00:11 +00:00
Remigiusz Fiedler
4fe917ba26 update for DXF-Importer v1.12, DXF-Exporter v1.29 - 2009.04.11 by migius
- added DWG support, adapted Stani Michiels idea for binding an extern DXF-DWG-converter

The external DXF-DWG converter "dconvertcon.exe" 355kb comes from openDesignAlliance www.opendwg.org, is free, but not opensource, not GPL-compatible (can not be bundled with commercial programs), so must be downloaded and installed in Blender script folder by user. It is a DOS console application, can be started in background mode, works on Windows, and in Wine on Linux and OSX. Version 1.0 (2002) supports conversion between DXF<->DWG for autocad release: 2.5, 2.6, 9, 10, 11, 12, 13, 14, 2000, 2002.
2009-04-15 01:37:50 +00:00
Remigiusz Fiedler
a277b979f2 v1.29 - 2008.12.28 by Yorik van Havre
- modif POLYLINE to support bulge segments
2009-04-14 23:57:14 +00:00
Campbell Barton
d91d64d807 [#18329] VRML import on indexedfaceset munges some colors (off by one)
Thanks to Ezra Peisach for including a patch in the report.
2009-04-13 06:50:02 +00:00
Campbell Barton
a412ce0702 strip indentation from lines of OBJ files.
OBJ's from VMD's molecular visualization program had this.
2009-04-10 14:33:52 +00:00
Campbell Barton
4ff661c989 X3D Import was broken because some arguments from VRML were missing. 2009-04-10 14:09:44 +00:00
Guillermo S. Romero
afb2670246 Emacs has some rules about where and how to look for settings. 2009-04-07 17:17:47 +00:00
Campbell Barton
c054ea0203 [#18407] Trouble w/ Bevel_Center.py
add python encoding info
2009-04-07 10:16:26 +00:00
Campbell Barton
2178fcea6e Script written for apricot, poly reduces based on known topologies, keeping edge loops unlike edge collapsing poly reduction.
Example
http://www.graphicall.org/ftp/ideasman42/unsubsurf.gif
2009-04-02 11:30:27 +00:00
Campbell Barton
1e2f736d3a [#18479] 'Consolidate into one image' does not calculate/use 'pixel margin'
Thanks to Dusan Stevanovic for pointing out the fix.

Also noticed alpha wasn't being rendered, enabled texface alpha.
2009-04-01 07:13:55 +00:00
Campbell Barton
d1dd9fd9f0 [#18478] Unwrap (smart projections) should accept values grater than 0.25 for island margin (it works just fine when changed in original script)
increased value as suggested.
2009-04-01 02:02:26 +00:00
Guillermo S. Romero
441f26a170 Clean up for the imminent migration from SVN to GIT. 2009-03-31 22:34:34 +00:00
Remigiusz Fiedler
e0b629fe71 update v1.12 - 2009.03.14 by migius
d3 removed all set()functions (problem with osx/python<2.4 reported by Blinkozo)
 d3 code-cleaning
 d2 temp patch for noname BLOCKS (*X,*U,*D)
2009-03-13 23:35:15 +00:00
Campbell Barton
4a089890df [#18388] PLY Import fails if line ending is not \n
bugfix, read the header as ascii text - open(filename, 'rU'), only the body as binary.
2009-03-10 06:58:42 +00:00
Campbell Barton
373d4fe6d3 [#18323] VRML import will not import colors if pervertexcolors set (comparison reversed)
thanks to Ezra Peisach for fixing.
2009-02-23 12:17:34 +00:00
Campbell Barton
570b48aae6 BGE Py API
print filename:line with ShowDeprecationWarning().
Typo in scripttemplate_gamelogic.py
removed 2 unneeded typedefs
2009-02-22 10:22:49 +00:00
Campbell Barton
c12149cf26 According to Amir Ebrahimi, fbx vertex color is supposed to be between 0.0 and 1.0 rather then 0-255
At the moment I dont have a way to test this.
2009-02-12 01:46:38 +00:00
Remigiusz Fiedler
7c48f1994a patch for paths_svg2obj.py by author jms:
This patch solves some major problems of the svg script :
- reading of the inkscape svg format
- parsing of the scientific numbers
- redundant arc data in the same path for only one command "a"
- blending of curves after several files import and at the end a more correct management of the current point.
2009-02-02 00:31:46 +00:00
Campbell Barton
0409977aa8 [#18241] Very minor bugfix and typo correction for wavefront obj exporter and importer python scripts
from Michael Judd.

Also removed .keys() for a loop in impor_obj.py since its the default dictionary iterator.
2009-01-30 02:01:16 +00:00
Willian Padovani Germano
73cffd9aad == Scripts ==
- Scripts Help Browser: error parsing doc info wrapped in triple single quotes, like done in the 3ds importer. Thanks Jean-Michel (jms) for informing me about it.
2009-01-21 15:45:31 +00:00
Campbell Barton
bae2de3f1a minor corrections 2009-01-16 10:51:30 +00:00
Campbell Barton
ce3dca24d1 have had few requests to use blender for performing background tasks
- visualizing data, rendering scenes automatically and character rendering on a server.

This example script shows how you can run blender in background mode, parse arguments from the command line to generate a simple scene and render/save it.
2009-01-15 22:16:29 +00:00
Campbell Barton
b71bc3a2f3 patch from Thomas Dinges, update URLs in help scripts 2009-01-13 15:48:27 +00:00
Campbell Barton
ae15fc5e46 [#18082] make uvcalc_follow_active_coords.py bypass the gui and accept arguments when called from another script
from Bill N (slow67)

Also made uvcalc_quad_clickproj.py and uvcalc_follow_active_coords.py add UV's if they didn't exist.
2009-01-12 04:07:06 +00:00
Willian Padovani Germano
278d6758ea == Scripts ==
- Scripts Help Browser: Brendon Murphy requested and Kevin Morgan implemented a "run script" button.
- AC3D importer: option to store emis color from .ac file in mirror color in Blender (the exporter has the option to export mirror color as emis). Patch by Francesco Brisa.

Thanks for the contributions.
2009-01-11 16:13:00 +00:00
Campbell Barton
fc12ec2317 don't raise exceptions on some errors unless debugging 2009-01-07 11:27:17 +00:00
Campbell Barton
5296928728 confusion between Inline and externproto nodes 2009-01-07 03:34:12 +00:00
Campbell Barton
70c5417ed6 Added support for EXTERNPROTO's and fixed a bug where relative Inline URL's that included a path didn't load 2009-01-06 12:30:28 +00:00
Campbell Barton
823aa30cba string extraction wasnt working + minor changes 2009-01-06 08:58:45 +00:00
Campbell Barton
49b5edddd4 left testing lines uncommitted by mistake 2009-01-05 10:54:26 +00:00
Campbell Barton
92ab0c0369 [#18142] Blender FBX export outputs broken vertex colors when using vertex paint
from Kevin Hsu (caywen) 
use fix suggested in report
2009-01-03 14:02:14 +00:00
Campbell Barton
eee013d9b9 use higher precession pi 2008-12-31 02:13:38 +00:00
Campbell Barton
cbc3c7e878 script was adding UV's rather then vertex Colors (this was correct before uv & vcol layers existed) 2008-12-30 08:25:36 +00:00
Campbell Barton
cbebe4ad46 * bpy curve api wouldn't give correct errors for bad arguments when appending nurbs.
* the radius on the curves first point was ignored. 
* mesh_edges2curves.py was giving all points a tilt of 1.0
2008-12-24 15:46:26 +00:00
Campbell Barton
5a96981cc6 improved PROTO support, works for many testfiles now. 2008-12-23 06:47:43 +00:00
Campbell Barton
6158762797 WIP - support for VRML PROTO's 2008-12-22 15:05:07 +00:00
Remigiusz Fiedler
e7c0666d96 DXF exporter, dxf-library.py updated
v1.28 - 2008.12.13 by Steeve/BlenderArtists
- bugfix for EXTMIN/EXTMAX to suit Cycas-CAD
2008-12-14 21:26:24 +00:00
Remigiusz Fiedler
c794e13ba3 bugfix in pickMeshRayFaceWeight() in bpymodules/BPyMesh.py 2008-12-14 18:39:58 +00:00
Campbell Barton
e94dae4c03 VRML/X3D
* Improved compatibility with VRML files
* Extract strings so they dont get modified for parsing, filename URL's with {} [] dont break importing anymore.
* Cameras were rotated incorrectly
* inline files were not opened with GZip
* Animation Support - currently only loc/scale/rot (scale untested)
* Lists of image URLs now use the first image from the list since there is no support for dynamic switching.
* use imagemagick to convert GIF's so they load in linux. (WIP - could be extended, At least it should not break anything)

BPyMathutils angle2ToLength function could be simplified (pointed out by brecht)
2008-12-12 05:46:07 +00:00
Campbell Barton
f4c581aa01 missed saving a small change 2008-12-03 07:51:12 +00:00
Campbell Barton
cefae5e1b4 fix for [#18040] FBX writes incorrect relative paths.
http://projects.blender.org/tracker/index.php?func=detail&aid=18040&group_id=9&atid=125
2008-12-03 07:45:52 +00:00
Campbell Barton
2acd106492 added a function to resolve case insensitive paths in BPySys and an option to use it in BPyImage
- Useful when loading files with saved in windows on a *nix system.
2008-12-03 02:03:51 +00:00
Remigiusz Fiedler
3a44c76246 DXF-Importer: updated version v1.12 - 2008.11.16 by migius
- remove try_finally: cause not supported in python <2.5
 - add Bezier curves bevel radius support (default 1.0)
2008-11-16 23:52:29 +00:00
Campbell Barton
5161c2ee3a attempt to make executing an external command work with python 2.4 & 2.5, it seems that only py 2.6 wanted list args for subprocess.Popen 2008-11-11 08:21:09 +00:00
Campbell Barton
37c1fd2303 [#17958] Windows path fix for image_edit.py script.
Modified to work in linux too,  on my system subprocess.Popen(appstring) only works when appstring is a list.

Blenders __import__ didnt support keywords like pythons causing the subprocess module to fail for me.
added keywords to blenders c/api import to match pythons.
2008-11-07 15:16:30 +00:00
Remigiusz Fiedler
3b2a07a866 uniform end-of-line format and set svn:eol-style property to "native" for all scripts 2008-11-05 11:42:34 +00:00
Matt Ebb
633e3e1323 * Updated the 'Consolidate into one image' script to support alpha 2008-11-05 04:48:08 +00:00
Campbell Barton
688cc11302 added an option for python Draw.UIBlock(func, mouse_exit) so moving the mouse outside the popup wont close it.
Stops FBX Export and OBJ I/O from flickering a lot.
2008-10-22 08:21:43 +00:00
Campbell Barton
4936e09cdf add a way for external scripts to call X3D/VRML importer and deal with unknown node types. 2008-10-21 23:14:40 +00:00
Campbell Barton
1df683a38b more python 2.3 compat, should be the last of it. 2008-10-21 09:08:46 +00:00
Campbell Barton
ff2fcdf34e py 2.3 compat for lightwave_import and wizard_curve2tree 2008-10-21 00:21:02 +00:00
Campbell Barton
fd1dcada60 fix for [#17871] PLY file import: blender seems to loose vertex color information
use Mesh rather then NMesh
2008-10-20 13:36:18 +00:00
Nathan Letwory
3544a4bd36 === Blender Python API ===
* 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
2008-10-19 21:39:50 +00:00
Campbell Barton
18072f5583 modified OBJ import and export UI's to be less confusing with nicer layout. removed an unneeded workaround in fbx export. 2008-10-19 15:53:22 +00:00
Campbell Barton
e96a5bd05b patch [#17856] Correction on docs for Ipo module. from Lucas Vella (lvella) + some other minor changes. 2008-10-18 13:33:27 +00:00
Campbell Barton
03d5780b76 Added joystick epydocs, only changed incorrect docstrings in SCA_JoystickSensor.cpp
patch [#17857] HotKeys Update by dfelinto - SmoothStroke and Anchored.
	Made own edits, removed videoscape and added curve and armature specials.
2008-10-18 13:23:30 +00:00
Campbell Barton
1be4da60a2 * Fixed eekadoodle problem where faces with a zero index vert in the wrong place would reotate the UVs and VCols incorrectly
* Fixed an error that made IndexedLineSet and IndexedPointSet not load for x3d's
* Added support for opening gzip x3d/wrl files
2008-10-18 09:04:25 +00:00
Campbell Barton
efdbf4b1fc x3d and vrml importer for loading thes files as static scenes. x3d needs a full python install. VRML97 files can be imported without python.
for details on what is supported see
http://wiki.blender.org/index.php/Scripts/Manual/Import/X3D_VRML97#Compatibility
2008-10-17 19:06:24 +00:00
Campbell Barton
58ce460cf7 vrml exporting with images was broken. 2008-10-14 23:43:08 +00:00
Campbell Barton
2ee4feda26 c3d_import needed encoding defined for python 2.5+ to run.
wav file reading minor fix checking array bounds.
2008-10-12 10:39:45 +00:00
Willian Padovani Germano
e5d1c5a176 == Python ==
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.
2008-10-09 22:28:44 +00:00
Campbell Barton
56295f9688 own error, bvh import would always miss the last frame.
thanks ppClarity for picking up on this.
2008-10-08 17:07:32 +00:00
Remigiusz Fiedler
8b2f089c6e DXF-Exporter update
v1.27 - 2008.10.07 by migius
- exclude Stani's DXF-Library to extern module
- add "hidden mode" substitut: back-faces removal
- add support for mesh ->POLYFACE
- optimized code for "Flat" procedure
- 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
2008-10-07 20:34:24 +00:00
Chris Want
de6a9d0194 Use xrange() rather than range() for loop iterations. 2008-10-06 17:11:10 +00:00
Chris Want
d5f647a221 A fix for bug #8814:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=8814&group_id=9

Smarter handling of faces that have a material index that points
to a null material.
2008-10-06 17:06:13 +00:00
Remigiusz Fiedler
d0a8a767a7 DXF-Exporter script - initial commit
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
2008-09-29 14:03:15 +00:00
Joshua Leung
f001e58768 Updates to hotkeys.py with some hotkeys I've added/changed over past few releases (note, this doesn't cover all of them yet) 2008-09-29 00:47:21 +00:00
Remigiusz Fiedler
49f9049eb5 fix header text 2008-09-28 13:51:30 +00:00
Joshua Leung
1206061ed4 Patch #17346: Align bones in edit mode
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!
2008-09-26 08:51:05 +00:00
Campbell Barton
2b6f6698d2 patch [#17683] Fix OBJ import line endings
from Tom Nixon (greysquare)  for fixing [#17681] .OBj import issues
2008-09-25 13:17:56 +00:00
Campbell Barton
872704010e [#8540] Import scripts for MilkShape3D file formats
from Markus Ilmola (glome)

note, UV's will be incorrect in some faces because of eekadoodle problem.
2008-09-23 00:49:44 +00:00
Campbell Barton
224607982a Python api access to obcolor
Option to copy obcolor in the copy menu
Option to select same color in select grouped menu
console.py - mistake in last commit caused a python error
2008-09-20 10:11:42 +00:00
Campbell Barton
4d551c0a0d Text.c
- 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.
2008-09-20 04:37:10 +00:00
Ton Roosendaal
00ed5a2cc9 Patch #17348 by Roger Wickes
Fix in Bake Constraints script, better naming for new object.
2008-09-19 20:22:54 +00:00
Matt Ebb
f0e0e6b1c9 * Some tweaks to the OBJ importer/exporter after chatting with Campbell
- 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.
2008-09-17 04:07:58 +00:00
Ken Hughes
0859141238 Scripts
-------
Removed empty parenthesis from class definitions, causes a syntax error in 
Python 2.4 (reported by Sanne on IRC, thanks!)
2008-09-10 21:37:22 +00:00
Campbell Barton
ecc5bdb8d7 2 gamelogic templates, one with example functions and comments, another minimal template for those who know the api. 2008-09-10 03:34:08 +00:00
Campbell Barton
c7fe2199a7 object_find, didnt get images from an objects material textures
KX_PythonInit.cpp - own error in recent commit.
2008-09-06 17:04:54 +00:00
Campbell Barton
1bd365e112 find objects by texture name raised a python error 2008-09-06 12:50:22 +00:00
Brecht Van Lommel
cb89decfdc Merge of first part of changes from the apricot branch, especially
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.
2008-09-04 20:51:28 +00:00
Campbell Barton
b818b1a164 cleanup mesh materials option was setting incorrect material indicies 2008-09-03 03:24:01 +00:00
Ian Thompson
3bab89cc1c Merge from trunk 16122-16307 2008-08-30 14:32:16 +00:00
Ian Thompson
bccce7e30e Fix for class variable parsing/listing bug. 2008-08-30 11:27:27 +00:00
Ian Thompson
0257f500e7 Fix for text plug-in scripts on 64-bit platforms. 2008-08-26 17:09:17 +00:00
Ian Thompson
e1ceab6ed6 Missed parentheses from except clause, has a whole different meaning. 2008-08-18 14:16:34 +00:00
Ian Thompson
7f30e5fdd2 Better class support with inheritance for text parsing. 2008-08-18 10:01:49 +00:00
Ian Thompson
3a62928777 Fix for numeric var types creating an error. 2008-08-17 10:08:38 +00:00
Ian Thompson
d1d1d2b870 Improvements to the base BPyTextPlugin module:
- 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.
2008-08-15 23:14:22 +00:00
Ian Thompson
bda3e4f8e2 Merge from trunk 16031:16122 2008-08-15 00:00:27 +00:00
Martin Poirier
db42038bcf merging trunk 15964 -> 16116 2008-08-14 21:16:48 +00:00
Ian Thompson
65d0ef3e74 Speed improvements for reading text lines and the option to specify a range for Text.asLines([start[, end]]) Also some tweaks for the plug-in scripts and updates to pydocs. 2008-08-12 15:17:08 +00:00
Campbell Barton
f876930904 fix for [#17365] PLY export script writes comment in invalid way
this is good for 2.47
2008-08-11 03:52:21 +00:00
Ian Thompson
a5d955632f Added sys.path module search to BPyTextPlugin module and fixed IndentationError when parsing. 2008-08-10 17:00:25 +00:00
Ian Thompson
5dad154414 Fixed inconsistencies between the text plugins and them not suggesting when called from the menu. 2008-08-10 16:07:14 +00:00
Ian Thompson
ed972db1a3 Merge from trunk: 15912:16031 2008-08-09 10:12:59 +00:00
Ian Thompson
d42891975b Typing 'from a import b' threw an error if b was not found. Accidentally moved this out of the try block in an earlier tidy-up. 2008-08-08 15:54:04 +00:00