mirror of https://github.com/AxioDL/metaforce.git
BlenderConnection::centerView operation ignores lamps and cameras now
This commit is contained in:
parent
eae83a1cb9
commit
ff89063a2b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue