Commit Graph

12811 Commits

Author SHA1 Message Date
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
14c1ed0810 Fixed own platform bug with stat/fstat. 2008-06-28 00:07:22 +00:00
Ian Thompson
ab6e6b4c41 Mouse selection (LMB) and confirmation (MMB) added to suggestions UI. Also fixed the problem of offset text (horizontally scrolled). 2008-06-27 19:55:08 +00:00
Ian Thompson
aee5e95610 Modifying a file externally or deleting a file linked with a Blender Text object presents options for reloading, saving or separating the Text object from the external file (like the make local idea). 2008-06-26 18:28:33 +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
05ce388f35 Added functions to the BPy Text object for positioning the cursor and inserting text. It seems Text.write() actually inserts *then* moves to the end of the buffer, so it doesn't really append as it says in the docs. However, with these new functions both appending and inserting can be achieved. 2008-06-17 19:26:26 +00:00
Ian Thompson
48bf0ef2ed Improvements to whole-word ops (thanks mindrones for suggestions). 2008-06-10 15:25:05 +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
Ian Thompson
7fd8c2424f Fix: Convert to spaces/tabs corrupted syntax 2008-06-09 12:45:49 +00:00
Ian Thompson
39a6807348 Prevent editing of linked library Texts 2008-06-08 19:29:19 +00:00
Ian Thompson
12f5a0a228 Added file info to header. Also reopen was marking text dirty (different from disk) which it isn't. 2008-06-06 11:32:45 +00:00
Ian Thompson
a68975f4e1 Whole word operations added:
* Alt-Left/Right: moves cursor/selection a word to the left/right
 * Alt-/Ctrl-Delete/Backspace deletes whole words at a time
2008-06-04 23:20:54 +00:00
Ian Thompson
ec4b6ba3f3 Fixed unreported bug: Backspace at top of text pushed newline onto undo stack 2008-06-04 16:03:19 +00:00
Ian Thompson
2dcab87383 Overwrite mode added, toggled with INSERTKEY 2008-06-04 12:32:06 +00:00
Ian Thompson
04fb0c6f79 First commit and merge from trunk for testing.
Merge: 14970-14988
2008-05-26 23:04:37 +00:00
Andre Susano Pinto
4383743ace Fixed some compile erros under msvc (thanks lguillaume)
Fixed object dependency (thanks ZanQdo for pointing it out)
Make some code cleaner
(preparing for adding bvh trees on nearest surface)
2008-05-26 21:57:53 +00:00
Martin Poirier
ea760cade7 creating gsoc branch for Ian Thompson 2008-05-25 19:24:46 +00:00
Campbell Barton
b306aaccb9 patch [#11491] Fix for bug 11362: Blender.Draw.Image() method does not clip properly
fixing [#11362] Blender.Draw.Image() method does not clip properly
also return silently on zero zoomlevel rather then raising an error, only raise an error on negative values.
2008-05-25 16:39:57 +00:00
Peter Schlaile
20b4bf4aba == Sequencer ==
Fixes
[#12106] Memory leak in sequencer (>10MB/frame)

in parts: inner contents of meta strips are freed up after calculation
making more room for the cache.

Actually have to think of a mechanism, that remembers, which output
frames are asked for and caches only those.
2008-05-25 16:07:32 +00:00
Andre Susano Pinto
ad3f4c89aa Merge BVH tree fixes from cloth branch
svn merge -r 14954:14963 https://svn.blender.org/svnroot/bf-blender/branches/cloth/blender/source/blender/blenlib/BLI_kdopbvh.h
svn merge -r 14954:14963 https://svn.blender.org/svnroot/bf-blender/branches/cloth/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
2008-05-25 15:47:54 +00:00
Andre Susano Pinto
ad2fecf266 Added BVH nearest neighbour code, for now only works in 6-dop and finds the node with the nearest bounding volume.
I'll work on making it more generic.
So far it querys faster than kdtree, but building the tree is slower.
And bvhtree NN uses an heuristic based on the last match.

Shrinkwrap (OBCube)24578 over (OBSuzanne)31658
kdtree
build: 30.000000ms
query: 1360.000000ms

bvhtree
build: 140.000000ms
query: 490.000000ms

Shrinkwrap now uses bvhtree (binary tree, 6dop) for nearest vertex.
2008-05-25 15:43:18 +00:00
Martin Poirier
03ccc38ddf [#11124] Hide Threshold button when Constant QMC sampling enabled
Patch by Olivier Saraja
2008-05-25 14:39:55 +00:00
Benoit Bolsee
da1f38f99d Apply BGE patch 11137: Render objects with negative scaling correctly (as in Blender) 2008-05-25 14:37:39 +00:00
Martin Poirier
f680b56ebf [#11119] Tool tips correction
Patch by Olivier Saraja
2008-05-25 14:32:59 +00:00
Benoit Bolsee
31ec51df42 Apply BGE patch 12799: Fix quad buffer stereo mode for Windows 2008-05-25 14:32:26 +00:00
Andre Susano Pinto
cc98ef4012 Merge from trunk
svn merge -r 14843:14954 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2008-05-25 13:53:58 +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
Andre Susano Pinto
fd53876faf Merge bvh tree from cloth branch 2008-05-25 13:44:55 +00:00
Benoit Bolsee
e2a9590a15 BGE patch: rename rayCastToEx() to rayCast() - better name 2008-05-24 22:50:31 +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
Benoit Bolsee
cc6dac8c42 BGE patch: add rayCastToEx(), an extended version of rayCastTo() for use in game script 2008-05-24 18:06:58 +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
Benoit Bolsee
7f10f5f66f fix BGE bug #8646: unusable anaglyph settings
The best rules for stereo rendering are now applied to Blender. Here is the new situation:
1) The focal distance is now settable through the GUI: select the camera (each camera can have a different setting) and go to the camera data (F9): the "Dof Dist" and "Dof Ob" can be used to set the focal distance for that camera. The "Dof Ob" is interesting because it sets the focal distance so that the center this object will appear at the surface of the screen when running the game.
2) The eye separation is automatically set to focal_distance/30, which is considered to be a reasonable value. If you need a different value, you can always use Python scripting. 

Notes: 
- If you switch camera during the game, the focal distance will also change unless you have set the focal distance by scripting, in which case it overwrites the focal distance setting of all cameras.
- If you don't set the focal distance in the camera data or by scripting, the default value will be used. The default value corresponds more of less to the near clipping plane which means that all the objects will be very far with little 3D effect.
- If you don't set the eye separation by scripting, it is automatically computed as focal_distance/30, regardless on how the focal distance was set.
2008-05-24 08:34:04 +00:00
Willian Padovani Germano
5f70682f6a == PyNodes ==
Fixing bug #11737 reported by Daniel Salazar (Zanqdo, thanks!): assigning as pynode a text that failed to parse as a pynode script, then deleting that text would crash Blender.

http://projects.blender.org/tracker/?func=detail&atid=125&aid=11737&group_id=9
2008-05-23 16:31:02 +00:00
Joshua Leung
18abce25e5 Typos and whitespace tweaks 2008-05-23 11:12:03 +00:00
Brecht Van Lommel
02c4866d04 Fix for bug #12526: object instancing didn't restore matrices
correct for envmap, could give objects rendering in the wrong
position.
2008-05-23 10:06:06 +00:00
Campbell Barton
b46bdbcd0f fix for "[#11004] Adding ram sound and alt-U causes ram to look like HD sound and can lead to crash"
Missing call sound_initialize_sounds, cant be added BKE_reset_undo since its in blenderkernel.
2008-05-23 09:58:33 +00:00
Brecht Van Lommel
b6ab784c12 Fix for bug #12473: crash converting old particle system from
a linked file.
2008-05-23 09:23:57 +00:00
Campbell Barton
f9e81a6f3a fix for [#12218] Impossible to exit meta strips with hotkey
Only enter mesta's that are active and selected, inconsistent with editmode in the 3D view, but editmode dosnt deal with 
nested data.
2008-05-23 08:58:44 +00:00
Campbell Barton
99f43e0b07 fix for error when all faces are the same area 2008-05-23 08:39:59 +00:00
Joshua Leung
b4573a0c4b Bugfix #12508:
Action Editor Border Select Channels no longer selects bones
2008-05-23 04:54:16 +00:00
Brecht Van Lommel
b7aeda4ff8 Fix for bug #11895: databrowse for image painting clone image didn't work. 2008-05-22 17:32:15 +00:00
Brecht Van Lommel
7bae2af95c Fix for bug #11698: mesh deform modifier not working on extruded curves.
The modifier work on the tesselated result rather than the curve itself.
2008-05-22 17:06:46 +00:00
Brecht Van Lommel
1b00877051 Fix for bug #12077: tangent shading (which only affects specular) made
bump mapping not work for diffuse.
2008-05-22 15:30:35 +00:00
Brecht Van Lommel
5463828bd2 Fix for part of bug #12075: gamma node generated nan's on negative input. 2008-05-22 14:56:32 +00:00
Martin Poirier
99a2e7e92e Comments!!1 2008-05-22 14:12:09 +00:00
Brecht Van Lommel
abb247ac35 Fix for bug #11743: incorrect transformation for particle group
visualization DupliGroup option.
2008-05-22 14:08:13 +00:00