подготовлено к подключению
This commit is contained in:
parent
a848d92a14
commit
19b8eeb441
1 changed files with 5 additions and 5 deletions
|
@ -9,11 +9,11 @@ doc = App.ActiveDocument
|
|||
#функции для создания обьектов PDDL
|
||||
|
||||
def add_types():
|
||||
types = doc.addObject('App::FeaturePython', 'types')
|
||||
types = doc.addObject('App::FeaturePython', 'Types')
|
||||
types.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||
types.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'Types'
|
||||
types.addProperty("App::PropertyStringList", 'Types', 'PDDL')
|
||||
sortEntity(types)
|
||||
# sortEntity(types)
|
||||
print('Types of objects added successfully')
|
||||
return(types)
|
||||
#слишком много types
|
||||
|
@ -24,7 +24,7 @@ def add_parameters():
|
|||
params.addProperty("App::PropertyString", 'PDDL', 'PDDL').PDDL = 'PDDL'
|
||||
params.addProperty("App::PropertyString", 'Type', 'PDDL').Type = 'Parameters'
|
||||
params.addProperty('App::PropertyPythonObject', 'Parameters','PDDl')
|
||||
sortEntity(params)
|
||||
# sortEntity(params)
|
||||
print('Domain parameters added successfully')
|
||||
return(params)
|
||||
|
||||
|
@ -177,7 +177,7 @@ def sortEntity(object):
|
|||
# if len(doc.getObjectsByLabel(object.Type)) == 0 :
|
||||
# pddl_group = doc.addObject("App::DocumentObjectGroup", object.Type)
|
||||
# else:
|
||||
pddl_group = doc.addObject("App::DocumentObjectGroup", object.Type)
|
||||
# pddl_group = doc.addObject("App::DocumentObjectGroup", object.Type)
|
||||
|
||||
if len(doc.getObjectsByLabel(object.Type)) == 0:
|
||||
pddl_group = doc.addObject("App::DocumentObjectGroup", object.Type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue