Developing a plugin/macro for orbiting based on input
-
So I have been reading up on tutorials how to code in Ruby and whatnot, but I am having trouble finding a solution to my problem and hopefully some of the experienced users here can help me out.
I am trying to develop a plugin or macro that can take at least 1 input, lets say multiple keyboard letters for now, and map it to a function such as orbiting. I have thought about ways to do this and realized that you could just have the input (coming from a C# code) just send the physical key that is mapped to that function in the shortcuts, but I need something that's more robust and on a deeper level. That brought me to the point where I need to develop some sort of plugin that will respond something like this:
ex: I press and hold D and the camera orbits to the right direction. I press and hold A and it orbits to the left direction. I hold A and W together and that orbits in the top left corner direction, etc.
Not only do I want to be able to control orbiting, but I want to be able to draw lines based on a sequence of coordinate/position points I give to it. etc.
Right now I know this sounds very ambiguous and dumbed down, but I would REALLY appreciate any help to set me in the right direction. Any input or suggestions are definitely welcome! if you have any questions about what i'm trying to do i'll answer as soon as I humanly can. Thanks a lot and I look forward to hearing some input!
-
Using letters will be difficult, as they will trigger keyboard shortcuts. You can tap into the arrow keys - with a
Tool
class. -
@thomthom said:
Using letters will be difficult, as they will trigger keyboard shortcuts. You can tap into the arrow keys - with a
Tool
class.well then cant i just change my shortcut configurations and save the preferences.dat file?
and i don't know if i can limit myself to just arrows because ultimately I'm going to be syncing this up with a C# code that will provide me both values for a position and for a function
-
You'll have problems with re distributing the plugin - don't see any users willing to sacrifice their shortcuts.
-
@thomthom said:
You'll have problems with re distributing the plugin - don't see any users willing to sacrifice their shortcuts.
OK fine, just to have a baseline program that works how would I implement that using the keyboard arrows?
Essentially the data i'm going to input is X,Y,Z position coordinates and an indicator of which operation I want to perform (orbit, move, draw, etc.) that will be constantly updating/refreshing so that I can draw a line in real time (I don't want it to just draw the line in 1 move for me, or orbit from 0 to 140 degrees west instantaneously, essentially I want to update in segments so it appears that this is all happening in real time)
Thanks a lot for your help! I really appreciate any input you can provide
-
Did you read the "linetool.rb" file in the "Examples" directory ??
Advertisement