Mercurial > MadButterfly
comparison pyink/pyink.py @ 941:9ba94c577a6f
Add scene editor. This vewrsion can only switch scene. It can not change the scene yet.
author | wycc |
---|---|
date | Sun, 14 Nov 2010 23:09:02 +0800 |
parents | |
children | 82321f404b5f |
comparison
equal
deleted
inserted
replaced
934:5dedeedf0408 | 941:9ba94c577a6f |
---|---|
1 import pybInkscape | |
2 import pygtk | |
3 import gtk | |
4 from MBScene import * | |
5 global ink_inited | |
6 ink_inited=0 | |
7 def start_desktop(inkscape,ptr): | |
8 global ink_inited | |
9 if ink_inited == 1: | |
10 return | |
11 | |
12 desktop = pybInkscape.GPointer_2_PYSPDesktop(ptr) | |
13 top = desktop.getToplevel() | |
14 dock = desktop.getDock() | |
15 item = dock.new_item("scene", "scene", "feBlend-icon", dock.ITEM_ST_DOCKED_STATE) | |
16 | |
17 ink_inited = 1 | |
18 scene = MBScene(desktop,item.get_vbox()) | |
19 scene.show() | |
20 | |
21 | |
22 def pyink_start(): | |
23 print 'pyink_start()' | |
24 pybInkscape.inkscape.connect('activate_desktop', start_desktop) | |
25 pass |