Hi!
Is there a way I could connect a detail wrangle just after the merge and pick up how many inputs the merge contains? For example, I can see it matches the amount of cooks. Is there a way to access this value?
Thanks.
-Olivier
Detect how many inputs connected to Merge?
3265 7 0- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
- Andr
- Member
- 900 posts
- Joined: Feb. 2016
- Offline
- olivierth
- Member
- 1007 posts
- Joined: April 2017
- Offline
- BabaJ
- Member
- 2038 posts
- Joined: Sept. 2015
- Offline
- msum
- Member
- 4 posts
- Joined: Dec. 2016
- Offline
- tamte
- Member
- 8539 posts
- Joined: July 2007
- Online
msumyou can use opninputs() [www.sidefx.com] hsript expression, but I guess you could consider that extra scripting too
This is really neat! I reckon it should be accessible by default without extra scripting
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- msum
- Member
- 4 posts
- Joined: Dec. 2016
- Offline
Thanks Tomas! Big fan of your work on this forum
All I meant is that it’s a pretty basic but quite useful variable from that specific node to push it forward, which made me think that it could be just part of it easily accessible without creating additional var and adding just ONE line of code ;D I bet for someone with years of experience it’s just bread and butter, for me it’s still a bit confusing.
So for anyone else looking for a literal way of making it work:
Python:
len(pwd().inputs())
HScript:
opninputs(".")
All I meant is that it’s a pretty basic but quite useful variable from that specific node to push it forward, which made me think that it could be just part of it easily accessible without creating additional var and adding just ONE line of code ;D I bet for someone with years of experience it’s just bread and butter, for me it’s still a bit confusing.
So for anyone else looking for a literal way of making it work:
Python:
len(pwd().inputs())
HScript:
opninputs(".")
Edited by msum - June 29, 2021 20:39:23
- Jikian
- Member
- 131 posts
- Joined: Aug. 2012
- Offline
If such a function is sufficiently useful to you, simply save it as a preset on the node(s) you use. Should note that allowing users the option to customize their workflow as befits their needs is a great boon - one line of code is peanuts
By preset, I mean creating a spare float parameter on Merge node from Edit Parameter Interface, call it inputs/Inputs, typing expression opinputs("."), save as Preset. Could even be a Permanent Default if you wish.
By preset, I mean creating a spare float parameter on Merge node from Edit Parameter Interface, call it inputs/Inputs, typing expression opinputs("."), save as Preset. Could even be a Permanent Default if you wish.
-
- Quick Links