Last active
October 4, 2015 17:40
-
-
Save Pullusb/1cd82b6ac97f46bfe945 to your computer and use it in GitHub Desktop.
blenderSB subsurf number view to render
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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