Commit Graph

161 Commits

Author SHA1 Message Date
fdc5f9c0a8 Add name argument to data creation API calls
Was adding then renaming, unnecessarily.
2015-05-04 16:01:20 +10:00
722ddaaccd Remove 'lorem ipsum' operator
its a very specific function, and not hard to paste body text from elsewhere.
We can make an addon if its important to some users.
2015-03-24 06:17:30 +11:00
026cb6bdeb FileBrowser: Cleanup: rename some (really ugly) enum names. 2015-01-04 12:04:47 +01:00
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
7d040d2a08 Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r 2014-11-16 13:57:58 +01:00
5c6e333780 UI Refactor T41640
Make the UI API more consistent and reduce confusion with some naming.

mainly:
- API function calls
- enum values

some internal static functions have been left for now
2014-11-10 23:06:54 +01:00
0297f1fdd5 Cleanup: de-duplicate text select logic 2014-09-24 14:55:01 +10:00
7d9760d962 Text3d: assert for <0 len text
also add operator to test blacklist
2014-09-10 23:12:11 +10:00
3ad9027648 Text3D: fixes to selection
- clamp selection on entering editmode (Python may have changed).
- BKE_vfont_select_get no longer succeeds with an empty selection
  this caused many operators to go ahead and operate on zero size array.
2014-09-10 23:00:24 +10:00
42eb36ecf6 Fix 3D font selection and material lagging behind with vertical cursor motion 2014-05-15 19:06:25 +10:00
c742a4b62b Code cleanup: remove '\r' check for 3d text, its removed on load even on windows 2014-05-15 18:06:27 +10:00
d303556afb Code cleanup: remove file handling headers where they arent needed 2014-05-02 05:37:11 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
4cfd14644b 3D Text: textbox selection while in editmode
D395 from Henrik Aarnio with some improvements.
2014-03-11 17:16:08 +11:00
f18d8a5a66 Correct 3d text editing update logic
- editmode operations were converting text->nurbs twice.
- cursor and selection operations were re-tessellating text every time.
2014-02-05 05:27:01 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
348cf17448 Code Cleanup: no need to pass empty strings as default values 2014-01-16 22:00:29 +11:00
f86fbc4ea3 Remove direct displist creation from BKE_vfont_to_curve_ex()
This goes back to ancient era again and such a call isn't
safe for threading and really DAG is to make it sure display
list for dependencies is always there.
2014-01-13 15:57:51 +06:00
2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
3fbd63c52e Text3d: improve error checking when pasting from files 2014-01-08 16:14:19 +11:00
7b8e07b7d0 Fix for own error in recent text3d changes
Called important function from within an assert.
2014-01-06 14:41:33 +11:00
9686554633 Text3d: avoid assert, clamp position before getting the selection 2014-01-06 03:27:34 +11:00
3b024d63fe Text3d: fix font family feature for unicode and correct tooltip 2014-01-06 01:37:19 +11:00
38bbd9c778 Text3d: paste additions
- Add paste from system clipboard which behaves like paste from file.
- Paste from file now replaces the selection rather then just adding to the end.
- Move paste operations into the 'Edit' menu.
- Added generic paste functions: font_paste_wchar, font_paste_utf8.
- Fix paste max length check not taking the selection length into account.
2014-01-06 00:39:13 +11:00
15bc30f4ee Text3d: store number of characters and utf8 length separately
EditFont's use of Curve.len was very confusing, in editmode it
represented the number of characters, in object mode the number of
bytes. add Curve.len_wchar and keep track of both.

Also don't convert the editmode text into utf8 on every keystroke.
Now this is done on exiting editmode or save - to match most other
object types.

This also fixes curves 'body_format' being reported with an invalid size.
2014-01-03 17:08:23 +11:00
a5cb2229ab Text3d: avoid converting utf8 to wchar_t in editmode 2014-01-03 14:20:35 +11:00
42aa19088e Text3d: add select all operator
also add Edit menu for 3d text and move cut/copy/paste there.
2013-12-29 23:55:05 +11:00
1c8d1569da correction to previous commit 2013-12-29 23:34:13 +11:00
451343022a Fix crash moving the cursor after deleting 3d text 2013-12-29 23:18:38 +11:00
748b800eba Text3d: add assert's to check the selection and length are valid 2013-12-29 23:16:02 +11:00
57e8c5870a Text3d: setting upper/lower case now uses the selection 2013-12-29 21:05:39 +11:00
9a3855e655 Text3d: remove redundant call to wcslen 2013-12-29 21:04:54 +11:00
d0ec1b1caa Fix for 3d text ctrl+arrow keys failing for multi-byte characters. 2013-12-29 16:54:43 +11:00
0f22eb8564 3D Text: delete selection before pasting 2013-12-08 16:39:11 +11:00
d232486b40 Fix T37543: Multiline 3D Text saved in edit mode breaks on load 2013-11-21 04:32:28 +11:00
0af52adac0 Code Cleanup: remove unused members for editfont (3D text) 2013-11-21 04:16:41 +11:00
7267221715 remove return argument from wmOperatorType->cancel, was only ever returning OPERATOR_CANCELLED. 2013-10-30 23:08:53 +00:00
b21b24573d lots of operator descriptions were incorrectly copy/pasted.
update some descriptions, others were removed and operators tagged as internal.

add a script to detect duplicate operator descriptions.
2013-09-30 05:50:41 +00:00
3ff3d1bc0f replace use of strcat() where the string offset is known.
also correct bad logic with converting a textblock to 3d-text, bytes-vs-number of chars wasn't handled right.
2013-07-23 12:49:30 +00:00
28a27e2e9d Fix text object text entry being broken after recent fix to BLI_strncpy_wchar_from_utf8.
Checked other usages of this function but they seem to be fine.
2013-07-15 19:04:49 +00:00
2b6f35d686 fix for error in string copy
- BLI_strncpy_wchar_from_utf8 wasn't NULL terminating the destination string, caused uninitialized memory use in BPY_python_start().
- BLI_strncpy_wchar_as_utf8 could write one byte past the buffer bounds.
2013-07-15 05:09:06 +00:00
603258d763 fix for zero length normalize before scanfill for meshes and other minor changes. 2013-06-27 04:32:44 +00:00
4df0c46f83 Make freestyle use local Main for temporary objects
This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle
2013-04-18 08:58:21 +00:00
456f3b318a code cleanup: minor changes, clang checker option for exact size matches and use vector functions. 2013-04-14 12:01:12 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
8dca501045 code cleanup: remove ctrl option from FONT_OT_line_break
(which in fact      wasn't mapped to ctrl), it would add in a non printable
character '1' / ascii-SOH, traced back to original commit and theres no
comments about this or mentions as to what its supposed to do).
2013-02-21 17:14:27 +00:00
8d8c69406b fix for 3d text input failing for non utf8 input. 2012-11-15 06:02:32 +00:00