3D navigate script updated ! (v1.3) see last post

Hi all,
it comes yesterday, i’m using a laptop for prototyping and some modeling, with ubuntu !
maybe you know that the top numeric keys is not working, so, from few month i used a USB numeric pad !
too much for me, not really fair !

so i discover the script from Demohero , nice one !
but some features may missing !

i did an update of it (version 1.1), here is the code and screenshot:
> save this code into a text file, rename it as “navigate_11.py” and put it in addon folder, active it in “preferences” and …enjoy !

http://blenderclan.tuxfamily.org/html/uploads/img4c71ed9f936d1.png


# 3D NAVIGATION TOOLBAR v1.1 - 3Dview Addon - Blender 2.5x 
# 
# THIS SCRIPT IS LICENSED UNDER GPL,  
# please read the license block at the end of this code. 
 
bl_addon_info = { 
    'name': '3D View: 3D Navigation 1.1 Updated ', 
    'author': 'Version 1.0: Demohero, update 1.1: uriel', 
    'version': '1.1 2010/08/22', 
    'blender': (2, 5, 3), 
    'category': '3D View', 
    'location': 'View3D > Toolbar ', 
    'description': 'You can navigate to views from 3D Toolbar (Shortcut: T)', 
    'wiki_url': '#'} 
     
# import the basic library 
import bpy 
 
# main class of this toolbar 
class VIEW3D_PT_3dnavigationPanel(bpy.types.Panel): 
    bl_space_type = "VIEW_3D" 
    bl_region_type = "TOOLS" 
    bl_label = "3D Views " 
     
    def draw(self, context): 
        layout = self.layout 
        view = context.space_data 
 
# Triple boutons         
        col = layout.column(align=True) 
        row = col.row() 
        row.operator("view3d.viewnumpad", text="View Camera", icon='CAMERA_DATA').type='CAMERA' 
        row = col.row() 
        row.operator("view3d.localview", text="View Global/Local") 
        row = col.row() 
        row.operator("view3d.view_persportho", text="View Persp/Ortho")   
 
# group of 6 buttons 
        col = layout.column(align=True) 
        col.label(text="Align view from:") 
        row = col.row() 
        row.operator("view3d.viewnumpad", text="Front").type='FRONT' 
        row.operator("view3d.viewnumpad", text="Back").type='BACK' 
        row = col.row() 
        row.operator("view3d.viewnumpad", text="Left").type='LEFT' 
        row.operator("view3d.viewnumpad", text="Right").type='RIGHT' 
        row = col.row() 
        row.operator("view3d.viewnumpad", text="Top").type='TOP' 
        row.operator("view3d.viewnumpad", text="Bottom").type='BOTTOM' 
        row = col.row() 
 
# group of 2 buttons 
        col = layout.column(align=True) 
        row = col.row() 
        row.operator("view3d.view_selected", text="View at selected !")  
        row = col.row() 
 
# bouton single 
        col = layout.column(align=True) 
        row = col.row() 
        row.operator("view3d.view_center_cursor", text="View at cursor", icon='CURSOR').type='CURSOR' 
        row = col.row() 
        
# register the class 
def register(): 
    bpy.types.register(VIEW3D_PT_3dnavigationPanel) 
 
def unregister(): 
    bpy.types.unregister(VIEW3D_PT_3dnavigationPanel) 
 
if __name__ == "__main__": 
    register() 
 
# ##### BEGIN GPL LICENSE BLOCK ##### 
# 
#  This program is free software; you can redistribute it and/or 
#  modify it under the terms of the GNU General Public License 
#  as published by the Free Software Foundation; either version 2 
#  of the License, or (at your option) any later version. 
# 
#  This program is distributed in the hope that it will be useful, 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
#  GNU General Public License for more details. 
# 
#  You should have received a copy of the GNU General Public License 
#  along with this program; if not, write to the Free Software Foundation, 
#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
# 
# ##### END GPL LICENSE BLOCK ##### 


I found this script very usefull, i have some question regarding this kind of update:

1/ how can i submit this new version ?
2/ how to name correctly the authors ?
3/ as a beginner, is my script modification is correct ? (anyway…it’s work fine !)

Bye bye :smiley:

Very cool, sorry that did not work here!!! :no:
Build tested: 31515

But I think it would be better if instead of letters you put some icons(Help the save space)!

ex:
Maya
http://imgur.com/I2DUn.png
SoftImage
http://imgur.com/BsxMw.png
UDK
http://imgur.com/uLBlT.png

Thanks for your contribution Uriel. This looks much better now. :yes:

Edit: Registring classes is a bit different now.

def register(): 
    pass 
 
def unregister(): 
    pass 

if __name__ == "__main__": 
    register()

thanks Demohero :smiley:
pass ??? what is that ? we put only pass now ?

Yes, it is. Otherwise script doesn’t work.

Btw, about your questions:

  1. Go to https://projects.blender.org/account/login.php and create a new account. Then
    submit new addon here: https://projects.blender.org/tracker/?atid=467&group_id=153&func=browse

  2. Can’t understand what you mean?

  3. I tried it. No problems with recent builds. (changed pass)

and I published this addon in my blog in updated documents. :slight_smile:

Demohero

Et hop !
here is the new update (v1.2) from yesterday, all features that is needed for ubuntu users on laptop !

http://blenderclan.tuxfamily.org/html/uploads/img4c748aee1b399.png

get the script here: http://www.********.org/15203/python

enjoy !!!

by the way, i want to discuss with you about it, it seems that we have on the other 3Dview panel (shortcut N) a “View” part which contains some access to 3d views operators AND camera operator, AND cursor operator !

So, do you think it would be great to have a mix panel that contains our 3d navigate and 3d view options, an other panel for camera, and one small other for cursor actions?

comments are welcome !
bye

don’t forget that the script is written for official 2.53, not for builds, so you in this last case, you must replace the register lines by:

def register(): 
    pass 
 
def unregister(): 
    pass 

if __name__ == "__main__": 
    register()

As you mentioned, it’s very useful to create a mixture of the useful tools with Python. You know Python is capable of customizing UI. Nice update again. Thanks.

cool script,
i would like tyo see this in svn.
please contact me or look here & follow thre instructions.
http://wiki.blender.org/index.php/Dev:Py/Sharing
thanks

Meta-Androcto

I addet it in py scripts contrib. It’s called Navigate Panel. :slight_smile:

Nice !
We can also hope that shortcut keys will be fixed (one day) in ubuntu for laptop users !

Does Blender can also get into it ?

Hi, here is the 1.3 version of the script:

http://blenderclan.tuxfamily.org/html/uploads/img4ccf9b854d7fa.jpg

  
# 3D NAVIGATION TOOLBAR v1.3 - 3Dview Addon - Blender 2.5x
#
# THIS SCRIPT IS LICENSED UNDER GPL, 
# please read the license block at the end of this code.

bl_addon_info = {
    'name': '3D View: 3D Navigation 1.3 Updated ',
    'author': 'Creator 1.0: Demohero, update 1.3: uriel',
    'version': '1.1 2010/08/22',
    'blender': (2, 5, 3),
    'category': '3D View',
    'location': 'View3D > Toolbar ',
    'description': 'You can navigate to views and more from 3D Toolbar (Shortcut: T)',
    'wiki_url': '#'}

# import the basic library
import bpy

# main class of this toolbar
class VIEW3D_PT_3dnavigationPanel(bpy.types.Panel):
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_label = "3D Views "  

    def draw(self, context):
        layout = self.layout
        view = context.space_data

# Triple boutons        

        col = layout.column(align=True)
        col.label(text="Camera:")
        row = col.row()
        row.operator("view3d.viewnumpad", text="View Camera", icon='CAMERA_DATA').type='CAMERA'
        row = col.row()
        row.operator("view3d.object_as_camera", text="Active camera")  
        row = col.row()
        row.operator("view3d.camera_to_view", text="View to camera")

        col = layout.column(align=True)
        col.label(text="Switch:")
        row = col.row()
        row.operator("view3d.localview", text="View Global/Local")
        row = col.row()
        row.operator("screen.region_quadview", text="View Quad/Single") 
        row = col.row()
        row.operator("view3d.view_persportho", text="View Persp/Ortho")  


# group of 6 buttons
        col = layout.column(align=True)
        col.label(text="Align view from:")
        row = col.row()
        row.operator("view3d.viewnumpad", text="Front").type='FRONT'
        row.operator("view3d.viewnumpad", text="Back").type='BACK'
        row = col.row()
        row.operator("view3d.viewnumpad", text="Left").type='LEFT'
        row.operator("view3d.viewnumpad", text="Right").type='RIGHT'
        row = col.row()
        row.operator("view3d.viewnumpad", text="Top").type='TOP'
        row.operator("view3d.viewnumpad", text="Bottom").type='BOTTOM'
        row = col.row()

# group of 2 buttons
        col = layout.column(align=True)
        col.label(text="View to Object:")
        col.prop(view, "lock_object", text="")
        row = col.row()
        row.operator("view3d.view_selected", text="View to selected !") 

        col = layout.column(align=True)
        col.label(text="Cursor:")
        row = col.row()
        row.operator("view3d.snap_cursor_to_center", text="Center")
        row.operator("view3d.view_center_cursor", text="View")
        row = col.row()
        row.operator("view3d.snap_cursor_to_selected", text="Cursor to selected")

# register the class
def register(): 
    pass 

def unregister(): 
    pass 

if __name__ == "__main__": 
    register()



# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# ##### END GPL LICENSE BLOCK #####


Enjoy !

NICE!
Could you add “toggle quadview” to this?

tungee,
it’s already there, if you look closer, or even if you install this script:
switch section > view quad/single !!!

:p:D

anyway here is the last one with icons…i’m not sure yet about them, let’s see !

http://blenderclan.tuxfamily.org/html/uploads/img4ccf9b854d7fa.jpg

a+