VSE: Text editing in preview #127239
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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 project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#127239
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "iss/blender:text-edit-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit implements most features needed for simple text editing.
Active text strip can be edited in preview by pressing tab key, which
enabled text editing mode. With this mode active, outline matches text
boundary box and cursor is drawn.
Cursor can be moved with usual keys. Pressing shift starts selection.
Selection and navigation works when text is scaled or rotated. Mirrored
text is not supported in this PR. it can be done, but the text is
unreadable that way, so I kept it simple.
Multi line text is supported. Pressing return key starts new line.
Copy/paste operator uses OS copy paste buffer, so text from other apps
can be pasted.
Text is still limited to 512 characters. Text string property still
exists in side panel and is limited to single line. Individual
characters can not be styled in different way like in 3D viewport, but
the code is mostly ready for such feature.
@blender-bot package
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.
const
s 50a40fe9a6BLF_boundbox()
on per-line basis. 2b25e91eb0@blender-bot package
Package build started. Download here when ready.
@fsiddi the text editing PR is pretty much complete, but I want to check with you on text background color behavior vs text boundbox. Currently background color does check height of each character and fills least amount of space. So it would change it's height as you type. This could be fine for background, but I don't think, that boundbox should do this. As a result, boundbox with background color could look quite buggy. Here are some images of what I mean:
Here is what text "......." looks like:
Here is the other extreme, with diacritics and descender:
But there could be text like this, which is not filled completely to the top or bottom, which looks not very nice.
I would propose to make background color height to be as large as largest character of the font is. When you change padding of the background, the boundbox can be resized as well, but does not need to. Do you have an opinion on this?
Super cool to be able to edit text in the preview!
A couple of things I've noticed:
Properly to be expected.
Can not reproduce this. Do you mean that copy pasting block below would paste only
This text
?Not sure about that. The box can be padded IMO, but I need to decide what the shape of the box should be in the first place before I start tweaking these little issues.
Yes, that is expected.
I don't want to change that in this PR
Technically yes, practically did not try that. It should be possible to feed runtime data into BLF draw function that would render to texture. than You could cut off the texture to avoid artifacts. Not sure how would I go about rotating/scaling stuff in that texture though. Also would probably rather do this in separate PR.
Possibly, will have to check.
Yeah, it is. So I should add this to TODO to add menu item. We don't do doubleclicks in Blender. Already tried it with retiming heh.
Eeh I could see having a tool for adding text strip from preview. IMO drawing box to set bounds would be ideal.
Alternatively it would add text with some pre-defined string and that could be modally translated to final position.
That is a bug. Will fix.
actually we do.
e.g. double click the text in the outliner to rename
also on lists etc
Yes, I don't have the text and build at hand now. I asked ChatGPT for some ex. multi-line movie credits, and only the first line was pasted into the preview, hence the report. If \n works, then are both \n and \r dealt with?
Since the tool position transforming (G), moves the cropped text (which is mainly useful for short texts), maybe Text Location (X, Y) values could be very handy to change by mouse-clicking in the Preview, ex. with some Ctrl+LM functionality?
Double-clicking text to edit it would be in consistency with Blender methodology.
Hi Richard, as discussed in person, the box should always have maximum height (to reduce jittering, and to match behavior of most text editing software). If you could implement it that way, the patch is good to go.
@blender-bot package
WIP: VSE: Text editing in previewto VSE: Text editing in previewPackage build started. Download here when ready.
Maybe the zoom level should be taken into account for the cursor size?
The Text Editor for reference:
Maybe the Anchor point should be exposed in the preview? Instead of being some invisible, some "magic-point"?
Since the convention is that the strip gets a white outline when selected, and the frame of the image determines, if the text is inside and visible and what is outside and invisible, maybe the white selection outline should still be an outline of the visible area of the strip, and not just around the text(in text edit mode), so some other type of outline should make the text-box visible? Or in other words, IMHO, the white outline should always be for the selected strip frame, and ex. a dashed (or some other style) outline is always the text-box outline.
Nice with a Text menu. Delete Character: Backspace and Line-Break: Return, are maybe overkill to expose? Esc to unselect text, is not a function of the Text Editor? The word "Text" is redundant inside the Text menu. Ex. Edit Text, Cut Text, Copy Text, Paste Text,
It is surprising that the Wrap Width isn't relative to the strip width, so 1 is equal to 100 % strip width. And the value doesn't change when the box gets wider, when the lines get longer? And it is even more surprising that it is possible to enter a value of 0 and that gives full width? Maybe a checkbox for switching Wrap Width on/off would be more in consistency with Blender functions in general?
When animating the Location, the outline doesn't seem to take that into account, when moving the playhead?
I can do that, I was looking more at 3D viewport, where cursor scales. It's matter of preference really.
I want to remove the anchor as well as text position since we have same things in transform properties.
Yes, I would like to work on this separately, possibly in same PR where I deal with text position and anchor. While having these propeties duplicated, it just complicates things. As far as color goes, I don't want to change it.
Sure, I can make this bit nicer. I just got bunch of stuff that I thought is useful and put it in menu.
There are no changes to text wrapping so far and it works as expected. What I would like to do is add gizmo for wrapping, so text box could be resized by mouse.
That is weird, will have to check.
Checkout
From your project repository, check out a new branch and test the changes.