FEM: python base object and python base view object, workaround:
- do not add Object attribute, regression added in 299879f8d - do not attacht Object and ViewObject attribute, regression added in f47c288001 - this deactivates the icons in tree view - thus this only is a workaround
This commit is contained in:
@@ -48,14 +48,15 @@ class ViewProxy(object):
|
||||
# needs to be overwritten, if no standard icon name is used
|
||||
def getIcon(self):
|
||||
"""after load from FCStd file, self.icon does not exist, return constant path instead"""
|
||||
file_name = self.Object.Proxy.Type.replace("Fem::", "FEM_")
|
||||
return ":/icons/{}.svg".format(file_name)
|
||||
# file_name = self.Object.Proxy.Type.replace("Fem::", "FEM_")
|
||||
# return ":/icons/{}.svg".format(file_name)
|
||||
return ""
|
||||
|
||||
def attach(self, vobj):
|
||||
default = coin.SoGroup()
|
||||
vobj.addDisplayMode(default, "Default")
|
||||
self.Object = vobj.Object
|
||||
self.ViewObject = vobj
|
||||
# self.Object = vobj.Object
|
||||
# self.ViewObject = vobj
|
||||
|
||||
def getDisplayModes(self, obj):
|
||||
"Return a list of display modes."
|
||||
|
||||
@@ -34,7 +34,7 @@ class Proxy(object):
|
||||
BaseType = "Fem::ConstraintPython"
|
||||
|
||||
def __init__(self, obj):
|
||||
self.Object = obj # keep a ref to the DocObj for nonGui usage
|
||||
# self.Object = obj # keep a ref to the DocObj for nonGui usage
|
||||
obj.Proxy = self # link between App::DocumentObject to this object
|
||||
|
||||
# a few objects had this method in their class before the move to this base class
|
||||
|
||||
Reference in New Issue
Block a user