POV-Ray : Newsgroups : povray.general : Shell-outs Server Time
27 Nov 2024 19:18:57 EST (-0500)
  Shell-outs (Message 1 to 10 of 10)  
From: ingo
Subject: Shell-outs
Date: 29 Mar 2021 10:29:30
Message: <XnsACFCA7C3D3FCCseed7@news.povray.org>
Does the shell-out mechanism still work (3.8, win10)? I can not get it 
going and remember having trouble with it in the past.

Ingo


Post a reply to this message

From: William F Pokorny
Subject: Re: Shell-outs
Date: 29 Mar 2021 12:26:30
Message: <6061ffb6$1@news.povray.org>
On 3/29/21 10:29 AM, ingo wrote:
> Does the shell-out mechanism still work (3.8, win10)? I can not get it
> going and remember having trouble with it in the past.
> 
> Ingo
> 
Unsure about Win10 and v3.8.

I've had some trouble with it in the distant (years) past, on linux, but 
I know jr has had recent success. So let me see with v3.8...

First be sure your most restrictive .conf file allows the shell out. 
This is not the default on unix/linux and I just had to change my 
default. You should - somewhere - get a message about the shell outs not 
being allowed if the permissions don't allow the feature.

Beyond that I find I've mostly got to use an ini file with settings 
inside the ini file as the command line substitutions %o, %s don't seem 
to both be parsed and substituted correctly. At least I could not figure 
out how to get it to work.

In the ini file I was able to use:

Post_Scene_Command=/bin/ls >%s_post.txt
Pre_Scene_Command=preShell %s

where preShell is a bash script I created. However, the %s feature is 
not stripping the scene input file extension as the documentation says 
it should... I get, for example, a file called:

hmmPovr.pov_post.txt

from the Post_Scene_Command. On unix/linux systems you could do the 
needed corrections within a created shell.

So, looks to me on linux/unix one could get the shell out stuff going 
though with some gotchas to work around. Unsure if this any help to you 
on windows. :-)

Bill P.


Post a reply to this message

From: ingo
Subject: Re: Shell-outs
Date: 29 Mar 2021 13:21:27
Message: <XnsACFCC4EAB6921seed7@news.povray.org>
in news:6061ffb6$1@news.povray.org William F Pokorny wrote:

> Unsure if this any help to you 
> on windows.

Not at all, but that's fine :) 
I write a file from the scene but render nothing. Then I want to convert 
the file. I just stuck the commandline behind the Post_Scene_Command=..
Nothing happens, no error, no result.

First I thought is because I use the No Image INI-option, as that results 
in a Render failed message. Redering an image changes nothing.

Starting other programms is not disabled.

Ingo


Post a reply to this message

From: William F Pokorny
Subject: Re: Shell-outs
Date: 31 Mar 2021 07:59:18
Message: <60646416$1@news.povray.org>
On 3/29/21 1:21 PM, ingo wrote:
> in news:6061ffb6$1@news.povray.org William F Pokorny wrote:
> 
>> Unsure if this any help to you
>> on windows.
> 
> Not at all, but that's fine :)
> I write a file from the scene but render nothing. Then I want to convert
> the file. I just stuck the commandline behind the Post_Scene_Command=..
> Nothing happens, no error, no result.
> 
> First I thought is because I use the No Image INI-option, as that results
> in a Render failed message. Redering an image changes nothing.
> 
> Starting other programms is not disabled.
> 
> Ingo
> 

I didn't mention it in my earlier response, but while playing with the 
pre-post shell features, a few times I had typos / syntax errors. Some 
of those didn't show up as errors - or anything at all - that I could see.

When I got errors they were sort of mixed in with the output in random 
or unusual positions in the output making them harder to see. This might 
be something particular to linux/unix as some of those messages would 
have been issued by the shell itself.

A shot in the dark. Have you tried running POV-Ray from a command line 
in a windows command shell window? I don't know enough about windows or 
the windows interface top know if there is a shell/command window 
'under/available' for commands when the usual UI is running. And, if one 
is available where any shell issued messages might end up in the UI.

Aside: Your usage of POV-Ray here reminds me functionality such as a 
directive like #parserstop would be useful to have. Something to get a 
clean return code while skipping to any post scene work and exit. It 
would better enable using POV-Ray's SDL/language as a scripting tool. 
Plus, it would make creating parser tests cases less messy. (Maybe 
#radiositystop, #photonsstop keywords too...)

Bill P.


Post a reply to this message

From: Mr
Subject: Re: Shell-outs
Date: 31 Mar 2021 09:40:00
Message: <web.60647b40e8422dbf6adeaecb3f378f2@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> in news:6061ffb6$1@news.povray.org William F Pokorny wrote:
>
> > Unsure if this any help to you
> > on windows.
>
> Not at all, but that's fine :)
> I write a file from the scene but render nothing. Then I want to convert
> the file. I just stuck the commandline behind the Post_Scene_Command=..
> Nothing happens, no error, no result.
>
> First I thought is because I use the No Image INI-option, as that results
> in a Render failed message. Redering an image changes nothing.
>
> Starting other programms is not disabled.
>
> Ingo

Hello,
First
I am assuming you read docs and already did uncheck the menu entry
Options > Script I/O Restrictions > Disable Starting Other Programs
as opposed to the default setting and advised here:
http://www.povray.org/documentation/view/3.6.1/221/

"Note: individual platforms may provide means of preventing shell-outs from
occurring. For example, the Windows version provides a menu command to turn
shell-outs off (which is the default setting for that platform). The reason for
this (along with file I/O restrictions) is to attempt to prevent untrusted INI
files from doing harm to your system. "

So Secondly, as this thread also suggests/
http://news.povray.org/povray.newusers/thread/%3CX### [at] 204213191226%3E/

....have you checked the program you wish to run is indeed in Windows environment
path? (For command shell, C:\Windows\System32\cmd.exe) so you can call it in
your ini file just by "cmd[(.exe?)]" and not full path


Third and Lastly, if all else failed,
Though this feature looks very powerful and user friendly... Have you considered
switching to another command language like python/Lua/whatever you please for
the whole ini writing + render launching wrap up? (personally I had to learn
Python because it's the scripting language embedded in Blender from within which
I launch and post handle back pov rendered images (but off-topic, Lua does look
much closer to POV in syntax doesn't it?)


Post a reply to this message

From: Bald Eagle
Subject: Re: Shell-outs
Date: 31 Mar 2021 13:20:00
Message: <web.6064af15e8422dbf1f9dae3025979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> Aside: Your usage of POV-Ray here reminds me functionality such as a
> directive like #parserstop would be useful to have. Something to get a
> clean return code while skipping to any post scene work and exit. It
> would better enable using POV-Ray's SDL/language as a scripting tool.
> Plus, it would make creating parser tests cases less messy. (Maybe
> #radiositystop, #photonsstop keywords too...)
>
> Bill P.

For some things, such as going through the code and writing to a file to be used
in the scene, perhaps a #reparse command would find utility as well.  I envision
it being used much like #persistent, but during the first run.


Post a reply to this message

From: ingo
Subject: Re: Shell-outs
Date: 31 Mar 2021 16:41:32
Message: <XnsACFEE6D561C4Dseed7@news.povray.org>
in news:web.60647b40e8422dbf6adeaecb3f378f2@news.povray.org Mr wrote:

> Options > Script I/O Restrictions > Disable Starting Other Programs

yes, every thing enabled.

The program I use runs fine from the cmd.

Python et all means setting up yet an other layer. I've done that in the 
past for running Voro++

I'll investigate a bit more later, as I can continue through an other way 
for now.

Thanks,

Ino


Post a reply to this message

From: ingo
Subject: Re: Shell-outs
Date: 31 Mar 2021 17:08:56
Message: <XnsACFEEB7BF6E8Cseed7@news.povray.org>
in news:60646416$1@news.povray.org William F Pokorny wrote:

> A shot in the dark. Have you tried running POV-Ray from a command line 
> in a windows command shell window?

I have no commandline version for windows. Calling the gui version from 
the command line gives the same result. The scene renders. The 
Post_Scene_Command seems to do nothing, regardles what I try. I'm sure I 
ve used it in the past for conversions and assembling animations.

Ingo


Post a reply to this message

From: Mr
Subject: Re: Shell-outs
Date: 31 Mar 2021 17:30:00
Message: <web.6064e8f3e8422dbf6adeaecb3f378f2@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> in news:web.60647b40e8422dbf6adeaecb3f378f2@news.povray.org Mr wrote:
>
> > Options > Script I/O Restrictions > Disable Starting Other Programs
>
> yes, every thing enabled.
>
> The program I use runs fine from the cmd.
>
> Python et all means setting up yet an other layer. I've done that in the
> past for running Voro++
>
> I'll investigate a bit more later, as I can continue through an other way
> for now.
>
> Thanks,
>
> Ino

The program runs in cmd but the thread seems to imply that cmd itself has to be
added to path? sorry if rehammering the nail where you already tried.


Post a reply to this message

From: ingo
Subject: Re: Shell-outs
Date: 1 Apr 2021 02:21:50
Message: <XnsACFF5511210A1seed7@news.povray.org>
in news:web.6064e8f3e8422dbf6adeaecb3f378f2@news.povray.org Mr wrote:

> sorry if rehammering the nail where you already tried.

Keep hammering.

http://news.povray.org/povray.animations/message/%
3Cweb.53b48e48fc9f866986104bb60%40news.povray.org%3E/#%
3Cweb.53b48e48fc9f866986104bb60%40news.povray.org%3E

This is exactly how I did a few things in the past.

So now I've put my command in a bat file. When I run the batfile the 
conversion works fine.

When I add the batfile to  Post_Scene_Command= "test.bat" in the ini file, 
nothing happens.

Ingo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.