This commit is contained in:
2025-10-13 16:56:38 +02:00
parent bf636cbc66
commit 57b55b10a2
21 changed files with 624 additions and 202 deletions

View File

@@ -11,15 +11,13 @@
"operators/preset_ops.py",
"operators/text_editor_ops.py"
],
"exclude_patterns": ["*batch*", "*advanced*", "*overlay*", "*utility*"],
"max_texture_size": 1024,
"exclude_patterns": ["*batch*", "*advanced*", "*utility*"],
"max_concurrent_operations": 1
},
"full": {
"description": "Full version - all features included",
"exclude_files": ["blender_manifest.toml"],
"exclude_patterns": [],
"max_texture_size": 4096,
"max_concurrent_operations": 4
}
},

View File

@@ -68,7 +68,7 @@ def create_template_variables(config: Dict, version: str, version_type: str = "f
# Define features based on version type
if version_type == "free":
enabled_features = ["basic", "preview", "image_overlays", "basic_utilities"]
enabled_features = ["basic", "preview"]
else: # full version
enabled_features = ["basic", "preview", "image_overlays", "basic_utilities", "advanced_styling", "normal_maps", "presets", "batch_processing", "advanced_utilities", "text_fitting"]
@@ -105,7 +105,6 @@ def create_template_variables(config: Dict, version: str, version_type: str = "f
'BLENDER_VERSION_PATCH': str(blender_patch),
'DEPENDENCIES': dependencies_str,
'ENABLED_FEATURES': json.dumps(enabled_features),
'MAX_TEXTURE_SIZE': str(version_config['max_texture_size']),
'MAX_CONCURRENT_OPERATIONS': str(version_config['max_concurrent_operations'])
}
@@ -204,4 +203,4 @@ if __name__ == "__main__":
sync_version(args.version, args.type)
except Exception as e:
print(f"Error: {e}")
sys.exit(1)
sys.exit(1)

View File

@@ -28,12 +28,10 @@ def get_version_limits():
"""Get version-specific limits."""
if VERSION_TYPE == "free":
return {
"max_texture_size": {{MAX_TEXTURE_SIZE}},
"max_concurrent_operations": {{MAX_CONCURRENT_OPERATIONS}}
}
else:
return {
"max_texture_size": 4096,
"max_concurrent_operations": 4
}
@@ -117,9 +115,13 @@ def has_text_fitting():
def get_max_resolution():
"""Get maximum texture resolution based on version"""
"""Get maximum texture resolution based on version.
Returns:
None if texture resolution is unrestricted, otherwise an integer limit.
"""
limits = get_version_limits()
return limits.get("max_texture_size", 1024)
return limits.get("max_texture_size")
def should_show_feature_lock(feature_name):
"""Check if feature lock indicator should be shown."""
@@ -157,11 +159,14 @@ def get_feature_availability_text():
def get_version_info_details():
"""Get detailed version information for display."""
limits = get_version_limits()
max_texture_size = limits.get('max_texture_size')
if not max_texture_size:
max_texture_size = 'Unlimited'
info = {
'version_type': VERSION_TYPE.upper(),
'max_texture_size': limits.get('max_texture_size', 'Unlimited'),
'max_texture_size': max_texture_size,
'max_concurrent_operations': limits.get('max_concurrent_operations', 'Unlimited'),
'features_enabled': len(ENABLED_FEATURES),
'upgrade_available': is_free_version()
}
return info
return info