Commit fc7a4cac authored by Amitav Baruah's avatar Amitav Baruah Committed by Facebook GitHub Bot
Browse files

Fix plotly pointcloud visualization feature bug

Summary: If a pointcloud had less than pointcloud_max_points, the colors would not render. This diff fixes that.

Reviewed By: bottler

Differential Revision: D25099044

fbshipit-source-id: 47c3ddcdb4e06284b0a7966ffca1b973f394921f
parent 6c2fc685
......@@ -587,7 +587,9 @@ def _add_pointcloud_trace(
color = None
if features is not None:
features = features[indices]
if indices is not None:
# Only select features if we selected vertices above
features = features[indices]
if features.shape[1] == 4: # rgba
template = "rgb(%d, %d, %d, %f)"
rgb = (features[:, :3].clamp(0.0, 1.0) * 255).int()
......
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