boxpack2d - python 2.3 compat fix, thanks brecht
gen_utils - needed to include BKE_library.h off_import - use ed.key
This commit is contained in:
@@ -379,9 +379,9 @@ class boxList:
|
||||
|
||||
# Sort boxes by area
|
||||
def sortArea(self):
|
||||
# uvlist.sort(key=lambda v: v.uv.x) #X coord sort
|
||||
# self.boxes.sort(lambda A, B: cmp(A.area, B.area) ) # Reverse area sort
|
||||
self.boxes.sort(key=lambda b: b.area ) # Reverse area sort
|
||||
try: self.boxes.sort(key=lambda b: b.area )
|
||||
except: self.boxes.sort(lambda A, B: cmp(A.area, B.area) )
|
||||
|
||||
|
||||
# BLENDER only
|
||||
def draw(self):
|
||||
|
||||
@@ -133,12 +133,7 @@ def read(filename):
|
||||
# Set all edges to be fgons by default
|
||||
for ed in me.edges:
|
||||
ed.flag |= FGON_FLAG
|
||||
i1= ed.v1.index
|
||||
i2= ed.v2.index
|
||||
if i1>i2:
|
||||
i1,i2= i2,i1
|
||||
|
||||
edge_dict[i1,i2]= ed
|
||||
edge_dict[ed.key]= ed
|
||||
|
||||
# Now make known edges visible
|
||||
has_edges = True
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "BIF_space.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_library.h"
|
||||
|
||||
#include "Mathutils.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user