Forums

You are not logged in.

#1 2012-06-20 08:21:59

daddysauce
Member
Registered: 2007-01-21
Posts: 174
Website

A Lil help with Procedural Run Program

Hi all,

Getting to grips with python here. Well almost.
I'm following a "trivial example".
Created a Nurbs plane and attached a Pre-Geo Mel Script as follows. I've tried to put in what I've seen on the forum here and in the manual. I'm on Windows 64.

//////////////////////////

Procedural "RunProgram"  ["C:\python26\python.exe C:\Users\luke\Documents\maya\2012-x64\scripts\createSphere.py" ""]  [-1 1 -1 1 -1 1];
RiAttribute -n "visibility" -p "camera" "int"  "0";

///////////////////////////////

the createSphere.py script is as follows

///////////////////////////

# createSphere.py
# Description - make an RiSphere

import sys
sys.stdout.write('Sphere [3 -3 3 360]\n')
sys.stdout.write('\377')
sys.stdout.flush()

//////////////////////////////////////
RIB options output in 0s
// Error: ...L_getAllGeoAttribsNodesFromShape |nurbsPlane1|nurbsPlaneShape1 "";
tHighestAttrNode("shaderCollection", $passes);
Layout|AEcont //
// Error: Syntax error //
// Warning: error in Pre Geo MEL Script in delightGeoAttribs1 attached to |nurbsPlane1|nurbsPlaneShape1
//

Thanks for an advice.

Last edited by daddysauce (2012-06-20 08:23:20)

Offline

 

#2 2012-06-20 10:03:03

ogre
Member
From: Poland
Registered: 2007-01-22
Posts: 585
Website

Re: A Lil help with Procedural Run Program

daddysauce wrote:

Procedural "RunProgram"  ["C:\python26\python.exe C:\Users\luke\Documents\maya\2012-x64\scripts\createSphere.py" ""]  [-1 1 -1 1 -1 1];

1st - this is not a MEL statement, so try RiProcedural - this might work:

Code:

RiProcedural -pn "C:/python26/python.exe C:/Users/luke/Documents/maya/2012-x64/scripts/createSphere.py" -p "" -b -1 1 -1 1 -1 1;

If you get past MEL errors, see how it goes at python side.

PS. why setting visibility attr after RunProgram ? mistake ?


- Michal

Offline

 

#3 2012-06-20 14:31:59

daddysauce
Member
Registered: 2007-01-21
Posts: 174
Website

Re: A Lil help with Procedural Run Program

hey thanks that works,
instead of the RiAttribute I switched off the 'output geometry' in the geo attribute.
I had followed the renderman courseware example where they had the RiProcedural in the 1st line and the RiAttribute in the second line.


thanks again ogre

Last edited by daddysauce (2012-06-20 14:59:22)

Offline

 

Board footer

PunBB is © Copyright 2002–2005 Rickard Andersson

You are here: Resources » Forums
Follow us on Twitter
© 2006-2011 dna research. All Rights Reserved.
Trademarks & Copyrights Notices