Blender VSE Preview Text Editor #112698

Open
opened 2023-09-22 05:03:33 +02:00 by klauwier · 4 comments

Why VSE Preview Text Editor should be implemented

It's hard to use text strips in cases such:

  1. Long center or right-aligned text because there is only left alignment;
  2. Text where important words should be marked with bold/italic/color/etc. effects;
  3. Texts with titles.

Text strips will require using more than one of them or creating images with text in image redactors.

We intend to add basic text editor options to make it easier to use Blender for simple text formatting cases.

Our text editing options will be in the preview window so there will be a clear distinction between sequencer text options like color and size that can change over time, and static effects such as bold, font, etc.

Text editor features

Effects that are set for the whole text strip and may be changed in time:
(all already implemented in the text strip)

  1. Wrap width;
  2. Size;
  3. Color;
  4. Shadow;
  5. Box and Box margin;
  6. Layout.

Extensions that we want to implement:

  1. Support for multiple lines.
  2. Text effects that can be set differently for each symbol:
    bold, italic, strikethrough, underline, etc.
  3. Spacing options that can be set for each paragraph (or the text strip).
  4. Effects that can be set differently for each paragraph (or the text strip).
    1. Alignment;
    2. [Possible] Kerning.
  5. [Possible] Fonts can be set differently for each symbol with a limit on the number of fonts.
    1. Consider creating a predefined set of fonts for use in the Blender document.
    2. It’s a good idea to add some “i” near the Font settings with information about a font number limit.
    3. Styles that can be saved and reused, similar to titles and headers in common text editors.

Roadmap

There is no specific time for testing because it has to be done every time a feature is implemented before assuming it's done.

Phase 1, preparation:

  1. Implement the basic part for GUI in the preview window of the VSE. The style may be partly taken from 3D
    GUI will:
    1. Show the text in an expanding window with a height limit and a scroll bar.
    2. Copy-paste bold and italic effects for the entire text strip. These effects will be used in the next phase.

Phase 2, editing with selection:

  1. Implement support for multiple lines.
  2. Implement the text editing with selection for bold and italic effects.

Phase 3, alignment:

  1. Implement alignment and spacing.

Phase 4, effects:

  1. Implement all remaining effects that can be set differently for each symbol.
  2. Implement all remaining effects that can be set differently for each strip/paragraph.
  3. Implement fonts per character, if we will find a nice way to use this feature.

Phase 6:

  1. Submit PR.
  2. Fix PR after review.
# Why VSE Preview Text Editor should be implemented It's hard to use text strips in cases such: 1. Long center or right-aligned text because there is only left alignment; 2. Text where important words should be marked with bold/italic/color/etc. effects; 3. Texts with titles. Text strips will require using more than one of them or creating images with text in image redactors. We intend to add basic text editor options to make it easier to use Blender for simple text formatting cases. Our text editing options will be in the preview window so there will be a clear distinction between sequencer text options like color and size that can change over time, and static effects such as bold, font, etc. # Text editor features Effects that are set for the whole text strip and may be changed in time: _(all already implemented in the text strip)_ 1. Wrap width; 2. Size; 3. Color; 4. Shadow; 5. Box and Box margin; 6. Layout. Extensions that we want to implement: 1. Support for multiple lines. 2. Text effects that can be set differently for each symbol: bold, italic, strikethrough, underline, etc. 3. Spacing options that can be set for each paragraph (or the text strip). 4. Effects that can be set differently for each paragraph (or the text strip). 1. Alignment; 2. [Possible] Kerning. 5. [Possible] Fonts can be set differently for each symbol with a limit on the number of fonts. 1. Consider creating a predefined set of fonts for use in the Blender document. 2. It’s a good idea to add some “i” near the Font settings with information about a font number limit. 3. Styles that can be saved and reused, similar to titles and headers in common text editors. # Roadmap There is no specific time for testing because it has to be done every time a feature is implemented before assuming it's done. Phase 1, preparation: 1. Implement the basic part for GUI in the preview window of the VSE. The style may be partly taken from 3D GUI will: 1. Show the text in an expanding window with a height limit and a scroll bar. 2. Copy-paste bold and italic effects for the entire text strip. These effects will be used in the next phase. Phase 2, editing with selection: 1. Implement support for multiple lines. 2. Implement the text editing with selection for bold and italic effects. Phase 3, alignment: 1. Implement alignment and spacing. Phase 4, effects: 1. Implement all remaining effects that can be set differently for each symbol. 2. Implement all remaining effects that can be set differently for each strip/paragraph. 3. Implement fonts per character, if we will find a nice way to use this feature. Phase 6: 1. Submit PR. 2. Fix PR after review.
klauwier added the
Type
Design
label 2023-09-22 05:03:33 +02:00
klauwier changed title from Blender VSE Text Editor to Blender VSE Preview Text Editor 2023-09-22 05:21:28 +02:00
Contributor

Support for multiple lines.

FYI, this just seems to be an issue with the current UI not allowing you to enter a newline symbol or escape sequence. If you run something like C.scene.sequence_editor.sequences_all["Text"].text = "abcd\nefg" in a script editor, you'll see that multiple lines already work as expected.

Phase 6 - Submit PR

Wouldn't it be possible to release this feature in smaller PRs, leaving out less critical features for later?
Not only to allow earlier testing of the basic features, but also to avoid reviewing a huge block of code all at once.

> Support for multiple lines. FYI, this just seems to be an issue with the current UI not allowing you to enter a newline symbol or escape sequence. If you run something like `C.scene.sequence_editor.sequences_all["Text"].text = "abcd\nefg"` in a script editor, you'll see that multiple lines already work as expected. > Phase 6 - Submit PR Wouldn't it be possible to release this feature in smaller PRs, leaving out less critical features for later? Not only to allow earlier testing of the basic features, but also to avoid reviewing a huge block of code all at once.
Iliya Katushenock added the
Interest
Text Editor
Interest
Video Sequencer
labels 2023-09-22 15:09:07 +02:00
Iliya Katushenock added this to the Video Sequencer project 2023-09-22 15:09:15 +02:00
Author

@mod_moder, I assume that the "Text Editor" label is only intended for the Text Editor from this module. Our project will implement a text editor for VSE, and these are two different text editors.

@mod_moder, I assume that the "Text Editor" label is only intended for the Text Editor from [this module](https://projects.blender.org/blender/blender/wiki/Module:%20Python%20API%20&%20Text%20Editor). Our project will implement a text editor for VSE, and these are two different text editors.

@RedMser Sure, more smaller PR's would be best, though considering size of base feature - to edit text in preview, the PRs would be likely large.

@fsiddi since we have talked about this, here is outline of what should be implemented.

@RedMser Sure, more smaller PR's would be best, though considering size of base feature - to edit text in preview, the PRs would be likely large. @fsiddi since we have talked about this, here is outline of what should be implemented.
Iliya Katushenock removed the
Interest
Text Editor
label 2023-09-22 20:53:30 +02:00

Great to see the very limited text strip options being addressed. This is something I've tried to work around for many years in add-ons.

Consider adding mock-ups of the UI early, since many projects dead-ends on the UI design.

IMO, there is no doubt that the optimal solution would be to have a text implemented as a Tool in the Preview, which will work like a text tool commonly known from image editors. This is what users would expect of such a tool. You select the T tool, click in the Preview to set the position, type away, set anchor, adjustable wrap area, and in the sidebar set font, alignment(center!), kerning, styling etc. And even animated presets (as assets in the asset browser?) could be implemented.

As an early step, the current text entry widget was recently changed to the search template(TEXTEDIT_UPDATE) which is updating the text while you type, an alternative version of this widget could be made where the return key would enter a line break \n character, so users would actually be able to look at the Preview while typing and see the line breaks being inserted immediately. (The X for clear string could maybe also be changed to a Return button). Or alternatively, implement a simple multiline text widget with a scrollbar (it could also can be used for the 3d text and multiline node texts).

Better integration of the VSE with other editors in Blender is also a thing. And we already have the Text Editor and the text data block, so it could be considered to have an option to link to a text data block as an alternative to manual text entry option.

However, these two elements are editing pure text strings, and the question is if each character should be styleable, as mentioned, how can these two different text types work together? And what system will allow for individual character styling, mark-up, json, html or an entire and complicated animateable system based on string positions(ex. individual characters changing to individual colors over time)?

Other things to consider:

  • When changing the resolution of the scene, texts are not rescaled or repositioned accordingly, and the design will break. This is due to working with a font size which is not relative to the resolution.
  • The area below the strip info is the content area, where ex. waveforms or thumbnails are displayed. In this area should the content text of Text strips be drawn.
  • Outline is often requested.

A couple of text strip related add-ons of mine:
Text Strip Editor: https://github.com/tin2tin/Subtitle_Editor
Text to Speech: https://github.com/tin2tin/Text_Strip_to_Speech
Add Outline: https://github.com/tin2tin/Outline_for_Text_Strips
Import Subtitles: https://github.com/tin2tin/import_subtitles
Text Block to Text Strip: https://github.com/tin2tin/import_text_block_as_text_strip
Text Editor to Text Strip: https://github.com/tin2tin/text_to_strip
Text to AI: https://github.com/tin2tin/Generative_AI

Great to see the very limited text strip options being addressed. This is something I've tried to work around for many years in add-ons. Consider adding mock-ups of the UI early, since many projects dead-ends on the UI design. IMO, there is no doubt that the optimal solution would be to have a text implemented as a Tool in the Preview, which will work like a text tool commonly known from image editors. This is what users would expect of such a tool. You select the T tool, click in the Preview to set the position, type away, set anchor, adjustable wrap area, and in the sidebar set font, alignment(center!), kerning, styling etc. And even animated presets (as assets in the asset browser?) could be implemented. As an early step, the current text entry widget was recently changed to the search template(TEXTEDIT_UPDATE) which is updating the text while you type, an alternative version of this widget could be made where the return key would enter a line break \n character, so users would actually be able to look at the Preview while typing and see the line breaks being inserted immediately. (The X for clear string could maybe also be changed to a Return button). Or alternatively, implement a simple multiline text widget with a scrollbar (it could also can be used for the 3d text and multiline node texts). Better integration of the VSE with other editors in Blender is also a thing. And we already have the Text Editor and the text data block, so it could be considered to have an option to link to a text data block as an alternative to manual text entry option. However, these two elements are editing pure text strings, and the question is if each character should be styleable, as mentioned, how can these two different text types work together? And what system will allow for individual character styling, mark-up, json, html or an entire and complicated animateable system based on string positions(ex. individual characters changing to individual colors over time)? Other things to consider: - When changing the resolution of the scene, texts are not rescaled or repositioned accordingly, and the design will break. This is due to working with a font size which is not relative to the resolution. - The area below the strip info is the content area, where ex. waveforms or thumbnails are displayed. In this area should the content text of Text strips be drawn. - Outline is often requested. A couple of text strip related add-ons of mine: Text Strip Editor: https://github.com/tin2tin/Subtitle_Editor Text to Speech: https://github.com/tin2tin/Text_Strip_to_Speech Add Outline: https://github.com/tin2tin/Outline_for_Text_Strips Import Subtitles: https://github.com/tin2tin/import_subtitles Text Block to Text Strip: https://github.com/tin2tin/import_text_block_as_text_strip Text Editor to Text Strip: https://github.com/tin2tin/text_to_strip Text to AI: https://github.com/tin2tin/Generative_AI
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#112698
No description provided.