Skip to content

Conversation

@dave-artificial-agency
Copy link
Contributor

@dave-artificial-agency dave-artificial-agency commented Aug 20, 2025

Add parsing support for a few missing pin types

  1. Add pin attribute parsers for:
  • serializeAsSinglePrecisionFloat
  • subPins
  • parentPin
  • DesiredPinDirection
  1. Add node parser for UserDefinedPin
  2. Add color and rounding support for the real pin type (make it green, same as float)
  3. Handle PinFriendlyName for INVTEXT
  4. Added several null checks on subCategoryObject to prevent Uncaught TypeError: can't access property "class", i.subCategoryObject is undefined. Without these several node and pin types do not display.

This patch removes a number of errors from the browser console like

Didn't parse property attribute 'PinType.bSerializeAsSinglePrecisionFloat'. There isn't a matching parser.
There is no implementation for custom property type 'UserDefinedPin'. Skip this property

Tests: I created one node for each of these pin types and verified that they display correctly.

1) Nodes in Unreal:
klee pin types 1 - unreal

2) Before This Patch: Nodes in current main code
(note you will need to add the null checks for this to render; otherwise it will not display)
klee pin types 2 - before patch - current main code

3) After This Patch: Nodes display more correctly
klee pin types 3 - with patch

@dave-artificial-agency
Copy link
Contributor Author

You can now see in #8 - I have added unit tests to prove that this code works.

Unreal draws an square box filled with the color value - e.g. a white or red box.
Currently klee just lists the rgba number values in a line.

draw the colored box instead.
@dave-artificial-agency
Copy link
Contributor Author

dave-artificial-agency commented Oct 10, 2025

I added support for drawing the color-filled box beside LinearColor pins.

Unreal draws an square box filled with the color value - e.g. a white or red box.
Currently klee just lists the rgba number values in a line.

draw the colored box instead.

Unreal:
unreal - colored box

Currently klee draws:
klee - text color values

With this patch - klee draws the color box

klee - color boxes with patch

It's also easy to add a unit test for this. e.g.

describe('PinPropertyParser - LinearColor ColorBox', () => {
    let parser: PinPropertyParser;

    beforeEach(() => {
        parser = new PinPropertyParser();
    });

    test('Can parse PinSubCategoryObject with LinearColor reference', () => {
        const propertyData = 'PinName="TestColor",PinType.PinCategory="struct",PinType.PinSubCategoryObject="/Script/CoreUObject.LinearColor",DefaultValue="(R=1.0,G=0.0,B=0.0,A=1.0)"';
        const pinProperty = parser.parse(propertyData, 'TestNode');

        expect(pinProperty).toBeDefined();
        expect(pinProperty.subCategoryObject?.class).toBe('"/Script/CoreUObject.LinearColor"');
        expect(pinProperty.defaultValue).toBeInstanceOf(Color);
        expect(pinProperty.defaultValueControlClass).toBe(ColorBoxControl);
    });
});

@martinhodler martinhodler merged commit c50f94b into Joined-Forces:main Oct 12, 2025
@dave-artificial-agency dave-artificial-agency deleted the add-pin-types branch October 16, 2025 17:18
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