problems in scripting textport

   4495   6   0
User Avatar
Member
34 posts
Joined: July 2005
Offline
trying to follow along with some tutorials….

i can type help for command example

exhelp prim

and it will display the help for the command
but when i type it in it is coded red and says

unknown command prim

when i start typing “prim” the popup for commands starting with “P” appears but prim or prims is not on the list

I tried this with other commands that are on the list such as “parmlist”

and when i type

exhelp parmlist

it returns

No installed expressions match parmlist

to me it seems it isn't finding installed expressions….is it possible that it is referencing an improper file location for expressions?
User Avatar
Member
1145 posts
Joined: July 2005
Offline
parmlist isn't an expression. Have you done a search in the browser?

What version of houdini are you using?
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
34 posts
Joined: July 2005
Offline
9.0794

i'm not actually trying to use parmlist I was just experimenting

what i am trying to do is use prim….
which i have searched out in the help and found an expression “prims”

let me paste what i typed

/obj/soccerball -> prim(“./measureArea”, 8, “area”, 0)
Unknown command: prim

/obj/soccerball -> exhelp prim
float prim (string, float, string, float)
usage

prim(<<SOP>>, <<prim_num>>, <<attrib_name>>, <<attrib_index>>)

This function can be used to get information about a specified
primitive. When given the “P” or “Pw” attribute, the centroid of the
primitive will be returned.

examples
prim(“/obj/geo1/facet1”, 3, “P”, 0)

Evaluates the X component of the centroid of primitive 3 in the
sop specified.
prim(“/obj/geo1/facet1”, 3, “Cd”, 1)

Evaluate the green color of the “Cd” attribute of primitive 3.

SEE ALSO: primuv, point

the unknown command thing is throwing me
User Avatar
Member
34 posts
Joined: July 2005
Offline
i've double checked the node namings and the names and attributes appear to be correct
User Avatar
Member
7723 posts
Joined: July 2005
Offline
That's because prim() is an *expression*, not a *command*. It also explains why it's only available when using “exhelp” and not “help”.

http://odforce.net/wiki/index.php/Expression [odforce.net]
User Avatar
Member
34 posts
Joined: July 2005
Offline
what is the correct context to use this in then….

i'm following along with magic of houdini, which of course is H8

i've entered this expression in the textport and Hscript textport both with the same results….but in the book that's what he directs you to do to test the expression

in the book he has you preceed the expression by the echo command

which i do

/obj/soccerball -> echo ‘prim(“./measureArea”, 8, “area”, 0)’

and houdini returns

prim(“./measureArea”, 8, “area”, 0)
/obj/soccerball ->

but in the book the echo command returns the attribute number itself
when i do it it dosn't seem to evaluate the expression
User Avatar
Member
34 posts
Joined: July 2005
Offline
ohhh my bad
backticks
` not '

happy new year
  • Quick Links