update addons (for 5.2)
This commit is contained in:
@@ -154,19 +154,44 @@ class GOVIE_Quick_Export_GLB_Operator(bpy.types.Operator):
|
||||
|
||||
# read preset parameters from file
|
||||
if preset_filepath:
|
||||
|
||||
class Container(object):
|
||||
__slots__ = ("__dict__",)
|
||||
|
||||
op = Container()
|
||||
preset_file = open(preset_filepath, "r")
|
||||
|
||||
# storing the values from the preset on the class
|
||||
for line in preset_file.readlines()[3::]:
|
||||
exec(line, globals(), locals())
|
||||
preset_key = line.split("op.")[1].split(" = ")[0]
|
||||
preset_value = line.split("op.")[1].split(" = ")[1].rstrip()
|
||||
|
||||
if preset_value.startswith("'") and preset_value.endswith("'"):
|
||||
# value is a string
|
||||
gltf_export_param[preset_key] = preset_value[1:-1]
|
||||
continue
|
||||
|
||||
if preset_value == "True":
|
||||
# value is a bool
|
||||
gltf_export_param[preset_key] = True
|
||||
continue
|
||||
|
||||
if preset_value == "False":
|
||||
# value is a bool
|
||||
gltf_export_param[preset_key] = False
|
||||
continue
|
||||
|
||||
try:
|
||||
preset_value_converted = int(preset_value)
|
||||
# if no error is thrown its an int
|
||||
gltf_export_param[preset_key] = preset_value_converted
|
||||
continue
|
||||
except ValueError:
|
||||
try:
|
||||
# should be a float
|
||||
preset_value_converted = float(preset_value)
|
||||
gltf_export_param[preset_key] = preset_value_converted
|
||||
except ValueError:
|
||||
print(
|
||||
"Could not convert preset parameter from gltf preset at line: {}".format(
|
||||
line
|
||||
)
|
||||
)
|
||||
|
||||
# pass class dictionary to the operator
|
||||
gltf_export_param = op.__dict__
|
||||
else:
|
||||
gltf_export_param["export_extras"] = True
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ bl_info = {
|
||||
"author": "Lorenz Wieseke, 3D Interaction Technologies GmbH (contact@govie.de)",
|
||||
"description": "Transform your model into a web-optimized GLB file for use in the Govie Editor.",
|
||||
"blender": (4, 2, 0),
|
||||
"version": (1, 0, 20),
|
||||
"version": (1, 0, 22),
|
||||
"location": "View 3D > Property Panel (N-Key in 3D View)",
|
||||
"warning": "",
|
||||
"category": "Scene",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
schema_version = "1.0.0"
|
||||
|
||||
id = "govietools"
|
||||
version = "1.0.20"
|
||||
version = "1.0.22"
|
||||
name = "Govie Tools"
|
||||
tagline = "Optimize your model for use in the Govie Editor"
|
||||
maintainer = "Stefan Bernstein, 3D Interaction Technologies GmbH <contact@govie.de>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "govietools"
|
||||
version = "1.0.20"
|
||||
version = "1.0.21"
|
||||
description = "Optimize your model for use in the Govie Editor"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11.13"
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
version = 1
|
||||
revision = 2
|
||||
requires-python = ">=3.11.13"
|
||||
|
||||
[[package]]
|
||||
name = "govietools"
|
||||
version = "1.0.20"
|
||||
source = { virtual = "." }
|
||||
Reference in New Issue
Block a user