File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -3138,17 +3138,18 @@ def pixel_to_world(self):
31383138 def pixel_to_world (self , value ):
31393139 raise AttributeError ('pixel_to_world is read-only' )
31403140
3141- def capture (self , * s ):
3142- if len (s ) == 0 :
3143- raise AttributeError ('scene.capture requires at least one argument.' )
3144- filename = s [0 ]
3145- if not isinstance (filename , str ): raise AttributeError ('A capture file name must be a string.' )
3146- if '.png' not in filename : filename += '.png'
3141+ def capture (self , filename , capture_labels = None ):
3142+ if not isinstance (filename , str ):
3143+ raise TypeError ("'filename' for Capture must be a string." )
3144+
3145+ if filename [- 4 :] != ".png" :
3146+ filename += ".png"
3147+
31473148 include_labels = "T"
3148- if len ( s ) == 2 :
3149- if s [ 1 ] == True : include_labels = "T "
3150- else : include_labels = "F"
3151- self .addmethod (' capture' , include_labels + filename )
3149+ if capture_labels is not None :
3150+ include_labels = "T" if capture_labels else "F "
3151+
3152+ self .addmethod (" capture" , include_labels + filename )
31523153
31533154 @property
31543155 def objects (self ):
You can’t perform that action at this time.
0 commit comments