PDA

View Full Version : Events in a cluster


jlesquembre
11-10-2011, 08:28 AM
Hi,

I'm running a cluster with several clients, all in the same computer.I have a problem with events, I want to make some actions if the user makes a click. If I click in the master window, everything is fine, but is not possible to make a click in any client window. Any suggestion?

Thanks.

jlesquembre
11-10-2011, 11:50 AM
Ok, I got it, I should use this code

def onmouse(button):
client = viz.cluster.getClient()
print 'Mouse pressed on client',client,'the button',button

viz.callback(viz.MOUSEDOWN_EVENT,onmouse,viz.ALLCL IENTS)


But next problem is, how can I pick an object in clientX? For master or client1 works, but for others clients not. Any idea why?

Jeff
11-16-2011, 05:03 PM
Clustering is not really meant to be used this way. Cluster clients don't actually execute any Python code. They just receive commands from the master to perform basic low-level commands (e.g. add objects, set position, etc...). Clustering is only meant to be used when you want to clone the output of a script with only slight changes (e.g. view offset, fov). Picking is not supported on the clients.