Jump to content

Can not "import mantra"


KuDDu

Recommended Posts

Hi everybody! I am new in Houdini(previosly Maya user). The target is to render scenes in several local machines. This can be done by: mantra -h hos1, host2 etc.

Dut PythonShell after this:

>>> import mantra

Traceback (most recent call last):

File "<console>", line 1, in <module>

ImportError: No module named mantra

This problem occurs on several machines. I think i need mantra.py file or no? Please help

Link to comment
Share on other sites

Hm... but where can i find this "shell". I have only "python shell" and "hscript textport". I understand that this is stupid question but please help me!

oh! i understand) i am so stupid) shell = comand line or cmd.exe inside) thanks all)

STOP: what about THIS code-sample:

#

# Simple Example Filter

#

import sys

import mantra # Import the mantra module

Verbose = False

# Process any arguments during initialization of the module

for arg in sys.argv[1:]:

if arg == '-v':

Verbose = True

# A callback to change the surface shader of all objects

def filterInstance():

if Verbose:

print 'Filtering:', mantra.property('object:name')

catstr = mantra.property('object:categories')[0]

categories = catstr.split(', ')

mantra.setproperty('object:surface', 'plastic diff 1 0 0')

for c in categories:

if c == 'pass1':

mantra.setproperty('object:renderable', 0)

elif c == 'pass2:

mantra.setproperty('object:surface', 'matte')

mantra.setproperty('object:overridedetail', 1)

Isn't it python-script? I am nativly c/c++ programer but know smth about python

PS: even typing in shell "mantra -h localhost, second_host_name" nothing happens. Changing in hserver.ini doesnt help. Rendering by pressing button inside Houdini cases rendering only on local machine(while there is string "mantra -h localhost, second_host_name"

Edited by KuDDu
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...