Skip to content

Instantly share code, notes, and snippets.

@Pullusb
Last active October 4, 2015 17:40
Show Gist options
  • Save Pullusb/1cd82b6ac97f46bfe945 to your computer and use it in GitHub Desktop.
Save Pullusb/1cd82b6ac97f46bfe945 to your computer and use it in GitHub Desktop.
blenderSB subsurf number view to render
import bpy
# for all selected object if subsurf modifier:
# render subdivision number = view subdivision number
act = bpy.context.active_object
exist = False
for mod in act.modifiers:
if mod.type == 'SUBSURF':
sub = act.modifiers['Subsurf'].levels
exist = True
if exist:
for o in bpy.context.selected_objects:
for mod in o.modifiers:
if mod.type == 'SUBSURF':
o.modifiers['Subsurf'].levels = sub
o.modifiers["Subsurf"].render_levels = sub
else:
print("active object has no subsurf to refer")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment