Entropy Posted January 24, 2018 Share Posted January 24, 2018 (edited) 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 January 24, 2018 by Entropy Quote Link to comment Share on other sites More sharing options...
coltonmil Posted January 24, 2018 Share Posted January 24, 2018 (edited) 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 January 24, 2018 by coltonmil Quote Link to comment Share on other sites More sharing options...
Entropy Posted January 24, 2018 Author Share Posted January 24, 2018 Hello Colton i cant make it to work can you see what i am doing wrong thank you in advance switchpath.hipnc Quote Link to comment Share on other sites More sharing options...
coltonmil Posted January 24, 2018 Share Posted January 24, 2018 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 Quote Link to comment Share on other sites More sharing options...
Entropy Posted January 24, 2018 Author Share Posted January 24, 2018 Colton thank you very much your solution is very cool! much appreciated Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.