Commit 8ee092ec authored by Frank Bessou's avatar Frank Bessou

Move all height map configuration in a single panel

parent 93ae6b8f3d2
Pipeline #9623 passed with stage
in 1 minute and 43 seconds
......@@ -142,8 +142,8 @@ class TYMPANPROPERTIES_PT_altimetry_mesh_layers_opacity(Panel):
text="Height Map")
class TYMPANPROPERTIES_PT_altimetry_mesh_height_map_range(Panel):
bl_label = "Height Map Range"
class TYMPANPROPERTIES_PT_altimetry_mesh_height_map(Panel):
bl_label = "Height Map"
bl_parent_id = "TYMPANPROPERTIES_PT_altimetry_mesh"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
......@@ -153,6 +153,7 @@ class TYMPANPROPERTIES_PT_altimetry_mesh_height_map_range(Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
obj = context.object
material = obj.material_slots[0].material
......@@ -165,25 +166,7 @@ class TYMPANPROPERTIES_PT_altimetry_mesh_height_map_range(Panel):
col.prop(height_map_range.inputs[2], "default_value",
text="Max Height")
class TYMPANPROPERTIES_PT_altimetry_mesh_height_map_gradient(Panel):
bl_label = "Height Map Gradient"
bl_parent_id = "TYMPANPROPERTIES_PT_altimetry_mesh"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = 'object'
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
obj = context.object
material = obj.material_slots[0].material
nodes = material.node_tree.nodes
height_map_val_to_rgb_node = nodes["height_map_val_to_rgb"]
layout.template_color_ramp(height_map_val_to_rgb_node, "color_ramp")
......@@ -193,8 +176,7 @@ classes = (
TYMPANPROPERTIES_PT_ground_map,
TYMPANPROPERTIES_PT_altimetry_mesh,
TYMPANPROPERTIES_PT_altimetry_mesh_layers_opacity,
TYMPANPROPERTIES_PT_altimetry_mesh_height_map_range,
TYMPANPROPERTIES_PT_altimetry_mesh_height_map_gradient,
TYMPANPROPERTIES_PT_altimetry_mesh_height_map,
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment