[Bf-python] Fixing [ #4834 ] getVertsFromGroup bugs (Mesh and NMesh modules)

Ed Blake kitsune_e at yahoo.com
Thu Sep 7 17:52:38 CEST 2006



--- Roland Hess <me at harkyman.com> wrote:

>
http://projects.blender.org/tracker/index.php?func=detail&aid=4834&group_id=9&atid=125
> 
> Since I'm a committer now (woohoo!), I was looking through the tracker 
> for bugs to fix and ran across this one.
> 
> It looks like the reporter found a real bug, and that the function 
> doesn't work as advertised in the docs.
> 
> The relevant function appears to throw an exception as soon as it 
> encounters an out-of-group vert, as opposed to just culling the list and 
> returning the final result. The way it's written, it looks to me like 
> any out-of-group vert will prevent the return of the list.
> 
> Pretty simple to fix... just a removal of the check in question, but I 
> didn't want to step on anyone's toes. All it would need would be a final 
> check to ensure that there is at least one element left in the list to 
> return, otherwise I'd think it ought to return None.
> 
> Ken, if you're cool with that, can I fix and commit?
> 
> Roland Hess
> harkyman

Congrats on becoming a committer!  You are deffinatly a good choice for it. 
As for your proposed fix shouldn't the function return an empty list instead
of None?  An empty list still evaluates as False, but you can call list
methods on it too.



More information about the Bf-python mailing list