"JoinStrings" VOP

   1714   2   1
User Avatar
Member
207 posts
Joined: 11月 2015
Offline
Hi;

I'm curious if anyone can help explain the “joinStrings” VOP; specifically what data type its first input is (and how one might create such a data type). The documentation doesn't seem to cover this, and I can't find information out in the wild.

To give context: the thing I'm trying to do is assemble a file path in a shader. So, say:

string fileBase;
int spriteNumPP;
string extension;

string file = fileBase + spriteNumPP + extension;

At the moment, the way I'm hacking around this is in SOPS, by storing a completed filepath on my geometry using VEX. But this is super-inefficient, and, coming from an RSL background, I'm looking for a solution on the shader side of things.
User Avatar
Member
2042 posts
Joined: 9月 2015
Offline
Maybe do your concatenation with the + operator in Python…or look into using join(), append(), extend()
User Avatar
Member
207 posts
Joined: 11月 2015
Offline
Can you elaborate on this approach? I'm basically trying to bind a per-object attribute (like, e.g. a sprite frame number), and I need to build a file path from this. The bind has to happen inside the shader builder obviously, but it's not clear to me how to use python inside a shader builder.
  • Quick Links