Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-02-11 02:45:47 +0300
committermano-wii <germano.costa@ig.com.br>2019-02-11 02:46:17 +0300
commita5ebaabeee575be340ad0c7464489de4afac5eb3 (patch)
treea8a54a23b82d27b2095d961a2ce8dac1e704e899 /mesh_snap_utilities_line/__init__.py
parent68375994aba6e8e1c111c2820bf9a83ad568ecfc (diff)
mesh_snap_utilities_line: Fix framebuffer being created and cleaned in the wrong context
The solution is somewhat hackistic because it requires the creation of a global framebuffer at the time the addon is registered
Diffstat (limited to 'mesh_snap_utilities_line/__init__.py')
-rw-r--r--mesh_snap_utilities_line/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py
index be37d8a0..40194f1d 100644
--- a/mesh_snap_utilities_line/__init__.py
+++ b/mesh_snap_utilities_line/__init__.py
@@ -22,7 +22,7 @@
bl_info = {
"name": "Snap_Utilities_Line",
"author": "Germano Cavalcante",
- "version": (5, 9, 1),
+ "version": (5, 9, 2),
"blender": (2, 80, 0),
"location": "View3D > TOOLS > Line Tool",
"description": "Extends Blender Snap controls",
@@ -154,6 +154,10 @@ classes = (
)
def register():
+ from .snap_context_l import global_snap_context_init
+ # This makes sure that the framebuffer is created in the correct context
+ global_snap_context_init(None, None, None)
+
for cls in classes:
bpy.utils.register_class(cls)
@@ -161,6 +165,9 @@ def register():
def unregister():
+ from .snap_context_l import global_snap_context_destroy
+ global_snap_context_destroy()
+
unregister_snap_tools()
for cls in reversed(classes):