-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Command line / Scripting interactions in a vim-like manner #595
Comments
So moving forward with this, here are my thoughts and a design proposal. Introducing f3dCommand f3dCommand will let user interact with f3d in a text based way and script certain f3d interactions.
And a few specific commands:
Standard commands takes a set Usage:
Set the value of inc/dec Usage:
Increase/Decrease the value of Note: CycleScalars and such will be handled here. toggle Usage:
Toggle the the value of a boolean option. Note: toggle animation will be handled here and added as an option instead/in supplement of being a dedicated C++ call. Usage:
Print the value of an option, without option, print info about the scene (current alias Usage:
Add an alias for Note: We could extend the alias method and support not only exit Usage: Stop the interactor and give back control to the applicative side reset Usage: Reset the camera position to its default position (current "Enter" binding) |
Notes from internal discussions: @snoyer @Meakk remarked that we should plan for integration with imgui and autocompletion. @snoyer suggested @Meakk suggested to separate between inc/dec and prev/next but it did not reach consensus and finally the idea was let down (I think?). @snoyer suggested inverting the logic and avoiding separators (eg: |
Implementation tryouts: A Simply adding a
In terms of actual implementation, most of the logic will go in the interactor_impl class. Regarding the imgui integration needs, (autocompletion, option listing), it will require improvements to the options class and be provided by the interaction_impl class. But it is not required in the first implementation. |
libf3d command API has been added in #1680 |
Let user use small command to control F3D, based on the libf3d::options with a unified api, eg:
:render.effect.ssao toggle
:render.effect.ssao on
:render.effect.ssao off
:render.effect.ssao reset
It could also include specific action, eg:
:camera.fit
Of course, a libf3d API would need to be designed for this.
more discussions here: #535
First implementation in libf3d added in #1680
Autocompletion will be needed in the future and should be added on the command API using a dedicated callback
The text was updated successfully, but these errors were encountered: