Window manager methods
Prior to running python console code below I have exported the scene to wavefront obj, set a filepath and chosen use selection.
>>> wm = C.window_manager
>>> props = wm.operator_properties_last("export_scene.obj")
Running auto-complete props.
CtrlSpace
>>> props.
as_pointer(
... cut for brevity...
use_normals
use_nurbs
use_selection
use_smooth_groups
use_smooth_groups_bitflags
use_triangles
use_uvs
use_vertex_groups
values(
>>> props.
Can get any property value
>>> props.use_uvs
True
This is the default value for use_uvs
If however we iterate over items, will get those values last used that are non default.
>>> for k, v in props.items():
... k, v
...
('filepath', '/home/batfinger/Desktop/untitled.obj')
('use_selection', 1)
To run the operator again using the same properties from code could simply make this a dictionary and pass it to the operator as kwargs
>>> d = {k : v for k, v in props.items()} # or d = dict(props.items())
>>> bpy.ops.export_scene.obj(**d)
Progress: 0.00%
( 0.0003 sec | 0.0000 sec) OBJ Export path: '/home/batfinger/Desktop/untitled.obj'
Progress: 0.00%
Progress: 8.33%
Progress: 16.67%
Progress: 25.00%
Progress: 33.33%
Progress: 41.67%
Progress: 50.00%
( 0.0044 sec | 0.0034 sec) Finished writing geometry of 'Cube'.
Progress: 50.00%
Progress: 50.00%
Progress: 50.00%
( 0.0058 sec | 0.0051 sec) Finished exporting geometry, now exporting materials
Progress: 100.00%
NO NODES!
( 0.0074 sec | 0.0067 sec) OBJ Export Finished
Progress: 100.00%
Progress: 100.00%
Progress: 100.00%
Progress: 100.00%
{'FINISHED'}