Bone Manager (Addon)

I merged your fork.

I hope you just ignore pep8 because the default pylinting in vscode just gives too many invalid errors.
If so, I also added the settings I use in my vscode, to get linting working correctly and the codes I choose to ignore.


I adjusted the Custom Props ui to account for the new display options.
The noteworthy change is the Add button is on the bottom now.
The reasoning is that when you click it, it adds to the bottom, so it should behave like the layers ui, where you click the button, then the button is replaced by the property.

I spent a lot of time trying to adjust the UI to keep all three on one line at the top, and then scrapped the idea and pushed it to the bottom. Now that I think about it, this part was purely optional and I could’ve just left it at the top :thinking:

Code Talk

There’s this thing you do in your uilayout.props() where you set the icon as a tuple.
I had thought this was a hidden feature of the parameters, and then after playing with it, I realized you were just returning a single item from the tuple :smile:

I never thought of that, so I switched some code in my personal addon, to do something similar.]

What I would do is something like:
class.props(layout, idname, icon='NONE', on={'icon': 'INFO'}, off={})
When that’s called, it will go through the on / off properties and replace the property being used with that, for the situation.

Now I can just do
class.props(layout, idname, icon=('NONE', 'INFO'))
If the prop is a tuple (with 2 items), it’ll return the first if it’s off, or the second if it’s on.


I can also use that elsewhere instead of using multiple lines for if and else or whatever.

Though, this requires both values be valid, in which cases I would have to use one-line if-else statements if I REALLY want it on one line :roll_eyes:

You’re free to play with them to figure out how you’d like to have them.
I tried to setup their code to make it easier to differentiate between them, to split them later if desired.