col.row().prop(con, "map_from", expand=True)
split = layout.split()
+ ext = "" if con.map_from == 'LOCATION' else "_rot" if con.map_from == 'ROTATION' else "_scale"
sub = split.column(align=True)
sub.label(text="X:")
- sub.prop(con, "from_min_x", text="Min")
- sub.prop(con, "from_max_x", text="Max")
+ sub.prop(con, "from_min_x" + ext, text="Min")
+ sub.prop(con, "from_max_x" + ext, text="Max")
sub = split.column(align=True)
sub.label(text="Y:")
- sub.prop(con, "from_min_y", text="Min")
- sub.prop(con, "from_max_y", text="Max")
+ sub.prop(con, "from_min_y" + ext, text="Min")
+ sub.prop(con, "from_max_y" + ext, text="Max")
sub = split.column(align=True)
sub.label(text="Z:")
- sub.prop(con, "from_min_z", text="Min")
- sub.prop(con, "from_max_z", text="Max")
+ sub.prop(con, "from_min_z" + ext, text="Min")
+ sub.prop(con, "from_max_z" + ext, text="Max")
col = layout.column()
row = col.row()
col.row().prop(con, "map_to", expand=True)
split = layout.split()
+ ext = "" if con.map_to == 'LOCATION' else "_rot" if con.map_to == 'ROTATION' else "_scale"
col = split.column()
col.label(text="X:")
sub = col.column(align=True)
- sub.prop(con, "to_min_x", text="Min")
- sub.prop(con, "to_max_x", text="Max")
+ sub.prop(con, "to_min_x" + ext, text="Min")
+ sub.prop(con, "to_max_x" + ext, text="Max")
col = split.column()
col.label(text="Y:")
sub = col.column(align=True)
- sub.prop(con, "to_min_y", text="Min")
- sub.prop(con, "to_max_y", text="Max")
+ sub.prop(con, "to_min_y" + ext, text="Min")
+ sub.prop(con, "to_max_y" + ext, text="Max")
col = split.column()
col.label(text="Z:")
sub = col.column(align=True)
- sub.prop(con, "to_min_z", text="Min")
- sub.prop(con, "to_max_z", text="Max")
+ sub.prop(con, "to_min_z" + ext, text="Min")
+ sub.prop(con, "to_max_z" + ext, text="Max")
self.space_template(layout, con)