diff --git a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/Colors.kt b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/Colors.kt index 9c76fd81..7dc41632 100644 --- a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/Colors.kt +++ b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/Colors.kt @@ -5,6 +5,7 @@ import hep.dataforge.meta.get import hep.dataforge.meta.number import hep.dataforge.values.ValueType import hep.dataforge.values.int +import hep.dataforge.values.string import kotlin.math.max /** diff --git a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt index 5f4e2573..3487f95c 100644 --- a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt @@ -6,6 +6,7 @@ import hep.dataforge.names.asName import hep.dataforge.values.Null import hep.dataforge.values.Value import hep.dataforge.values.asValue +import hep.dataforge.values.string import javafx.scene.control.ColorPicker import javafx.scene.paint.Color import org.slf4j.LoggerFactory diff --git a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt index 051469c7..5ce3d960 100644 --- a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt @@ -12,6 +12,7 @@ import hep.dataforge.names.Name import hep.dataforge.names.asName import hep.dataforge.values.Value import hep.dataforge.values.parseValue +import hep.dataforge.values.string import javafx.collections.FXCollections import javafx.scene.control.ComboBox import javafx.util.StringConverter diff --git a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/MetaViewer.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/MetaViewer.kt index ca6edcc2..88079731 100644 --- a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/MetaViewer.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/MetaViewer.kt @@ -17,6 +17,7 @@ package hep.dataforge.vision.editor import hep.dataforge.meta.Meta +import hep.dataforge.values.string import hep.dataforge.vision.dfIconView import javafx.beans.property.SimpleStringProperty import javafx.scene.control.TreeItem diff --git a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt index a8a62999..9ae8fcf3 100644 --- a/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt @@ -6,6 +6,7 @@ import hep.dataforge.meta.get import hep.dataforge.meta.int import hep.dataforge.values.ValueType import hep.dataforge.values.int +import hep.dataforge.values.string import hep.dataforge.vision.Colors import javafx.scene.paint.Color import javafx.scene.paint.Material @@ -59,7 +60,7 @@ public fun MetaItem<*>.color(opacity: Double = 1.0): Color { /** * Infer FX material based on meta item */ -fun MetaItem<*>?.material(): Material { +public fun MetaItem<*>?.material(): Material { return when (this) { null -> FXMaterials.GREY is MetaItem.ValueItem -> PhongMaterial(color()) diff --git a/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeMaterials.kt b/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeMaterials.kt index 16d24525..f7ec681d 100644 --- a/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeMaterials.kt +++ b/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeMaterials.kt @@ -3,6 +3,7 @@ package hep.dataforge.vision.solid.three import hep.dataforge.meta.* import hep.dataforge.values.ValueType import hep.dataforge.values.int +import hep.dataforge.values.string import hep.dataforge.vision.Colors import hep.dataforge.vision.Vision import hep.dataforge.vision.solid.SolidMaterial