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

Vertical Pins? #152

Open
Stanlyhalo opened this issue Jan 28, 2022 · 2 comments
Open

Vertical Pins? #152

Stanlyhalo opened this issue Jan 28, 2022 · 2 comments

Comments

@Stanlyhalo
Copy link

I tried to check the example for this, but it's hard to understand where the vertical pins styling comes into play. Here is a picture of my current state, and my only 2 things I need help with, is making the link direction come from the bottom instead acting like it's coming out of the right side, also, I need help with making it so the pin/link point can be anywhere on the white quad (saw that this can be done in one of the gifs on the readme).
image

@Stanlyhalo
Copy link
Author

Stanlyhalo commented Jan 28, 2022

Well that just happened, figured out it's done through styling. Well my only question left that is unanswered as to be how to make the link start be anywhere on the white area.
image

@thedmd
Copy link
Owner

thedmd commented Feb 8, 2022

This kind of pin is present in blueprint example:

ed::PushStyleVar(ed::StyleVar_PinArrowSize, 10.0f);
ed::PushStyleVar(ed::StyleVar_PinArrowWidth, 10.0f);
ed::PushStyleVar(ed::StyleVar_PinCorners, 12);
ed::BeginPin(pin.ID, ed::PinKind::Input);
ed::PinPivotRect(inputsRect.GetTL(), inputsRect.GetBR());
ed::PinRect(inputsRect.GetTL(), inputsRect.GetBR());
ed::EndPin();
ed::PopStyleVar(3);

Basically you can specify ed::PinPivotRect, node editor will start drawing link from this area. Link is drawn between closest points between source and target. So if you specify whole area on the bottom of "Particle Instance" node, link will connect to the right side.
Does this help?

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

2 participants