Commit Graph

402 Commits

Author SHA1 Message Date
Dalai Felinto
aa70879df4 bugfix [#36724] Ctrl+F in text editor opens Toolbar, but no longer closes it
(added Ctrl+P as a toggle to show Properties)
2013-09-20 18:36:49 +00:00
f171f4e270 correct own recent edits, area for text line numbers drawing was too small. 2013-09-10 21:45:54 +00:00
89a02fc4ef fix [#36656] text editor undo error when undoing paste command
When tabs to spaces is enabled and a paste command is undone, the improper number of characters could get removed. Also fixed issue with shift + left/right only selecting a max of 1 character.
2013-09-05 21:36:19 +00:00
26cbf331a8 text editor cursor motion (left/right arrows) with selected text typically jumps to either side of the selection previously the cursor would move and loose the selection too.
text button fields already did this.
2013-09-02 00:47:27 +00:00
208b068c3f text spacing was using DPI rather then the size of the text.
characters could draw outside the selection when the text was scaled up.
2013-08-31 05:09:52 +00:00
fd90e17130 text drawing glitche - highlight line was offset slightly from selection. 2013-08-31 05:00:40 +00:00
973e317461 correct own error r59619 (changes made to patch, adding handle recalculation which is needed after splitting). 2013-08-29 14:52:36 +00:00
f6527043d9 fix for glitch where the text editor could be clamped to scroll above line 1 (would flicker on scroll). 2013-08-29 08:13:32 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
418011907c remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h 2013-07-02 10:14:59 +00:00
40d4dfaba8 Fix #35824: finding missing files not working correct for filepaths with special
characters on Windows.

Replaced some uses of stat() by BLI_stat() to properly handle such filepaths.
2013-06-25 14:48:30 +00:00
02fbfa5c70 Fix unnecessary 3D viewport redraws in various cases, in particular when editing
node materials.

Area and region listener callbacks now get the screen and area pointers passed, so
they can do more fine grained checks to see if redraw is really needed, for example
depending on the 3D view drawtype.
2013-06-24 22:41:33 +00:00
d8c2709414 Better API design for making text datablocks after loading.
An optional 'internal' argument was added to the bpy.data.texts.load() operator.  
The changes in revision 57153 were reverted, so that the is_in_memory and is_dirty
properties of text datablocks are not editable again.

In the C API layer, BKE_text_load_ex() was introduced to allow for optionally
making text datablocks internal after loading.
2013-06-02 17:52:06 +00:00
3e97e2c8e8 style cleanup 2013-05-31 22:35:25 +00:00
9fb3d3e032 remove redundant includes from cmake and scons. 2013-05-30 02:16:22 +00:00
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
cd6b27f2b5 remove return value from MEM_freeN, it wasn't used anywhere and was cast to a different function signature. (which evidently works but error prone). 2013-05-21 07:37:59 +00:00
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
ce39c806cf only use OSKEY as a replacement for CTRL on Apple (was already the case in many areas). 2013-05-11 01:12:29 +00:00
a9fb183901 rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()
was renamed fairly recently but other similar iterators not negated
	like this, would prefer to keep it as it was
2013-05-08 12:58:11 +00:00
c31ec62d2f fix for glitch in text editor using ctrl+(backspace / delete),
for now just don't jump words when theres a selection.
2013-05-07 01:00:19 +00:00
9e75d276e3 holding ctrl when using arrow keys in the text editor didn't navigate newlines. 2013-05-01 00:15:22 +00:00
8ee1de2de3 text editor reload no-longer resets scroll & cursor - annoying when making tweaks to UI scripts.
also restrict freestyle hack to WITH_FREESTYLE define.
2013-04-17 04:53:23 +00:00
594eb6218c fix [#34905] Text editor: replacing matches by empty string not allowed 2013-04-08 01:31:41 +00:00
8f8613df90 fix for missing redraw in own commit r55554 (Ctrl+F text editor find).
since an event wasn't added to the queue no redraws we're done when the panel was already open, instead use a notifier.
2013-03-25 21:31:24 +00:00
1165236f69 Usablity:
In text editor, the CTRL+F find now opens property region (or keeps it) and
activates the search button for input.

That's already nice! But next step should be to do a search on exit of 
the button (or while typing). That's stuff I need Campbell to help with though.

Notes:
- Probably Py api for property buttons could get an "operator=" arg?
- The warning menu "not found" should go away
- I also suggest to make "wrap" search default for new editors
2013-03-24 13:43:40 +00:00
fbdec13005 Bug fix #34405
On opening a text editor for first time, and use search (CTRL+F) the scrollers were not
correct initialized, so the view would jump a bit on redraw.
2013-03-22 12:00:29 +00:00
a79e10157d code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
2013-03-22 05:34:10 +00:00
afe9970d48 style cleanup 2013-03-16 14:42:05 +00:00
aff410b558 style cleanup: odd indentation 2013-03-14 05:52:30 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
d9960dba31 fix own regression in 2.66 [#34610] Text editor: Syntax highlighting freezes 2013-03-12 08:46:12 +00:00
5792e77239 Patch [#34373] Use i18n monospace font in Text editor and Python console
This patch allows Blender to display i18n monospace font in the text
editor and the Python interactive console. Wide characters that occupy
multiple columns such as CJK characters can be displayed correctly.
Furthermore, wrapping, selection, suggestion, cursor drawing, and
syntax highlighting should work.

Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic

To estimate how many columns each character occupies, this patch uses
wcwidth.c written by Markus Kuhn and distributed under MIT-style license:

  http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

wcwidth.c is stored in extern/wcwidth and used as a static library.

This patch adds new API to blenfont, blenlib and blenkernel:

BLF_get_unifont_mono()
BLF_free_unifont_mono()
BLF_draw_mono()
BLI_wcwidth()
BLI_wcswidth()
BLI_str_utf8_char_width()
BLI_str_utf8_char_width_safe()
txt_utf8_offset_to_column()
txt_utf8_column_to_offset()
2013-03-12 07:25:53 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
53b7bc8f1f Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It is
always used in that context so we can at least avoid reverting it twice
:p.
2013-03-06 20:55:04 +00:00
713c9afb39 fix [#34460] text editor freezes when turning on syntax highlight 2013-02-27 14:19:44 +00:00
b1543f07bf Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazzán and S. Lockal for spotting them! 2013-02-24 15:40:28 +00:00
7f1ae2497b fix [#34275] Text autocomplete cuts words with accents or special characters
autocomplete is now unicode aware, using python api's checks for now. eventually we should have our own.
2013-02-19 16:13:41 +00:00
cd3b98c4fa step over unicode characters with autocomplete (correctly this time). 2013-02-19 15:56:49 +00:00
54311fde29 revert own commit r54625, broke autocomplete. 2013-02-19 13:41:53 +00:00
098e4234b1 minor change to own recent commit with transform fcurve centers and some style edits and typo corrections. 2013-02-19 02:30:02 +00:00
5ba0eb0ae5 Fix some popups being too small on retina display, among them the new image dialog. 2013-02-18 15:08:27 +00:00
1c216337f0 make autocomplete use unicode character stepping (needed for bugfix). 2013-02-18 12:00:17 +00:00
ab7ca2dc44 fix for double clicking in the text editor not working usefully (double clicking a pair chars would select 3 - one to the left). 2013-02-14 03:03:12 +00:00
fdfa5910b5 Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashes
Issue was caused by couple of circumstances:

- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview

All this leads to threading conflict between preview render and undo
system.

Solved it in  way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.

This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:

- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
  but adds temporary mesh to specified Main.

So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.

Viewport render shall not be an issue because object sync happens from
main thread in this case.

It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.

Thanks to Brecht for review!
2013-02-05 12:46:15 +00:00
6e7ee2649d style cleanup 2013-01-16 18:16:05 +00:00
fe83dc6882 dont add identifiers starting with digits to autocomplete 2013-01-16 04:43:37 +00:00
d0e65f2bf4 text syntax highlighting: don't use utf8 stepping if we know the text is ascii 2013-01-16 04:05:01 +00:00
6fd5645d56 patch [#33888] Syntax Highlighting Changes
from Benjamin Tolputt (btolputt), (with minor changes)

adds support for LUA syntax highlighting.
2013-01-16 03:43:09 +00:00
c420547625 correction to last commit 2013-01-16 03:30:40 +00:00