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>2018-10-30 08:11:50 +0300
committermano-wii <germano.costa@ig.com.br>2018-10-30 08:12:57 +0300
commit8b32385cf00e2fa7280c7ab6c3ac2a3bdf837eb2 (patch)
tree2ea8b89b2dd383ad87f7c9a9fc75c65bfa129319
parentf9ea752640ddc5bd4074a52da84299cfa5ccb063 (diff)
Snap Utilities Line: Fix crash due to difference in the basic size of an object in python in different build solutions.
And add comments
-rw-r--r--mesh_snap_utilities_line/ops_line.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesh_snap_utilities_line/ops_line.py b/mesh_snap_utilities_line/ops_line.py
index 427b0b30..f8375607 100644
--- a/mesh_snap_utilities_line/ops_line.py
+++ b/mesh_snap_utilities_line/ops_line.py
@@ -43,8 +43,11 @@ def Bpy_Area_header_text_clear(area):
#HACK
import ctypes
func = area.header_text_set
- c_func = ctypes.c_void_p.from_address(id(func) + 56).value
+ #(int)(&((struct BPy_FunctionRNA *)0)->func) == object.__basicsize__ + 24
+ c_func = ctypes.c_void_p.from_address(id(func) + object.__basicsize__ + 24).value
+ #(int)(&((struct FunctionRNA *)0)->cont.properties.first) == 24
c_param = ctypes.c_void_p.from_address(c_func + 24).value
+ #(int)(&((struct PropertyRNA *)0)->flag_parameter) == 40
flag_parameter = ctypes.c_void_p.from_address(c_param + 40)
previous_value = flag_parameter.value
flag_parameter.value = 0