You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: The built-in tween system doesn't work for me and I want to implement my own into every class. I tinkered with it a bit, but it didn't go anywhere.
First of all, I'm not very experienced with C++ nor GDExtension. There might be a way to do this. If so, sorry.
I'm working on some sort of a video editor plugin. Basically, the idea is that instead of separate video files, the user can use built-in nodes in Godot. I also want to make it so each node can decide when to do what, using a tween-like system. I can't use the built-in tween system for reasons such as:
They're one-time use, meaning the preview panel would be super buggy.
They aren't customizable enough for my purposes.
They aren't very efficient in mass quantities.
This isn't a problem for me, I had already made a tween system in the past for another project. The problem is I couldn't figure out a way to add it to the engine. I basically want to add a function into the Object class, so that it can be inherited by any other class. I then would have a class with access to that object, along with everything exposed within it. To do this however, I messed around with it quite a lot, mainly with #include_next, but couldn't get it to work in any way.
Describe the problem or limitation you are having in your project
I want to add a new function into the built-in Object class, so that it can be used in any other class. I recall doing something similar in C#, but couldn't find a way in here.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
As opposed to C#, there is no partial keyword in C++ (thanks Bjarne Stroustrup). I can't really think of a way to get through that. Perhaps a way to bind methods to any class would work.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Like how we bind methods like how we do it right now, but for any class. I don't really have an idea how that'd work in code though.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No as far as I know.
Is there a reason why this should be core and not an add-on in the asset library?
Yes, there could be a lot of use cases for something like this.
The text was updated successfully, but these errors were encountered:
Calinou
changed the title
Add a way to add extra functionality to built-in classes using GDExtension.
Add a way to add extra functionality to built-in classes using GDExtension
Jun 13, 2024
Describe the project you are working on
TL;DR: The built-in tween system doesn't work for me and I want to implement my own into every class. I tinkered with it a bit, but it didn't go anywhere.
First of all, I'm not very experienced with C++ nor GDExtension. There might be a way to do this. If so, sorry.
I'm working on some sort of a video editor plugin. Basically, the idea is that instead of separate video files, the user can use built-in nodes in Godot. I also want to make it so each node can decide when to do what, using a tween-like system. I can't use the built-in tween system for reasons such as:
This isn't a problem for me, I had already made a tween system in the past for another project. The problem is I couldn't figure out a way to add it to the engine. I basically want to add a function into the
Object
class, so that it can be inherited by any other class. I then would have a class with access to that object, along with everything exposed within it. To do this however, I messed around with it quite a lot, mainly with#include_next
, but couldn't get it to work in any way.Describe the problem or limitation you are having in your project
I want to add a new function into the built-in
Object
class, so that it can be used in any other class. I recall doing something similar in C#, but couldn't find a way in here.Describe the feature / enhancement and how it helps to overcome the problem or limitation
As opposed to C#, there is no
partial
keyword in C++ (thanks Bjarne Stroustrup). I can't really think of a way to get through that. Perhaps a way to bind methods to any class would work.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Like how we bind methods like how we do it right now, but for any class. I don't really have an idea how that'd work in code though.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No as far as I know.
Is there a reason why this should be core and not an add-on in the asset library?
Yes, there could be a lot of use cases for something like this.
The text was updated successfully, but these errors were encountered: