Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
73b85949
Commit
73b85949
authored
5 years ago
by
Julien Duroure
Browse files
Options
Downloads
Patches
Plain Diff
glTF exporter: allow addons with multiple extensions
parent
4cdb8df8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
io_scene_gltf2/__init__.py
+6
-2
6 additions, 2 deletions
io_scene_gltf2/__init__.py
with
6 additions
and
2 deletions
io_scene_gltf2/__init__.py
+
6
−
2
View file @
73b85949
...
...
@@ -15,7 +15,7 @@
bl_info
=
{
'
name
'
:
'
glTF 2.0 format
'
,
'
author
'
:
'
Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors
'
,
"
version
"
:
(
1
,
1
,
29
),
"
version
"
:
(
1
,
1
,
30
),
'
blender
'
:
(
2
,
81
,
6
),
'
location
'
:
'
File > Import-Export
'
,
'
description
'
:
'
Import-Export as glTF 2.0
'
,
...
...
@@ -356,7 +356,7 @@ class ExportGLTF2_Base:
preferences
=
bpy
.
context
.
preferences
for
addon_name
in
preferences
.
addons
.
keys
():
try
:
if
hasattr
(
sys
.
modules
[
addon_name
],
'
glTF2ExportUserExtension
'
):
if
hasattr
(
sys
.
modules
[
addon_name
],
'
glTF2ExportUserExtension
'
)
or
hasattr
(
sys
.
modules
[
addon_name
],
'
glTF2ExportUserExtensions
'
)
:
extension_panel_unregister_functors
.
append
(
sys
.
modules
[
addon_name
].
register_panel
())
self
.
has_active_extenions
=
True
except
Exception
:
...
...
@@ -468,6 +468,10 @@ class ExportGLTF2_Base:
if
hasattr
(
sys
.
modules
[
addon_name
],
'
glTF2ExportUserExtension
'
):
extension_ctor
=
sys
.
modules
[
addon_name
].
glTF2ExportUserExtension
user_extensions
.
append
(
extension_ctor
())
if
hasattr
(
sys
.
modules
[
addon_name
],
'
glTF2ExportUserExtensions
'
):
extension_ctors
=
sys
.
modules
[
addon_name
].
glTF2ExportUserExtensions
for
extension_ctor
in
extension_ctors
:
user_extensions
.
append
(
extension_ctor
())
export_settings
[
'
gltf_user_extensions
'
]
=
user_extensions
return
gltf2_blender_export
.
save
(
context
,
export_settings
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment