Skip to content
Snippets Groups Projects
Commit 659e9854 authored by Campbell Barton's avatar Campbell Barton
Browse files

material for internal faces.

parent a2324bd4
No related branches found
No related tags found
No related merge requests found
......@@ -246,6 +246,12 @@ class FractureCell(Operator):
default=0.001,
)
material_index = IntProperty(
name="Material",
description="Material index for interior faces",
default=0,
)
# -------------------------------------------------------------------------
# Object Options
......@@ -324,13 +330,15 @@ class FractureCell(Operator):
box = layout.box()
col = box.column()
col.label("Mesh Data")
rowsub = col.row(align=True)
rowsub = col.row()
rowsub.prop(self, "use_smooth_faces")
rowsub.prop(self, "use_smooth_edges")
rowsub.prop(self, "use_data_match")
rowsub.prop(self, "use_island_split")
rowsub.prop(self, "material_index")
rowsub = col.row()
# could be own section, control how we subdiv
rowsub.prop(self, "margin")
# rowsub.prop(self, "use_island_split") # TODO
rowsub.prop(self, "use_island_split")
box = layout.box()
col = box.column()
......
......@@ -124,6 +124,7 @@ def cell_fracture_objects(scene, obj,
use_data_match=False,
use_debug_points=False,
margin=0.0,
material_index=0,
):
from . import fracture_cell_calc
......@@ -233,6 +234,10 @@ def cell_fracture_objects(scene, obj,
for bm_edge in bm.edges:
bm_edge.smooth = True
if material_index != 0:
for bm_face in bm.faces:
bm_face.material_index = material_index
# ---------------------------------------------------------------------
# MESH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment