Changeset View
Changeset View
Standalone View
Standalone View
object_fracture_cell/__init__.py
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | if level != 0: | ||||
| kw_copy["source_limit"] = recursion_source_limit | kw_copy["source_limit"] = recursion_source_limit | ||||
| from . import fracture_cell_setup | from . import fracture_cell_setup | ||||
| # not essential but selection is visual distraction. | # not essential but selection is visual distraction. | ||||
| obj.select = False | obj.select = False | ||||
| if kw_copy["use_debug_redraw"]: | if kw_copy["use_debug_redraw"]: | ||||
| obj_draw_type_prev = obj.draw_type | obj_display_type_prev = obj.display_type | ||||
| obj.draw_type = 'WIRE' | obj.display_type = 'WIRE' | ||||
| objects = fracture_cell_setup.cell_fracture_objects(scene, obj, **kw_copy) | objects = fracture_cell_setup.cell_fracture_objects(scene, obj, **kw_copy) | ||||
| objects = fracture_cell_setup.cell_fracture_boolean(scene, obj, objects, | objects = fracture_cell_setup.cell_fracture_boolean(scene, obj, objects, | ||||
| use_island_split=use_island_split, | use_island_split=use_island_split, | ||||
| use_interior_hide=(use_interior_vgroup or use_sharp_edges), | use_interior_hide=(use_interior_vgroup or use_sharp_edges), | ||||
| use_debug_bool=use_debug_bool, | use_debug_bool=use_debug_bool, | ||||
| use_debug_redraw=kw_copy["use_debug_redraw"], | use_debug_redraw=kw_copy["use_debug_redraw"], | ||||
| level=level, | level=level, | ||||
| ▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | if group_name: | ||||
| if group is None: | if group is None: | ||||
| group = bpy.data.groups.new(group_name) | group = bpy.data.groups.new(group_name) | ||||
| group_objects = group.objects[:] | group_objects = group.objects[:] | ||||
| for obj_cell in objects: | for obj_cell in objects: | ||||
| if obj_cell not in group_objects: | if obj_cell not in group_objects: | ||||
| group.objects.link(obj_cell) | group.objects.link(obj_cell) | ||||
| if kw_copy["use_debug_redraw"]: | if kw_copy["use_debug_redraw"]: | ||||
| obj.draw_type = obj_draw_type_prev | obj.display_type = obj_display_type_prev | ||||
| # testing only! | # testing only! | ||||
| # obj.hide = True | # obj.hide = True | ||||
| return objects | return objects | ||||
| def main(context, **kw): | def main(context, **kw): | ||||
| import time | import time | ||||
| ▲ Show 20 Lines • Show All 384 Lines • Show Last 20 Lines | |||||