sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Mouse move handling when dropping

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 173 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      algorytmus
      last edited by

      I work on the newest version of Sketchup on Windows 7.

      I ran into some problems while working on my custom tool for Sketchup implementing Tool interface: http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool. What I need to get working is onMouseMove (also onLButtonUp) for the following scenario:
      It is working as expected in most cases except when something is dragged from another application but when moving the mouse (preview drop) over a model (sketchup view) none of those mouse events are fired for me in the Tool implementing class. So what I really need to do is to be able to handle dropping; pretty much by getting onMouseMove and onLButtonUp working. What I am able to do is to send some command to do something when dragging is started to sketchup Tool class if that helps. I was wondering maybe I need to send some signal to the operating system of the following event: MouseKeyUp but this is quite dramatic.

      Thanks in advance,
      Pawel

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @algorytmus said:

        ... except when something is dragged from another application but when moving the mouse (preview drop) over a model (sketchup view) none of those mouse events are fired for me in the Tool implementing class.

        What is something ???

        a SKP file ??

        an Image file ??

        (1) The application drag-and-drop handler is not directly exposed via the SketchUp API.

        Instead, native SketchUp tools are activated when VALID objects are dropped:

        • Images: The ScaleTool is activated after the image is inserted, and selected.* SKP file: The MoveTool is activated after the skp is added to the DefintionList, and an instance is inserted and selected.

        So in both cases, dropping those valid objects, SHOULD cause your tool's deactivate() callback to fire, just prior to the native tool becoming active.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement