Compare commits
3 Commits
v1.2.5
...
2df6d3bdc2
| Author | SHA1 | Date | |
|---|---|---|---|
| 2df6d3bdc2 | |||
| edda76f519 | |||
| 09da031cd4 |
19
.gitignore
vendored
19
.gitignore
vendored
@@ -68,10 +68,21 @@ desktop.ini
|
|||||||
# Project-specific directories and files
|
# Project-specific directories and files
|
||||||
.benchmarks/
|
.benchmarks/
|
||||||
|
|
||||||
# Marketing - Large binary files
|
# Marketing - Large binary files and assets
|
||||||
marketing/screenrecords/*.mp4
|
marketing/**/*.mp4
|
||||||
marketing/voice/*.wav
|
marketing/**/*.mov
|
||||||
marketing/*.psd
|
marketing/**/*.wav
|
||||||
|
marketing/**/*.psd
|
||||||
|
marketing/**/*.blend
|
||||||
|
marketing/**/*.blend[0-9]
|
||||||
|
marketing/screenrecords/
|
||||||
|
marketing/voice/
|
||||||
|
marketing/thumbnails/
|
||||||
|
|
||||||
|
# Build and Distribution
|
||||||
|
dist/
|
||||||
|
*.whl
|
||||||
|
src/blender_manifest.toml
|
||||||
|
|
||||||
# Temporary files
|
# Temporary files
|
||||||
*.tmp
|
*.tmp
|
||||||
|
|||||||
BIN
dist/text_texture_generator_v1.0.0.zip
vendored
BIN
dist/text_texture_generator_v1.0.0.zip
vendored
Binary file not shown.
BIN
dist/text_texture_generator_v1.0.0_free.zip
vendored
BIN
dist/text_texture_generator_v1.0.0_free.zip
vendored
Binary file not shown.
BIN
dist/text_texture_generator_v1.1.0.zip
vendored
BIN
dist/text_texture_generator_v1.1.0.zip
vendored
Binary file not shown.
BIN
dist/text_texture_generator_v1.1.0_free.zip
vendored
BIN
dist/text_texture_generator_v1.1.0_free.zip
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 162 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 104 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 156 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 139 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 186 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38
src/blender_manifest.toml
Normal file
38
src/blender_manifest.toml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
schema_version = "1.0.0"
|
||||||
|
|
||||||
|
# Module ID
|
||||||
|
id = "text_texture_generator"
|
||||||
|
|
||||||
|
# Module version
|
||||||
|
version = "1.2.5"
|
||||||
|
|
||||||
|
# Display name
|
||||||
|
name = "Text Texture Generator Pro"
|
||||||
|
|
||||||
|
# Short description
|
||||||
|
tagline = "Generate image textures from text with accurate dimensions and instant live preview"
|
||||||
|
|
||||||
|
# Maintainer
|
||||||
|
maintainer = "Marc Mintel <marc@mintel.me>"
|
||||||
|
|
||||||
|
# Version: standard or community
|
||||||
|
type = "add-on"
|
||||||
|
|
||||||
|
# Support: Community, Official or Core
|
||||||
|
support = "COMMUNITY"
|
||||||
|
|
||||||
|
# Website URI
|
||||||
|
website = "https://mintel.me"
|
||||||
|
|
||||||
|
# Common tags
|
||||||
|
tags = ["Material", "Shader", "Texture", "Text", "Image"]
|
||||||
|
|
||||||
|
# Minimum Blender version
|
||||||
|
blender_version_min = "4.0.0"
|
||||||
|
|
||||||
|
# License
|
||||||
|
license = ["GPL-3.0-or-later"]
|
||||||
|
|
||||||
|
[permissions]
|
||||||
|
# files = "Read and write access to files"
|
||||||
|
# network = "Access to the Internet"
|
||||||
@@ -150,7 +150,10 @@ def generate_texture_image(props, width, height):
|
|||||||
try:
|
try:
|
||||||
text_bbox = temp_draw.textbbox((0, 0), text_value, font=text_font)
|
text_bbox = temp_draw.textbbox((0, 0), text_value, font=text_font)
|
||||||
except Exception:
|
except Exception:
|
||||||
font_size_val = getattr(props, 'font_size', 100)
|
try:
|
||||||
|
font_size_val = int(getattr(props, 'font_size', 100))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
font_size_val = 100
|
||||||
width = font_size_val * len(text_value) * 0.6
|
width = font_size_val * len(text_value) * 0.6
|
||||||
height = font_size_val
|
height = font_size_val
|
||||||
text_bbox = (0, 0, width, height)
|
text_bbox = (0, 0, width, height)
|
||||||
@@ -903,9 +906,15 @@ def generate_preview(props, preview_width=None, preview_height=None):
|
|||||||
pass
|
pass
|
||||||
# Use full texture resolution when not explicitly provided
|
# Use full texture resolution when not explicitly provided
|
||||||
if not preview_width or preview_width <= 0:
|
if not preview_width or preview_width <= 0:
|
||||||
preview_width = getattr(props, 'texture_width', 512) or 512
|
try:
|
||||||
|
preview_width = int(getattr(props, 'texture_width', 512))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
preview_width = 512
|
||||||
if not preview_height or preview_height <= 0:
|
if not preview_height or preview_height <= 0:
|
||||||
preview_height = getattr(props, 'texture_height', 512) or 512
|
try:
|
||||||
|
preview_height = int(getattr(props, 'texture_height', 512))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
preview_height = 512
|
||||||
|
|
||||||
# Generate at preview resolution
|
# Generate at preview resolution
|
||||||
result = generate_texture_image(props, preview_width, preview_height)
|
result = generate_texture_image(props, preview_width, preview_height)
|
||||||
|
|||||||
Reference in New Issue
Block a user