Commit Graph

934 Commits

Author SHA1 Message Date
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
Remigiusz Fiedler
98302f6c7c forgot update ver.number in last commit 2008-08-08 11:40:51 +00:00
Geoffrey Bantle
1d425f8da2 -> Fix for warnings in FLT exporter and Palette Manager
Removed buffer overflow masking warnings from the
FLT exporter and Palette Manager.
2008-08-07 22:31:35 +00:00
Geoffrey Bantle
66d6221899 -> Slight tweak to FLT exporter
FLT files written by the FLT exporter would
reference external files (other FLT files,
texture maps, ect) with standard backslash
seperators on win32. However, many tools
that deal with FLT files expect directory
seperators to always be forward slashes
regardless of platform.
2008-08-07 04:38:35 +00:00
Ian Thompson
6c0f4660ed Various UI drawing and event tweaks to make markers feel more natural and avoid getting in the way. If there is a marker under the cursor, ESC will remove it and others in its group. Otherwise all temporary markers are removed. Tab finds/cycles/removes temp. markers, cycles non-temp. markers (under cursor) and behaves normally in all other cases. 2008-08-06 13:46:44 +00:00
Ian Thompson
799ba2c351 Added a Python interface to the marker system with a few additional functions for modifying text selections in general. Tweaked some of the events and drawing code and added a template completion script along the lines of gedit's snippets. 2008-08-05 23:23:31 +00:00
Martin Poirier
e238066525 Merging with trunk
15568 - 15963
2008-08-05 02:27:09 +00:00
Campbell Barton
07bc1e56fe own bug in weightpaint cleaning, wasnt removing as many groups from verts as it should be. 2008-08-04 23:20:12 +00:00
Remigiusz Fiedler
ac7aef6b3d DXF-importer script. Works well with 2.46winXP
Please commit to 2.47 branch
patch history:
 v1.12 - 2008.08.03
 c2 warningfix: relocating of globals: layersmap, oblist 
 c2 modif UI: buttons newScene+targetLayer moved to start panel
 v1.12 - 2008.07.04
 c1 added control Curve's OrderU parameter
 c1 modif UI: preset buttons X-2D-3D moved to start panel
 b6 added handling exception of not registered LAYERs (Hammer-HL-editor DXF output)
 b5 rebuild UI: global preset 2D for Curve-Import
 b5 added UI-options: PL-MESH N+N plmesh_flip and normals_out 
 b5 added support for SPLINEs, added control OrderU parameter
 b5 rewrote draw module for NURBS_curve and Bezier_curve
 v1.12 - 2008.06.22
 b4 change versioning system 1.0.12 -> 1.12
 b4 print at start version-info to console
 b3 bugfix: ob.name conflict with existing meshes (different ob.name/mesh.name)
2008-08-03 15:57:09 +00:00
Ian Thompson
ed5002458b Merged 15771:15912 from trunk 2008-08-01 23:39:52 +00:00
Remigiusz Fiedler
91ece746b8 commit by jms:
Rvk1 to rvk2 script python did not work anymore with the softbodie in blender 2.46.  Only one line needs to be removed.
2008-07-28 10:13:56 +00:00
Ian Thompson
6531d859ba TextPlugin update: Converted try-except blocks to use try-catch-else to allow better error tracking. Commented the descriptor classes and improved variable support for basic types (string, list, etc.) 2008-07-26 20:02:10 +00:00
Ian Thompson
07b8c7e887 Updated the textplugin_outliner.py plug-in to use the new Draw.PupTreeMenu and updated this menu to support titles. 2008-07-21 19:11:38 +00:00
Ian Thompson
5435d7c3ea Oops, typo in rev. 15664 caused error 2008-07-21 11:21:49 +00:00
Ian Thompson
fab7270e40 Script template added for text plug-ins 2008-07-21 10:07:03 +00:00
Ian Thompson
6352cd509e BPyTextPlugin now has descriptors for variables, functions and classes (and their variables/functions). Each descriptor also holds the line number of the definition allowing a simple outliner to be written.
Text.setCursorPos(row, col) now pops the text into view if it is in the active window space. The outliner uses this to jump to any definition in a script; it is invoked with Ctrl+T.
2008-07-21 00:38:42 +00:00
Ian Thompson
f042a468fd Merged 15170:15635 from trunk (no conflicts or even merges) 2008-07-18 23:35:34 +00:00
Ian Thompson
123407e0b4 Added a documentation panel with primitive word-wrap functionality. It can be displayed by Text.showDoc(string) in python and has a text-plugin script for function docs which may be invoked with Ctrl+I inside its params list. Eg. type "dir(" <Ctrl+I> 2008-07-18 23:12:19 +00:00
Ian Thompson
b205cf34b4 All parsing is now done in one sweep and cached to allow details to be obtained without re-parsing. A text can be manually parsed with parse_text(text) which also updates the cache. 2008-07-18 11:00:34 +00:00
Ian Thompson
062643eefd Fixed error when scripts were run without a visible Text to work on. 2008-07-16 12:56:23 +00:00
Ian Thompson
cc89221a24 Previously relying on import to run scripts didn't work every time and was not the right way to do it. Also fixed a problem with 'import *' not working and added the sys.modules list to the import suggestion list with a timed update. 2008-07-16 10:33:48 +00:00
Ian Thompson
512eec04aa Made suggestions case-insensitive which also puts _ prefixed items at the bottom. Improvements have also been made to the way the list works, when it should disappear/update/confirm, etc. 2008-07-15 17:03:59 +00:00
Ian Thompson
9037159d7a Text plugin script updates: Better error handling, variable parsing, token caching for repeat parsing of the same document. Fixed joining of multiline statements and context detection. 2008-07-15 12:55:20 +00:00
Ian Thompson
aeb4d0c631 Created a BPy module BPyTextPlugin to centralize functions used across the text plugin scripts. Also created two more scripts to handle imports and member suggestions. 2008-07-15 07:34:46 +00:00
Ian Thompson
dbb61988fd Any script can now register a unique key combination as part of its bpy header. For a supported space type, the user may press this shortcut to invoke the script.
Space types that are to support shortcuts like this should call BPY_menu_do_shortcut(...) from the event queue read method (See winqreadtextspace in drawtext.c for example)
2008-07-15 07:04:31 +00:00
Martin Poirier
84ae0fc000 merge with trunk (15330 -> 15566) 2008-07-14 14:09:36 +00:00
Maxime Curioni
270184e1b2 soc-2008-mxcurioni: merge-repair with trunk rev 15456 2008-07-06 19:53:32 +00:00
Maxime Curioni
eda7cdc81d soc-2008-mxcurioni: merged changes to revision 15441 2008-07-05 13:30:48 +00:00
Campbell Barton
e6e2087e90 Updates from Roger Wickes
[#16494] Animation Bake Constraints update
links cloned children to cloned parents, useful for ik target baking. whitespace, capitalization.

[#15032] C3D Import script cleanup/IK
Changed code to put IK constraints on a user-defined layer, separate from Markers. cleaned up module naming convention.
removed questionable sloc. add revision history. forced the TrackTo constraint to use a valid marker, and not make up
one on its own.
2008-07-05 11:38:16 +00:00
Ian Thompson
fc392040dd Added readline() and reset() for reading lines from a Blender Text Object and resetting the pointer to the beginning of the buffer. readline() will return the '\n' character and return '' when the end of the buffer is reached in accordance with other readline methods. 2008-06-25 21:00:39 +00:00
Ian Thompson
e68834c75b Added UI for suggestions list. Works with arrow-keys and mouse wheel, accept with Enter, reject with Esc or click elsewhere. Mouse selection not yet supported. The script is called from the File->Text Plugins menu.
Tidied python script, the C suggestions functions and fixed some bugs including suggestions not being freed properly.
2008-06-25 13:51:54 +00:00
Ian Thompson
bdc030c664 Text plugin basis with plugin for suggestions/completions. The suggest plugin works for imported global variables, methods, modules and module members. For example typing:
import Blender
from Blender import *
| <- cursor here suggests globals
Blender.Draw.gl| <- cursor here suggests all Draw members starting gl

Currently suggestions are listed in the console when the space is redrawn but will be presented as a menu-style list soon. Also to add are shortcut/activation keys to allow plugins to respond to certain key strokes.
2008-06-24 15:25:25 +00:00
Martin Poirier
488fa13fc0 MERGING TRUNK 2008-06-23 16:37:51 +00:00
Campbell Barton
fcc377e204 [#13635] DirectX8Exporter with vertex colors
patch from Masaru Nemoto (mnemoto) 

Made some modifications to the patch, use reduce() to get total face verts and some speedup for face vcol looping, also don't write vcol alpha since its used by brushes internally and has no useful meaning.
2008-06-23 00:21:49 +00:00
Campbell Barton
484ac5ea1a [#14405] New python Script - Bake Constraints
AGAIN PLEAST USE TABS, lost quite some time with mixed tab/space adjustments alone.
Other then that, patch is very useful ;)

---Text from patch submission --- 
Using a slightly revised BPy_Armature, this script takes any non-armature object type and creates an Action that keys
the object location (by default, for every frame). If it is an Armature, it goes into each bone and keys the locrot
of the bone. You can now edit the armature, but the motions still rotate the bones. This enables the next step, re-targeting,
which changes bone lengths to fit a mesh. High-level, we are working toward:

1. import mocap (bvh or c3d)
2. bake to make an action library (using this script)
3. re-target and use the actions to drive/deform any character mesh (theeth)
2008-06-22 22:46:02 +00:00
Campbell Barton
9035253493 [#14392] C3D Import
c3d importer for motion capture data
This could do with some improvements but for now its acceptable.
- Note, could people please not mix tabs and spaces.


-Text copied from the patch submission-
The c3d_import with 2.46 was able to import a mocap cloud for some c3d files. I have improved it:
Version History:
 0.4: PERIN Released under Blender Artistic Licence
 0.5: WICKES used marker names, fixed 2.45 depricated call
 0.6: WICKES creates armature for each subject
 0.7: WICKES constrains armature to follow the empties (markers). Verified for shake hands s
 0.8: WICKES resolved DEC support issue

see also http://wiki.blender.org/index.php/Tutorials%5CMoCap-Section_3 for how this program gets the mocap data into
Blender and creates an armature, like the BVH script does.

I'd like someone to test and verify, and if accepted, replace the current c3d_import.py

--- See patch url for example files http://projects.blender.org/tracker/index.php?func=detail&aid=14392&group_id=9&atid=127
2008-06-22 21:48:02 +00:00
Martin Poirier
b5bde6d4dc More params for reeb graph visualizer 2008-06-20 18:06:41 +00:00
Chris Want
fd8e873e01 == VRML97 exporter ==
Faulty indentation of a line sometimes caused a bunch of empty lines to
be printed into the TextureCoordinate and texCoodIndex fields
(benign error, just ugly).
2008-06-18 21:16:29 +00:00
Chris Want
4ed60f4575 == VRML97 export ==
Don't export vertex colors if a mesh doesn't have any (even if a
texface has 'shared cols' set).
2008-06-18 19:58:05 +00:00
Chris Want
1c1f81914c == VRML97 export ==
Patch #10569 from Michalis Kamburelis (sorry for the delay).

This patch adds a popup menu that lets the user choose whether
they want to export selected, whether thay wanted to export
compressed, and whether they want to export the file from
blender's "Z up" coordinates to VRML's "Y up".

I'm not too crazy about the caching to disk of these options
via GetRegistry/SetRegistry, but since this seems to occur
in many of the other export scripts I'll leave it as is.
2008-06-18 17:13:33 +00:00
Campbell Barton
1e3bdcf198 bugfix from Markus Ilmola (glome)
patch was in [#8540] Import scripts for MilkShape3D file formats

Some animations were incorrectly imported and this adds support for weights.
2008-06-16 14:08:24 +00:00
Ian Thompson
10d59e7208 Merged from trunk
svn merge -r14988:15170 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2008-06-09 14:04:19 +00:00
Maxime Curioni
07001e708e soc-2008-mxcurioni: merged changes to revision 15163 2008-06-08 20:12:29 +00:00
Remigiusz Fiedler
cc0d730923 import_dxf.py script update: ver. 1.0.12b3-2008.06.05
bugfix: ob.name conflict with existing meshes (different ob.name/mesh.name)
refactor/support for LWPOLYLINEs
2008-06-05 12:31:16 +00:00
Campbell Barton
056f0564c2 bugfix for zero area faces and adding uv layers was not checking if the
UV layer existed alredy.
2008-05-27 15:14:35 +00:00
Campbell Barton
0eb8ea7429 bugfix, edges with no faces raised an error. 2008-05-27 13:32:10 +00:00
Martin Poirier
1345417f27 Reeb Graph importer (for debuging purpose only) 2008-05-27 13:24:38 +00:00
Campbell Barton
be215f74f3 removing this script, should have been removed for 2.46 since the
functionality is avalable in the UV snap menu.
2008-05-27 09:46:35 +00:00
Maxime Curioni
59df5a23b4 soc-2008-mxcurioni: merged changes to revision 14967 2008-05-25 18:28:52 +00:00
Campbell Barton
55f1b6baa7 for for [bf-blender-Bug Tracker][11843] 3DS importer imports broken meshes 2008-05-25 13:48:36 +00:00
Geoffrey Bantle
7b069b9b60 -> FLT import: Zero area N-gon bug fix
FLT importer would throw errors when importing ngons with
zero area. These faces are now ignored
2008-05-24 18:43:02 +00:00
Campbell Barton
459b4ea5be fix for [#12797] FBX Exporter Exports Incorrect Matterial EmissiveFactor and DiffuseFactor
- own error, swapped diffuse and emit factors
2008-05-24 12:22:53 +00:00
Campbell Barton
99f43e0b07 fix for error when all faces are the same area 2008-05-23 08:39:59 +00:00
Remigiusz Fiedler
61fa5f9126 remove module dxfImportObjects.py. It is obsolete since 2.43, then all functions integrated in the main dxf-importer code 2008-05-22 08:29:54 +00:00
Campbell Barton
58e6861aea fix for [#11542] "Add -> Mesh -> Torus" adds corrupt mesh
previous fix only worked in object mode
2008-05-16 13:05:36 +00:00
Campbell Barton
cf66596d32 fix for [#11667] Minor problem with lightmap_uvpack, LC is getting out of control but keeping to annoy theeth 2008-05-15 19:44:34 +00:00
Geoffrey Bantle
ad397fa16b -> FLT import bug (loose vertices)
New faceweld code broke the import of meshes with loose
vertices. Also added exception handling to the importer
and exporter so that UI doesnt quite when errors are encountered.
Instead traceback is printed to stderr and control returns to
the script UI
2008-05-15 19:35:17 +00:00
Geoffrey Bantle
9f7bc14c57 -> FLT Export bugfix
Export of open faces on export was dropping
the last vertex. Also removed recursion from
function in order to make it safe for large polygons.
2008-05-14 19:29:33 +00:00
Campbell Barton
540c0e0795 uvcalc_lightmap would raise an error on meshes with no faces.
auto-threads wasnt working for baking.
2008-05-14 16:40:25 +00:00
Maxime Curioni
c785d7493e soc-2008-mxcurioni: merged changes to revision 14798, compilation works for rendering/ directry. Still needs to figure out how to compile on non-Unix machines. 2008-05-11 20:28:47 +00:00
Campbell Barton
b9c66e88ea added encoding "# coding: utf-8" to the headers of scripts that python would not run with execfile('....'), python would also riase the error, though there is no practicle use
for running these scripts outside blender.

The error looked like this.
SyntaxError: Non-ASCII character '\xe4' in file ./3ds_export.py on line 10, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
2008-05-11 12:41:12 +00:00
Chris Want
5e5dc2e938 Reverting vrml97_export.py to it's state at revision 14751 because:
1) Bug #6692 is actually a feature request. While I do think that
Michalis' patch is a worthy change, we don't have time to test
this at this stage in the release cycle (and svn is supposedly
closed to new features anyways). I'm sorry Michalis, this will
have to wait until after release.

2) I have looked at bug #8814 a while ago, but I have not yet found
a good solution (and perhaps the solution is to *not* export faces 
without materials assigned). I don't have time to assess whether
revision 14774 presents a worthwhile change or not, and I have no
time to test before release. Also I don't like that the 'fix' for
#8814 is mixed with a fix for a previous faulty commit.

3) Again, another commit to a script I maintain without consulting
me first. Not cool!

Chris
2008-05-10 14:05:35 +00:00
Campbell Barton
cc279a3aa0 fix for [#8814] VRML 97 Exporter bug (empty coordIndex [] indexes) Blender V2.45
null materials were not exported, but would also mess up the assignment of materials for any valid materials after the empty slots.
also made a mistake last recently that Michalis Kamburelis pointed out, changing the default orientation incorrectly. this is now set 
back to what it was in Michalis's patch.
2008-05-10 07:58:10 +00:00
Campbell Barton
694dce0e63 render layer saving script assumed scriptsdir existed.
apply def script assumed the mesh had all the objects vertex groups.
2008-05-09 17:13:03 +00:00
Campbell Barton
8f6eda7e5d need to recalc normals for meshes added in object mode 2008-05-09 12:37:26 +00:00
Campbell Barton
9fb7381d2e chris want corrected some of the last commits changes 2008-05-09 06:02:39 +00:00
Campbell Barton
71fbf87304 fix for [#6692] vrml (.wrl) export bug in V2.44 release
patch from Michalis Kamburelis with some minor edits
2008-05-08 20:51:22 +00:00
Maxime Curioni
64e4a3ec9a soc-2008-mxcurioni: merged changes to revision 14747, cosmetic changes for source/blender/freestyle 2008-05-08 19:16:40 +00:00
Remigiusz Fiedler
3faf127707 DXF-importer prepared for ProE files, which are outside of DXF-specification. 2008-05-08 15:58:00 +00:00
Campbell Barton
bda4e3d19f * added support for exporting dupli objects
* option to export modifier applied objects
* option to export quads as tri's
* added back compress option (will default to enabled if you use .x3dz as the extension)
2008-05-07 15:38:40 +00:00
Campbell Barton
4255f3c7ab made python add mesh module respect blenders user settings for editmode and view align.
added sys.cleanpath() was a patch in the tracker but blender's internal path cleaning is now more general and can be used from 
python.
2008-05-06 17:54:55 +00:00
Maxime Curioni
ec90691384 merge to 14689, Freestyle library changes, SConscript start 2008-05-05 16:56:44 +00:00
Campbell Barton
caa7566ee2 wizard_curve2tree was opening FBX wiki docs. leaf dupliface object was being offset each time the script ran. 2008-05-02 12:27:05 +00:00
Campbell Barton
da509d33c7 used fixed width font, set the command history to ignore dupes when pressing up/down 2008-05-02 10:33:32 +00:00
Campbell Barton
5fef83b0ce fix for bugs
[bf-blender-Bug Tracker][6693] x3d export bug in V2.44 release
[bf-blender-Bug Tracker][7773] .x3d exporter problems (moving meshes away)
Updated how objects are transformed, and use Mesh rather then NMesh.
also removed vertex color saving since it was really slow and vcolors are stored per face in blender.
2008-04-30 22:30:52 +00:00
Maxime Curioni
f12cf0e250 Merged changes from trunk to soc-2008-mxcurioni, to revision 14603 2008-04-28 19:21:51 +00:00
Campbell Barton
34c1699e7e fix for [#9649] svg2obj.py needs a patch,
slight change to the fix suggested, the svg imported was assuming that
"fill:" and "#" being in a string meant there was "fill:#", but the # could be used for other properties.
2008-04-28 19:13:38 +00:00
Campbell Barton
c6554898cc fix for [#9651] raw_export.py tooltip outdated?
own error, bpath looper was trying to free NULL pointer,
added fromOrig to python mtex api
made FromOrig and FromDupli tooltips be understandable
2008-04-28 16:09:17 +00:00
Campbell Barton
4f49a3b906 added ipo script template from blenderartists forTe, made scripts refresh on load factory settings and replaced elysiun with blenderartist.org in headers 2008-04-23 14:04:05 +00:00
Campbell Barton
fa27b5bcc7 Script templates, metaball creation script from forTe, and camera script from macouno 2008-04-22 15:37:54 +00:00
Campbell Barton
8ac1330b74 Patch from Mario Lapin, fixes [#7394] 3ds File Import is broken 2008-04-20 19:27:48 +00:00
Tom Musgrove
9629d8e561 The mdd exporter was skipping the first frame, fix from bill nieuwendorp (slow67) 2008-04-20 16:18:43 +00:00
Campbell Barton
0441b5354d [#6932] Cal3D Exporter Distort Vertex
Removing cal3d importer, since the soya3d maintain their own and I could not fix a bug in weird bone exporting.
2008-04-19 17:38:40 +00:00
Campbell Barton
92f15c7c0c applied patch from Boris van Schooten, [#8148] Animation bugfix for md2_export script
made some other small fixes while testing. (divide by zero errors)
2008-04-18 23:04:54 +00:00
Campbell Barton
9a19ab21b5 milkshape3d model importer, can import a textured model with materials and animation 2008-04-17 20:15:37 +00:00
Campbell Barton
3175ecbcc0 Mot importer from ZanQdo 2008-04-17 08:43:22 +00:00
Campbell Barton
3a9624fd77 ZanQdo fixed exporting of mot files 2008-04-16 20:03:59 +00:00
Campbell Barton
235f793f28 Made aspx/y into floats so we can render precise regions (for apricot terrain baking) 2008-04-09 15:46:26 +00:00
Geoffrey Bantle
b96b7ab83d -> Fix for last commit on FLT exporter
Forgot to change some dictionary keys in source which
would break export. Fixed
2008-04-08 19:35:53 +00:00
Martin Poirier
79ed118fd4 Potential fix for [#8113] Blender.Registry segfault when no permission to write
This converts exceptions in Warning in selected points of the registry module.

While I couldn't reproduce the segfault ( I received the Py error as expected), this isn't a bad idea anyway, since the BPy C counterpart was discarding the error anyway, making it a warning is a bit more inline with its meaning.

The exception is not preventable nor fixable from a script's point of view, so better to silence it and print a warning to the console instead.
2008-04-07 20:56:45 +00:00
Campbell Barton
711306c2ba added a help link to wiki docs for curve2tree, fixed some bugs in flt_toolbar 2008-04-06 17:11:14 +00:00
Campbell Barton
0eb018919a fix for wrong rotation between branch joins 2008-04-05 10:55:18 +00:00
Campbell Barton
8fdfd4cc4c PyAPI - setting a buttons string value crashed. suspect this is a 64bit problem since replacing the string length of int, with Py_ssize_t or long prevented the crash. worked around the problem by removing the PyString_AsStringAndSize command.
wizard_curve2tree - removing id properties didnt work. exit button used a callback it didnt need to.
2008-04-04 23:12:20 +00:00
Campbell Barton
8960f53676 some fixes for python baking function
needed to add a small value to the baking distance for it to include faces of that distance (maybe should make this happen from the user interface too)
2008-03-29 14:50:05 +00:00
Geoffrey Bantle
0010f33bdb -> FLT I/O: UI now undo safe
Both the FLT importer and exporter now store and retrieve
their settings from the blender python registry making
them safe for use with global undo.
2008-03-28 23:06:00 +00:00
Geoffrey Bantle
5fa49b5947 -> FLT I/O: LOD hiding on import
LODS were not getting hidden correctly on import.
Fixed now.
2008-03-28 21:04:27 +00:00
Geoffrey Bantle
b766441658 -> FLT I/O: Hierarchy order fixed on export
Hierarchy was getting reversed on import/export cycle
for FLT files. Fixed now.
2008-03-28 19:45:07 +00:00
Geoffrey Bantle
d32ec4297d -> Double Sided Faces fix for FLT import
Faces marked as double sided in FLT file were
not getting the proper face flags on import to blender.
Fixed.
2008-03-28 00:30:46 +00:00