Closed Darkblader24 closed 5 years ago
Thank you for the changes. :smile:
But I think we should use context.area
whenever context.area
is a 3D view area, and consider a case of no 3d View. :thinking:
You are right, I missed that. I just tested around with it more and found out that there are more things to iron out than just this error. Take a look at the case when there are more than two 3D views: https://i.imgur.com/6g7Wy4Y.gif The second one is pretty much not working properly at all and the first one also effects the second one. I think it should either effect both at the same time or only one of them.
Feel free to do whatever you want with this PR and fix it in your own style since this issue extends the scope of this PR.
Okay, I've updated the code (29feeb7) which should fix the error of calling the shading buttons via code/console. It will effect all 3D views when context.area
is not a 3D view area. :)
Thanks, works like a charm 💯
Sometimes it can happens that there is no 3D view (or it is not the first space) when calling the shading buttons via code. This fixes this.