File name as attribute or label.

   3451   3   2
User Avatar
Member
36 posts
Joined: May 2016
Offline
Hi.

I have a specific problem. I want to pass file name ( file node - only name without path) node to upper node.
When I import .obj file node shows a obj name. But how to get this information?

For example as label in geo cointainer or detail attribute.

Somebody has a solution?
User Avatar
Member
648 posts
Joined: July 2005
Offline
try splitpath in an attributewrangle (detail):
string f = "";
string d = "";
splitpath(ch("p"),d,f); 
s@filename = f;
where ch(“p”) refers to the filename.

not sure how to make it a container node name without a python round-trip.
User Avatar
Member
36 posts
Joined: May 2016
Offline
Thx.
User Avatar
Member
36 posts
Joined: May 2016
Offline
One more question. I have read this attribute from this nod for font node and have problem to pass this object name.
I have “0” rather than “file.obj”.

Font text field looks like this:
`detail(“../../g_objects_a”, “filename”, 0)`


Should be a text but I have 0;
I checked point expression and works.
string from ( text from other node) detail hasn't worked. I mean he works but not in the way it should works.
Edited by TheCrisis - Nov. 4, 2018 02:14:17
  • Quick Links