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

Node to View Interface #215

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

dannymate
Copy link

@dannymate dannymate commented May 15, 2022

I added ViewDelegates class that sits in a BaseNode which the NodeView assigns Actions/Funcs relating to things like get/set the current size or position. I did this because I wanted to generate a graph on the fly but I couldn't get the size of the node properly. But it's there anyway to be expanded upon if there's anything in the view that's required to enable certain functionalities.

If the NodeView hasn't initialised yet it modifies the initialposition.

Added the ViewDelegates into BaseNode as View so:
baseNode.View.GetPosition().
baseNode.View.SetPosition(Vector2)
baseNode.View.GetSize()
baseNode.View.GetRect()
baseNode.View.SetRect(Rect)

Greebling and others added 30 commits October 11, 2021 11:20
This reverts commit a511e4a.
Added proxiedFieldPath to input for CustomPortBeh ports
Added ability to have property fields for dynamic ports.
Added GetNonRelayEdges List<SerializedEdge> extensions
Daniel Burgess and others added 13 commits February 4, 2022 18:28
Added FieldInfoWithPath as it easier to work with
BaseGraphView uses Param CustomNodeType to create Node on drop
Prepended Custom to ParamNodeType in ExposedParam. Defaults to null
Added CustomMenuItem attribute for custom node creation methods
CreateNodeMenuWindow now uses a given Func to create a node.
Created example.
Can Add Custom Menu Items to Node Menu
OuputAttribute now can target properties
Replaced most instances of FieldInfo with MemberInfo
Added ability to use Properties as Outputs
CHORE Extracted child classes in BaseNode to different files
ADD ViewDelegates class which allows Node to Access a views data
CHORE Removed unecessary comments
BUG Add in missing using to BaseNode.Constructors
BUG Position not retained with opening up a saved graph
BUG Fixed SetPosition if
@dannymate
Copy link
Author

I can foresee a possible bug in the Node Init where if the position has been changed from the initial position to 0,0 then it would move back to the initial position when opening a saved graph.

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

Successfully merging this pull request may close these issues.

2 participants