bnpr / Malt

Render framework for NPR.
https://malt3d.com
Other
952 stars 75 forks source link

Groups not being created with CTRL+G in node-groups-latest 633fa53 #442

Closed StarshipAmelia closed 1 year ago

StarshipAmelia commented 1 year ago

Malt version

node-groups-latest 633fa53

Blender version

Blender 3.3.1

OS

Linux 5.19.17-1-MANJARO

Hardware info

AMD Ryzen 7 2700X | 32GB RAM | AMD Radeon RX 580 8GB

Issue description and reproduction steps

When I attempt to create a node group by pressing CTRL+G with some number of nodes selected, rather than a node group being created, the selected nodes get disconnected from anything not selected and an empty node group node is created below them.

This empty node group can be entered and exited with tab as normal, but trying to add things to it (or change its inputs & outputs under the 'Group' tab in the sidebar) results in the view being returned to the ungrouped view, as if I had hit tab. I can see a 'Malt Node Tree UI' under the 'Malt Nodes' tab of the sidebar, but nothing appears in it when expanded.

See the following images for an example. The first image is before pressing CTRL+G, the second is after, and the third is what the node group node looks like without other nodes above it.

I'll also attach the Malt log & an example file from after attempting to group some nodes.

Attachments

groups not working 01 groups not working 02 groups not working 03

malt 2022-11-07(19-51).log groups not working.zip

pragma37 commented 1 year ago

Thanks for the report.

It should be fixed now. 👍

StarshipAmelia commented 1 year ago

Hi, thanks for the quick response! Unfortunately the issue seems to mostly persist (using commit https://github.com/bnpr/Malt/commit/e2522b63a378160e96a8422220d678d203650d75 , the most recent 'nodes-group-latest' as of right now).

I can now successfully group nodes with CTRL+G (The nodes that were selected when I hit CTRL+G do end up inside the group), but doing so breaks existing connections with the new group and I cannot seem to add new inputs/outputs either via the Group tab's input & output settings or other means (I'm not sure what the 'Malt Node Tree UI' is meant to look like). I'll attach additional screenshots, log file, and blend zip as well.

groups not working 04 groups not working 05 groups not working 06 malt 2022-11-10(18-37).log groups not working 2.zip

pragma37 commented 1 year ago

but doing so breaks existing connections with the new group

This is expected. Creating the inputs/outputs and connecting them automatically is not implemented yet.

That Inputs/Outputs menu is something that Blender adds by default, but that doesn't work with Malt. I certainly see how it can be confusing, but I don't think there's a way to hide it when using Malt.

Input and Output nodes must be added manually. (Shift+A > Node Tree > NODE GROUP FUNCTION Input/Output) Then Custom IO works the same as in any other tree type: https://malt3d.com/Documentation/Graphs/#inputsoutputs

StarshipAmelia commented 1 year ago

Thank you for the clarification, I think I understand the current workflow now.

Is it expected behavior currently for adding or changing any of the nodes (such as adding the NODE GROUP FUNCTION Input/Output nodes) in a group to make the view leave the group, as if I'd pressed tab? (The actual change or addition seems to work as expected otherwise, the view just changes)

pragma37 commented 1 year ago

Nope, that shouldn't happen and I can't reproduce it. 🤔

Does it happen for any node tree?

StarshipAmelia commented 1 year ago

I did a bit more poking around, and it appears that I caused the problem myself! I had been experimenting with OSL a few months back and had packaged my script plus some helper python functions into an addon for ease of use. It seems that something in the code I wrote was conflicting with something Malt does, because as soon as I disabled my addon everything appears to behave as it should, as far as I can tell from some quick tests. Shows me for leaving a half finished addon enabled 😅

I haven't bothered to try and figure exactly what was causing the issue because that project ended up being a dead end for what I had been trying to accomplish anyhow, but I wouldn't be surprised if it was something to do with either how I added a submenu to the shift+a menu in the node editor or the (many) handlers I was using, in case anyone encounters a similar issue in the future.

In any case, I think this is resolved now. Thank you again for your time and thank you for your work on Malt as well! It's very exciting to see a render engine that prioritizes NPR workflows!