Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Some improvements to the Properties panel #540

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/main/kotlin/sc/iview/commands/edit/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ package sc.iview.commands.edit
import graphics.scenery.*
import graphics.scenery.attribute.material.HasMaterial
import graphics.scenery.primitives.Line
import graphics.scenery.primitives.PointCloud
import graphics.scenery.primitives.TextBoard
import graphics.scenery.volumes.Colormap.Companion.fromColorTable
import graphics.scenery.volumes.SlicingPlane
Expand Down Expand Up @@ -211,6 +212,11 @@ class Properties : InteractiveCommand() {
@Parameter(label = "Edge width", callback = "updateNodeProperties", style = "group:Line")
private var edgeWidth = 0

/* Point cloud properties */

@Parameter(label = "Point size", callback = "updateNodeProperties", style = "group:PointCloud")
private var pointRadius = 0f

private val slicingModeChoices = Volume.SlicingMode.values().toMutableList()

var fieldsUpdating = true
Expand Down Expand Up @@ -485,6 +491,13 @@ class Properties : InteractiveCommand() {
maybeRemoveInput("edgeWidth", java.lang.Integer::class.java)
}

if (node is PointCloud){
pointRadius = node.pointRadius
} else {
maybeRemoveInput("pointSize", java.lang.Float::class.java)
}


name = node.name
fieldsUpdating = false
}
Expand Down Expand Up @@ -594,6 +607,10 @@ class Properties : InteractiveCommand() {
node.edgeWidth = edgeWidth.toFloat()
}

if (node is PointCloud) {
node.pointRadius = pointRadius
}

events.publish(NodeChangedEvent(node))
}

Expand Down
Loading