Jump to content

Passing ref obj string path from switch sop to wrangler


Entropy

Recommended Posts

Hello 

how can i pass the ref of a switch sop to the wrangler input ?

i have a switch sop to select between 3 cameras 
i would like to ref the selected switch output dynamically inside a wrangler 

i try the op:/obj/geo/switch_cameras but it dosent work
as in the code below i need to ref the string path

vector _ndc = toNDC("/obj/cam3", @P);

 

ioannis

Edited by Entropy
Link to comment
Share on other sites

Hey Ioannis!

Perhaps this would work

In the wrangle put:

string switchRef = chs("switchRef");
vector _ndc = toNDC(switchRef, @P);

then in the channel created put something like this:

`opinputpath("../switch1",chs("../switch1/input"))`

if you're using a switcher at the obj level instead put something like this:

`opinputpath("/obj/switcher1",ch("/obj/switcher1/camswitch"))`

 

Edited by coltonmil
Link to comment
Share on other sites

Hey Ioannis,

I've attached a possible solution.

I made a switcher at the obj level to take advantage of the one expression I used above. It's driven by the switch you have at the geo level. Also, it looks like you're not using any of the data from that switch or the object merges directly in the point wrangle, so they don't actually need to be connected. But, I left them as-is, just in case you plan on doing something with it later.

switchpath_v02.hipnc

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