forked from Zolko-123/FreeCAD_Assembly4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibAsm4.py
38 lines (27 loc) · 971 Bytes
/
libAsm4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
# coding: utf-8
#
# LGPL
# Copyright HUBERT Zoltán
#
# libAsm4.py
# has been replaced by Asm4_libs, kept here for compatibility
"""
+-----------------------------------------------+
| Custom icon |
| Here only for compatibility reasons |
+-----------------------------------------------+
"""
# https://wiki.freecadweb.org/Viewprovider
# https://wiki.freecadweb.org/Custom_icon_in_tree_view
#
# usage:
# object = App.ActiveDocument.addObject('App::FeaturePython','objName')
# object = model.newObject('App::FeaturePython','objName')
# object.ViewObject.Proxy = Asm4.setCustomIcon(object,'Asm4_Variables.svg')
class setCustomIcon():
def __init__( self, obj, iconFile):
#obj.Proxy = self
self.customIcon = os.path.join( iconPath, iconFile )
def getIcon(self): # GetIcon
return self.customIcon