However don't let the lack of guidelines stop you from adding a GUI to your own plugins. The current GUI API is very usable, and gets more mature every day.
The layout at the moment is a two level tab control. The tabs at the top represent categories, like modeling, files, render. The ones at the bottom are the tasks in the current category and refine the more broad category in macrodetail, detail and microdetail modeling, or loading, saving and exporting.
So when creating your plugin, the first thought should be "In which category does it belong?". From experience we know that it can be a though question to answer. Sometimes the only answer is adding a new category. This is what we did for measurement for example.
def load(app):
category = gui3d.Category(app, "Measurement", app.getThemeResource("images", "button_measure.png"))
Next you probably want your own task to implement your feature. While it's possible to attach functionality to an instance of gui3d.Task, it's often easier to derive your own class. When you create an instance of your class, you pass the parent of your task, which can either be an existing category
taskview = HairPropertiesTaskView(app.categories["Modelling"])
or the new one which you added.
taskview = MeasurementTaskView(category)
In your derived task you will then add the necessary controls to let the user interact. A good place to see how to use the different controls is the example plugin. You will see that even if you don't add any controls, the model is already visible. This is because the model is attached to the root of the GUI tree. In the onShow event of your task you might want to reset the camera position, like we do in the save task, or hide the model, like we do in the load task. Just don't forget to reset the state when your task gets hidden in onHide.
Definitely, definitely bring the 3d controller objects; they were 'straight out of Avatar' cool. Push Makehuman into the 3d next-gen, don't hold back now, the whole world is going 3d. And get ready for your biggest money maker, the 3d Talking Head. Everyone wants one, nobody else has got the universal-human approach that Makehuman has. Makehuman Real Time Lip Sync = $$$
ReplyDeleteI know I can't speak for everyone... but I like the sliders. Just wish the information that they modify was more clearly communicated to the user. Age, Height, etc.
ReplyDelete