Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import v2 #4

Merged
merged 326 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
326 commits
Select commit Hold shift + click to select a range
8472783
Update encoded image return type
keianhzo Oct 28, 2022
e7dc7fe
Update fake bpy to 3.3
keianhzo Oct 28, 2022
6caaa2c
Fix debugger
keianhzo Oct 28, 2022
d4558a8
Update test versions
keianhzo Oct 28, 2022
be35b7d
Fix Unions
keianhzo Oct 28, 2022
112b481
Fix type checking
keianhzo Oct 28, 2022
91772e0
Update actions versions
keianhzo Oct 28, 2022
a18cd7c
Merge pull request #147 from MozillaReality/blender-3.3-support
keianhzo Oct 28, 2022
b8a98f2
Update remaining actions
keianhzo Oct 28, 2022
b9fbca6
Merge branch 'master' of https://github.com/MozillaReality/hubs-blend…
keianhzo Oct 28, 2022
731d379
Update set-output to env variables
keianhzo Oct 28, 2022
d8e365d
Add build number
keianhzo Oct 28, 2022
bf53876
Merge pull request #148 from MozillaReality/update-gh
keianhzo Oct 28, 2022
1f059a9
Make sure all tests are created with latest release (0.0.15) and firs…
keianhzo Nov 2, 2022
5e5a97b
Merge pull request #150 from MozillaReality/tests-update
keianhzo Nov 2, 2022
464a412
Merge pull request #149 from MozillaReality/build-number
keianhzo Nov 2, 2022
28eaf83
Separate import functions out into their own file. Refactor how spec…
Exairnous Apr 6, 2022
126109f
Fix setting colors from Hex, handle more special cases, reduce code d…
Exairnous May 13, 2022
21ada56
Update importer for changes in the new architecture.
Exairnous Jul 6, 2022
3aaf0eb
Clear the stored components after the import is finished so they don'…
Exairnous Jul 7, 2022
02e990b
Handle properties that link to objects in a more reliable and future …
Exairnous Jul 7, 2022
9b0d4ac
Update handle_spawner to the new architecture.
Exairnous Jul 7, 2022
9bd5eab
Add support for newer import API and refactor some code
keianhzo Jul 28, 2022
e0e8f9c
Simplify compat import
keianhzo Jul 28, 2022
a3e92b1
Consolidate into one GLTF importer
keianhzo Jul 28, 2022
0dfd575
Fix media-frame yup issues and expose a global import property for yup
keianhzo Jul 28, 2022
051f24b
Remove debug print
keianhzo Jul 28, 2022
25ec5fb
Lightmap support
keianhzo Jul 29, 2022
74743ce
Support for importing components in bones
keianhzo Jul 29, 2022
9e6ed2e
Remove duplicated comment
keianhzo Aug 22, 2022
3794fcd
Remove unnecessary gather_imports
keianhzo Aug 22, 2022
a963def
Update io add_hubs_components function name
keianhzo Aug 22, 2022
0890280
Fix glTF string
keianhzo Aug 22, 2022
37e6a03
Remove import_hubs_components method
keianhzo Aug 22, 2022
815906d
Catch and log component import exceptions
keianhzo Aug 22, 2022
7994552
Move import
keianhzo Aug 22, 2022
8fd9910
Update addons/io_hubs_addon/components/definitions/media_frame.py
keianhzo Aug 22, 2022
7d9711d
Update addons/io_hubs_addon/io/gltf_importer.py
keianhzo Aug 22, 2022
8a5d30f
Update addons/io_hubs_addon/io/gltf_importer.py
keianhzo Aug 22, 2022
9be706e
Update addons/io_hubs_addon/io/gltf_importer.py
keianhzo Aug 22, 2022
5120f66
Update addons/io_hubs_addon/components/definitions/background.py
keianhzo Aug 22, 2022
92080da
Update addons/io_hubs_addon/components/definitions/background.py
keianhzo Aug 22, 2022
5979823
Update addons/io_hubs_addon/io/gltf_importer.py
keianhzo Aug 22, 2022
efcc735
Fix merge issues
keianhzo Aug 22, 2022
544b1a1
Fix lightmap import
keianhzo Aug 25, 2022
4620a56
Show importer exception call stack
keianhzo Aug 25, 2022
b05f7d4
Support for Spoke GLB import
keianhzo Aug 25, 2022
34abb76
Cleanup.
Exairnous Aug 26, 2022
6880d57
Fix merge conflict
keianhzo Sep 6, 2022
30c9920
Use import extensions starting in Blender 3.1 because they aren't pre…
Exairnous Sep 11, 2022
b2fe084
Fix #123
Exairnous Sep 19, 2022
d4ac897
Update importer parameters import_settings -> gltf
keianhzo Nov 2, 2022
c81cf53
Fix HDR images glTF import
keianhzo Nov 2, 2022
2988e81
Rebase fixes
keianhzo Nov 3, 2022
d11521b
Import tests
keianhzo Nov 4, 2022
44c6c20
Add delayed gathered to import and update tests
keianhzo Nov 4, 2022
5384bca
Remove debug print
keianhzo Nov 5, 2022
bd94d63
Enable all tests
keianhzo Nov 5, 2022
61e381d
Change the default of the audio params component property overrideAud…
Exairnous Nov 6, 2022
619ca03
Update version with the first add-on version items
keianhzo Nov 7, 2022
c87ae53
Merge pull request #152 from Exairnous/fix-audio-overrides-breaking-o…
keianhzo Nov 7, 2022
c4712ae
Merge pull request #153 from MozillaReality/fix-version-update
keianhzo Nov 7, 2022
895d9c8
Detach relfection probes from the reflection probe object for correct…
keianhzo Nov 7, 2022
11715e4
Fix import issues with the text component in Spoke
keianhzo Nov 7, 2022
2c99c33
Support for importing Spoke's spawn points
keianhzo Nov 7, 2022
d6325b5
Support Spoke's box collider import
keianhzo Nov 7, 2022
19af6c3
Pack generated reflection probe environment maps instead of outputtin…
Exairnous Nov 2, 2022
d4f4acc
Add -old to conflicting environment maps to improve reflection probe …
Exairnous Nov 3, 2022
d4b854e
Fix reflection probes sometimes failing to render and getting stuck m…
Exairnous Nov 3, 2022
6f46a12
Add an open EnvMap button to reflection probes.
Exairnous Nov 3, 2022
f853339
Add import/export reflection probe environment maps operators.
Exairnous Nov 4, 2022
fc28e23
Allow reflection probes to be locked.
Exairnous Nov 4, 2022
4f6868d
Prevent baking errors when there are no valid probes for the bake mode.
Exairnous Nov 4, 2022
c2bfbbb
Add warnings for and management of reflection probe environment map r…
Exairnous Nov 5, 2022
155e931
Add a warning for images selected as reflection probe environment map…
Exairnous Nov 5, 2022
f4d451f
Add bake mode dependent tooltips to the reflection probe bake operator.
Exairnous Nov 5, 2022
d5d3616
Restore the preferences' saved state after baking reflection probes.
Exairnous Nov 5, 2022
4196de2
Clean up the leftover images when reflection probe baking is cancelled.
Exairnous Nov 5, 2022
8e92c55
Account for linked reflection probes.
Exairnous Nov 6, 2022
62d3be2
Improve warnings and selection functionality for mismatched reflectio…
Exairnous Nov 6, 2022
e7131b0
PEP 8 formatting.
Exairnous Nov 7, 2022
6b2ec44
Add rotation and scene envmap warnings to reflection probes.
Exairnous Nov 9, 2022
f493274
Merge branch 'master' into fix-linking-issues
Exairnous Nov 10, 2022
28d5711
PEP 8 formatting.
Exairnous Nov 15, 2022
b1438ae
Fix merge issues caused by the addition of the build number to the ad…
Exairnous Nov 18, 2022
ebca722
Remove the unneeded refresh from the GizmoGroup setup function.
Exairnous Nov 18, 2022
12ad7e9
Account for duplicate window setups in the scene_and_view_layer_updat…
Exairnous Nov 18, 2022
e163ec2
Document the known scene/view layer actions that don't trigger a deps…
Exairnous Nov 18, 2022
9e4300c
Migrate linked components when undoing their removal.
Exairnous Nov 19, 2022
fe34901
Switch to migrating components based solely off of their local add-on…
Exairnous Nov 19, 2022
583ac5e
Always show the link migration warning when migrating linked components.
Exairnous Nov 20, 2022
187b1b1
Don't constrain updating gizmos to LOCAL migrations.
Exairnous Nov 20, 2022
a004c1d
Update the linked migration warning.
Exairnous Nov 20, 2022
bd1cfe3
Only warn about linked components if a migration was actually done.
Exairnous Nov 21, 2022
7988a3a
Improve the migration report for linked components.
Exairnous Nov 21, 2022
cac5c60
Merge pull request #160 from Exairnous/pep8-format
keianhzo Nov 22, 2022
ace9aa8
Add a PEP8 GH and a manual formatter script
keianhzo Nov 22, 2022
6b50a31
Exclude models in PEP8 GA
keianhzo Nov 22, 2022
a9b78e3
Switch to component specific versions.
Exairnous Nov 22, 2022
ab253a5
Fix beta bone components not being versioned correctly.
Exairnous Nov 22, 2022
d608f91
Convert migration type from using strings to using an Enum.
Exairnous Nov 22, 2022
01401c7
Add migrations and previous beta versioning for components on materials.
Exairnous Nov 22, 2022
cb8c98b
Change GA and improve formatter params
keianhzo Nov 22, 2022
e590d46
Change GA and improve formatter params
keianhzo Nov 22, 2022
629af78
Linter updates
keianhzo Nov 22, 2022
38e3547
Merge branch 'pep8-formatting' of https://github.com/MozillaReality/h…
keianhzo Nov 22, 2022
b6d4af5
fix autopep8 exclusion glob
keianhzo Nov 22, 2022
a712ae5
Move format script to python
keianhzo Nov 23, 2022
42ef715
Merge pull request #163 from MozillaReality/pep8-formatting
keianhzo Nov 23, 2022
8e2451f
Merge pull request #158 from Exairnous/reflection-probes-rotation-glo…
keianhzo Nov 24, 2022
1b990fb
Exclude hubs components from extras creation
keianhzo Nov 24, 2022
391ce5f
Disable active reflection probe operators when linked.
Exairnous Nov 28, 2022
d0ef9b9
Merge branch 'master' into pack-reflection-probes
Exairnous Nov 28, 2022
b7d6c0b
PEP 8 formatting.
Exairnous Nov 28, 2022
a93db16
Handle property exclusion better and add all properties
keianhzo Nov 28, 2022
7ef176f
Improve modules import and refactor video-texture-target import
keianhzo Nov 29, 2022
987764d
Fix typo
keianhzo Nov 29, 2022
dd6df05
Update README install image and fix some spacing
keianhzo Nov 29, 2022
5b311b8
Add a code style section to the README
keianhzo Nov 29, 2022
9984b93
Merge branch 'master' into update-readme-install-screenshot
keianhzo Nov 30, 2022
ceefba2
Merge pull request #168 from MozillaReality/update-readme-install-scr…
keianhzo Nov 30, 2022
e41846a
Remove audio-target imports
keianhzo Nov 30, 2022
02a411c
Remove unused import
keianhzo Nov 30, 2022
522b285
Fix README typo
keianhzo Nov 30, 2022
8d2ee9b
Update README.md
keianhzo Nov 30, 2022
5f9dc79
Limit Cone Outer Gain to the 0-1 range.
Exairnous Nov 30, 2022
19ee561
Allow new lines in report viewer messages and wrapped text.
Exairnous Dec 1, 2022
947806c
Report Python errors encountered while migrating components.
Exairnous Dec 1, 2022
0b2f23f
Add a generic function for displaying wrapped text in the UI.
Exairnous Dec 1, 2022
d2d0fbe
Display the total number of messages in the report viewer.
Exairnous Dec 1, 2022
00e3e26
Prefix report messages with their numerical position within the report.
Exairnous Dec 1, 2022
5e945dd
Stabilize the report viewer.
Exairnous Dec 1, 2022
79b8311
Merge pull request #169 from Exairnous/limit-cone-outer-gain
keianhzo Dec 2, 2022
b97b3ab
Merge pull request #167 from MozillaReality/import-slowdown
keianhzo Dec 2, 2022
3bccc50
Don't use blanket exception handling except for special cases like th…
Exairnous Dec 2, 2022
1134a6e
Add badges
keianhzo Dec 2, 2022
cf1d064
Move adding extra exceptions to before and after export
keianhzo Dec 2, 2022
3567b6a
Rename panels.py to ui.py
Exairnous Nov 10, 2022
b14f34f
Preserve property definition order when auto displaying/gathering.
Exairnous Dec 4, 2022
948d2c6
Update the audio component test file.
Exairnous Dec 4, 2022
57bc7db
Fix gather_joint_property error in Blender 3.2+ when getting the vnode.
Exairnous Nov 28, 2022
4718fca
Reset the bone EnumProperty when the srcNode changes.
Exairnous Nov 28, 2022
ad2953e
Merge branch 'master' into pack-reflection-probes
Exairnous Dec 5, 2022
4ce4c4e
Add a check for locked probes to the Open EnvMap operator's poll.
Exairnous Dec 5, 2022
8cc1ea1
Merge pull request #166 from MozillaReality/fix_extras
keianhzo Dec 5, 2022
42d65ee
Merge branch 'master' into pack-reflection-probes
keianhzo Dec 5, 2022
f46af55
Merge pull request #159 from Exairnous/rename-panels-to-ui
keianhzo Dec 5, 2022
a40ec70
Fix formatting to comply with the GitHub pycodestyle CI test.
Exairnous Dec 6, 2022
b3de9e7
Merge pull request #156 from Exairnous/pack-reflection-probes
keianhzo Dec 6, 2022
1f86224
Update workflow and badges
keianhzo Dec 6, 2022
3a0c18e
Merge pull request #174 from MozillaReality/update-ci
keianhzo Dec 6, 2022
2b0d9f8
Remove test dependency from the publish workflow
keianhzo Dec 6, 2022
3706d05
Fix status badges
keianhzo Dec 6, 2022
46cdd41
Merge pull request #171 from Exairnous/fix-gather-joint-property-get-…
keianhzo Dec 6, 2022
8d29d00
Merge pull request #173 from Exairnous/fix-stale-bone-id
keianhzo Dec 6, 2022
c3da594
Support linked PointerProperties in Blender 3.2+
Exairnous Nov 7, 2022
d5f2e45
Cleanup reflection probes utils imports.
Exairnous Dec 7, 2022
e87c591
Merge pull request #157 from Exairnous/fix-pointerproperties-blender-…
keianhzo Dec 7, 2022
fa7ff92
Update README.md
keianhzo Dec 7, 2022
cab7158
Update README.md
keianhzo Dec 7, 2022
c51c5b4
Fix error when clearing the srcNode property in audio and video textu…
Exairnous Dec 7, 2022
6bf0581
Fix typos/grammar in the scale warning message for ammo shapes and me…
Exairnous Dec 6, 2022
0fb1341
Fix typos
keianhzo Dec 8, 2022
306de75
Improve UV scroll runtime checks
keianhzo Dec 8, 2022
287c828
Migrate components on add-on registration.
Exairnous Dec 4, 2022
02a5c1e
Reset any global variables on add-on registration that would have bee…
Exairnous Dec 9, 2022
52f790d
Merge branch 'master' into fix-linking-issues
Exairnous Dec 9, 2022
d57ad42
Utilize the is_linked function for migrations and beta versioning.
Exairnous Dec 9, 2022
d737e90
Cleanup and PEP 8 formatting.
Exairnous Dec 9, 2022
e7b2d7f
Add comment to the migration operator is_registration property.
Exairnous Dec 10, 2022
30d5987
Warn about and display components on unsupported hosts.
Exairnous Dec 10, 2022
d78a7bf
Use the new utility function for retrieving host references in compon…
Exairnous Dec 10, 2022
49a090e
Fix the pre and post export hooks not looping through all the hosts.
Exairnous Dec 10, 2022
3fe86ac
Remove the unused OBJECT_DATA member from the PanelType Enum.
Exairnous Dec 10, 2022
0647d56
Improve/fix the loop animation message bus handling and handler regis…
Exairnous Dec 10, 2022
b76688e
Fix 3.2 classloading issues
keianhzo Dec 13, 2022
4df6a09
Remove unneeded imports
keianhzo Dec 13, 2022
48c39cd
Fix poll errors during migration.
Exairnous Dec 16, 2022
d426486
Use the object directly when getting the host reference message for b…
Exairnous Dec 16, 2022
fd5ee81
Warn about future components.
Exairnous Dec 10, 2022
3d09c89
Armature migration and gizmo fixes.
Exairnous Dec 18, 2022
7f44296
Merge pull request #145 from Exairnous/fix-linking-issues
keianhzo Dec 23, 2022
ce6937f
Merge pull request #175 from Exairnous/fix-bone-id-reset-bug
keianhzo Dec 23, 2022
df5141c
Merge pull request #176 from Exairnous/typo-fix-ammo-shape-media-fram…
keianhzo Dec 23, 2022
b9e14a2
Merge branch 'master' into fix-typos
keianhzo Dec 23, 2022
40437d3
Merge fixes
keianhzo Dec 23, 2022
dc0dfb4
Merge pull request #184 from Exairnous/fix-pre-post-export-hooks
keianhzo Dec 23, 2022
e08372a
Merge pull request #185 from Exairnous/improve-loop-animation-msgbus-…
keianhzo Dec 23, 2022
52b51d2
Merge pull request #182 from Exairnous/handle-unsupported-hosts
keianhzo Dec 23, 2022
2259627
Merge pull request #183 from Exairnous/warn-future-components
keianhzo Dec 23, 2022
04296d6
Merge branch 'master' into armature-gizmo-and-migration-fixes
keianhzo Dec 23, 2022
d783b45
Merge pull request #188 from Exairnous/armature-gizmo-and-migration-f…
keianhzo Dec 23, 2022
a19ab4e
Merge branch 'master' into fix-typos
keianhzo Dec 23, 2022
6834519
Merge pull request #178 from MozillaReality/fix-typos
keianhzo Dec 23, 2022
4560bfa
Merge pull request #179 from MozillaReality/uvscroll-image-check
keianhzo Dec 23, 2022
374f2c0
Fix uv-scroll merge issues
keianhzo Dec 23, 2022
9be2e1b
Fix linter issues
keianhzo Dec 23, 2022
0ea7eb9
Make linter first stage
keianhzo Dec 23, 2022
d9cc35c
Move to BaseException for ctype related exceptions
keianhzo Dec 23, 2022
488a391
Add gizmos source blend files
keianhzo Dec 23, 2022
1ad2cab
Remove duplicated unsupported host message
keianhzo Dec 23, 2022
586ee7a
Add support for script reload
keianhzo Dec 23, 2022
1c75cad
Revert "Add support for script reload"
keianhzo Dec 23, 2022
0b048f3
Update unsupported hosts check
keianhzo Dec 23, 2022
289dd64
Check for non-empty material in uv-scroll drawing
keianhzo Dec 23, 2022
f6cd7c3
Fix 3.2 classloading issues
keianhzo Dec 13, 2022
05485f7
Remove unneeded imports
keianhzo Dec 13, 2022
209a082
Lazy load as many references to the gltf exporter module as possible
keianhzo Jan 3, 2023
f85f86f
Merge branch 'fix-3.2-classloading-issues' of https://github.com/Mozi…
keianhzo Jan 3, 2023
619392e
Merge pull request #186 from MozillaReality/fix-3.2-classloading-issues
keianhzo Jan 3, 2023
e52ff11
Add files via upload
theanine3D Dec 14, 2022
1d6bf77
Update audio.py
theanine3D Dec 14, 2022
32003c1
Update directional_light.py
theanine3D Dec 14, 2022
42b945b
Update directional_light.py
theanine3D Dec 14, 2022
5229168
Update image.py
theanine3D Dec 14, 2022
d1ceac3
Update link.py
theanine3D Dec 14, 2022
6e0884d
Update point_light.py
theanine3D Dec 14, 2022
d7fa547
Update point_light.py
theanine3D Dec 14, 2022
07f36a0
Update spot_light.py
theanine3D Dec 14, 2022
30e487c
Update video.py
theanine3D Dec 14, 2022
ca94138
Update pointlight.py
theanine3D Dec 14, 2022
f12f1ad
Add files via upload
theanine3D Dec 14, 2022
7584b74
Add files via upload
theanine3D Dec 14, 2022
8154a20
Add files via upload
theanine3D Dec 18, 2022
565f095
Add files via upload
theanine3D Dec 18, 2022
6f9dbfb
Add files via upload
theanine3D Dec 18, 2022
4215d83
Add files via upload
theanine3D Dec 18, 2022
aa88b2f
Add files via upload
theanine3D Dec 18, 2022
f35d2db
Add files via upload
theanine3D Dec 18, 2022
6809f1f
Add files via upload
theanine3D Dec 19, 2022
99c14aa
Add files via upload
theanine3D Dec 19, 2022
e974fe7
Add files via upload
theanine3D Dec 19, 2022
eae057a
Add files via upload
theanine3D Dec 20, 2022
79780f7
Add files via upload
theanine3D Dec 23, 2022
ab23336
Delete audio_link_image_video_point_light_spot_light_directional_ligh…
theanine3D Dec 23, 2022
4138cde
Fix linter issues
keianhzo Jan 3, 2023
8ab9519
Rename some gizmos
keianhzo Jan 3, 2023
9e09d83
Merge pull request #187 from theanine3D/master
keianhzo Jan 3, 2023
efddf8c
Test 3.4.0
keianhzo Dec 8, 2022
d5aa32b
Merge pull request #181 from MozillaReality/3-4-0-tests
keianhzo Jan 3, 2023
9123c0f
Fix generator
keianhzo Jan 3, 2023
2c310a2
Merge pull request #190 from MozillaReality/generator-fix
keianhzo Jan 3, 2023
fcfc8db
Merge branch 'master' into import-v2
keianhzo Jan 5, 2023
cf3ebb2
Merge fixes
keianhzo Jan 6, 2023
9d24341
Linter fixes
keianhzo Jan 6, 2023
54af4b4
Add reflection probe import support
keianhzo Jan 6, 2023
cf0a6e0
Disable undo stack in background mode
keianhzo Jan 9, 2023
8998792
Fix reflection probe host reference in migration
keianhzo Jan 17, 2023
4f2f74a
Make importer v1.1.0
keianhzo Jan 18, 2023
e3b048c
Merge branch 'import' into import-v2
Exairnous Mar 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/ci.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Lint

on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Python Linter
uses: weibullguy/[email protected]
with:
python-root-list: 'addons'
use-black: false
use-yapf: false
use-isort: false
use-docformatter: false
use-pycodestyle: true
use-autopep8: false
use-pydocstyle: false
use-mypy: false
use-pylint: false
use-flake8: false
use-mccabe: false
use-radon: false
use-rstcheck: false
use-check-manifest: false
use-pyroma: false
extra-black-options: ''
extra-yapf-options: ''
extra-isort-options: ''
extra-docformatter-options: ''
# This should work with **/models but it doesn't
extra-pycodestyle-options: '--exclude=models --ignore=E501,W504'
extra-pydocstyle-options: ''
extra-mypy-options: ''
extra-pylint-options: ''
extra-flake8-options: ''
extra-mccabe-options: ''
extra-radon-options: ''
extra-rstcheck-options: ''
extra-manifest-options: ''
extra-pyroma-options: ''
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
workflow_run:
workflows: [Test]
types:
- completed

env:
CI: true

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Update build number
run: |
sed -i'' 's/"dev_build"/${{ github.run_number }}/g' $GITHUB_WORKSPACE/addons/io_hubs_addon/__init__.py
- name: Upload addon artifacts
uses: actions/upload-artifact@v3
with:
name: io_hubs_addon
path: addons
if-no-files-found: error
19 changes: 9 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Test

on:
workflow_call:
inputs:
versions:
required: true
type: string
workflow_run:
workflows: [Lint]
types:
- completed

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{fromJson(inputs.versions)}}
version: ["3.4.0", "3.3.1", "2.93.9"]
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Finds latest Blender build, and outputs the hosted build's download URL.
- name: Find latest Blender build
id: blender_version
Expand All @@ -26,11 +25,11 @@ jobs:
patch=$(echo ${{ matrix.version }} | cut -d. -f3)
echo "Looking for Blender $BLENDER_MAJOR.$BLENDER_MINOR.${BLENDER_PATCH}"
BLENDER_URL="https://download.blender.org/release/Blender$major.$minor/blender-$major.$minor.$patch-linux-x64.tar.xz"
echo "::set-output name=blender-url::$BLENDER_URL"
echo "blender-url=$BLENDER_URL" >> $GITHUB_OUTPUT
# Loads a cached build of Blender if available. If not available, this step
# enqueues the /opt/blender directory to be cached after tests pass.
- id: blender_cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-blender
with:
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:
cd tests
OUT_PREFIX=$GITHUB_WORKSPACE/tests/out yarn test-bail --reporter-options reportDir=out/mochawesome
- name: Upload test artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-output-${{ matrix.version }}
path: tests/out/mochawesome
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
"remoteRoot": "${workspaceFolder}"
}
],
"justMyCode": true
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"python.autoComplete.extraPaths": [
"../fake_bpy_modules_3.0-20211212"
"./fake_bpy_modules_3.3-20221006"
],
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--exclude=**/models/**/*.py"
"--exclude=models", "--max-line-length", "120", "--experimental"
],
"python.analysis.extraPaths": [
"../fake_bpy_modules_3.0-20211212"
"./fake_bpy_modules_3.3-20221006"
],
"editor.formatOnSave": true
}
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# Hubs Exporter for Blender
# Hubs Blender Exporter and Importer

This addon extends the glTF 2.0 exporter to support the `MOZ_hubs_components` and `MOZ_lightmap` extensions allowing you to add behavior to glTF assets for [Mozilla Hubs](https://hubs.mozilla.com).

[![Test](https://github.com/MozillaReality/hubs-blender-exporter/actions/workflows/test.yml/badge.svg)](https://github.com/MozillaReality/hubs-blender-exporter/actions/workflows/test.yml)
[![Publish](https://github.com/MozillaReality/hubs-blender-exporter/actions/workflows/publish.yml/badge.svg)](https://github.com/MozillaReality/hubs-blender-exporter/actions/workflows/publish.yml)

# To Install
Find the latest [release](https://github.com/MozillaReality/hubs-blender-exporter/releases) and download the add-on zip file.
<img alt="select add-on zip file" src="https://user-images.githubusercontent.com/837184/175948982-64e263b6-d070-4d15-8d0b-248417a592da.png" width=685px height=330px />

In Blender: `Edit > Preferences > Add-ons`
Click install and select the zip file of the latest release.
<img width="780" alt="in blender prefs install addon" src="https://user-images.githubusercontent.com/4493657/102955927-dcc56900-448b-11eb-8bfa-07e68b31cffd.png">
Find the latest [release](https://github.com/MozillaReality/hubs-blender-exporter/releases) and download the add-on zip file.

Ensure the hubs component exporter is checked and enabled.
<img width="494" alt="hubs blender exporter installed" src="https://user-images.githubusercontent.com/4493657/102956859-c9b39880-448d-11eb-9f02-2f529f14c139.png">
<img alt="select add-on zip file" src="https://user-images.githubusercontent.com/837184/204576860-316b32de-8654-48a7-b9a7-3c0de1c1b652.png" width=685px height=330px />

In Blender: `Edit > Preferences > Add-ons`
Click install and select the zip file of the latest release.

<img width="780" alt="in blender prefs install addon" src="https://user-images.githubusercontent.com/4493657/102955927-dcc56900-448b-11eb-8bfa-07e68b31cffd.png">

Ensure the Hubs add-on is checked and enabled.

<img width="494" alt="hubs blender add-on installed" src="https://user-images.githubusercontent.com/4493657/102956859-c9b39880-448d-11eb-9f02-2f529f14c139.png">

# Adding Components

Expand All @@ -24,17 +30,17 @@ Click "Add Component" and select the component you wish to add from the list. On

# Using Lightmaps

To use a lightmap, create a `MOZ_lightmap` node from the `Add > Hubs` menu and hook up a image texture to the `Lightmap` input. Use a `UV Map` node to control what UV set should be used for the lightmap, as you would any other texture in Blender.
To use a lightmap, create a `MOZ_lightmap` node from the `Add > Hubs` menu and hook up a image texture to the `Lightmap` input. Use a `UV Map` node to control what UV set should be used for the lightmap, as you would any other texture in Blender.

![lightmap node](https://user-images.githubusercontent.com/130735/83931408-65c7bd80-a751-11ea-86b9-a2ae889ec5df.png)

Note that for use in Hubs, you currently **MUST** use the second UV set, as ThreeJS is currently hardcoded to use that for lightmaps. This will likely be fixed in the future so the exporter does not enforce this.
Note that for use in Hubs, you currently **MUST** use the second UV set, as ThreeJS is currently hardcoded to use that for lightmaps. This will likely be fixed in the future so the add-on does not enforce this.

![setting bake UV](https://user-images.githubusercontent.com/130735/83697782-b9e96b00-a5b4-11ea-986b-6690c69d8a3f.png)

# Exporting

This addon works in conjunction with the official glTF exporter, so exporting is done through it. Select "File > Export > glTF 2.0" and then ensure "Hubs Components" is enabled under "Extensions".
This addon works in conjunction with the official glTF add-on, so exporting is done through it. Select "File > Export > glTF 2.0" and then ensure "Hubs Components" is enabled under "Extensions".

![gltf export window](https://user-images.githubusercontent.com/130735/84547591-be9ad700-acb8-11ea-8c58-7b1104f0a3a7.png)

Expand All @@ -53,13 +59,21 @@ It is also possible to use the GLB file to replace the scene for an existing Hub
# Development

## Code Completion
To enable code completion for the Blender Python API you can install the [Fake Blender Python API module collection]([](https://github.com/nutti/fake-bpy-module/)). You can download the modules using the `setup.sh` script from the repository root or using [pip]([](https://github.com/nutti/fake-bpy-module/#install-via-pip-package)).
To enable code completion for the Blender Python API you can install the [Fake Blender Python API module collection](https://github.com/nutti/fake-bpy-module/). You can download the modules using the `setup.sh` script from the repository root or using [pip](https://github.com/nutti/fake-bpy-module/#install-via-pip-package).
## Code style

Tis repository follows the [PEP8](https://peps.python.org/pep-0008/) style convention for python files. If you use VSCode this repository already includes a setting to autoformat every python file when saved. If you don't use VSCode you can probably add a similar setting in your favorite editor. We are happy to add settings for other editors so feel free to open a PR if you want you editor's settings included.

We also includes a `format.py` python script that will formats the whole codebase when run. You can run it before pushing the PR to make sure that all the new code follows PEP8.

Both the python script and the VSCode settings rely on the [autopep8](https://pypi.org/project/autopep8/) command line tool for formatting so make sure that it's installed in your system.

## Addon development

It might be useful while developing to be able to load the addon directly from the checkout folder without needing to install it. You can do it in two ways:

- ### Overriding the Blender user scripts directory
You can override the Blender user scripts directory from the console to point to the addon repo directory.
You can override the Blender user scripts directory from the console to point to the addon repo directory.

**MacOS**

Expand All @@ -69,16 +83,15 @@ You can override the Blender user scripts directory from the console to point to

`BLENDER_USER_SCRIPTS=full_path_to_/hubs-blender-exporter blender`

- ### Symlinking you addon to the Blender user scripts directory
You can create a symbolic link pointing to `full_path_to_/hubs-blender-exporter/addons/io_hubs_addon` in your current Python scripts directory in Blender. This way you will also load any other addons that you have in that directory.
- ### Symlinking your addon to the Blender user scripts directory
You can create a symbolic link pointing to `full_path_to_/hubs-blender-exporter/addons/io_hubs_addon` in your current Python scripts directory in Blender. This way you will also load any other addons that you have in that directory.

**MacOS and Linux**

`ln -s full_path_to/hubs-blender-exporter/addons/io_hubs_addon full_path_to/blender_user_scrips_dir`

You can set or see the current Blender user scripts in the Preferences -> File Paths -> Scripts


# Debugging

You can debug the addon code with PyCharm or VSCode:
Expand All @@ -87,6 +100,7 @@ You can debug the addon code with PyCharm or VSCode:
- [Debug with VSCode](DEBUGGING.md)

# Continuous Integration Tests

To run the tests locally, your system should have a blender executable in the path that launches the desired version of Blender.

The latest version of [Yarn](https://yarnpkg.com/en/) should also be installed.
Expand Down
Binary file added addons/gizmos/box.blend
Binary file not shown.
Binary file added addons/gizmos/reflection_probe.blend
Binary file not shown.
Binary file added addons/gizmos/spawn_point.blend
Binary file not shown.
28 changes: 21 additions & 7 deletions addons/io_hubs_addon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from .io import gltf_exporter
from . import (nodes, components)
from . import preferences
from .io import gltf_exporter, gltf_importer
from . import (nodes, components)
from .io import gltf_exporter
import bpy

bl_info = {
"name": "Hubs Blender Addon",
"author": "Mozilla Hubs",
"description": "Tools for developing GLTF assets for Mozilla Hubs",
"description": "Tools for developing glTF assets for Mozilla Hubs",
"blender": (3, 1, 2),
"version": (1, 0, 0),
"version": (1, 0, 1),
"location": "",
"wiki_url": "https://github.com/MozillaReality/hubs-blender-exporter",
"tracker_url": "https://github.com/MozillaReality/hubs-blender-exporter/issues",
Expand All @@ -18,24 +21,35 @@

def register():
preferences.register()
gltf_exporter.register()
nodes.register()
components.register()
gltf_importer.register()
gltf_exporter.register()

# Migrate components if the add-on is enabled in the middle of a session.
if bpy.context.preferences.is_dirty:
def registration_migration():
# Passing True as the first argument of the operator forces an undo step to be created.
bpy.ops.wm.migrate_hubs_components(
True, is_registration=True)
bpy.app.timers.register(registration_migration)


def unregister():
gltf_exporter.unregister()
gltf_importer.unregister()
components.unregister()
nodes.unregister()
gltf_exporter.unregister()
preferences.unregister()


# called by gltf-blender-io after it has loaded


glTF2ExportUserExtension = gltf_exporter.glTF2ExportUserExtension
glTF2_pre_export_callback = gltf_exporter.glTF2_pre_export_callback
glTF2_post_export_callback = gltf_exporter.glTF2_post_export_callback
if bpy.app.version > (3, 0, 0):
glTF2ImportUserExtension = gltf_importer.glTF2ImportUserExtension


def register_panel():
Expand Down
6 changes: 3 additions & 3 deletions addons/io_hubs_addon/components/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from . import (handlers, gizmos, components_registry, panels, operators)
from . import (handlers, gizmos, components_registry, ui, operators)


def register():
handlers.register()
gizmos.register()
components_registry.register()
operators.register()
panels.register()
ui.register()


def unregister():
panels.unregister()
ui.unregister()
operators.unregister()
components_registry.unregister()
gizmos.unregister()
Expand Down
Loading