WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Events in a cluster (https://forum.worldviz.com/showthread.php?t=3995)

jlesquembre 11-10-2011 08:28 AM

Events in a cluster
 
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
Quote:

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.


All times are GMT -7. The time now is 02:23 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC