Compare commits

..

No commits in common. "36ae68761d60d678683ae1f00592a79edb5c8aa6" and "65710b05ee8601f2edea554e6d2cdc20c464499a" have entirely different histories.

8 changed files with 342 additions and 3893 deletions

1
.gitignore vendored
View file

@ -5,4 +5,3 @@ venv
# vim
*.swo
*.swp
/abc3d_updater/*

View file

@ -5,12 +5,6 @@ source venv/bin/activate
pip install bpy
```
to install mathutils, this was necessary for me:
```
sudo xbps-install -Sy python3.11-devel
CFLAGS=$(python3.11-config --cflags) LDFLAGS=$(python3.11-config --ldflags) pip install mathutils
```
# install addon:
```bash
cd <root directory>

File diff suppressed because it is too large Load diff

View file

@ -6,15 +6,12 @@ let g:jedi#environment_path = "venv"
""""""""""""""""""""""""""""""""" ALE
"let g:ale_python_pylint_executable = '/home/jrkb/git/pointer/neomatter/font3d/abc3d/venv/bin/pylint'
"let g:ale_python_executable='/home/jrkb/git/pointer/neomatter/font3d/abc3d/venv/bin/python'
"let g:ale_python_pylint_executable = '/home/jrkb/git/pointer/neomatter/font3d/font3d_blender_addon/venv/bin/pylint'
"let g:ale_python_executable='/home/jrkb/git/pointer/neomatter/font3d/font3d_blender_addon/venv/bin/python'
"let g:ale_python_pylint_use_global=1
"let g:ale_use_global_executables=1
"let g:ale_python_auto_pipenv=1
"let g:ale_python_auto_virtualenv=1
"let g:ale_virtualenv_dir_names = ['venv']
"let g:ale_linters = { 'javascript': ['eslint', 'tsserver'], 'python': ['jedils', 'pylint', 'flake8'], 'cpp': ['cc', 'clangcheck', 'clangd', 'clangtidy', 'clazy', 'cppcheck', 'cpplint', 'cquery', 'cspell', 'flawfinder'], 'php': ['php_cs_fixer'] }
"let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'], 'python': ['autopep8'], 'cpp': ['uncrustify'], 'javascript': js_fixers, 'css': ['prettier'], 'json': ['prettier'], 'php': ['php_cs_fixer'] }
let g:ale_pattern_options = {'\.py$': {'ale_enabled': 0}}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -605,21 +605,9 @@ def is_mesh(o):
return type(o.data) == bpy.types.Mesh
def is_metrics_object(o):
if f"{utils.prefix()}_type" in o:
return o[f"{utils.prefix()}_type"] == 'metrics'
return (re.match(".*_metrics$", o.name) != None or re.match(".*_metrics.[\d]{3}$", o.name) != None) and is_mesh(o)
def is_text_object(o):
if f"{utils.prefix()}_type" in o:
return o[f"{utils.prefix()}_type"] == 'textobject'
for t in bpy.context.scene.abc3d_data.available_texts:
if o == t.text_object:
return True
return False
def is_glyph(o):
if f"{utils.prefix()}_type" in o:
return o[f"{utils.prefix()}_type"] == 'glyph'
try:
return type(o.parent) is not type(None) \
and "glyphs" in o.parent.name \
@ -628,14 +616,6 @@ def is_glyph(o):
except ReferenceError as e:
return False
def update_types():
scene = bpy.context.scene
abc3d_data = scene.abc3d_data
for t in abc3d_data.available_texts:
t.text_object[f"{utils.prefix()}_type"] = "textobject"
for g in t.glyphs:
g.glyph_object[f"{utils.prefix()}_type"] = "glyph"
# blender bound_box vertices
#
# 3------7.
@ -698,11 +678,6 @@ def set_text_on_curve(text_properties, recursive=True):
if len(text_properties.text) != len(text_properties.glyphs):
regenerate = True
# blender bug
# https://projects.blender.org/blender/blender/issues/100661
if mom.data.use_path:
regenerate = True
# if we regenerate.... delete objects
if regenerate:
completely_delete_objects(glyph_objects)
@ -774,12 +749,7 @@ def set_text_on_curve(text_properties, recursive=True):
location, tangent, spline_index = calc_point_on_bezier_curve(mom, advance, True, True)
if spline_index != previous_spline_index:
is_newline = True
if regenerate:
ob.location = mom.matrix_world @ (location + text_properties.translation)
else:
ob.location = (location + text_properties.translation)
ob.location = mom.matrix_world @ (location + text_properties.translation)
if not text_properties.ignore_orientation:
mask = [0]
input_rotations = [mathutils.Vector((0.0, 0.0, 0.0))]
@ -795,10 +765,7 @@ def set_text_on_curve(text_properties, recursive=True):
ob.rotation_mode = 'QUATERNION'
q = mathutils.Quaternion()
q.rotate(text_properties.orientation)
if regenerate:
ob.rotation_quaternion = (mom.matrix_world @ motor[0] @ q.to_matrix().to_4x4()).to_quaternion()
else:
ob.rotation_quaternion = (motor[0] @ q.to_matrix().to_4x4()).to_quaternion()
ob.rotation_quaternion = (mom.matrix_world @ motor[0] @ q.to_matrix().to_4x4()).to_quaternion()
else:
q = mathutils.Quaternion()
q.rotate(text_properties.orientation)
@ -845,8 +812,6 @@ def set_text_on_curve(text_properties, recursive=True):
if regenerate:
mom.select_set(True)
# https://projects.blender.org/blender/blender/issues/100661
mom.data.use_path = False
mom[f"{utils.prefix()}_type"] = "textobject"
mom[f"{utils.prefix()}_linked_textobject"] = text_properties.text_id
mom[f"{utils.prefix()}_font_name"] = text_properties.font_name

View file

@ -4,7 +4,7 @@ def get_version_major():
def get_version_minor():
return 0
def get_version_patch():
return 2
return 1
def get_version_string():
return f"{get_version_major()}.{get_version_minor()}.{get_version_patch}"
def prefix():
@ -30,8 +30,6 @@ 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
@ -49,9 +47,6 @@ def deprecated(func):
return func(*args, **kwargs)
return new_func
import subprocess
import sys
def open_file_browser(directory):
if sys.platform=='win32':
os.startfile(directory)