mifth / mifthtools

MifthTools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors skip draw_handler_remove, throw RNA Reference error indefinitely

shipshupe opened this issue · comments

Wow, so this is probably one of the cleanest, most fantastic collection of blender tools available. Thank you.

I made a small modification to prevent myself getting stuck clicking the CStretch tool with my whole mesh selected and waiting for it to update.
mi_curve_stretch.py: 87

        if len(self.loops) > 25:
            self.report({'WARNING'},"More than 25 loops selected. cancelling to avoid crash")
            return {'CANCELLED'}

I also run into issues where when using a curve guide there is a divide by zero error (i'm using it on Windows 7). The thread exits , the draw_handler_remove() function doesn't get called and the console keeps looking for an RNA block that no longer exists. Reloading a .blend doesn't fix it; I have to restart blender. I learned to avoid moving the pink base curve in CurveGuide after setting it the first time but it has also happened randomly during CurveSurfaces.

div/zero error:
mi_curve_guide.py line 416, in modal line 658 in update_mesh_to_curve dir_multilpier = (vert_data[2] * (best_bezier_len / self.tool_side_vec_len)) - vert_data[2] TypeError:unsupported operand type(s) for /: 'NoneType' and 'float'

then keeps spitting out
line 753 if self.curve_tool... ReferenceError line 736 if self.lw_tool... Reference Error
Hope that's enough info!

I love what you've done with the tools! I'm using it as a learning resource / reference, especially with the bgl / draw_handler stuff.

commented

Hi. Thanks for the report. I'll check tomorrow.
No much free time right now.

commented

Hi again.

Thanks for the report. I have fixed the CurveGuide with the last commit.

About CStretch limitation - i'll leave it as it's now for a while. As a user can have more than 25 curves in some situations.

About learning my code:
i did not use verts indices in CurveSurfaces and PolyLoops tools. I used custom vertex ids. As blender change verts indices every time when new point was created.