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

Implement AskUser dialog #6

Open
BigRoy opened this issue Sep 13, 2016 · 2 comments
Open

Implement AskUser dialog #6

BigRoy opened this issue Sep 13, 2016 · 2 comments

Comments

@BigRoy
Copy link
Member

BigRoy commented Sep 13, 2016

Implementation

A draft implementation has been pushed just now for AskUserDialog. This is the fusionless class for Fusion's comp.AskUser. Consider it a draft implementation, so make sure to test the functionality once you start adopting it.

An example of usage is available here: https://github.com/BigRoy/fusionless/blob/master/examples/comp/ask_user_dialog.py

The resulting dialog:

ask_user_dialog

As far as I tested all functionality should work.

Discussion

I'm not too fond of how Fusion returns some of the values from the dialog.

For example a position control returns the values as {1.0: 0.5, 2.0: 0.5, 3.0: 0.5}. So basically it is a dictionary with three values (even though the control shows only X, Y). Preferably I would have it return it as a list or tuple, like (0.5, 0.5, 0.5) (for X, Y, Z if the Z-component is shown in the UI which I haven't seen yet).

Furthermore I'm opening this issue to open up discussion about the overall implementation.

@LarsCawley
Copy link

This seems to work really well. I would like to suggest an optional argument for multibutton and dropdown controls to return the selected string value.

@BigRoy
Copy link
Member Author

BigRoy commented Sep 14, 2016

Where would you like to pass that optional argument? When adding the button?

Something like:

dialog.add_multibutton("id", result="str")

It feels a bit odd. Do you have a better idea maybe? I think I need my morning coffee
Or should it maybe just always return the string?

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