MoI discussion forum
MoI discussion forum

Full Version: AutoRotate script final

Show messages:  1-16  17-35

From: mcramblet
26 Feb 2013   [#17]
Paul-

Thanks for posting this, it works great. I'll have to find a decent Mac OS screen capture program so I can use the script and capture quick animations right out of MoI. Very useful!
From: Michael Gibson
26 Feb 2013   [#18] In reply to [#16]
Hi Michael (ORION20036) - you wrote:

> The script does turn indefinitely, but has a slight pause with every revolution. Any information
> on how to modify the script so I can set the number of continuous revolutions without a pause
> would be appreciated.

It looks like the script currently runs on a "busy loop" where the script is going in a really tight loop kind of continuously churning away. I'll try to modify it to use a timer instead and move more processing over into the main host process. I think that could make for some more consistent motion.

- Michael
From: Michael (ORION20036)
26 Feb 2013   [#19] In reply to [#18]
Many thanks Michael, It has great potential for viewing my Cad Sculptures, especially as it is so simple to capture, and your rendering settings are just perfect.


Many thanks for posting the script also Paul!.
From: Michael Gibson
26 Feb 2013   [#20] In reply to [#19]
Hi Michael, try the attached updated version, this one is kind of "lighter weight" since it doesn't make the script run in a continuous busy loop and that should likely help it have a more consistent motion.

This version will only run on v3 (or v2.5 on the Mac should be ok too).

Hope this helps!

- Michael

Attachments:
AutoRotate2_new.zip


From: Michael (ORION20036)
26 Feb 2013   [#21] In reply to [#20]
That does the trick just great Michael, I spend so much time on my sculptures that I never have the time to create animations, so this will get me moving on some YouTube promotions.

I will post some of the links later in the week when I have sorted some of my sculptures out to animate.



Many Thanks for your time and innovation!.
From: shayno
14 Apr 2013   [#22]
Hi Michael
Is there a command or script to hide/unhide the background grid

I forget but what is a good screen video capture program
cheers
shayne
From: Michael Gibson
14 Apr 2013   [#23] In reply to [#22]
Hi shayne, see here for a script you can paste as the command part of a shortcut key for doing a hide/unhide of the grid:
http://moi3d.com/forum/index.php?webtag=MOI&msg=4954.2

> I forget but what is a good screen video capture program

I use Camtasia: http://www.techsmith.com/camtasia.html

- Michael
From: Frenchy Pilou (PILOU)
6 Jun 2016   [#24]
French version! ;)

http://moiscript.weebly.com/tournette.html

From: Zooen
22 Aug   [#25]
Hi Michael,
Is it possible that AutoRotate2 only starts rotation when "Start" is clicked?
From: Michael Gibson
22 Aug   [#26] In reply to [#25]
Hi Zooen,

re:
> Is it possible that AutoRotate2 only starts rotation when "Start" is clicked?

Yes, I think so - on line number 7 of AutoRotate2.htm there is this:
code:
			var start_stop = true;


I think that is where the default value is set, try changing that to:

code:
			var start_stop = false;


- Michael
From: Zooen
24 Aug   [#27] In reply to [#26]
Thanks Michael, but I'm using the version you modified at Michael's (ORION20036) request . In this version there's no line of code: var start_stop = true;
And I'd rather use this one.

I'm also using version: MoI 5.0 beta February 8, 2025 and it's only AutoRotate_New that works with V5.0 beta.

Attachments:
AutoRotate2_new.zip


From: Michael Gibson
24 Aug   [#28] In reply to [#27]
Hi Zooen, for that version the thing that makes it rotate on startup is in the file AutoRotate2.js, line number 5:

code:
	moi.ui.commandUI.Start();


Either delete that line of code or put a // at the start of it to comment it out and then it should be stopped when initially launched.

- Michael
From: Zooen
25 Aug   [#29] In reply to [#28]
Thanks Michael,
Well, when I put a // at the beginning of the line, I got an error message (maybe I didn't understand the instruction properly!). Then I thought of a problem with the left brace.
So here's what I did below: move left brace.

// config: norepeat

function DoAutoRotate()

// moi.ui.commandUI.Start();

{ var dlg = moi.ui.commandDialog;

while ( 1 )
{
if ( !dlg.waitForEvent() )
return false;

if ( dlg.event == 'quit' )
break;
}
}

DoAutoRotate();

It works!

This allows me, when recording an animation, to start at a specific (chosen) position.
Thanks again
From: Zooen
25 Aug   [#30] In reply to [#28]
Well, to illustrate my request, a short video.
It's very short, because in mp4 or Gif format, a longer video can't be sent to the forum.
In fact, I'm wondering what the maximum size is.

Please, I have no Copyright, but out of respect for the modest little creator that I am, do not use this animation video in any AI software or other to ask him to realize anything. Thank you

Oups! j'ai oublié de traduit en anglais.

Oops! I forgot to translate it into English.
In fact, as my memory fails me more and more, I was wondering how I had created the basic shape or if I had created it myself. I've just found the original August 16, 2021 file on an external disk. 4 years, well, I'm allowed to have forgotten!!!

Attachments:
MoI_Chorégraphonia.mp4


From: Michael Gibson
25 Aug   [#31] In reply to [#29]
Hi Zooen, I'm glad you got it working! I've attached the file with the edit in it that I was trying to describe.

- Michael

Attachments:
AutoRotate2.js


From: Phiro
25 Aug   [#32]
Hi,

My 2 cents.
If you want something like autoRotate to have a simple render, look at Koru software.
MoI is wonderfull and perhaps the best CAD for artistic model but it's not a render tool.
I think if you want an easy and good render with a rotation effect, Koru is a very good choice.
It can export your work in a html page with Webgl and easy add a script to rotate the camera.
If you let it work, the webpage will rotate the cam.
If you use your mouse to rotate and stop touch it, after seconds, it will re-rotate the cam.

And as a webpage, you can open it with any device, Computer, smartphone, tablet...

A quick sample here... Click_it
From: Zooen
26 Aug   [#33] In reply to [#32]
Hi Phiro,
Merci pour l'information.
Thanks for the information, I'll look into it. Well, it's not free.

I use ShareX 18.0.1.
ShareX is a free, open-source screen capture and screencast program for recording everything that happens on screen.
From: Zooen
26 Aug   [#34] In reply to [#31]
Thanks Michael,
Even though my tweaked AutoRotate2.js works, I've gone back to yours, certainly more in line with the code writing!
From: Frenchy Pilou (PILOU)
26 Aug   [#35]
Koru shown example has not a complete rotation! ;)
Spline 3D yes! ;) Don't use it for a while! :(
https://moiscript.weebly.com/spline.html

Show messages:  1-16  17-35