1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

Fix for drawer priority of primitives over dynamic port lists

This commit is contained in:
Kailey Joanette 2019-09-26 06:25:48 -04:00
parent 0152b6d5d6
commit 50250caa32
2 changed files with 18 additions and 0 deletions

View File

@ -11,6 +11,23 @@ using static XNode.Node;
namespace XNodeEditor.Odin
{
[DrawerPriority( 0.4, 0, 0 )]
public class DynamicPortCollectionOverrideDrawer<T> : CollectionDrawer<T>
{
protected override bool CanDrawValueProperty( InspectorProperty property )
{
var input = property.GetAttribute<InputAttribute>();
if ( input != null )
return input.dynamicPortList;
var output = property.GetAttribute<OutputAttribute>();
if ( output != null )
return output.dynamicPortList;
return false;
}
}
[ResolverPriority( 10 )]
public class DynamicPortListBackedResolver<TList, TElement> : StrongListPropertyResolver<TList, TElement>
where TList : IList<TElement>

View File

@ -13,6 +13,7 @@ using static XNode.Node;
namespace XNodeEditor
{
[ResolverPriority( 10 )]
public class DynamicPortListNoDataResolver<TNotAList> : BaseOrderedCollectionResolver<TNotAList>
{
public override bool CanResolveForPropertyFilter( InspectorProperty property )