41 |
def getMainNode(): |
def getMainNode(): |
42 |
return context.states.buoymanager.getLastMain() |
return context.states.buoymanager.getLastMain() |
43 |
def getOldVS(): |
def getOldVS(): |
44 |
return fenPDF.uistate.lastVs |
return fenPDF.animation.lastVs |
45 |
|
|
46 |
# Inside the action, we have the following symbols usable: |
# Inside the action, we have the following symbols usable: |
47 |
# fenPDF - the main FenPDF object |
# fenPDF - the main FenPDF object |
51 |
|
|
52 |
# Note that the default is that the old vobscene is reused. |
# Note that the default is that the old vobscene is reused. |
53 |
# If an action needs regeneration, it has to explicitly call for |
# If an action needs regeneration, it has to explicitly call for |
54 |
# that by fenPDF.uistate.regenerateVs() |
# that by fenPDF.animation.regenerateVs() |
55 |
|
|
56 |
######## Actions to control pan of main nodes etc. |
######## Actions to control pan of main nodes etc. |
57 |
|
|
77 |
obj = getMainNode().getNodeOnPlane(getOldVS(), x,y) |
obj = getMainNode().getNodeOnPlane(getOldVS(), x,y) |
78 |
context.states.cursor.setAccursed(obj) |
context.states.cursor.setAccursed(obj) |
79 |
getMainNode().moveToPoint(int(x),int(y), getOldVS()) |
getMainNode().moveToPoint(int(x),int(y), getOldVS()) |
80 |
fenPDF.uistate.regenerateVS() |
fenPDF.animation.regenerateVS() |
81 |
|
|
82 |
|
|
83 |
class ZoomPan(vob.input.RelativeAxisListener): |
class ZoomPan(vob.input.RelativeAxisListener): |
94 |
def clicked(self, x, y): |
def clicked(self, x, y): |
95 |
obj = getMainNode().getNodeOnPlane(getOldVS(), x,y) |
obj = getMainNode().getNodeOnPlane(getOldVS(), x,y) |
96 |
context.states.cursor.setAccursed(obj) |
context.states.cursor.setAccursed(obj) |
97 |
fenPDF.uistate.regenerateVS() |
fenPDF.animation.regenerateVS() |
98 |
|
|
99 |
class MouseMenu(vob.mouse.MouseClickListener): |
class MouseMenu(vob.mouse.MouseClickListener): |
100 |
def clicked(self, x, y): |
def clicked(self, x, y): |
103 |
context.states.objectOnPlane = obj |
context.states.objectOnPlane = obj |
104 |
context.mousemenu.link = 1 |
context.mousemenu.link = 1 |
105 |
else: context.mousemenu.link = 0 |
else: context.mousemenu.link = 0 |
106 |
|
|
107 |
|
fenPDF.uistate.menu.originateFromMainNode(getMainNode(), obj) |
108 |
|
|
109 |
context.mousemenu.showList(x,y,'mainmenu') |
context.mousemenu.showList(x,y,'mainmenu') |
110 |
fenPDF.uistate.regenerateVS() |
fenPDF.animation.regenerateVS() |
111 |
vob.AbstractUpdateManager.setNoAnimation() |
vob.AbstractUpdateManager.setNoAnimation() |
112 |
|
|
113 |
####### Actions to control nodes on main node plane |
####### Actions to control nodes on main node plane |
195 |
def clicked(self, x, y): |
def clicked(self, x, y): |
196 |
buoymanager = context.states.buoymanager |
buoymanager = context.states.buoymanager |
197 |
p('hit',buoymanager.buoyHit) |
p('hit',buoymanager.buoyHit) |
198 |
|
fenPDF.uistate.menu.originateFromBuoy(buoymanager.buoyHit) |
199 |
context.mousemenu.showList(x,y, 'buoymenu') |
context.mousemenu.showList(x,y, 'buoymenu') |
200 |
fenPDF.uistate.regenerateVS() |
fenPDF.animation.regenerateVS() |
201 |
vob.AbstractUpdateManager.setNoAnimation() |
vob.AbstractUpdateManager.setNoAnimation() |
202 |
|
|
203 |
class BuoyFollowClick(vob.mouse.MouseClickListener): |
class BuoyFollowClick(vob.mouse.MouseClickListener): |
205 |
buoymanager = context.states.buoymanager |
buoymanager = context.states.buoymanager |
206 |
p('hit',buoymanager.buoyHit, buoymanager.buoyHit.single) |
p('hit',buoymanager.buoyHit, buoymanager.buoyHit.single) |
207 |
buoymanager.buoyHit.single.followLink(buoymanager.buoyHit.link) |
buoymanager.buoyHit.single.followLink(buoymanager.buoyHit.link) |
208 |
fenPDF.uistate.regenerateVS() |
fenPDF.animation.regenerateVS() |
209 |
|
|
210 |
# Return a map of symbols |
# Return a map of symbols |
211 |
res = { } |
res = { } |