Skip to content

Conversation

@kilon
Copy link

@kilon kilon commented Mar 23, 2017

Γεια σου Αντώνη ;)
Hello Antoni

Nice addon by the way

Your addon can be improved by completely removing the multiEdit Enter and multiEdit Exit buttons. Instead the addon could detect automagically if you are in edit mode and if you selected more than one object and call either MultiEnter enter or MultiEnter exit accordingly.

So I created this pull request to your Github repo that contains code that creates a modal operator. The advantage of the modal operator is that it runs always and there is no need to click buttons. The modal operator then checks every 1 second (this can be configured for less or more time) to see if the user selected multiple objects and entered edit mode for one of them, then it calls MultiEdit Enter operator , if it detects that all objects are on non edit mode and the multi edit mode has previously being entered then it calls the MultiEdit Exit operator.

The code is placed on the bottom of the python module.

The modal operator can be called with the spacebar menu and its named "Simple View Operator" , you can name it whatever you want , you can also make it run as soon as the addon is enabled.

I have tested the code and it seems it works fine, there is a small delay because I have set it to check only once a second but you can easily drop it down to 100 milliseconds. I also had some crashes with Blender but 2.78c seems to work better than 2.79a.

Also I have not commented the code because I think it is obvious what it does but if you feel that you struggle to understand it, drop me a comment and will clean up the code and add comments.

You are free to do with the code as you please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants