Page MenuHome

Text EditorProject
ActivePublic

Details

Description

This project includes the Text editor built into Blender, and is a sub-project of the Python API module.

Sub-Module Page: T68061
Developers: @Campbell Barton (campbellbarton)

Recent Activity

Tue, Apr 26

Jon Denning (gfxcoder) retitled D14739: Text Editor: update syntax highlighting for different Python strings from Text Editor: add syntax highlighting for Python f-strings, raw strings, unicode strings, and raw f-strings to Text Editor: update syntax highlighting for different Python strings.
Tue, Apr 26, 12:21 PM · Text Editor

Sun, Apr 24

Jon Denning (gfxcoder) retitled D14739: Text Editor: update syntax highlighting for different Python strings from Text Editor: add syntax highlighting for Python F-strings to Text Editor: add syntax highlighting for Python f-strings, raw strings, unicode strings, and raw f-strings.
Sun, Apr 24, 9:09 PM · Text Editor
Jon Denning (gfxcoder) updated the diff for D14739: Text Editor: update syntax highlighting for different Python strings.
  • added formatting for python raw strings, unicode strings, and raw f-strings
Sun, Apr 24, 9:05 PM · Text Editor

Sat, Apr 23

Jon Denning (gfxcoder) retitled D14739: Text Editor: update syntax highlighting for different Python strings from added formatting for python f-strings to Text Editor: add syntax highlighting for Python F-strings.
Sat, Apr 23, 10:23 PM · Text Editor

Thu, Apr 21

Campbell Barton (campbellbarton) closed T95932: Drag n drop of object from Outliner into Text Editor is broken (when using Auto Close Text Editor Preference) as Resolved by committing rBc342b3cede94: Fix T95932: Auto-close text breaks outliner drag-n-drop.
Thu, Apr 21, 9:58 AM · Python API, Text Editor, BF Blender
Campbell Barton (campbellbarton) closed D14707: Text Editor: add Python 3.10 soft keywords to builtinfunc list.

Thanks, committed rBc6ed879f9aa7cd863f146cc7104f16cfe8a73e8a

Thu, Apr 21, 4:41 AM · Text Editor
Campbell Barton (campbellbarton) accepted D14707: Text Editor: add Python 3.10 soft keywords to builtinfunc list.
Thu, Apr 21, 4:41 AM · Text Editor
Campbell Barton (campbellbarton) retitled D14707: Text Editor: add Python 3.10 soft keywords to builtinfunc list from Added Python 3.10 soft keywords to `builtinfunc` list for text editor highlighting to Text Editor: add Python 3.10 soft keywords to builtinfunc list.
Thu, Apr 21, 4:36 AM · Text Editor

Wed, Apr 20

Jon Denning (gfxcoder) retitled D14707: Text Editor: add Python 3.10 soft keywords to builtinfunc list from added Python 3.10 soft keywords to builtinfunc list to Added Python 3.10 soft keywords to `builtinfunc` list for text editor highlighting.
Wed, Apr 20, 10:10 PM · Text Editor
Philipp Oeser (lichtwerk) updated subscribers of T95932: Drag n drop of object from Outliner into Text Editor is broken (when using Auto Close Text Editor Preference).

Introduced in rBc4ea5cb1a381: Text Editor: Auto close relevant characters

Wed, Apr 20, 4:53 PM · Python API, Text Editor, BF Blender
Philipp Oeser (lichtwerk) renamed T95932: Drag n drop of object from Outliner into Text Editor is broken (when using Auto Close Text Editor Preference) from Drag n drop of object from Outliner into Text Editor is broken to Drag n drop of object from Outliner into Text Editor is broken (when using Auto Close Text Editor Preference).
Wed, Apr 20, 4:50 PM · Python API, Text Editor, BF Blender
Philipp Oeser (lichtwerk) added a project to T95932: Drag n drop of object from Outliner into Text Editor is broken (when using Auto Close Text Editor Preference): Python API.
Wed, Apr 20, 4:49 PM · Python API, Text Editor, BF Blender

Apr 13 2022

Matheus Santos (MatheusSantos) updated the diff for D13392: Text Editor: Trim Trailing Whitespace.

Updated Diff to current master.

Apr 13 2022, 10:21 PM · Text Editor

Apr 7 2022

Campbell Barton (campbellbarton) closed D13616: Text Editor: Get/Set region text API.

Thanks for adding the tests, good to see some duplicate code could be removed.

Apr 7 2022, 7:25 AM · Python API, Text Editor
Campbell Barton (campbellbarton) accepted D13616: Text Editor: Get/Set region text API.
Apr 7 2022, 7:18 AM · Python API, Text Editor
Campbell Barton (campbellbarton) retitled D13616: Text Editor: Get/Set region text API from Text Editor: Get / Set region text API to Text Editor: Get/Set region text API.
Apr 7 2022, 7:18 AM · Python API, Text Editor
Campbell Barton (campbellbarton) updated the summary of D13616: Text Editor: Get/Set region text API.
Apr 7 2022, 7:16 AM · Python API, Text Editor
Campbell Barton (campbellbarton) updated the diff for D13616: Text Editor: Get/Set region text API.

Rename region_set_string to region_from_string, matching Text.from_string method.

Apr 7 2022, 7:12 AM · Python API, Text Editor
Campbell Barton (campbellbarton) updated the diff for D13616: Text Editor: Get/Set region text API.

Minor cleanup for tests

Apr 7 2022, 7:08 AM · Python API, Text Editor
Campbell Barton (campbellbarton) updated the diff for D13616: Text Editor: Get/Set region text API.

Run clang-format

Apr 7 2022, 6:59 AM · Python API, Text Editor

Apr 6 2022

Matheus Santos (MatheusSantos) updated the diff for D13616: Text Editor: Get/Set region text API.

Changed the function that was used before to set the selection for the txt_sel_set, this way it handles the out of boundary ranges.
A unit test was also added to check text editor methods.

Apr 6 2022, 9:13 PM · Python API, Text Editor
Campbell Barton (campbellbarton) abandoned D9752: Fix: T78228 Send all Python errors to Info Editor.

It turns out this was quite involved, require more changes to reporting than I'd anticipated.
I've committed an alternate patch to this one rB2d2baeaf04d4: Fix: T78228 Send all python errors to info editor.

Apr 6 2022, 10:56 AM · Text Editor, Python API

Apr 4 2022

Campbell Barton (campbellbarton) requested changes to D9752: Fix: T78228 Send all Python errors to Info Editor.
Apr 4 2022, 2:30 AM · Text Editor, Python API

Mar 28 2022

Campbell Barton (campbellbarton) updated the diff for D9752: Fix: T78228 Send all Python errors to Info Editor.

Rebase on master (resolve conflicts)

Mar 28 2022, 8:29 AM · Text Editor, Python API
Campbell Barton (campbellbarton) added inline comments to D9752: Fix: T78228 Send all Python errors to Info Editor.
Mar 28 2022, 6:35 AM · Text Editor, Python API
Campbell Barton (campbellbarton) added inline comments to D9752: Fix: T78228 Send all Python errors to Info Editor.
Mar 28 2022, 6:34 AM · Text Editor, Python API
Campbell Barton (campbellbarton) requested changes to D9752: Fix: T78228 Send all Python errors to Info Editor.

After applying this patch errors are being suppressed from the output (stderr/stdout).

Mar 28 2022, 6:27 AM · Text Editor, Python API
Campbell Barton (campbellbarton) updated the diff for D9752: Fix: T78228 Send all Python errors to Info Editor.

Rebase on master (tweaked to reduce diff-noise)

Mar 28 2022, 6:18 AM · Text Editor, Python API
Campbell Barton (campbellbarton) added a comment to D9752: Fix: T78228 Send all Python errors to Info Editor.

@Eric Bickle (ShadowChaser) the main thing is that they're printed, if there are complications printing to the stderr - this can be handled separately from this patch.

Mar 28 2022, 1:24 AM · Text Editor, Python API

Mar 27 2022

Eric Bickle (ShadowChaser) added a comment to D9752: Fix: T78228 Send all Python errors to Info Editor.

Some things to check:

  • Errors should always be printed to the stderr (as well as the Info Editor), since developers are likely to have a terminal open. Showing the error only in the info-editor risks developers missing bugs.
  • Errors are properly reported in background mode (running without a UI). This may not need special handling, just take care that errors don't become hidden in this case.
Mar 27 2022, 8:36 PM · Text Editor, Python API
Eric Bickle (ShadowChaser) added inline comments to D9752: Fix: T78228 Send all Python errors to Info Editor.
Mar 27 2022, 8:05 PM · Text Editor, Python API
Eric Bickle (ShadowChaser) updated the diff for D9752: Fix: T78228 Send all Python errors to Info Editor.
  • Remove trailing whitespace
Mar 27 2022, 8:05 PM · Text Editor, Python API
Eric Bickle (ShadowChaser) updated the diff for D9752: Fix: T78228 Send all Python errors to Info Editor.

Rebased and improved error message formatting.

Mar 27 2022, 7:54 PM · Text Editor, Python API

Mar 23 2022

Campbell Barton (campbellbarton) added a comment to D9752: Fix: T78228 Send all Python errors to Info Editor.

Some things to check:

Mar 23 2022, 8:08 AM · Text Editor, Python API
Campbell Barton (campbellbarton) added a comment to D9752: Fix: T78228 Send all Python errors to Info Editor.

@Eric Bickle (ShadowChaser) this patch looks useful, if you wouldn't mind updated the patch I'll check on it.

Mar 23 2022, 7:58 AM · Text Editor, Python API

Mar 22 2022

Peter Fog (tintwotin) added projects to D9752: Fix: T78228 Send all Python errors to Info Editor: Python API, Text Editor.
Mar 22 2022, 3:10 PM · Text Editor, Python API

Mar 2 2022

Matheus Santos (MatheusSantos) added a comment to D13616: Text Editor: Get/Set region text API.

I've never worked with unittest before but I'll give it a try!

Mar 2 2022, 8:59 PM · Python API, Text Editor

Feb 22 2022

Campbell Barton (campbellbarton) added a comment to T80864: Undo fails with Python text editor operators while in edit-mode.

This has been resolved for some years now.

Feb 22 2022, 10:47 AM · Text Editor
Campbell Barton (campbellbarton) closed T80864: Undo fails with Python text editor operators while in edit-mode as Resolved.
Feb 22 2022, 10:47 AM · Text Editor

Feb 21 2022

Omar Emara (OmarSquircleArt) changed the status of T95932: Drag n drop of object from Outliner into Text Editor is broken (when using Auto Close Text Editor Preference) from Needs Information from User to Confirmed.
Feb 21 2022, 3:57 PM · Python API, Text Editor, BF Blender

Feb 16 2022

Campbell Barton (campbellbarton) added inline comments to D13616: Text Editor: Get/Set region text API.
Feb 16 2022, 2:45 AM · Python API, Text Editor
Campbell Barton (campbellbarton) requested changes to D13616: Text Editor: Get/Set region text API.

I was looking to apply this patch but I've found a crash on empty/small text data-blocks:

Feb 16 2022, 2:33 AM · Python API, Text Editor

Feb 14 2022

Matheus Santos (MatheusSantos) updated the diff for D13616: Text Editor: Get/Set region text API.

region_set_string now inserts the text at the cursor position if no region is set.

Feb 14 2022, 10:16 PM · Python API, Text Editor

Feb 12 2022

Campbell Barton (campbellbarton) added inline comments to D13616: Text Editor: Get/Set region text API.
Feb 12 2022, 12:54 AM · Python API, Text Editor

Feb 11 2022

Matheus Santos (MatheusSantos) updated the diff for D13616: Text Editor: Get/Set region text API.
  • Docstrings are now more comprehensive.
  • Struct comment now mention it is a data structure for the arguments from a Python function.
  • Dummy values were removed, now PyTuple_GET_SIZE is used to check if the optional range was passed.
  • WM_event_add_notifier was removed. WM_main_add_notifier is used instead.
Feb 11 2022, 8:31 PM · Python API, Text Editor

Feb 10 2022

Campbell Barton (campbellbarton) added inline comments to D13616: Text Editor: Get/Set region text API.
Feb 10 2022, 2:59 AM · Python API, Text Editor
Campbell Barton (campbellbarton) requested changes to D13616: Text Editor: Get/Set region text API.
Feb 10 2022, 2:58 AM · Python API, Text Editor

Feb 6 2022

RedMser (RedMser) removed a reviewer for D13052: Text Editor: add zoom in/out to view menu: Text Editor.
Feb 6 2022, 11:23 PM · Text Editor, User Interface

Feb 4 2022

Matheus Santos (MatheusSantos) updated the diff for D13616: Text Editor: Get/Set region text API.

Setting the selection range is now a separated function and the values gotten from PyArg_ParseTuple() are grouped inside a structure TextRegion.

Feb 4 2022, 7:00 PM · Python API, Text Editor

Feb 2 2022

Campbell Barton (campbellbarton) added inline comments to D13616: Text Editor: Get/Set region text API.
Feb 2 2022, 3:06 AM · Python API, Text Editor