wireless connections for everybody.

Moderator: Chad

User avatar
andromeda_girl
Fusionista
Posts: 382
Joined: Sun Feb 21, 2016 6:25 am
Been thanked: 3 times

Re: wireless connections for everybody.

#16

Post by andromeda_girl » Tue Feb 19, 2019 9:36 am

holy crap what a respnse.
and i actually edited my post to remove me ranting on about why i hate hidden connections in nuke, too
O_o

i have yet to read all this but it appears someone has already granted my wishes :D

but just for the record, i indeed despise hidden connections.
the reason is because nobody seems to use them in a logical and efficient manner, just willy-nilly making it impossible to take over another person's shot.
but having wireless connections in fusion can be designed [as i suggested] in a manner that makes it logical.
as long as a person knows there are hidden wires, then there is no harm done.
it's when they are hidden and you have no clue it's being done that people need to be chastised for it.

looking forward to trying out these new wireless tools, because only when i am rebuilding my PBR shaders in fusion for a model [such as my example with 524 shaders] does the desire to unsee a few wires starts to become a wishlist item.

otherwise, yeah. i am not a fan of hiding a damned thing.
Au

User avatar
thibaud
Fusioneer
Posts: 135
Joined: Thu Sep 04, 2014 1:23 am
Been thanked: 2 times
Contact:

Re: wireless connections for everybody.

#17

Post by thibaud » Tue Feb 19, 2019 11:35 am

ok, I did sound close minded and rigid... sorry about that
My feeling is that going wireless isn't the most elegant way to tackle the wire clutter problem...
there has to be some less sucking and more considerate options, like for example :
Alternate (dimmed/dashed) wire appearance combined with simple user action (rollover) to undim it

Unfortunately that's not going to happent until BMD adresses a long overdue node view experience improvement

User avatar
JUNE
Fusioneer
Posts: 242
Joined: Wed Aug 06, 2014 5:45 am
Been thanked: 15 times
Contact:

Re: wireless connections for everybody.

#18

Post by JUNE » Tue Feb 19, 2019 7:07 pm

Image :cry:

User avatar
intelligent machine
Fusionista
Posts: 406
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 29 times
Contact:

Re: wireless connections for everybody.

#19

Post by intelligent machine » Wed Feb 20, 2019 3:23 am

@JUNE Oh yeah.. It doesn't work... just an abandoned attempt. If you have any ideas to make that one or the WirelessMore fuse work you'd be forever awesome.

User avatar
intelligent machine
Fusionista
Posts: 406
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 29 times
Contact:

Re: wireless connections for everybody.

#20

Post by intelligent machine » Wed Feb 20, 2019 11:13 pm

Okay...so I un-abandoned this and finally found a solution that works.

I've successfully combined wireless, wireless 3d and wireless materials into one tool that can actually pass on the result. This works similar to @SecondMan's "Wireless More" fuse and is partly based on it but creates inputs and outputs dynamically after initially selecting a mode.

For now, you get one opportunity to set the mode and then it is locked. If someone knows how to destroy an input and output via the NotifyChanged function then I can revise this. I've already tried

Code: Select all

self:RemoveOutput('outputName'), self:RemoveControl('outputName') and a few other variations
The Fuse:
WirelessAnything.fuse
Test Comp:
WirelessAnything Tests.comp
You do not have the required permissions to view the files attached to this post.

User avatar
SirEdric
Fusionator
Posts: 1868
Joined: Tue Aug 05, 2014 10:04 am
Answers: 2
Real name: Eric Westphal
Been thanked: 112 times
Contact:

Re: wireless connections for everybody.

#21

Post by SirEdric » Thu Feb 21, 2019 3:40 am

Cool stuff!
Just a wild guess here...
Maybe if there's only *one* (main) input and output, you can't destroy that one?
Did you try adding a second Input/Output first, and then destroying the first one?
(Again...just guessing...:-))

User avatar
intelligent machine
Fusionista
Posts: 406
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 29 times
Contact:

Re: wireless connections for everybody.

#22

Post by intelligent machine » Thu Feb 21, 2019 4:31 am

Yeah I tried first with a single input that accepts multiple types and just overwriting the same output but stuff gets mucked up along the way. It may be possible if certain things are executed in a very precise order.

User avatar
SecondMan
Site Admin
Posts: 3473
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 5
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: wireless connections for everybody.

#23

Post by SecondMan » Thu Feb 21, 2019 11:48 pm

Well, it may not be as pretty as we'd like but I think we may have kind of almost nailed it, albeit a little hacky.

I couldn't resist trying, so now my brain hurts and I really need to go to bed. I'll explain later but here's something to test if I'm right :)

EDIT: I'm just thinking there may be a way to make this even better... but not now...
You do not have the required permissions to view the files attached to this post.

User avatar
intelligent machine
Fusionista
Posts: 406
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 29 times
Contact:

Re: wireless connections for everybody.

#24

Post by intelligent machine » Fri Feb 22, 2019 6:12 am

I tried something (many things actually) like this and the problem I ran into is how to destroy the Output first. Notice that whichever type you plug in first will remain the output type even after switching modes and then the output type gets updated to the previous on the next attempt.

Example:
-Start with 'image'
-then reset
-then try '3d'. --The output is still in image mode.
-then try 'material'. --The output type finally switches to 3D.

An off-by-one or order of operations bug from NotifyChanged. This is why I simply hid the mode dropdown after the first choice is made.
My next thought was to create a completely new handler function that is called by each mode change from within NotifyChanged after all other updates... a function that will simply force refresh the tool.

I'm looking through the scripting guide now and see a couple things to try:
INPB_ForceNotify
INPI_Priority

I'll fiddle with this later today.

User avatar
SecondMan
Site Admin
Posts: 3473
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 5
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: wireless connections for everybody.

#25

Post by SecondMan » Fri Feb 22, 2019 7:13 am

That sounds familiar.

I should combine this into the previous topic, lest we're eating our tails here...

That will be my contribution for today :)

User avatar
JUNE
Fusioneer
Posts: 242
Joined: Wed Aug 06, 2014 5:45 am
Been thanked: 15 times
Contact:

Re: wireless connections for everybody.

#26

Post by JUNE » Fri Feb 22, 2019 7:27 am

WirelessAnything.fuse
try again :D
You do not have the required permissions to view the files attached to this post.

User avatar
Midgardsormr
Fusionator
Posts: 1096
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 2
Location: Los Angeles, CA, USA
Been thanked: 74 times
Contact:

Re: wireless connections for everybody.

#27

Post by Midgardsormr » Sat Mar 09, 2019 7:54 pm

Something that has always bothered me about the Wireless Link is that copy-paste breaks the Input connection (naturally, that's how all the tools work, after all). I decided to hack at this one for a little while to see if I could come up with a way to have it save its input into CustomData so that when it's copied that information comes along. Then you could just push a button to relink it. Or better yet, push a button and relink all the WirelessAnythings in the comp. This would make it so easy to copy-paste templates—something that I anticipate doing 41 times tomorrow afternoon.

While I can easily save and load CustomData in the Fuse, I can't quite figure out how to get the Connected Output's name from the Input itself. I tried querying several things in an OnConnected() function, but all I could ever get Fusion to tell me was 'struct cdata'.

It's possible that I'm just going about it all wrong. Anybody have any ideas? I mean, I can do it with a script button, and I may well do that tomorrow, but it would be cool if it could be built into the tool.

User avatar
intelligent machine
Fusionista
Posts: 406
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 29 times
Contact:

Re: wireless connections for everybody.

#28

Post by intelligent machine » Sat Mar 09, 2019 8:09 pm

I had that same issue when working out some other things, Bryan....One of the reasons I had to make all the linked inputs and outputs dynamic and in their own namespaces. The 'hack' that I came up with is to first make that InMode dropdown and everything else is based on it...maybe if that selection is also stored you'll get the right output since the output is actually created using notifychanged from the InMode input.

[edit]
...or are you referring to storing the referenced tools name like this?

Code: Select all

if tool.InImage then SrcName = tool.InImage:GetConnectedOutput():GetTool():GetAttrs()['TOOLS_Name'] end
print (SrcName)
(which is already used in the fuse BTW but for the rename button under the guise "GetNewName")
Last edited by intelligent machine on Sat Mar 09, 2019 10:24 pm, edited 1 time in total.

User avatar
intelligent machine
Fusionista
Posts: 406
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 29 times
Contact:

Re: wireless connections for everybody.

#29

Post by intelligent machine » Sat Mar 09, 2019 8:12 pm

Also, I've already started on incorporating a 'wireless merge' and 'wireless merge3d' into the tool...promising so far but had to place it on hold until I after I take care of some client work.

User avatar
Midgardsormr
Fusionator
Posts: 1096
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 2
Location: Los Angeles, CA, USA
Been thanked: 74 times
Contact:

Re: wireless connections for everybody.

#30

Post by Midgardsormr » Sun Mar 10, 2019 9:05 am

Kinda... I experimented with storing the data using a button. Actually, I just inserted it into your GetSource command for testing:

Code: Select all

	GetSource = [[
		if tool.InImage then 
			comp:SetActiveTool(tool.InImage:GetConnectedOutput():GetTool()) 
			tool:SetData('source', tool.InImage:GetConnectedOutput():GetTool())
		end
		if tool.InMask then comp:SetActiveTool(tool.InMask:GetConnectedOutput():GetTool()) end
		if tool.In3D then comp:SetActiveTool(tool.In3D:GetConnectedOutput():GetTool()) end
		if tool.InMtl then comp:SetActiveTool(tool.InMtl:GetConnectedOutput():GetTool()) end
		if tool.InPtcl then comp:SetActiveTool(tool.InPtcl:GetConnectedOutput():GetTool()) end
		]]
That successfully stores the Output. But I couldn't make it work in OnConnected(), which is where it would be most convenient, since it would store the metadata as soon as a connection was made.

Code: Select all

function OnConnected(link, old, new)
	if link == InImage then
		print("poop", old, new)
		print(link:GetAttr('LINKS_Name'))
		dump(new)
	end
end
Once the data is in there, using a button to restore it works fine. I didn't get to the point of trying to restore it in OnAddToFlow(), although a little experimentation just now wasn't promising. But I need to get to work, so for today's project I'll just MacGyver it with a script.