python filtering script doesn't work anymore

   1183   0   1
User Avatar
Member
383 posts
Joined:
Offline
Hi

I wrote a filter script for mantra command …sometime ago.


import mantra
import sys, os



aPath = os.path.dirname(os.path.abspath(sys.argv))
filePath = aPath + ‘\shad.txt’
mFile = open(filePath,'r')
mLine = mFile.readlines()

sPath = ‘op:’ + mLine
#give this : opshop/myshader

def filterCamera():

mantra.setproperty('renderer:renderengine','raytrace')
#print ‘Renderer’, mantra.property('renderer:renderengine')


def filterInstance():

#print ‘Filtering:’, mantra.property('object:name')
mantra.setproperty('object:surface', sPath)
mantra.setproperty('objectverridedetail', 1)

mFile.close()


All shop are declared but mantra give me a exit code 1 .. even if use directly a shader path instead of the spath variable …
Used to work fine … sometime ago.

Thanks for your help.

Vincent
http://vimeo.com/vbkstudio [vimeo.com]
  • Quick Links