Add rotate option to blf module #21867
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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 project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#21867
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
%%%Added an optional angle argument to the blf.draw function to allow the text to be rotated.
I tried to wrap the BLF_default_rotation directly but it sets the global text rotation angle and if you don't reset it then... well, not really intended behavior results.
So this patch sets the angle, calls the draw function and then resets the rotation angle back to 0 which is a lot safer than the alternative.%%%
Changed status to: 'Open'
%%%Version #2 with wrappers for rotate, shadow and clipping along with the helper functions to get them to work.
No idea what BLF_KERNING_DEFAULT does but threw that in as well for completeness.%%%
%%%Could you please make these 2 changes.
%%%
%%%Ok, did #1, if blur != 0, 3 or 5 it throws an error.
On change #2, this would break consistency with the bgl module where all the constants are in the same flat namespace as the functions.
And, as we all know, Consistency is King...
Based on my own usage of this module the chances are good that the user will also be using the bgl module as well and will expect them to behave similarly when it comes to constants since they both fulfill a nearly identical roll.
Having different methods for the same thing like bgl.glEnable(bgl.GL_BLEND) and blf.enable(blf.modes.ROTATION) will just lead to confusion IMHO.
I did however remove the BLF_ prefix as per your request since blf.ROTATION is pretty nearly the same thing.%%%
%%%applied patch to trunk, /w small fix, exception needed to return NULL, not -1.
re: opengl consistency, we have a number of python api's so its a choice to which once you want to match, but since this is probably used with OpenGL I can see the rationale. %%%
Changed status from 'Open' to: 'Archived'
%%%This might come a liitle late, but I just noticed, that the "invalid blur level" error doesn't show up when using blf.blur() inside the Game Engine.%%%