Welcome to mirror list, hosted at ThFree Co, Russian Federation.

space_buttons.py « ui « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aa89c06ea08ca3cacdfae4e671bf2eadbd74370a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

import bpy

class Buttons_HT_header(bpy.types.Header):
	__space_type__ = 'PROPERTIES'

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

		row= layout.row(align=True)
		row.template_header()

		if context.area.show_menus:
			sub = row.row(align=True)
			sub.itemM("Buttons_MT_view", text="View")
			
		row = layout.row()
		row.itemR(so, "buttons_context", expand=True, text="")
		row.itemR(scene, "current_frame")

class Buttons_MT_view(bpy.types.Menu):
	__space_type__ = 'PROPERTIES'
	__label__ = "View"

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

		col = layout.column()
		col.itemR(so, "panel_alignment", expand=True)

bpy.types.register(Buttons_HT_header)
bpy.types.register(Buttons_MT_view)