Add JobType property

This commit is contained in:
sliptonic
2021-07-14 14:53:17 -05:00
parent b836712c83
commit 7655849797

View File

@@ -181,6 +181,13 @@ class ObjectJob:
),
)
obj.addProperty(
"App::PropertyEnumeration",
"JobType",
"Base",
QtCore.QT_TRANSLATE_NOOP("PathJob", "Select the Type of Job"),
)
obj.addProperty(
"App::PropertyBool",
"SplitOutput",
@@ -208,6 +215,8 @@ class ObjectJob:
obj.OrderOutputBy = ["Fixture", "Tool", "Operation"]
obj.Fixtures = ["G54"]
obj.JobType = ["2D", "2.5D", "Lathe", "Multiaxis"]
obj.PostProcessorOutputFile = PathPreferences.defaultOutputFile()
obj.PostProcessor = postProcessors = PathPreferences.allEnabledPostProcessors()
defaultPostProcessor = PathPreferences.defaultPostProcessor()
@@ -478,6 +487,15 @@ class ObjectJob:
)
obj.SplitOutput = False
if not hasattr(obj, "JobType"):
obj.addProperty(
"App::PropertyEnumeration",
"JobType",
"Base",
QtCore.QT_TRANSLATE_NOOP("PathJob", "Select the Type of Job"),
)
obj.JobType = ["2D", "2.5D", "Lathe", "Multiaxis"]
def onChanged(self, obj, prop):
if prop == "PostProcessor" and obj.PostProcessor:
processor = PostProcessor.load(obj.PostProcessor)