Skip to content
Snippets Groups Projects
Commit ee9b40d0 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

blender plugin

parent 1232798e
No related branches found
No related tags found
3 merge requests!294Python SDK: FTLStreamReader,!292Python unit tests,!291Blender plugin (export to .ftl)
Pipeline #23080 passed
bl_info = {
"name": "FTL plugin",
"blender": (2, 80, 2),
"category": "Import-Export",
}
import bpy import bpy
import numpy as np import numpy as np
from mathutils import Matrix, Vector from mathutils import Matrix, Vector
...@@ -193,7 +199,7 @@ def render_stereo(camera, baseline=0.15): ...@@ -193,7 +199,7 @@ def render_stereo(camera, baseline=0.15):
camera.location = location_old camera.location = location_old
finally: finally:
bpy.context.scene.camera = camera bpy.context.scene.camera = camera_old
d_max = max(np.max(depthL), np.max(depthR)) d_max = max(np.max(depthL), np.max(depthR))
pose = np.identity(4,dtype=np.float32) pose = np.identity(4,dtype=np.float32)
...@@ -245,7 +251,7 @@ class FTL_Options(bpy.types.PropertyGroup): ...@@ -245,7 +251,7 @@ class FTL_Options(bpy.types.PropertyGroup):
import ftl import ftl
class FTL_OT_Operator(bpy.types.Operator): class FTL_OT_Operator(bpy.types.Operator):
bl_idname = "scene.ftl_operator" bl_idname = "scene.ftl_operator"
bl_label = "FTL Writer" bl_label = "FTL Operator"
def execute(self, context): def execute(self, context):
options = context.scene.ftl_options options = context.scene.ftl_options
...@@ -289,7 +295,7 @@ class FTL_OT_Operator(bpy.types.Operator): ...@@ -289,7 +295,7 @@ class FTL_OT_Operator(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
class FTL_PT_Panel(bpy.types.Panel): class FTL_PT_Panel(bpy.types.Panel):
bl_label = "FTL Options" bl_label = "FTL Export"
bl_idname = "FTL_PT_ftl" bl_idname = "FTL_PT_ftl"
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment