try icon and toolbar on SMESH plugin MeshCut: OK

This commit is contained in:
Paul RASCLE 2018-12-10 14:59:11 +01:00
parent 212d923cf8
commit 3ecbeb028a
3 changed files with 4 additions and 1 deletions

View File

@ -77,6 +77,7 @@ SET(SMESH_RESOURCES_FILES
mesh_octahedron.png mesh_octahedron.png
mesh_orientation.png mesh_orientation.png
mesh.png mesh.png
mesh_plugins_meshcut.png
mesh_polygon.png mesh_polygon.png
mesh_polyhedron.png mesh_polyhedron.png
mesh_pyramid_n.png mesh_pyramid_n.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

View File

@ -21,6 +21,7 @@
# #
import salome_pluginsmanager import salome_pluginsmanager
import os import os
from qtsalome import QIcon
try: try:
from spadderPlugin import runSpadderPlugin from spadderPlugin import runSpadderPlugin
@ -33,9 +34,10 @@ except Exception as e:
try: try:
from meshcut_plugin import MeshCut from meshcut_plugin import MeshCut
icon_file = os.path.join(os.getenv('SMESH_ROOT_DIR'),'share', 'salome', 'resources', 'smesh', 'mesh_plugins_meshcut.png')
salome_pluginsmanager.AddFunction('MeshCut', salome_pluginsmanager.AddFunction('MeshCut',
'Cut a tetrahedron mesh by a plane', 'Cut a tetrahedron mesh by a plane',
MeshCut) MeshCut, icon=QIcon(icon_file))
except Exception as e: except Exception as e:
salome_pluginsmanager.logger.info('ERROR: MeshCut plug-in is unavailable: {}'.format(e)) salome_pluginsmanager.logger.info('ERROR: MeshCut plug-in is unavailable: {}'.format(e))