Jump to content

Otl Parameter Problem


Recommended Posts

Hi folks,

I'm creating an OTL. I have created two parameters: an Operator Path, and an Integer. Inside the OTL, I am trying to use these values as part of expressions in an Add SOP to create a point that matches the position of a point in another SOP, which can be defined from the OTL parameters I've created.

So, in the Add SOP I have the X, Y and Z co-ordinates as follows:

point(ch("../../water_sop_path"),ch("../../water_sop_point"),"P",0)

point(ch("../../water_sop_path"),ch("../../water_sop_point"),"P",1)

point(ch("../../water_sop_path"),ch("../../water_sop_point"),"P",2)

I don't get an error, but these expressions evaluate to 0, 0, and 0! Which shouldn't be happening!

In the OTL params I have an absolute path (/obj/subnet1/water/facet1) and an integer (1230) which I know correspond to an existing point, because if I change the expressions to:

point("/obj/subnet1/water/facet1", ch("../../water_sop_point"), "P", 0)

point("/obj/subnet1/water/facet1", ch("../../water_sop_point"), "P", 1)

point("/obj/subnet1/water/facet1", ch("../../water_sop_point"), "P", 2)

I get the correct co-ordinates. So for some reason, the integer param gets passed correctly, but the absolute path param does not. I'm sure there is a very simple explanation, but I can't work out why it won't work! And why doesn't an error come up?

Can anyone see the problem? Is using ch() the wrong way to fetch a string parameter or something?

Link to comment
Share on other sites

point expression is:

point(sop, pt_num, attrib, index)

which is basically a chain flowing down.. This is the SOP-> Here is the point numbers I want you to pull from that sop-> Here is the attribute I want you to pull from those point(s)->And this is the index of that attribute.

but to me, it looks like you are trying to have it look up a sop and instead of grabbing points from that sop, you are telling it to look up a completely different sop (that i suppose has one point in it..) but in the end, it really just doesn't work like that..

Link to comment
Share on other sites

Didn't look at this very closely at all, but something jumped out at me in the first few lines... and maybe it has something to do with your problem...

Shouldn't that be:

point(chs("../../water_sop_path"),ch("../../water_sop_point"),"P",0)

<etc>

...ie: the sop path is a string, not a numerical value...

(?) just a thought.

Cheers!

<edit>

Sorry, that should actually be:

`chs("../../water_sop_path")` [with back-ticks]

Or maybe even:

`chsop("../../water_sop_path")`

... back to my render...

</edit>

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...