On 14/06/2015 at 13:56, xxxxxxxx wrote:
Hello again,
I am trying to get the Mouseposition in the Viewport when I run a Script. Is this possible without making a Tool-Plugin? I tried this code and it does not return anything.
import c4d
from c4d import gui
def main() :
bc = c4d.BaseContainer()
c4d.gui.GetInputState(c4d.BFM_INPUT_MOUSE,c4d.BFM_INPUT_X,bc)
mouse_x = bc[c4d.BFM_INPUT_X]
print mouse_x
if __name__=='__main__':
main()