In this tutorial I am going to show you how to create this UI in python, that will enable you to set render time subdivisions on your objects, also avoiding errors if the selection contains any other type of nodes like cameras or lights.
This will help you to create custom UI's and associated functions for your own scripts.