This commit is contained in:
2025-10-13 17:01:37 +02:00
parent 57b55b10a2
commit 09f33e461d
7 changed files with 91 additions and 22 deletions

View File

@@ -688,21 +688,26 @@ def generate_texture_image(props, width, height):
traceback.print_exc()
return None, None
def generate_preview(props, preview_width=512, preview_height=512):
def generate_preview(props, preview_width=None, preview_height=None):
pass
"""
Generate a preview version of the texture at lower resolution.
Args:
props: Text texture properties object
preview_width: Preview image width (default: 512)
preview_height: Preview image height (default: 512)
preview_width: Preview image width. Defaults to the texture width if available.
preview_height: Preview image height. Defaults to the texture height if available.
Returns:
Blender image object or None on error
"""
try:
pass
# Use full texture resolution when not explicitly provided
if not preview_width or preview_width <= 0:
preview_width = getattr(props, 'texture_width', 512) or 512
if not preview_height or preview_height <= 0:
preview_height = getattr(props, 'texture_height', 512) or 512
# Generate at preview resolution
result = generate_texture_image(props, preview_width, preview_height)