Page 1 of 1

Mac Questions

Posted: Sun May 10, 2009 8:02 am
by Whaat
Some questions related to Mac:

I haven't been able to launch an Indigo scene with the command line (Terminal - bash). Maybe I'm doing something wrong. Can someone explain the proper way to do it. I am writing:

Code: Select all

open -a Indigo.app "scenefile.igs"
doesn't work for me.

Also, is it possible to set the file associations on the Mac when Indigo is installed? It would be nice to render a scene file by double-clicking the file in the Finder. Is this going to be added for next release?

One more thing:
How do I write a batch/bash script on a Mac? I am not sure what the proper file extension is supposed to be so that it executes itself. For example, on a PC, I use '.bat' but what about Mac? Is there something equivalent?

Thanks!

Re: Mac Questions

Posted: Sun May 10, 2009 8:16 am
by fused
Whaat wrote:One more thing:
How do I write a batch/bash script on a Mac? I am not sure what the proper file extension is supposed to be so that it executes itself. For example, on a PC, I use '.bat' but what about Mac? Is there something equivalent?

Thanks!
It think we would need a shell script (.sh).

but im not really sure if we can just create them from our plugins and execute them, because the need rights for execution. i guess i cant set those with c4d.

http://www.oreillynet.com/pub/a/mac/200 ... g_osx.html

Re: Mac Questions

Posted: Sun May 10, 2009 12:03 pm
by benn
Oops sorry Dale, I didn't put the code in to respond to apple open events. It'll probably work if you pass the filename on the command line like:

/Applications/Indigo.app/Contents/MacOS/Indigo path_to_file

Although that gives me an error with my latest build. I'll suss it out.

Re: Mac Questions

Posted: Thu May 28, 2009 4:31 pm
by Whaat
benn wrote:Oops sorry Dale, I didn't put the code in to respond to apple open events. It'll probably work if you pass the filename on the command line like:

/Applications/Indigo.app/Contents/MacOS/Indigo path_to_file

Although that gives me an error with my latest build. I'll suss it out.
Hey benn,
When I try to open Indigo from the command line using the following code:

Code: Select all

open Indigo.app/Contents/MacOS/Indigo "/Applications/Indigo/default.igs"
Indigo launches but does not load and render the scene file. Instead, the scene file is opened using the TextEdit application :?
Am I doing something wrong? I am using the new Mac build that you posted in the Blender forums.

Re: Mac Questions

Posted: Thu May 28, 2009 5:24 pm
by benn
I'm doing this in blendigo and it works..

/Applications/Indigo.app/Contents/MacOS/Indigo /tmp/blendigo-export.igs

But I'll try it with applescript...

Re: Mac Questions

Posted: Thu May 28, 2009 5:26 pm
by benn
open -a /Applications/Indigo.app/Contents/MacOS/Indigo /tmp/blendigo-export.igs

Seems to be perfect though!