@@ -23,10 +23,12 @@ def __init__subclass__(self, configfile, pipeline, processed_model_exists=True):
23
23
self .processed_model_exists = processed_model_exists
24
24
self .pipeline = pipeline
25
25
26
+ self .configfile = None
26
27
if type (configfile ) is str :
27
28
if not os .path .isfile (configfile ):
28
29
raise Exception ('{} not found!' .format (configfile ))
29
30
self .cfg = load_json (open (configfile , 'r' ))
31
+ self .configfile = configfile
30
32
else :
31
33
self .cfg = configfile
32
34
@@ -151,11 +153,12 @@ def _load_robot(self):
151
153
# create a robot with the basic properties given
152
154
self .robot = Robot (name = self .robotname if self .robotname else None )
153
155
else :
154
- if os .path .exists (os .path .join (self .exportdir , "smurf" , self .robotname + ".smurf" )):
156
+ load_file = os .path .join (self .exportdir , "smurf" , getattr (self , "filename" , self .robotname ) + ".smurf" )
157
+ if os .path .exists (load_file ):
155
158
self .robot = Robot (name = self .robotname if self .robotname else None ,
156
- inputfile = os . path . join ( self . exportdir , "smurf" , self . robotname + ".smurf" ) )
159
+ inputfile = load_file )
157
160
else :
158
- raise Exception ('Preprocessed file {} not found!' .format (self . basefile ))
161
+ raise Exception ('Preprocessed file {} not found!' .format (load_file ))
159
162
160
163
def _join_to_basefile (self ):
161
164
# get all the models we need
@@ -735,7 +738,12 @@ def export(self):
735
738
for vc in self .robot .collisions + self .robot .visuals :
736
739
if isinstance (vc .geometry , representation .Mesh ):
737
740
self .processed_meshes = self .processed_meshes .union ([os .path .realpath (f ["filepath" ]) for f in vc .geometry ._exported .values ()])
738
- self .processed_meshes .add (os .path .realpath (vc .geometry .abs_filepath ))
741
+ try :
742
+ self .processed_meshes .add (os .path .realpath (vc .geometry .abs_filepath ))
743
+ except IOError :
744
+ # This mesh has been edited and has no source mesh any more that could provide a file path
745
+ pass
746
+
739
747
if "keep_files" in self .deployment :
740
748
git .reset (self .targetdir , "autobuild" , "master" )
741
749
misc .store_persisting_files (self .pipeline , self .targetdir , self .deployment ["keep_files" ], self .exportdir )
0 commit comments