CGCookie / retopoflow

A suite of retopology tools for Blender
2.48k stars 249 forks source link

IndexError: List Index out of range #172

Closed MutableLoss closed 7 years ago

MutableLoss commented 8 years ago

After getting this "List Index" error, I can no longer draw any strips. The first two times, it gave a warning type error, but after it then acted like it worked, allowing me to draw strokes without error, but not actually creating the strips.

I've included a screenshot of exactly what I was doing, where the exact original polystrips mesh existed. I had been adding more strips to it, and as I progressed submitted so not to lose any progress. I did not change the name, or anything else. This was simply submitting strips while it was working, and going right back in to add more to the existing mesh.

When I went to add a new strip, this error came about. I was not using the existing strip mesh to bind the strip either. The strip I was laying down is marked with the 3D cursor, and the direction outlined with a GP line, showing exactly where I went.

index

The Exact Error is:

Traceback (most recent call last): File "C:\Users\viles\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\retopoFlow\modaloperator.py", line 244, in modal nmode = self.FSM[self.fsm_mode](context, eventd) File "C:\Users\viles\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\retopoFlow\op_polystrips\polystrips_ui_tools.py", line 101, in modal_sketching self.polystrips.insert_gedge_from_stroke(p3d[:next_i_p], False) File "C:\Users\viles\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\retopoFlow\op_polystrips\polystrips_datastructure.py", line 1798, in insert_gedge_from_stroke gv0 = [gv for gv in self.extension_geometry if gv.is_picked(stroke[0][0])] File "C:\Users\viles\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\retopoFlow\op_polystrips\polystrips_datastructure.py", line 1798, in gv0 = [gv for gv in self.extension_geometry if gv.is_picked(stroke[0][0])] IndexError: list index out of range

location: :-1

patmo141 commented 8 years ago

@vxlcoder this looks to me like the stroke is empty. Perhaps when the stroke is pruned of points that do not hit the mesh it ended up with an empty stroke.

punkoffice commented 8 years ago

I get "List index error" as well with one of my models. Its a 200k poly 3D scan, but its been polished and its all one connected mesh (no separate eyes or tounge). This happens as soon as I try to lay down a polystrip around the eyes. It freezes Blender and I have to close the whole application. I can lay polystrips on other areas like the forehead, but it crashes when going around the eyebrow. list_index_error This is with Retopoflow 1.2.0 and Blender 2.77a

patmo141 commented 8 years ago

Can you upload that blend or even just the parts around the eyebrows?

punkoffice commented 8 years ago

Sure thing. You can download the blend file here www.punkoffice.com/downloads/polystrips.zip Its a 14MB file.

patmo141 commented 8 years ago

Thanks, I happen to have a few moments right now I'll see if I can tackle this

patmo141 commented 8 years ago

I'm having trouble reproducing this error. Am I in the right area. I didn't see any non manifolds near the eybrows. image

patmo141 commented 8 years ago

I think I need to see the error that is beneath the 2nd popup there which looks related to "none type has no attribute dot" in polystrips_datatructure.py. Can you get this to happen consistently?

punkoffice commented 8 years ago

Here's a video of me trying to put polystrips around the eye and mouth https://youtu.be/v7S0_cWWIw0

patmo141 commented 8 years ago

awesome thanks. This is the error we are looking for. We have come across this one in the past.image

patmo141 commented 8 years ago

ok, interesting. You error message gives me a line that's different in the current 1.2.0 release. sometimes we see old code stuck around that does not uninstall (I tinnk it's the cached compiled python code of the previous version). Try unstalling v1.2.0, saving user settings, restarting blender, then reinstalling v1.2.0. You will notice that your error occurs on line 1251, and the code is now on 1253, with 2 new lines above it, checking for a none type object :-) So yeah, this one has been fixed and is

image

patmo141 commented 8 years ago

Oh, as an experiment, if you go into edit mdoe and "make normals consistent" on your source mesh before you update your addon, see if that fixes it. Because the error we were having was where the ray cast returns a Hit on the mesh, but does not return a surface normal for that hit which is quite strange.

punkoffice commented 8 years ago

ok, I reinstalled it and made sure to recalculate normals. Its definitely better now. Thanks mate! I can lay polystrips without crashing. I do get an error sometimes when creating a circle around the eye then trying to fill it fill Its quite possible I'm doing something wrong with where I'm placing things and the area I'm trying to fill, but I should get some kind of meaningful message

patmo141 commented 8 years ago

Please open a separate issue for the circular patch fill. On Apr 9, 2016 10:22 AM, "Marcus Milne" notifications@github.com wrote:

ok, I reinstalled it and made sure to recalculate normals. Its definitely better now. Thanks mate! I can lay polystrips without crashing. I do get an error sometimes when creating a circle around the eye then trying to fill it [image: fill] https://cloud.githubusercontent.com/assets/5295016/14404101/1eb15998-feb2-11e5-8a05-18e5259bfbd5.png Its quite possible I'm doing something wrong with where I'm placing things and the area I'm trying to fill, but I should get some kind of meaningful message

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/CGCookie/retopoflow/issues/172#issuecomment-207795134

patmo141 commented 7 years ago

closing this old issue :-)