Re: sequence rendermap v 6.5?

Date : Tue, 04 Dec 2007 10:23:45 -0500
To : XSI(at)Softimage.COM
From : Francois Lord <xsilist(at)francoislord.com>
Subject : Re: sequence rendermap v 6.5?
or try this script. It must be called with the following command line:
xsibatch -script -main main -args -start [start frame] -end [end frame] -step [step] -scene [scene]


To process animated rendermaps, just put the tag "[Frame]" (without quotes) somewhere in the filename of the rendermap.

Rename it without the .txt extension.
You will need Python.


Daniel Jahnel wrote:
is there a solution for this? old netview script doesnt do anything anymore...

ta...daniel
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
# this script must be called with the following command line:
# xsibatch -script -main main -args -start [start frame] -end [end frame] -step [step] -scene [scene]
#
# To process animated rendermaps, just put the tag "[Frame]" (without quotes) somewhere in the filename of the rendermap.

from win32com.client import Dispatch
from win32com.client import constants as c
xsi				= Dispatch('XSI.Application').Application
log				= xsi.__getattr__('LogMessage')

def main(start, end, step, sScene):

	iStart = int(start)
	iEnd = int(end)
	iStep = int(step)
	sPath = None
	
	xsi.OpenScene(sScene)
	for iFrame in range(iStart, iEnd+1, iStep):
		log("Processing frame %d" %(iFrame))

		# Process Rendermaps
		oColl = xsi.FindObjects(None, "{9F3CAA50-1402-11D5-AE9A-00A0C96E63E1}")
		log("Number of Rendermaps: " + str(oColl.Count))
		for oRendermap in oColl:
			if oRendermap.Parent3DObject:
				if not sPath:
					sPath = oRendermap.imagefilepath.Value
				sNewPath = sPath.replace("[Frame]", str(iFrame))
				oRendermap.imagefilepath.Value = sNewPath
				log("Processing: %s" %(oRendermap.FullName))
				xsi.RegenerateMaps(oRendermap, "")
				
		# Process Ultimappers.
		oColl2 = xsi.FindObjects(None, "{76332571-D242-11d0-B69C-00AA003B3EA6}")
		for oObj in oColl2:
			if oObj.Type != "Ultimapper":
				oColl2.Remove(oObj)
		log("Number of Ultimappers: " + str(oColl2.Count))
		for oUltimapper in oColl2:
			if oUltimapper.Parent3DObject:
				if not sPath:
					sPath = oUltimapper.Prefix.Value
				sNewPath = sPath.replace("[Frame]", str(iFrame))
				oUltimapper.Prefix.Value = sNewPath
				log("Processing: %s" %(oUltimapper.FullName))
				xsi.GenerateUltimapper(oUltimapper)


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.