Page MenuHome

Fix Font Object: insert multiple text when selecting.
ClosedPublic

Authored by Yuki Hashimoto (hzuika) on Aug 8 2021, 6:21 AM.

Details

Summary

bpy.ops.font.text_insert(text="multiple text") with multiple
characters wasn't working.

When the text is selected does not correctly insert multiple characters.

  • When the text was selected from left to right, the cursor only move one position next to the selected text.
  • When the text is selected from right to left, a part of the selected text remain.

Problem

Using bpy.ops.font.text_insert(text="multiple text") when the text is selected does not correctly insert multiple characters.

Solution

The kill_selection function, which deletes a selection string, can handle multiple insertion strings.

Old: Insert multiple text incorrectly when selecting text.

New: Insert multiple text correctly when selecting text.

Example file:

Diff Detail

Repository
rB Blender
Branch
fix_ob_font_selection (branched from master)
Build Status
Buildable 16281
Build 16281: arc lint + arc unit