Skip to content

Vertical Pins? #152

Description

@Stanlyhalo

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

Activity

  1. Stanlyhalo commented on Jan 28, 2022

    @Stanlyhalo
    Author

    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

  2. thedmd commented on Feb 8, 2022

    @thedmd
    Owner

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions