Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/uvcalc_lightmap.py
| Show First 20 Lines • Show All 444 Lines • ▼ Show 20 Lines | for face_sel in face_groups: | ||||
| # ...1/8th of the UV size. | # ...1/8th of the UV size. | ||||
| # ...limiting this is needed or you end up with bug unused texture spaces | # ...limiting this is needed or you end up with bug unused texture spaces | ||||
| # ...however if its too high, box-packing is way too slow for high poly meshes. | # ...however if its too high, box-packing is way too slow for high poly meshes. | ||||
| float_to_int_factor = lengths_to_ints[0][0] | float_to_int_factor = lengths_to_ints[0][0] | ||||
| if float_to_int_factor > 0: | if float_to_int_factor > 0: | ||||
| max_int_dimension = int(((side_len / float_to_int_factor)) / PREF_BOX_DIV) | max_int_dimension = int(((side_len / float_to_int_factor)) / PREF_BOX_DIV) | ||||
| ok = True | ok = True | ||||
| else: | else: | ||||
| max_int_dimension = 0.0 # wont be used | max_int_dimension = 0.0 # won't be used | ||||
| ok = False | ok = False | ||||
| # RECURSIVE pretty face grouping | # RECURSIVE pretty face grouping | ||||
| while ok: | while ok: | ||||
| ok = False | ok = False | ||||
| # Tall boxes in groups of 2 | # Tall boxes in groups of 2 | ||||
| for d, boxes in list(odd_dict.items()): | for d, boxes in list(odd_dict.items()): | ||||
| ▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines | |||||