def redraw_points(dummy):
    """Redraw points of the previous Blender session."""

    # This test is very cheap, so it will not cause
    # huge overheads for scenes without point clouds
    if "contains_opengl_point_clouds" in bpy.context.scene:
        log_report(
            "INFO",
            "Checking scene for missing point cloud draw handlers",
            op=None,
        )
        for obj in bpy.data.objects:
            if (
                "particle_coords" in obj
                and "particle_colors" in obj
                and "point_size" in obj
            ):
                coords = obj["particle_coords"]
                colors = obj["particle_colors"]
                point_size = obj["point_size"]

                draw_manager = DrawManager.get_singleton()
                draw_manager.register_points_draw_callback(
                    obj, coords, colors, point_size
                )

        for area in bpy.context.screen.areas:
            if area.type == "VIEW_3D":
                area.tag_redraw()
                break
Redraw points of the previous Blender session.
photogrammetry_importer/opengl/utility.py