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

Reference variables directly from the parent of StateMachine #22

Open
sairam4123 opened this issue May 17, 2021 · 3 comments
Open

Reference variables directly from the parent of StateMachine #22

sairam4123 opened this issue May 17, 2021 · 3 comments

Comments

@sairam4123
Copy link

Hi, I'd be happy if we could reference variables directly from the parent, instead of setting the variable separately, we could have the current option as well, when we have to reference from children of the parent.

I hope you understand it, and I know the difficulty of the implementation, but it would be a nice feature to have.

@sairam4123 sairam4123 changed the title Reference variables directly from StateMachine. Reference variables directly from the parent of StateMachine May 17, 2021
@imjp94
Copy link
Owner

imjp94 commented May 17, 2021

Do you mean like what you can do with AnimationTree:

anim_tree.set("parameters/eye_blend/blend_amount", 1.0)
# Simpler alternative form:
anim_tree["parameters/eye_blend/blend_amount"] = 1.0

@sairam4123
Copy link
Author

sairam4123 commented May 17, 2021

No not like that, well, directly referencing the variable, like getting the variable directly instead of setting the variable.

	$StateMachinePlayer.set_param("speed", speed)

instead of this, the variable could be directly fetched from the parent, so instead of setting the variable here, the state machine will fetch the variable directly and we could reference the variable in the editor.

https://i.imgur.com/MzIvmoJ.png
Here, it will a menu option, where you could select the variable.

@imjp94
Copy link
Owner

imjp94 commented May 17, 2021

A menu that popup when typing variable name, so you can choose from the list?

Can do that, but I am leaving all the UI/UX improvement for v1.0 update, so it gonna take some time.

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

No branches or pull requests

2 participants