Jump to content

Pre Render Script Doubts


lisux

Recommended Posts

Hi all.

I am making a pre render script to be launched before a render starts, I wanto toinclude it in the Pre Render field of the scrips tab in the Manta ROP.

The thing that I want to do is to add at the beggining of the mantra command line the command:

nice -n 10

To launch the render with low priority, and when the render is launched return the command line to his original value.

So my problem now is how to know what ROP has launched the pre render script into the script itself, so I can first save the curren command line, change it, and restore it after rendering.

I have tried using the oppwd() expression to know the path that is used to launch the script, and it is launched from /, so I can't know the ROP that have launched this script.

Anybody have some tips about how to do this?

Thanks

Link to comment
Share on other sites

The thing that I want to do is to add at the beggining of the mantra command line the command:

nice -n 10

To launch the render with low priority, and when the render is launched return the command line to his original value.

Instead of a pre-render script, would it be sufficient for you if you just changed the render command from "mantra" to "nice -n 10 mantra"?

Cheers!

Link to comment
Share on other sites

Hi all.

I am making a pre render script to be launched before a render starts, I wanto toinclude it in the Pre Render field of the scrips tab in the Manta ROP.

The thing that I want to do is to add at the beggining of the mantra command line the command:

nice -n 10

To launch the render with low priority, and when the render is launched return the command line to his original value.

So my problem now is how to know what ROP has launched the pre render script into the script itself, so I can first save the curren command line, change it, and restore it after rendering.

I have tried using the oppwd() expression to know the path that is used to launch the script, and it is launched from /, so I can't know the ROP that have launched this script.

Anybody have some tips about how to do this?

Thanks

Not 100% sure what your after, but have you tried using $OS with opfullpath()? $OS will give you the

name of the current operator, and opfullpath() will return the fullpath to the operator specified.

eg opfullpath(".")

hope that helps

Luca

Link to comment
Share on other sites

Instead of a pre-render script, would it be sufficient for you if you just changed the render command from "mantra" to "nice -n 10 mantra"?

Cheers!

This has been my first try and my actual solution.

The problem is that if you put this in the command line, and then you open the command line dialog to change some parameters then the dialog doesn't interpret the line

nice -n 1o mantra

As the mantra command line, it things that you are working with the wren render, then you swith to mantra again and the dialog erase the nice -n 10.

This is the reason because I wanto to make this in tne background.

Another reason is that I want to do this with other commands like i3dgen or the ROP Output File, ane there I need to use pre render scripts.

Link to comment
Share on other sites

Not 100% sure what your after, but have you tried using $OS with opfullpath()? $OS will give you the

name of the current operator, and opfullpath() will return the fullpath to the operator specified.

eg opfullpath(".")

hope that helps

Luca

Thanks Luka you advice put me in the right way.

I am using oppwd() expression to get the correct path.

No my problem is that using opparm or opscript, on a Mantra ROP, I can't find the parameter that has the command line.

There is a parameter called command, but this only have the command name not the command line with argiments, ofr example if I set a command line like:

mantra -r -B 16 -V 1

The command parameter only have mantra, not the rest of arguments.

Hos can I get the complete command line in order to modify it from a script?

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...