Page MenuHome

Python: Add compute_text_splines method to Curve
AbandonedPublic

Authored by Omar Emara (OmarSquircleArt) on Jan 9 2021, 11:05 PM.

Details

Summary

This patch adds a new compute_text_splines() method to the Curve ID. If
called on a font curve, the curve splines will be computed and become
accessible through the curve.splines property.

The curve minmax function used an empty nurb listbase to indicate a font
object, so it had to be updated to use the curve type instead.

Diff Detail

Repository
rB Blender
Branch
compute-text-splines (branched from master)
Build Status
Buildable 12068
Build 12068: arc lint + arc unit

Event Timeline

Omar Emara (OmarSquircleArt) requested review of this revision.Jan 9 2021, 11:05 PM
Omar Emara (OmarSquircleArt) created this revision.

Such things needs to be done with an extreme care. What is it exactly you're solving?

The issue here is that the result is not very well defined: if used on original object, animation (and possible overrides in the future) is ignored. If the goal is to somehow make it possible to access splines, think better solution would be to do something similar to object.to_mesh().

@Sergey Sharybin (sergey) I will take a look at object.to_mesh().
The goal is to make it possible to access the splines of texts in a procedural manner. We are mainly proposing such feature to satisfy the needs of Animation Nodes users, but this should be useful for all add-on developers.

Abandon in favor of D10354.