Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Corona Goodies - User Contributions => Topic started by: oncire on 2017-10-09, 03:46:48

Title: Script - Create Corona Camera from View
Post by: oncire on 2017-10-09, 03:46:48
here is a macroscript... must be in perspective view to use it.

-just drag the script to your 3ds max window.. you can find the scripts in cui-category-ebbmaxscript
-to use, just add a shortcut,add to menu,quad, etc.


requirement: corona 1.7 and higher
update: modified the script to work perfectly in newest released
Title: Re: Script - Create Corona Camera from View
Post by: maru on 2017-10-09, 09:30:00
Awesome, seems to be working nicely.

Native feature like this is already logged in our task tracker.
Title: Re: Script - Create Corona Camera from View
Post by: romullus on 2017-10-09, 10:04:15
Thank you very much, good sir!
Title: Re: Script - Create Corona Camera from View
Post by: RolandB on 2017-10-09, 13:12:23
Does not work for me...
Title: Re: Script - Create Corona Camera from View
Post by: oncire on 2017-10-09, 13:50:38
Does not work for me...


make sure you have corona 1.7 installed..:) else it does not work
Title: Re: Script - Create Corona Camera from View
Post by: oncire on 2017-10-09, 14:05:34
Awesome, seems to be working nicely.

Native feature like this is already logged in our task tracker.
thanks maru.

Thank you very much, good sir!

no worries... just helping the community.
Title: Re: Script - Create Corona Camera from View
Post by: RolandB on 2017-10-09, 15:11:29
Arf... only 1.6.3... Pffff I have no excuse I have to read (but I was so happy)...
I'll install the new one thanks and sorry ;-)
Roland
Title: Re: Script - Create Corona Camera from View
Post by: rambambulli on 2017-10-31, 09:19:59
Assigned ctrt+C directly to your script.
Thanks!
Title: Re: Script - Create Corona Camera from View
Post by: vfga10 on 2017-11-07, 13:01:38
Awesome! Thank you so much
Title: Re: Script - Create Corona Camera from View
Post by: JoachimArt on 2018-06-18, 17:55:49
here is a macroscript... must be in perspective view to use it.

-just drag the script to your 3ds max window.. you can find the scripts in cui-category-ebbmaxscript
-to use, just add a shortcut,add to menu,quad, etc.


requirement: corona 1.7.... (works only on this version...previous version don't have coronacamera)

Hi I'm really enjoying your script, having a keyboard shortcut. with corona 2.0 (still i RC3 though) the position changes when adding a camera through your script. I know corona has a button for it, but if you are planning on updating the script it would be highly appreciated ;)
Title: Re: Script - Create Corona Camera from View
Post by: Frood on 2018-07-13, 09:56:55
the position changes when adding a camera


Just add a line "cam.targeted = false" before the transformation:

Code: [Select]
(...)
local cam = CoronaCam isSelected:true fov:(getViewFOV())
cam.targeted = false
cam.transform = inverse(viewport.getTM())
(...)

and it works again correctly. I had to change our script also at some point; something has changed during the dailies with CoronaCam.


Good Luck



Title: Re: Script - Create Corona Camera from View
Post by: FlorianW. on 2018-07-13, 10:27:03
Thanks! Had exact the same problem. Solved!

Cheers
Title: Re: Script - Create Corona Camera from View
Post by: oncire on 2018-07-13, 10:49:39

Just add a line "cam.targeted = false" before the transformation:

Code: [Select]
(...)
local cam = CoronaCam isSelected:true fov:(getViewFOV())
cam.targeted = false
cam.transform = inverse(viewport.getTM())
(...)

and it works again correctly. I had to change our script also at some point; something has changed during the dailies with CoronaCam.


Good Luck

updated the first post... seems like they change how corona camera works in the newer releases.
Title: Re: Script - Create Corona Camera from View
Post by: alias_marks on 2018-10-10, 18:27:40
Very handy script, thanks for putting together.  One request if you get around to tinkering some more.

Currently when I assign your script to ctrl-c it creates camera as advertised.  Great
Having that said, is it possible to have it behave like the previous ctrl-c behavior, whereby, if you have a camera already selected it simply moves that camera to your current perspective (instead of making entire new camera).

Thanks for any updates!

Title: Re: Script - Create Corona Camera from View
Post by: Frood on 2018-10-11, 12:58:15
it simply moves that camera to your current perspective (instead of making entire new camera).

no worries... just helping the community.

Yes this. So I feel free to attach our script which

- moves a selected camera instead of creating a new one
- warns if the camera is locked (and asks for confirmation if so)
- warns if a unlocked camera is selected when executing

We messed up cams regularly before having those confirmation boxes.


Good Luck

Title: Re: Script - Create Corona Camera from View
Post by: alias_marks on 2018-10-11, 17:41:06
Ah, wonderful!  Thanks, tested out and works well.