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
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
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
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
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
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
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
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