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

Add Blender 2.80 support (this will resolve #361) #466

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1a7911d
Add Blender 2.80 support
jasperges Oct 30, 2019
baf6c49
Some style changes and cleanup
jasperges Oct 30, 2019
d83484c
Fix: renamed open_file and save_file in __all__
jasperges Oct 30, 2019
4e2ab62
Fix: fix line lenght + unused var
jasperges Oct 30, 2019
0fbe9aa
Merge remote-tracking branch 'upstream/master' into add-blender28-sup…
jasperges Oct 30, 2019
a1bf183
Style fix
jasperges Oct 30, 2019
ee2954b
Import QtWidgets with namespace
jasperges Nov 1, 2019
809e53d
Style changes
jasperges Nov 1, 2019
aafbf85
Merge branch 'master' into add-blender28-support
jasperges Nov 5, 2019
16bd950
Merge branch 'master' into add-blender28-support
jasperges Nov 11, 2019
d3a4865
Merge branch 'master' into add-blender28-support
jasperges Dec 4, 2019
4be0f7c
Merge remote-tracking branch 'upstream/master' into add-blender28-sup…
jasperges Dec 16, 2019
ea5b85f
Merge branch 'master' into add-blender28-support
jasperges Dec 17, 2019
5bc3bb3
Add bpy.context wrapper
jasperges Dec 17, 2019
bf54052
Use bpy.context wrapper in TestApp
jasperges Dec 17, 2019
0570d60
Add `bpy.context` wrapper
jasperges Dec 17, 2019
834371b
Revert adding the bpy wrapper
jasperges Dec 30, 2019
2433fdc
Add library function to get selected objects
jasperges Dec 30, 2019
0a655ea
Make Avalon imports relative
jasperges Dec 30, 2019
d2ec489
Add note to change to `bpy.app.timers`
jasperges Dec 30, 2019
a78b312
Remove hardcoded 'scene' directory
jasperges Dec 30, 2019
3d46168
Use `bpy.app.timers` and remove test app
jasperges Dec 31, 2019
0840537
Cleanup
jasperges Dec 31, 2019
cc205ba
Merge branch 'master' into blender28-dev
jasperges Jan 6, 2020
d14d97b
Merge branch 'master' into blender28-dev
jasperges Jan 8, 2020
23331c4
Refactor to find_submodule (needed after merge of #501)
jasperges Jan 8, 2020
37c2fa8
Remove teardown function
jasperges Jan 8, 2020
12633c7
Make sure only 1 timer is registered for Qt apps
jasperges Jan 8, 2020
5019142
Fix check for self._window
jasperges Jan 8, 2020
cff9ad6
Exclude blender from tests
jasperges Jan 8, 2020
945c7a3
Merge branch 'master' into blender28-dev
jasperges Jan 13, 2020
a320eb3
Rename avalon_setup → setup_avalon and add comment about sys.excepthook
jasperges Jan 8, 2020
33d6e0c
Merge branch 'master' into blender28-dev
jasperges Jan 24, 2020
fe4bd5c
Remove unneeded `config` variable from blender (un)install
jasperges Jan 24, 2020
fd10091
Remove unused import + fix indentation
jasperges Jan 24, 2020
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
Prev Previous commit
Next Next commit
Use bpy.context wrapper in TestApp
  • Loading branch information
jasperges committed Dec 17, 2019
commit bf540523f1e089019d6e55c43cec388bfd3be0d7
12 changes: 9 additions & 3 deletions avalon/blender/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import avalon.api as api
from avalon.vendor.Qt import QtCore, QtWidgets

from . import lib

preview_collections: Dict = dict()


Expand Down Expand Up @@ -88,7 +90,9 @@ def init_ui(self):
def print_bpy_context(self):
"""Print `bpy.context` to the console and UI."""

context_string = pformat(bpy.context.copy(), indent=2)
# context = bpy.context.copy()
context = lib.bpy_context()
context_string = pformat(context, indent=2)
print(f"Context: {context_string}")
self.label.setText('Context:')
# Limit the text to 50 lines for display in the UI
Expand All @@ -102,7 +106,8 @@ def print_bpy_context(self):
def print_active(self):
"""Print the active object to the console and UI."""

context = bpy.context.copy()
# context = bpy.context.copy()
context = lib.bpy_context()
if context.get('object'):
objname = context['object'].name
else:
Expand All @@ -114,7 +119,8 @@ def print_active(self):
def print_selected(self):
"""Print the selected objects to the console and UI."""

context = bpy.context.copy()
# context = bpy.context.copy()
context = lib.bpy_context()
if context.get('selected_objects'):
selected_list = [obj.name for obj in context['selected_objects']]
else:
Expand Down