Open data-hound opened 6 months ago
You should first call my_viz.create_window()
. This is the revised code:
import open3d as o3d
import numpy as np
import matplotlib.pyplot as plt
import os
ply_point_cloud = o3d.data.PLYPointCloud()
pcd = o3d.io.read_point_cloud(ply_point_cloud.path)
cus_viz_demo = o3d.data.DemoCustomVisualization()
my_viz = o3d.visualization.Visualizer()
pcd.paint_uniform_color([0.5, 0.5, 0.5])
my_viz.create_window() # ADD
my_viz.add_geometry(pcd)
my_viz.get_render_option().load_from_json(cus_viz_demo.render_option_path)
my_viz.run()
my_viz.destroy_window()
Checklist
main
branch).Describe the issue
I have been trying to reproduce the example
custom_draw_geometry_with_camera_trajectory
in the docs. But, I keep getting error: AttributeError: 'NoneType' object has no attribute 'load_from_json'Steps to reproduce the bug
Error message
Cell 10 line 5 3 my_viz.add_geometry(pcd) 4 # ro = my_viz.get_render_option() ----> 5 my_viz.get_render_option().load_from_json(cus_viz_demo.render_option_path)
AttributeError: 'NoneType' object has no attribute 'load_from_json'
Expected behavior
open3d.visualization.RenderOption object should be returned
Open3D, Python and System information
Additional information
No response