Some non-PEP ‘enhancement’ proposals (sorry for such intrusion)
couldn’t you f.e. replace the line 76 (and adequate below) in inset script with something like
if (v1in and v2in) in [v.index for v in f.verts]: return True
line 65 could be squeezed similarly …
added the functions: warning - not tested, just a quickie edit…
## Find out if a vert is an outer vert (connected to a non selected vert by an edge)
def IsOuterVert(me, vIn):
for f in me.faces:
if not f.sel:
if vIn in [v.index for v in f.verts]: return True
return False
## Find out if an edge is an outer edge (connected to a non selected face)
def IsOuterEdge(me, v1in, v2in):
found = False
for f in me.faces:
if not f.sel:
if (v1in and v2in) in [v.index for v in f.verts]: return True
return False
Yeah could be done Though I’m mostly happy I have it working… a lot can be optimised code wise…
The downside of your version is that it always checks both v1in and v2in and in my case if the first check is not succesfull it just skips the second one… no idea which would be more efficient, but that’s why I had it multilined
I’m hoping some people may have some input in correctness of the actual results though…
I had a closer look at MadCello’s example and he’s right… it’s not 100% correct. Sadly I don’t have the time to perfect it… So hopefully someone else can help out… But I really think both these should be properly coded in C and added to blender as internal functions. I need em a lot
Shit I should dig nagging I did in Elysiun days with “feature requests”. For “extrude inner” which is/was C4D term for insetting.
Well thanks for getting the initiative up at least (even if it doesn’t _really_work_as your mommy told it should). Maybe you should nag Cambo to get someone porting that to C …
I’ve been working on a simplistic python code reformatter on-and-off lately and gotten in the habit of writing condensed-yet-almost selfdocumenting code. Because I wouldn’t understand shit if I didn’t do so.
Ah and I updated the online version of the inset script… it’s almost 4am here and I had just brushed me theeth as I realised what was wrong. I had a set value in there for 180 degree angle cases which was no longer nessecary. So MadCello… it’s fixed now for your mesh hehe
The downside of your version is that it always checks both v1in and v2in and in my case if the first check is not succesfull it just skips
afaik pyhon evaluates from left so this should be a nonissue (if first/left op is False then it’s False, dropped) - plus if the check is inline stuff should be faster in any case - no calls to local vars. Saying “should” because I havent really tested, that’s assumed as being “by the book” - plus saying again: haven’t tested.
For same reason I didn’t want to squeeze the f.sel check, as this would imply the comprehension/other checks being performed for all faces and not only selecteds.
Purely hypothetically. But very likely to work as advertised - if there wasn’t any logical/syntax mistakes in it.
MadCello… it would help if you showed when it doesn’t work for you…
UPDATE: Had a look and fixed and uploaded… version 2 of project cursor is now online. Apparently lineintersections really don’t like opposing vectors. So it should work fine on Full spheres and such now as well.
macouno, i was not saying that it works bad, i was complaining about mathematical reality of vertice vormals in the regural sphere. Only the Icosphere as vertice normals aligned with the center.
p.s. one thing that i notice, while i’m writing this reply, is that cursor disapears if you tested it with a 2d circle, and the LMB cannot show it again, only with Snaps.