From ff89063a2be9d36d591347ae148e9afcda3125d8 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 16 Aug 2016 19:43:01 -1000 Subject: [PATCH] BlenderConnection::centerView operation ignores lamps and cameras now --- hecl/blender/BlenderConnection.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hecl/blender/BlenderConnection.hpp b/hecl/blender/BlenderConnection.hpp index 4570c7a95..77fa9c098 100644 --- a/hecl/blender/BlenderConnection.hpp +++ b/hecl/blender/BlenderConnection.hpp @@ -197,7 +197,11 @@ public: void centerView() { - *this << "bpy.context.user_preferences.view.smooth_view = 0\n" + *this << "for obj in bpy.context.scene.objects:\n" + " if obj.type == 'CAMERA' or obj.type == 'LAMP':\n" + " obj.hide = True\n" + "\n" + "bpy.context.user_preferences.view.smooth_view = 0\n" "for window in bpy.context.window_manager.windows:\n" " screen = window.screen\n" " for area in screen.areas:\n" @@ -206,7 +210,11 @@ public: " if region.type == 'WINDOW':\n" " override = {'scene': bpy.context.scene, 'window': window, 'screen': screen, 'area': area, 'region': region}\n" " bpy.ops.view3d.view_all(override)\n" - " break\n"; + " break\n" + "\n" + "for obj in bpy.context.scene.objects:\n" + " if obj.type == 'CAMERA' or obj.type == 'LAMP':\n" + " obj.hide = False\n"; } class ANIMOutStream