def onChanged(self, obj, p):
     if p == "Proxy":
         if "ViewBox" not in obj.PropertiesList:
             obj.addProperty("App::PropertyLink", "ViewBox")
             obj.setEditorMode("ViewBox", 2)
             obj.ViewBox = getViewBox(obj.Document)
         obj.setEditorMode("Placement", 2)
         if FreeCAD.GuiUp:
             obj.ViewObject.Proxy = SymbolicPrimitiveViewProxy()
 def onChanged(self, obj, p):
     if p == "Proxy":
         if "Offset" not in obj.PropertiesList:
             obj.addProperty("App::PropertyString", "Offset", "SymPyExpression")
             obj.Offset = "0"
         if "Direction" not in obj.PropertiesList:
             obj.addProperty("App::PropertyString", "Direction", "SymPyExpression")
             obj.Direction = "[0, 0, 1]"
         if "ViewBox" not in obj.PropertiesList:
             obj.addProperty("App::PropertyLink", "ViewBox")
             obj.setEditorMode("ViewBox", 2)
             obj.ViewBox = getViewBox(obj.Document)
         obj.setEditorMode("Placement", 2)
         if FreeCAD.GuiUp:
             obj.ViewObject.Proxy = SymbolicPrimitiveViewProxy()
Beispiel #3
0
    def onChanged(self, obj, p):
        if p == "Proxy":
            if isDerivedFrom(obj, "Part::FeaturePython"):
                if "Outfaces" not in obj.PropertiesList:
                    obj.addProperty("App::PropertyPythonObject", "Outfaces")
                    obj.Outfaces = []
                    obj.setEditorMode("Outfaces", 2)

            if "Origin" not in obj.PropertiesList:
                obj.addProperty("App::PropertyLink", "Origin")
            if "Masker" not in obj.PropertiesList:
                obj.addProperty("App::PropertyLink", "Masker")
                obj.Masker = getViewBox(obj.Document)
            obj.setEditorMode("Placement", 2)
            if FreeCAD.GuiUp:
                obj.ViewObject.Proxy = FeatureMaskViewProxy()