Commit Graph

169 Commits

Author SHA1 Message Date
Dalai Felinto
a143aeaeae Integrate font objects copy/paste with system clipboard
When pasting text, the style (bold, material, ...) is maintained, if it was originally copied from Blender.

This fixes the issue of missing copy/paste options for font objects
(they were present back in Blender 2.49)

Reviewers: Severin, campbellbarton, brecht
2016-02-12 11:05:05 -02:00
77197b26fa Cleanup: line width 2016-02-07 22:56:20 +11:00
5fef3c3326 BLI_storage: Split text/binary version of mem-from-file funcs
Fix T47022, caused by own commit de0119d08
2015-12-21 18:16:14 +11:00
de0119d087 BLI_storage: util function BLI_file_read_as_mem
Use for text loading and pasting from file.
2015-12-14 17:16:23 +11:00
a374ff16b5 Cleanup: editor api naming
- use ED_ prefix for api calls
- use ED_*_select_pick for mouse selection (was already done in parts)
2015-11-18 12:22:00 +11:00
865796375b Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.
We have callbacks for that, they also do some checks and help ensure things are done
correctly. Only place where this is assumed not true is blenloader (since here we
may affect refcount of library IDs as well...).
2015-11-09 21:00:53 +01:00
83e16a4a87 This commit makes it possible to select the sort mode whenever we invoke an operator.
It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).

Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)

Reviewers: mont29

Reviewed By: mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1476
2015-08-23 12:40:21 +02:00
8b494e03be Fix reading uninitialized buffer 2015-05-30 14:48:42 +10:00
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