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

Graph Editor: Incorrect nodes position and inability to auto-arrange #1414

Open
zicher3d opened this issue Jul 17, 2023 · 4 comments
Open

Graph Editor: Incorrect nodes position and inability to auto-arrange #1414

zicher3d opened this issue Jul 17, 2023 · 4 comments

Comments

@zicher3d
Copy link

The attached file was created by an old version of LookdevX. The format and content seem ok. it's an example of an issue I run in once in a while.
When opening the file in Graph Editor the nodes are scattered all over the place.
Trying to re-arrange them using Auto Layout result in some of them not being arranged properly or at-all.

Looking at the ones that are initially scattered or not rearranged I can't seem to see a difference or anything wrong compared to others.

After opening the file:
image

After Auto-Layout:
image

Only some are correctly re-arranged:
image

The file: (Ignore the content, this is a debug/WIP file)
Note that this file requires the nodes in PR
pat_herringbone2x6_test01.zip

@zicher3d
Copy link
Author

Xpos/Ypos values in the original file might be high. Not sure what is the right range here.

@lfl-eholthouser
Copy link
Contributor

Hi! @zicher3d thanks for flagging this issue. I'll take a look and try to find the issue. Just glancing at the Xpos/Ypos the initial position is (1200, 0) and so some of the node's position's seem a little large but none of them immediately seemed like an issue.

@zicher3d
Copy link
Author

I'm not sure what the right range for the positions is. The old LookdevX seems to go in the hundreds, while the Graph Editor uses much lower numbers. Bot work fine when loading their own saved files.
The main concern here is the inability to get Auto-Layout to rearrange them.

If the range difference is an issue when exchanging files with other graph editors (like Quiltix, or Houdini), I would suggest adding a scale option, as Auto Layout might not be what is needed in these cases.

@kwokcb
Copy link
Contributor

kwokcb commented Jul 19, 2023

If it is doing what I think it's doing LookdevX is probably saving using absolute screen doors. Could be this is messing up the math used to place nodes inside the editor so my guess is to check what's going on there.

Another possibility is to perform a remap on load based on the bounds of the coordinates to try and normalize it.

If this is fractional node size then that info I assume is unknown for an arbitrary file created in an external editor where node size may differ?

Just some noisy thoughts :-).

@zicher3d zicher3d changed the title Incorrect nodes position and inability to auto-arrange Graph Editor: Incorrect nodes position and inability to auto-arrange Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants