# Modify default settings for subdivision surface modifier

In some other 3D packages, like XSI, subdivision surface can be directly interacted with by default. It is possible to display a cage and modify that cage, but it is not mandatory. I have seen some Blender videos, such as this one, where something similar is being done. I notice three things:

1. Wire and Draw all edges are turned on by default for objects.
2. Optimal Display is turned on by default for subsurf modifier.
3. Mesh elements can be directly selected from the subdivision surface and there is no cage visible.

How could I set these as defaults in Blender? Do I have to write a Python add-on? Is there an example that I could look into? Intuitively, I feel this should be a popular requirement.

The video you linked to is a tutorial for the Sensei addon, which is a free addon that you can download and try. You will notice that the Sensei addon replaces a lot of the blender UI so that it's own operators are used, which is how the various defaults are different than blender's defaults.

Some code to put into your operators execute() method could be something like -

# bpy.context.active_object is needed if you test this script
# inside an operators execute you only want context.active_object
obj = bpy.context.active_object
# objects draw wireframe settings
obj.show_wire = True
obj.show_all_edges = True
m = obj.modifiers.new('Subsurf', 'SUBSURF')
# this turns on optimal display
m.show_only_control_edges = True
# this shows the edit mode vertices on the
# deformed mesh not the real vertices
m.show_in_editmode = True
m.show_on_cage = True

• Thank you! I have been thinking, it is possible that there is already a subsurf modifier applied to the active object of that name, and I might want to apply a second one for whatever reason. Is it possible to intercept the event of a subsurf modifier being added to the active object? If I could intercept it, and set show_on_cage to True, that would be a really robust solution. – TheBicentennialMan Sep 26 '16 at 18:12
• The shortcut to add a subsurf is an operator, you can get your operator to use that key instead, intercepting adding a subsurf in the modifiers properties panel is more work but you could easily add a button that puts your settings in place - see the new addon in 2.78. Your at the right place to ask questions like that. – sambler Sep 27 '16 at 9:32
• The link leads me to a really old Blender 2.6 page. Is that what you wanted to share? I understand that defining my own operator would solve it. But I am very curious about tweaking Blender now. If I did want to take the trouble and wanted to intercept the application of a subsurf modifier, what could I do? I have been trying to dig some info on it. But it seems pretty hard to come by. I have so far only managed to override it, but then that becomes my custom op once again. – TheBicentennialMan Sep 27 '16 at 16:26