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

setters and getters for visual script #39

Open
kubecz3k opened this issue Jun 13, 2019 · 5 comments
Open

setters and getters for visual script #39

kubecz3k opened this issue Jun 13, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@kubecz3k
Copy link

kubecz3k commented Jun 13, 2019

Godot version:
3.1.1

OS/device including version:
Ubuntu 18.04

Issue description:
It would be nice to have ability to use setters and getters in visual script.
My use case: I'm working in a team with an artist that's slowly increasing it's capabilities in using Godot as an editor. The main tool this artist is currently using to create some small 'custom logics' is actually an AnimationPlayer. In some scenes I'm giving simple way to run some logic from AnimationPlayer by changing variable value in inspector (for example, export var up_position:bool value of elevator).
Recently I wanted to introduce this artist to VisualScript, for the start to give her ability to create functions that are calling different animations from models she is providing... It was quite natural for her that she would like to expose such 'animation' to the inspector so she could use it from AnimationPlayer that's in parent scene

@kubecz3k
Copy link
Author

cc @swarnimarun

@kubecz3k kubecz3k added the enhancement New feature or request label Jun 13, 2019
@fire
Copy link
Member

fire commented Jul 19, 2019

This is a work in progress for the next version, but is this what you mean?

Screen Shot 2019-07-18 at 11 46 33 PM

@kubecz3k
Copy link
Author

Not exactly, this feature request was for visual script equivalent of setget keyword.
So in this case there is one custom variable ball_dir. I would like to have ability to link it to 'set' and 'get' functions that would be called when variable value is changed from outside of this class.

@swarnimarun
Copy link
Contributor

@kubecz3k I had gotten it working on my local branch, still haven't created the PR focusing on other tasks at the moment but I will push the changes soon enough... :)

@kubecz3k
Copy link
Author

very cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants