BlenderConnection::centerView operation ignores lamps and cameras now

This commit is contained in:
Jack Andersen 2016-08-16 19:43:01 -10:00
parent eae83a1cb9
commit ff89063a2b
1 changed files with 10 additions and 2 deletions

View File

@ -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