In the code in your original post, set_selection sets the view's selection based on indices from the model. As far as I can tell, you will need to populate the model and connect it to the view before you do that. I would expect set_selection to be called after all other setup is complete except perhaps for signal connections.
The code in your pastebin is very different from the code above though, so maybe this is irrelevant now? On Saturday, 15 September 2018 02:30:21 UTC+10, kiteh wrote: > > Hey Michael, correct me if I am wrong, I will need to call for my > set_selection case before using the setModel? > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0246f83b-b2d8-4234-a115-5614a00a4a8f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.