load installed fonts, fix some minor loading issues

This commit is contained in:
jrkb 2024-08-14 13:39:47 +02:00
parent 8ce5e6c816
commit 0bf80e01b2
3 changed files with 69 additions and 20 deletions

View file

@ -1,4 +1,3 @@
import time
import datetime
from mathutils import (
@ -19,6 +18,22 @@ def mapRange(in_value, in_min, in_max, out_min, out_max, clamp=False):
return max(out_max, min(out_min, output))
else:
return output
import warnings
import functools
def deprecated(func):
"""This is a decorator which can be used to mark functions
as deprecated. It will result in a warning being emitted
when the function is used."""
@functools.wraps(func)
def new_func(*args, **kwargs):
warnings.simplefilter('always', DeprecationWarning) # turn off filter
warnings.warn("Call to deprecated function {}.".format(func.__name__),
category=DeprecationWarning,
stacklevel=2)
warnings.simplefilter('default', DeprecationWarning) # reset filter
return func(*args, **kwargs)
return new_func
# # Evaluate a bezier curve for the parameter 0<=t<=1 along its length
# def evaluateBezierPoint(p1, h1, h2, p2, t):