Message 1 of 2
Set Render Elements
Not applicable
07-10-2009
04:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have downloaded a script from scriptspot, which is close to what I want, but not quite and was hoping you could help me make the necessary changes.
The script is Sort Render Elements by Tollef Roe Steen, which is a simple enough script that sets the path of the render elements to the same as the main pass. However, the script creates sub-directories for all the elements in this directory.
What I am after is for the script just to change the path of the elements to that of the main pass, without any sub-directories, so the main pass and the elements are all in the same directory.
I have listed a copy of the code below, for your information: -
function setUpRenderElements =
(
re = maxOps.GetCurRenderElementMgr()
numb = re.numrenderelements()
for i=0 to (numb-1) do
(
el = re.getrenderelement i
currentFileName = (fileNameFromPath (re.GetRenderElementFileName i))
currentRendOutputFilePath = getFileNamePath rendOutputFilename
newDirectory = currentRendOutputFilePath+"\\"+el.elementname
if re.GetElementsActive() then makeDir newDirectory
newFileName = newDirectory +"\\"+ currentFileName
re.SetRenderElementFileName i newFileName
)
)
setUpRenderElements()
I'm sure this is quite simple, but I haven't had any luck with this.
Thanks
I have downloaded a script from scriptspot, which is close to what I want, but not quite and was hoping you could help me make the necessary changes.
The script is Sort Render Elements by Tollef Roe Steen, which is a simple enough script that sets the path of the render elements to the same as the main pass. However, the script creates sub-directories for all the elements in this directory.
What I am after is for the script just to change the path of the elements to that of the main pass, without any sub-directories, so the main pass and the elements are all in the same directory.
I have listed a copy of the code below, for your information: -
function setUpRenderElements =
(
re = maxOps.GetCurRenderElementMgr()
numb = re.numrenderelements()
for i=0 to (numb-1) do
(
el = re.getrenderelement i
currentFileName = (fileNameFromPath (re.GetRenderElementFileName i))
currentRendOutputFilePath = getFileNamePath rendOutputFilename
newDirectory = currentRendOutputFilePath+"\\"+el.elementname
if re.GetElementsActive() then makeDir newDirectory
newFileName = newDirectory +"\\"+ currentFileName
re.SetRenderElementFileName i newFileName
)
)
setUpRenderElements()
I'm sure this is quite simple, but I haven't had any luck with this.
Thanks