Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
TLabAltoh authored Aug 19, 2023
1 parent f8df85a commit 0b7a809
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions material.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ def apply_mat(self, obj):
name = obj.name
m_name = "terrain-" + name

if m_name in obj.data.materials:
if m_name in bpy.data.materials:
obj.data.materials.append(bpy.data.materials[m_name])
obj.active_material_index = len(obj.data.materials) - 1
return

material = bpy.data.materials.new("terrain-" + name)
Expand Down Expand Up @@ -529,4 +531,4 @@ def draw(self, context):
col = layout.column()
col.prop(terrain_mat, "noise_scale_s0", text = "Noise Scale")
col = layout.column()
col.prop(terrain_mat, "noise_detail_s0", text = "Noise Detail")
col.prop(terrain_mat, "noise_detail_s0", text = "Noise Detail")

0 comments on commit 0b7a809

Please sign in to comment.