outputting expression in textport?

   4009   5   1
User Avatar
Member
12 posts
Joined: 11月 2008
Offline
Hi guys,

I wonder if there is anyway that we could outputting the expression that we write?

For ex, if I have a sphere with 42 points, and I put a “pointgrouplist()” expression somewhere in different node pointing back to that sphere, “pointgrouplist(”../sphere1“)”, is that possible to check out the result, perhaps, in hscript textport, as it will return a long string?

I suppose it will return “zero one two three……etc”, but how can I see this perhaps in textport or anything?

I have tried by typing "trace `pointgrouplist(my/obj/pointlist)` in textport, well, this is just for example, but they dont have this command.

I think this might be helpful as sometimes we do type something wrong in an expression, or given the wrong path too, so it wont give us the correct result.

Any help will be much appreciated. Btw im using mac, so it might be slightly different way from windows user.

Thank you all,
Shandy
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Geometry Spreadsheet?

I've been putting expressions in to parm fields and using the Details View/ Geometry Spreadsheet to inspect the result for years and years…

I sometimes check expressions that use paths in the textport using the echo command and surround the expression in backquotes like this:

echo `opinputpath(“../../”, 0)`

if that is where my error lies…
There's at least one school like the old school!
User Avatar
Member
12 posts
Joined: 11月 2008
Offline
Hi Jeff,

thanks for your quick response. Appreciate that. But I still cant get it. Yes i do sometime checking them with spreadsheet. But if I put a pointgrouplist() expression and make it as a string point attribute, it returns me “pointgrouplist(../../mypath)” in the geometry spreadsheet.

I tried the echo `pointgrouplist(“../../mypath”), but it didnt give me any results. I also tried to go into my obj folder to my geo1 through textport, but also didnt give me anything. Maybe I did something wrong?

Attach below is a simple file. I have a partition node in my sphere and I put “point_$PT” in the rule parm. When I middle click it, I can see point_0, point_1, etc. Next to them I put a grid and a scatter node. in points parm inside scatter node, I put “pointgrouplist(”../partition1“)”, and it returns me an error. I know scatter node expects me to return an integer there, but it will be okay soon if I add argc() on top of pointgrouplist. I know this trick from Peter Claes' tutorial. But what is bugging me, is there any way to check any expression value either it is a string or integer, or vector to a textport or anything similar?

Hope I am not confusing you.

Thank you for your time,
Shandy

Attachments:
expression.hipnc (40.9 KB)

User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
sanlin
I tried the echo `pointgrouplist(“../../mypath”), but it didnt give me any results. I also tried to go into my obj folder to my geo1 through textport, but also didnt give me anything. Maybe I did something wrong?
Shandy

There's a relative path in the expression. By default the textport is in the / root directory.

I always type cd _space_ and then drag and drop the node in to the textport and enter to go to that node's path.
Then I type in the expression exactly as it is in the parameter and see what you get. So in your above example, you'd first:

cd /obj/my_object/my_node

and then do the echo command.
There's at least one school like the old school!
User Avatar
Member
7722 posts
Joined: 7月 2005
Online
sanlin
For ex, if I have a sphere with 42 points, and I put a “pointgrouplist()” expression somewhere in different node pointing back to that sphere, “pointgrouplist(”../sphere1“)”, is that possible to check out the result, perhaps, in hscript textport, as it will return a long string?

I think you can middle-mouse click on the parameter to have string parameters should the evaluated result.
User Avatar
Member
12 posts
Joined: 11月 2008
Offline
Hi Jeff and everyone!

hey its working! thanks a lot. Actually yesterday I hadn't pointed it out to my scatter node in the textport, so it didnt show me anything. My bad.

Thank you all for the help and time! Appreciate it!


Shandy
  • Quick Links