[Plugin] Camera OrbitOnTarget v1

[Plugin] Camera OrbitOnTarget v1

Postby MarcioAB » Sat Nov 15, 2008 7:32 am

I'm an occasional CAD user and once in SketchUP I missed the way those products behave regard Orbit, so I created this simple OrbitOnTarget tool (plugin) that more or less works similar them. Feel free to improve. This is how it works:

1. Activate the OrbitOnTarget tool by icon (or menu) and move the mouse over the view. The Point-inference engine will be following you to help the "Target" selection.
2. Double-click when you find a good "Target" point and the screen will be centered on this "Target".
3. Set Left-button down and drag the mouse around the screen to Rotate the View fixed on the "Target" (see more info on this below).
4. Set Left-button down + Shift-key down and drag the mouse in the vertical screen direction to Zoom centered in the "Target". Drag up to Zoom-in and down to Zoom-out.
5. Set Left-button down + Ctrl-key down and drag the mouse around the screen to Pan the View in XY plane. Even if the "Target" is not any more centered on the screen, the Zoom and Rotation will still be locked on the "Target".
6. If you leave OrbitOnTarget and use other functions, when you came back the "Target" will still be there (I use the global $mama_target variable for that and I hope it's name is so weird it will not conflict with any other plugin).

Regard item 3, when you drag the mouse Horizontally on the screen the View will rotate in an axis that is parallel to Global Z axis (the Blue one). When you drag the mouse Vertically on the screen the View will rotate in an horizontal axis that is Normal to your view direction (or sight direction).

Regard item 5, when you drag the mouse Horizontally on the screen the View will Pan parallel to X axis (the Red one) and when you drag Vertically parallel to Y axis (Green one). I thing this must be improved.

Obs1: When using OrbitOnTarget tool you can call the default Orbit tool (with the mouse middle-button) but then you lose the "Target". The reason is because the default Orbit tool works with a mobile target and when you leave the Orbit tool (releasing the middle-button) and get back into OrbitOnTarget, it's new "Target" is defined as the last target left by Orbit tool to avoid an abrupt View change.

Obs2: The OrbitOnTarget icon (a red bow-arrow target) is on Toolbar "MamaTools". You must activate this Toolbar using View\Toolbars\MamaTools

Obs3: First time using this forum file attach function, so just in case, this is the URL: http://pws.prserv.net/marcioab/OrbitOnTarget.zip

OrbitOnTarget.zip


I would like to find a way to replace the default Orbit tool by this one (and it's future improved versions) and have it triggered from inside any tool via the mouse middle-button.

Regards and let's see how we can improve this.
0
Last edited by MarcioAB on Mon Nov 17, 2008 11:13 am, edited 4 times in total.

MarcioAB 
 

Re: [Plugin] OrbitOnTarget v1

Postby linea » Sat Nov 15, 2008 8:11 am

cool script, thanks
0

linea 
 

Re: [Plugin] OrbitOnTarget v1

Postby MALAISE » Sat Nov 15, 2008 8:56 am

Fortunally, you've post the zip file because the link seems not to be available. (for me at least)

Quite interesting the way, you make that tool close to my idea... :thumb:
Thanks MarcioAB, let's see if other ruby 's guys will go forward...

MALAISE :)
0
La Connaissance n'a de valeur que partagée
User avatar
MALAISE 
 

Re: [Plugin] OrbitOnTarget v1

Postby watkins » Sat Nov 15, 2008 10:22 am

Dear Marcio,

I already have a folder called Icons in my Plugin directory (upper case i). Could you rename your folder something like icons_OOT to distinguish your icons from those for other scripts?

Regards,
Bob
0

watkins 
 

Re: [Plugin] OrbitOnTarget v1

Postby bianhai » Sat Nov 15, 2008 11:33 am

Very good!thank your work! :thumb:
0

bianhai 
Banned
 

Re: [Plugin] OrbitOnTarget v1

Postby MarcioAB » Sat Nov 15, 2008 12:40 pm

watkins wrote:Dear Marcio,
I already have a folder called Icons in my Plugin directory (upper case i). Could you rename your folder something like icons_OOT to distinguish your icons from those for other scripts?
Regards,
Bob

Sure Bob. In the mean time, if you wish to change Ruby code, could you please go to lines 144 and 145 and replace then from:

From:
cmd.small_icon = "icons/target_16.png"
cmd.large_icon = "icons/target_24.png"
To:
cmd.small_icon = "icons_OOT/target_16.png"
cmd.large_icon = "icons_OOT/target_24.png"

Thanks
1

MarcioAB 
 

Re: [Plugin] OrbitOnTarget v1

Postby watkins » Sat Nov 15, 2008 10:25 pm

Dear Marcio,

Thanks for the amendment. I have not had chance to try out the ruby as I've been out all day, but I'm sure it will come in very useful.

Kind regards,
Bob
0

watkins 
 

Re: [Plugin] OrbitOnTarget v1

Postby Edson » Sun Nov 16, 2008 10:57 am

should't the icons folder be also renamed to icons_OOT?

obrigado e um abraço.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] OrbitOnTarget v1

Postby Edson » Sun Nov 16, 2008 3:11 pm

i tried it on my macbook and it did not work. the tool bar is there and after i clicked twice on an object a dot appeared on it but other than that nothing happened.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] OrbitOnTarget v1

Postby MarcioAB » Sun Nov 16, 2008 4:39 pm

Edson wrote:i tried it on my macbook and it did not work. the tool bar is there and after i clicked twice on an object a dot appeared on it but other than that nothing happened.


Humm ... I do not have a Mac to check but, just to see if the sequence is the expected one:

1. Select the tool (on the bottom text bar there should appear short instructions). This is just to see if the tool was correctly loaded.
You will also see the Inference-point around. Just move the mouse to see if the Inference-point move around the elements.

2. Then double-click. The screen must re-center. (try a point that in not too close the center, but even with a minimal distance it's easy to see something happened with the screen)

Could you double-check that please ?

Also, there is a variation of this plugin for change the position of Components (in draft).
viewtopic.php?f=180&t=14193#p107373

Abracos
Marcio
0

MarcioAB 
 

Re: [Plugin] OrbitOnTarget v1

Postby Edson » Sun Nov 16, 2008 5:16 pm

1. Select the tool (on the bottom text bar there should appear short instructions). This is just to see if the tool was correctly loaded.
You will also see the Inference-point around. Just move the mouse to see if the Inference-point move around the elements.

no inference point to be seen. could you post a picture of what it looks like in windows?

2. Then double-click. The screen must re-center. (try a point that in not too close the center, but even with a minimal distance it's easy to see something happened with the screen)

re-centering works but nothing else besides that. no rotate, no zoom, no pan.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] OrbitOnTarget v1

Postby MarcioAB » Sun Nov 16, 2008 11:26 pm

Well, this is how it works here:


But I also tried to capture the video-screen with MS Windows Media 9 Encoder and the behavior became more or less like you mention. But I do not know how to fix this.
0

MarcioAB 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby xrok1 » Thu Feb 12, 2009 2:15 am

so ,any further dev.
any luck with the MMB?
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby xrok1 » Thu Feb 12, 2009 2:27 am

hey! the MMB double click works for me. :ecstatic:
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby MarcioAB » Thu Feb 12, 2009 3:02 am

xrok1 wrote:hey! the MMB double click works for me. :ecstatic:


Humm ... my initial expectation regard the Middle Mouse Button was to replace the default tool currently associated with the MMB - that is the standard SketchUP Orbit tool - by this one. But its not possible yet.
So I think in this case it is pointless to connect any function to MMB if I can only use it when the OrbitOnTarget tool is activated.

Regard any further development: I used that code in JointSU plugin with minor changes - When you are assembling components I find useful to have "OrbitOnTarget" with the target automatically set on the origin of the component axis you are working on. So, I think the idea now is to embed this "OrbitOnTarget" code into more specific plugins.

What else could be improved in a tool like this ?

Regards
Marcio
0

MarcioAB 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby xrok1 » Thu Feb 12, 2009 3:14 am

xrok1 wrote:hey! the MMB double click works for me. :ecstatic:




oops i guess you made me find an SK feature thats already in place. if i MMB double click SK centers on that point (i didn't know that before now :D )and since SK orbit the center of the screen anyway; please explain the purpose of your plugin?
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby MarcioAB » Thu Feb 12, 2009 11:16 am

xrok1 wrote:please explain the purpose of your plugin?


Make a simple cube. Center it (using the double-click you mention) targeting any specific point over the cube and Orbit.

You will find it will not always orbit around that expected point.

The OrbitOnTarget plugin makes it orbit on the selected point (and by the way, the selection is made using the Inference Engine).

Regards
Marcio
0

MarcioAB 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby Ross Macintosh » Thu Feb 12, 2009 11:44 am

Thanks Marcio for developing the plugin. I'm finding your approach to the controls very good. I have the feeling they will become very intuitive for me with a bit more use. I'm happy.

Regards, Ross
0

Ross Macintosh 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby MarcioAB » Thu Feb 12, 2009 5:26 pm

Great. Let me know if we can improve the interface or anything else.

Regards
Marcio
0

MarcioAB 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby xrok1 » Fri Feb 13, 2009 2:29 am

O.K, thanks for the explaination, even if i never use your script thank you for making me discover the MMB function of SK without you i would have never discovered that which is a very valuable function. ;)
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby jprokos » Tue Mar 02, 2010 8:38 am

I really wish this worked on a Mac. The Double Click feature is all that works nothing else.

2009 iMac
OS 10.6
SU 7.1
0

jprokos 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby majid » Tue Mar 02, 2010 2:49 pm

MarcioAB wrote:Great. Let me know if we can improve the interface or anything else.

Regards
Marcio

dear Marcio, would you plz add a function for exact movement of camera? i.e 35cm to right? up dn ....?
0
My perspective shortcuts book: https://bit.ly/30Tdbce
User avatar
majid 
Top SketchUcator
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby fullyfledgeded » Mon Jul 28, 2014 10:58 am

hey once you've define the target, can you say for example rotate exactly 180degrees around it?
0

fullyfledgeded 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby smiggyuk » Tue Jul 05, 2016 4:04 pm

this is a pluggin i have been looking for cant believe it was so hard to find but I am not familiar with loading PNG . i have just loaded ruby plug ins before . what do i do (learner)

many thanks
0

smiggyuk 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby caddia » Mon Jul 29, 2019 7:22 pm

please help not working on sketchup 2018 i need it so much.
0

caddia 
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby Dave R » Wed Jul 31, 2019 3:55 am

@caddia, The author hasn't visited Sketchucation in more than six years. It's likely that he's no longer supporting this plugin. Might be a good idea to look for an alternative.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Camera OrbitOnTarget v1

Postby juju » Wed Jul 31, 2019 9:30 am

quick off-the-cuff alternatives you might want to look into, there may be more:

Camera Tools
Curic Spin Camera
Animate Rotation
Camera Circle
Camera Spiral
0
Save the Earth, it's the only planet with chocolate.
User avatar
juju 
Premium Member
Premium Member
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: ArialBoled, Bing [Bot], joearnold1098, NatoxD and 7 guests