|
|
@ -42,12 +42,14 @@ import bpy |
|
|
|
from mathutils import Vector |
|
|
|
# from mathutils import Euler |
|
|
|
|
|
|
|
def calculate_one(): |
|
|
|
ob1 = None |
|
|
|
try: |
|
|
|
ob1 = obj.select_get() |
|
|
|
except: |
|
|
|
# < 2.8 |
|
|
|
ob1 = bpy.context.scene.objects.active |
|
|
|
calculate_collisionbox(ob1) |
|
|
|
|
|
|
|
|
|
|
|
class MessageBox(bpy.types.Operator): |
|
|
@ -79,6 +81,8 @@ bpy.utils.register_class(MessageBox) |
|
|
|
|
|
|
|
msgSuffix = "" |
|
|
|
|
|
|
|
def calculate_collisionbox(ob1): |
|
|
|
global msgSuffix |
|
|
|
mesh = None |
|
|
|
if ob1 is not None: |
|
|
|
mesh = ob1.data |
|
|
@ -245,3 +249,5 @@ else: |
|
|
|
|
|
|
|
# Unregistering before user clicks the MessageBox will crash Blender! |
|
|
|
# bpy.utils.unregister_class(MessageBox) |
|
|
|
|
|
|
|
calculate_one() |
|
|
|