~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/addons_contrib/cursor_control/__init__.py

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-05-12 20:02:22 UTC
  • mfrom: (14.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20120512200222-lznjs2cxzaq96wua
Tags: 2.63a-1
* New upstream bugfix release
  + debian/patches/: re-worked since source code changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
# ##### BEGIN GPL LICENSE BLOCK #####
3
 
#
4
 
#  This program is free software; you can redistribute it and/or
5
 
#  modify it under the terms of the GNU General Public License
6
 
#  as published by the Free Software Foundation; either version 2
7
 
#  of the License, or (at your option) any later version.
8
 
#
9
 
#  This program is distributed in the hope that it will be useful,
10
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
#  GNU General Public License for more details.
13
 
#
14
 
#  You should have received a copy of the GNU General Public License
15
 
#  along with this program; if not, write to the Free Software Foundation,
16
 
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
 
#
18
 
# ##### END GPL LICENSE BLOCK #####
19
 
 
20
 
 
21
 
 
22
 
# Blender Add-Ons menu registration (in User Prefs)
23
 
bl_info = {
24
 
    'name': 'Cursor Control',
25
 
    'author': 'Morgan Mörtsell (Seminumerical)',
26
 
    'version': (0, 7, 0),
27
 
    'blender': (2, 5, 9),
28
 
    'location': 'View3D > Properties > Cursor',
29
 
    'description': 'Control the Cursor',
30
 
    'warning': '', # used for warning icon and text in addons panel
31
 
    'wiki_url': 'http://blenderpythonscripts.wordpress.com/',
32
 
    'tracker_url': '',
33
 
    'category': '3D View'}
34
 
 
35
 
 
36
 
 
37
 
import bpy
38
 
 
39
 
# To support reload properly, try to access a package var, if it's there, reload everything
40
 
if "local_var" in locals():
41
 
    import imp
42
 
    imp.reload(data)
43
 
    imp.reload(ui)
44
 
    imp.reload(operators)
45
 
    imp.reload(history)
46
 
    imp.reload(memory)
47
 
else:
48
 
    from cursor_control import data
49
 
    from cursor_control import ui
50
 
    from cursor_control import operators
51
 
    from cursor_control import history
52
 
    from cursor_control import memory
53
 
 
54
 
local_var = True
55
 
 
56
 
def register():
57
 
    bpy.utils.register_module(__name__)
58
 
    # Register Cursor Control Structure
59
 
    bpy.types.Scene.cursor_control = bpy.props.PointerProperty(type=data.CursorControlData, name="")
60
 
    bpy.types.Scene.cursor_history = bpy.props.PointerProperty(type=history.CursorHistoryData, name="")
61
 
    bpy.types.Scene.cursor_memory  = bpy.props.PointerProperty(type=memory.CursorMemoryData, name="")
62
 
    # Register menu
63
 
    bpy.types.VIEW3D_MT_snap.append(ui.menu_callback)
64
 
 
65
 
def unregister():
66
 
    # Register menu
67
 
    bpy.types.VIEW3D_MT_snap.remove(ui.menu_callback)
68
 
    bpy.utils.unregister_module(__name__)
69
 
 
70
 
 
71
 
if __name__ == "__main__":
72
 
    register()