~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to release/scripts/startup/bl_ui/properties_data_empty.py

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ##### BEGIN GPL LICENSE BLOCK #####
 
2
#
 
3
#  This program is free software; you can redistribute it and/or
 
4
#  modify it under the terms of the GNU General Public License
 
5
#  as published by the Free Software Foundation; either version 2
 
6
#  of the License, or (at your option) any later version.
 
7
#
 
8
#  This program is distributed in the hope that it will be useful,
 
9
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
#  GNU General Public License for more details.
 
12
#
 
13
#  You should have received a copy of the GNU General Public License
 
14
#  along with this program; if not, write to the Free Software Foundation,
 
15
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
16
#
 
17
# ##### END GPL LICENSE BLOCK #####
 
18
 
 
19
# <pep8 compliant>
 
20
import bpy
 
21
from bpy.types import Panel
 
22
 
 
23
 
 
24
class DataButtonsPanel():
 
25
    bl_space_type = 'PROPERTIES'
 
26
    bl_region_type = 'WINDOW'
 
27
    bl_context = "data"
 
28
 
 
29
    @classmethod
 
30
    def poll(cls, context):
 
31
        return (context.object and context.object.type == 'EMPTY')
 
32
 
 
33
 
 
34
class DATA_PT_empty(DataButtonsPanel, Panel):
 
35
    bl_label = "Empty"
 
36
 
 
37
    def draw(self, context):
 
38
        layout = self.layout
 
39
 
 
40
        ob = context.object
 
41
 
 
42
        layout.prop(ob, "empty_draw_type", text="Display")
 
43
 
 
44
        if ob.empty_draw_type == 'IMAGE':
 
45
            layout.template_ID(ob, "data", open="image.open", unlink="image.unlink")
 
46
 
 
47
            layout.prop(ob, "color", text="Transparency", index=3, slider=True)
 
48
            row = layout.row(align=True)
 
49
            row.prop(ob, "empty_image_offset", text="Offset X", index=0)
 
50
            row.prop(ob, "empty_image_offset", text="Offset Y", index=1)
 
51
 
 
52
        layout.prop(ob, "empty_draw_size", text="Size")
 
53
 
 
54
if __name__ == "__main__":  # only for live edit.
 
55
    bpy.utils.register_module(__name__)