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

Base OScriptNodePin on PropertyInfo #444

Closed
Naros opened this issue Jun 28, 2024 · 0 comments · Fixed by #445
Closed

Base OScriptNodePin on PropertyInfo #444

Naros opened this issue Jun 28, 2024 · 0 comments · Fixed by #445
Labels
kind/enhancement New feature or request
Milestone

Comments

@Naros
Copy link
Member

Naros commented Jun 28, 2024

Description

Godot encodes quite a bit of information in its ProperyInfo struct, which describes a property on a class or a method argument or return value. If we transition OScriptNodePin to be based on this structure, this has a number of benefits such as making the integration of function calls much more seamless.

Implementation ideas

Change OScriptNodePin class members to look something like this:

PropertyInfo _property;
EPinType _pin_type;
EPinDirection _direction;
Variant _default_value;
Variant _generated_default_value;
BitField<Flags> _flags;
String _user_friendly_name;
String _member_parent_class; 

Many properties like _pin_name, _type, _target_class, as well as some of the flag bits would get encoded into the new PropertyInfo member named _property. Additionally, this would begin to serialize hint and usage flags along with the hint string, which allows the _file_types variable to become persistent.

In some instances, it may be useful for a pin to reference to a member in a specific target class. I'd prefer we consider folding part of the intent of _target_class into the PropertyInfo's class_name attribute; which keeping the other potential intent to describe the class that owns the property to be enabled into the new attribute called _member_parent_class or perhaps _owner_class or something similar.

In addition, all create_pin functions should be changed in OScriptNode. They should prefer to encapsulate as much behavior as possible, ideally having the node define whether the pin is (a) execution/data and (b) the property info associated with the pin; with an optional default value.

@Naros Naros added the kind/enhancement New feature or request label Jun 28, 2024
@Naros Naros added this to the 2.1 milestone Jun 28, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jun 28, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 2, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 5, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 5, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 5, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 5, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 9, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Naros added a commit that referenced this issue Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant