New Inset Polygon Addon

That sounds cool Howardt. Is there any chance that your algorithm could be implemented into the current inset tool as an option? It seems silly to me that you should need two different inset tools (one being an addon) to achieve different behaviors of the same function.

It doesn’t work in all cases that current inset does. And a bunch of work to covert this to C. And would add more code to Blender to maintain.

But it would be doable. I’d need some feeling that it would get wide use before doing such a thing.

Hey Howard! I was wondering if maybe you knew what was going on with this addon in the latest Blender versions? I thought it worked properly before but I had need of it today and found that it acted really strangely. I reproed it on just a simple plane that I subdivided. See attached gif:

Looks like a bug. Sorry. Without the model, not sure I could repro it. You can file a bug to upload the model and assign the bug to me.

@howardt Where does this add-on’s button appear in Blender 2.8? I’ve enabled the add-on, but can’t find how to call it into action. Thanks!

1 Like

It looks like I didn’t make any default key binding or menu entry for this. Not sure why I didn’t. In your opinion, where would you like it? One possible place is in the “Face” menu in Edit mode.

In the absence of me doing anything, you can invoke the tool by using “Search” (I change my preferences so that this is back on Spacebar), and then search for Inset Straight Skeleton. And/or you can change the key bindings to assign a favorite key combination to invoke the function of that name,

1 Like

Hi Howardt, this file reproduces that bug, uploading here now. Can also file a bug. It happened to me almost always when I try straight skeleton, always a bit ‘deeper’ inside.
inset skeleton.blend (671.6 KB)

1 Like

I myself would appreciate this tool being placed under the “Face” menu in Edit mode as you suggested as an option.

1 Like

Thanks for the search tip, I always forget to try that. I think it makes sense to put it in the face menu in edit mode.

Thanks for creating this!

1 Like

Thanks for the replies everyone.
I’ll update the addon to put the command it the face menu, and look at the bug vduha uploaded.

3 Likes

Hmm, I don’t think there’s a way to have an addon add an entry to the Faces menu. Checking with other devs, but I don’t think there will be one. So maybe I’m just going to have to leave this addon as having the need for the user to pick and assign a hotkey for the function. Or I could try to assign one myself, but that seems a little dangerous, especially as there are several possible keymaps that people could be using.

vduha: I tried the sample file you uploaded and am not seeing a bug. What is wrong with the result, in your opinion?

You sure? I have addons in my faces menu, looptools for one. If we´re talking about the RMB context sensitive menu.

I was talking about the Faces menu that is in the 3d view header.
Anyway, happily I was wrong and there was an easy way to add a new entry to a menu, so I have committed a change to the addons file so that that will happen now.

1 Like

Awesome, Howard :slight_smile: Yeah, I figured I misunderstood :stuck_out_tongue:

Howard, here’s a reproduction of the bug that I originally reported on earlier in this thread. There are two meshes - one that I’ve already done an inset skeleton on and then another mesh that’s just a duplicate before having done the inset, so that you can try to replicate it on the mesh. I hope this helps!

Skeleton inset.blend (826.6 KB)

I understand that Inset Straight Skeleton is the 2.8 version of this Add-on. Unfortunately I’m running into problems trying to use this on a polygon.


Using 1.5m for the amount, I get about 20 insets, not 1. Have I misunderstood the way the tool is meant to work? Because of this I downloaded v2.79b portable and tried the inset polygon in that to see if this is normal behaviour. Unfortunately I don’t get any opyions to change amount or anything else for this tool in 2.79b. When I click on Inset Polygon, it hangs for about 10 minutes then doesn’t do anything, i.e doesn’t modify the mesh in any way, and doesn’t give parameter options.

With the Inset Straight Skeleton, I assume what’s causing me the grief is in the model.py, def BevelPolyAreaInModel where overlaps are converted to bevels, whereas what I expected was a merging of the vertices so you would only have one inner edge.

James_Clow:
When I coded this, I had to decide what to do when lines merged or faces split. I decided that at each such event, I’d make faces going all around – this way, the faces created would be mostly quads or triangles. So getting “20 insets not 1” is as designed right now. I suppose I could add an option to not do that, and let there be lots of ngons in the results.

Dhiem:
Got your test file, thanks. This is likely to take some time and effort to debug, and I’m kind of busy in my day job right now. Hope to get to this sometime. Thanks for the example.

2 Likes

Hi Howard, thanks for letting me know, and thank you for coding the add-on. It makes sense to avoid the ngons. I find in some situations certain faces I work with easier to deal with starting with ngons and converting to quads/tris after I’ve modified faces, especially when I’m using python Scripting to automate a workflow involving insets and extrudes. Having the potential to allow inset creation with ngon would be a powerful option for me. I’ve been trying to ‘tweak’ the code to allow to prevent face creation on line merge, but at the moment I only succeed in breaking the plugin. I would completely understand if this is a feature you may not want to add with it just being one person wanting ngon creation, but if you would be willing to give me any tips on the py code sections I need to focus on bypassing it would be very appreciated. :slight_smile:

Hi James,

Without taking more time than I have today to look at this, I’m sorry I can’t be as helpful as I would like to be. If I recall correctly, the current code kind of depends on: after each merge or split event, we get back to a state where we have a (set of) closed curves that need to be inset. Which is easy to do if we add the edges all around at the new inset amuont where the event happens. It may require a lot of reworking to undo that solution. It might be easier to try to fix things up at the end. Two ways I can think of to do that would be:

  • keep track of the edges added on the boundary at each new iteration, and somehow figure out which ones you don’t need to add at the end. It’s the “somehow” I don’t really know if would be easy or hard.
  • for the newly created faces, do a step where you cluster together all the ones that are in the same plane and connected via shared edges, and then merge them together

Thanks for the suggestions, I certainly appreciate them. The latter one definitely sounds like it may be my better option to explore first.