Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting Style request. Nodes on 128 Grid. #67

Open
BenVlodgi opened this issue Dec 23, 2021 · 10 comments
Open

Formatting Style request. Nodes on 128 Grid. #67

BenVlodgi opened this issue Dec 23, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@BenVlodgi
Copy link

BenVlodgi commented Dec 23, 2021

I'd like the ability to enforce Blueprints to align to the grid in a certain way.
We use a certain blueprint format to maintain clarity and consistency.
The format is pretty easily defined as below:

  • Comment edges align to the 64x64 grid.
  • The left side of an executable node is clamped to the X-128 grid.
  • The top side of an executable node is clamped to the Y-128 grid. With modifications that maintain a consistent Y alignment of the execution line.
    • Executable node with targets are +16 on the Y-128 grid.
    • Variable Set nodes with targets are -16 on the Y-128 grid.
  • Reroute nodes for execution are clamped to +32 on the Y-128 grid.

Attached is a screenshot of the format in practice.
Blueprint Formatting Set Agro Mode

@fpwong fpwong added the enhancement New feature or request label Dec 25, 2021
@fpwong
Copy link
Owner

fpwong commented Dec 25, 2021

Hi Ben, currently I have some major improvements to the node formatting but I expect there to be quite a few issues upon releasing it. So I expect to wait a couple months for the plugin to be stable before adding any additional features.

Sometime in the future I will look into adding more node alignment options.

However I can quite easily add the commend edge alignment to the ASC plugin.

@BenVlodgi
Copy link
Author

Great to hear there's more updates coming. And glad to hear you're open to more formatting options. Looking forward to the updates.

Also Merry Christmas!

@yarpoplar
Copy link

Bumping this

@kroaton
Copy link

kroaton commented Sep 11, 2022

Bumping as well. This sounds great.

@fpwong
Copy link
Owner

fpwong commented Sep 12, 2022

@yarpoplar @kroaton Thanks for bumping this, I had forgotten about this request. I recently finished all the improvements I wanted to add to node formatting in 4.0.0, so now would be a good time to look into this feature.

@fpwong
Copy link
Owner

fpwong commented Oct 13, 2022

Update about the progress related to this feature

I have implemented snapping executable nodes to the grid. Ben initially calls this the 128 grid but in engine 1 snap size = 1 grid square, so I'm going to call this snapping to the 8x8 grid.

Parameter Nodes

For the first iteration I'm going to ignore these. In Ben's screenshot they are left aligned to the grid. Personally I would make them right aligned. But I will try to add options for both eventually.

Comment Nodes

Initially I said this would be quite easy to implement but there are some broken interactions when dragging comments and snapping that I haven't figured out yet.

But the main question is how to deal with nested comments. By default nested comments have some fixed spacing between them. If their bounds were to be aligned to the 8x8 grid there would be a whole 8x8 grid of empty space between nested comments.

I don't imagine this would look correct, neither would leaving a smaller spacing between them (while snapping the lowest level comment to the 8x8 grid).


Please let me know about how I should deal with parameters / comments. Any screenshots with your desired style would be extremely useful.


EDIT: Added the setting AlignExecNodesTo8x8Grid in version 4.0.6 (disabled by default)

@BenVlodgi
Copy link
Author

AlignExecNodesTo8x8Grid

This is nice, I've tried it out a little bit. Two things I've noticed right away that were undesired.

  1. The execution alignment is inconsistent with events and functions. In out projects, we use the Branch node as the basis for the execution pin alignment.
    • It is then consistent in functions and on the event graph.
    • The difference of different nodes then is either +/- 16 units on the grid from the standard line.
    • Perhaps this could be a configurable offset?
  2. Execution into the Timeline node moves the timeline so the execution goes straight in, which then mis-aligns the output Update execution, and produce a blueprint sentence that isn't straight.

Regarding empty space between comment boundaries. Empty Space is fine in my experience. Its easier to read blueprints when they're spaced out vs compacted.

@fpwong
Copy link
Owner

fpwong commented Mar 18, 2023

Hi Ben, thanks for the feedback.

  1. Could you provide an example of using "the Branch node as the basis for the execution pin alignment.". I don't quite understand what you mean by this. The way the exec alignment currently works is that the first linked exec for each node will be straightened, starting from the root.

  2. Thanks for pointing this out: this timeline issue seems to be a general bug in the plugin. Since the node spawns and requests the user to rename the title, the plugin will calculate the size incorrectly.

Also I did notice that the 8x8 alignment was not actually working correctly when having the setting Expand Nodes By Height enabled and would be misaligned to the grid.

@BenVlodgi
Copy link
Author

  1. Here's the way the alignment looks. I like to keep my execution line always at the same Y offset. So that the branch node is aligned to grid. This has the nice benefit of having all different types of nodes to have a standard y offset.
    image

  2. For timelines, I do the same thing, I align the node so the Main execution keeps this straight line at the same Y offset.
    image

  • Here's a marked up version showing how it works. The blue line is a reference on the grid. The yellow line is the execution line with the constant offset from the grid.
    image

@fpwong
Copy link
Owner

fpwong commented Apr 7, 2023

Thanks for the screenshots. I can see the benefits of aligning the main execution pins instead of the first linked, it does look quite nice. I'm in the middle of improving the formatting so I'll try to add an option for this while I'm at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants