Week 3
Week 3
In this week I aim to make some minor amendments to the code backend but mainly revamp the GUI to be more simple and intuitive.
Previously, I had the code check the min value was in range in my create_building function. I have found that maya input fields all have min, max, and default values that can be set.
Additionally, I have added a menu to window using this code:
In the window initialisation, I provide the "menuBar" flag and add a menu with some items.
Next I added a check box as I was often having to delete the items in the scene before generating a new city. Using the checkbox, I bundle that functionality into one easy click.
Here is the implementation for the checkbox in the create_buildings function:
I also discovered the use of separators which let me space out items in the GUI and create a division. Below is the code for my new GUI:
I make use of parenting to control which labels are attached to which sections.
My GUI
To-Do:
- Add road/pavement functionality to the script (and integrate with the GUI)
- Add control for car placement
Maya Scripting - City Generation
Status | In development |
Category | Other |
Author | up2115462 |
Leave a comment
Log in with itch.io to leave a comment.