Skip to content

Commit

Permalink
wxGUI/nviz: fix imports (#4592)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa authored Oct 26, 2024
1 parent ac49177 commit 652a2f8
Showing 1 changed file with 53 additions and 35 deletions.
88 changes: 53 additions & 35 deletions gui/wxpython/nviz/wxnviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
try:
from ctypes import (
CFUNCTYPE,
UNCHECKED,
byref,
c_char_p,
c_double,
Expand All @@ -58,7 +57,9 @@
print("wxnviz.py: {}".format(e), file=sys.stderr)

try:
from grass.lib.ctypes_preamble import UNCHECKED, String
from grass.lib.gis import (
Colors,
G_find_raster2,
G_find_raster3d,
G_find_vector2,
Expand All @@ -73,20 +74,15 @@
G_warning,
)
from grass.lib.nviz import (
ATT_COLOR,
ATT_EMIT,
ATT_MASK,
ATT_SHINE,
ATT_TOPO,
ATT_TRANSP,
CONST_ATT,
MAP_ATT,
DRAW_QUICK_SURFACE,
DRAW_QUICK_VLINES,
DRAW_QUICK_VOLUME,
DRAW_QUICK_VPOINTS,
MAP_OBJ_SITE,
MAP_OBJ_SURF,
MAP_OBJ_UNDEFINED,
MAP_OBJ_VECT,
MAP_OBJ_VOL,
Colors,
Nviz_change_exag,
Nviz_color_from_str,
Nviz_del_texture,
Expand Down Expand Up @@ -153,6 +149,27 @@
nv_data,
)
from grass.lib.ogsf import (
ATT_COLOR,
ATT_EMIT,
ATT_MASK,
ATT_SHINE,
ATT_TOPO,
ATT_TRANSP,
CONST_ATT,
DM_FLAT,
DM_GOURAUD,
MAP_ATT,
MAX_ISOSURFS,
GP_delete_site,
GP_get_sitename,
GP_select_surf,
GP_set_style,
GP_set_style_thematic,
GP_set_trans,
GP_set_zmode,
GP_site_exists,
GP_unselect_surf,
GP_unset_style_thematic,
GS_clear,
GS_delete_surface,
GS_get_cat_at_xy,
Expand All @@ -177,6 +194,16 @@
GS_surf_exists,
GS_write_ppm,
GS_write_tif,
GV_delete_vector,
GV_get_vectname,
GV_select_surf,
GV_set_style,
GV_set_style_thematic,
GV_set_trans,
GV_surf_is_selected,
GV_unselect_surf,
GV_unset_style_thematic,
GV_vect_exists,
GVL_delete_vol,
GVL_get_trans,
GVL_init_region,
Expand Down Expand Up @@ -205,35 +232,13 @@
GVL_slice_set_transp,
GVL_vol_exists,
)
from grass.lib.raster import Rast__init_window, Rast_unset_window, Vect_read_colors
from grass.lib.raster3d import (
GP_delete_site,
GP_get_sitename,
GP_select_surf,
GP_set_style,
GP_set_style_thematic,
GP_set_trans,
GP_set_zmode,
GP_site_exists,
GP_unselect_surf,
GP_unset_style_thematic,
)
from grass.lib.vector import (
GV_delete_vector,
GV_get_vectname,
GV_select_surf,
GV_set_style,
GV_set_style_thematic,
GV_set_trans,
GV_surf_is_selected,
GV_unselect_surf,
GV_unset_style_thematic,
GV_vect_exists,
)
from grass.lib.raster import Rast__init_window, Rast_unset_window
from grass.lib.vector import Vect_read_colors
except (ImportError, OSError, TypeError) as e:
print("wxnviz.py: {}".format(e), file=sys.stderr)

import grass.script as gs

from core.debug import Debug
from core.gcmd import DecodeString
from core.globalvar import wxPythonPhoenix
Expand Down Expand Up @@ -2432,3 +2437,16 @@ def GetCmd(self):

def Corresponds(self, item):
return sorted(self.GetCmd()) == sorted(item.GetCmd())


__all__ = [
"DM_FLAT",
"DM_GOURAUD",
"DRAW_QUICK_SURFACE",
"DRAW_QUICK_VLINES",
"DRAW_QUICK_VOLUME",
"DRAW_QUICK_VPOINTS",
"MAX_ISOSURFS",
"ImageTexture",
"Nviz",
]

0 comments on commit 652a2f8

Please sign in to comment.