sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Question about developing plugin to automate functions

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 4 Posters 84 Views 4 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.
    • N Offline
      nirvanaguy
      last edited by

      Hi,
      So essentially I'm trying to develop a plugin that will take live updating input and perform the task asked for by the user

      i'm interested in automating these functions:
      -Move
      -Rotate object
      -draw (line, square, circle, etc.)
      -stretch object

      so as you notice these aren't camera functions, they're actually manipulating an object or creating some virtual image

      it'll go something like this:

      if cmd=move
      select object
      take input coordinates that refresh every .5 seconds and move according to the vector created by the inputs
      etc.

      the only thing is.. i'm sort of stuck as to how i can actually get my logic running. can anyone give me some idea or method as to how i can start implementing this idea? I've considered using an animation scheme where you can change the rate at which the object moves and the delta coordinates (difference vector of where to move next), things like that. I've also thought about just using a tool to draw the line every .5 seconds or whatever the interval is to draw a line

      do these sound like good ways to approach this task? if not, can someone enlighten me on a more efficient/robust way to accomplish this? Thanks so much!

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        https://developers.google.com/sketchup/docs/ourdoc/animation might be a good start...

        TIG

        1 Reply Last reply Reply Quote 0
        • N Offline
          nirvanaguy
          last edited by

          @tig said:

          https://developers.google.com/sketchup/docs/ourdoc/animation might be a good start...

          yes thank you for that. i've looked through a majority of that but here's where the forum community comes into play. i'd like to hear what other people have to say and if anyone has done any similar projects so they can give some valid input as far as what method would be easiest and most practical in the long term

          1 Reply Last reply Reply Quote 0
          • D Offline
            driven
            last edited by

            Try and find a copy of knightgame.rb and the Prince_IO, Spin_Yoda talks on the web C.2008/9.

            john

            learn from the mistakes of others, you may not live long enough to make them all yourself...

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

              It sounds more like you want to create a tool.

              See the UI::Tool class in the API.

              Then read through and understand the "linetool.rb" script in the "Plugins/Examples" directory.

              Keep in mind that scripting within a GUI application's process, is event-driven programming, not a linear sequential exercise.

              You write a class with callback methods, that the application calls, in response to UI input, mouse movements, key presses, etc., from the user.

              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