lisux Posted August 23, 2006 Share Posted August 23, 2006 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 Quote Link to comment Share on other sites More sharing options...
rjpieke Posted August 23, 2006 Share Posted August 23, 2006 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! Quote Link to comment Share on other sites More sharing options...
doc Posted August 23, 2006 Share Posted August 23, 2006 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 Quote Link to comment Share on other sites More sharing options...
lisux Posted August 24, 2006 Author Share Posted August 24, 2006 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. Quote Link to comment Share on other sites More sharing options...
lisux Posted August 24, 2006 Author Share Posted August 24, 2006 Not 100% sure what your after, but have you tried using $OS with opfullpath()? $OS will give you thename 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 Quote Link to comment Share on other sites More sharing options...
rjpieke Posted August 24, 2006 Share Posted August 24, 2006 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? Instead of using opscript()/opparm(), what about just chs()? Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.