TemplatePyMod: Prevent user to remove core properties

This commit is contained in:
Florian Foinant-Willig
2025-03-16 23:03:55 +01:00
committed by Kacper Donat
parent e5b6848fc6
commit 4726c2c0c3
3 changed files with 26 additions and 26 deletions

View File

@@ -6,7 +6,7 @@ from pivy import coin
class Texture:
def __init__(self, obj, source):
"Add some custom properties to our box feature"
obj.addProperty("App::PropertyLink","Source","Texture", "Link to the shape").Source = source
obj.addProperty("App::PropertyLink","Source","Texture", "Link to the shape", locked=True).Source = source
obj.Proxy = self
def onChanged(self, fp, prop):
@@ -17,7 +17,7 @@ class Texture:
class ViewProviderTexture:
def __init__(self, obj):
obj.addProperty("App::PropertyPath","File","Texture", "File name to the texture resource")
obj.addProperty("App::PropertyPath","File","Texture", "File name to the texture resource", locked=True)
self.obj = obj
obj.Proxy = self