1
$\begingroup$

Is it possible to have Smooth Shading on by default for every object created? I can't seem to find a way to do this in the User Preferences. Turning on Smooth Shading is an action I need to perform 95% of the time, it would be nice if I could skip it. Apologies if this is more a "feature request" but I think I may have just missed the option in Preferences.

$\endgroup$
1
$\begingroup$

It is kind of possible to write an add-on for this with Python. There does not seem to be a nice way to trigger an operator(what smooth shading is in Blender apparently) every time an object is created, but it is possible to check the count of objects in the file every time scene is updated. Scene gets updated all the time so that is a whole lot of unnecessary checks, but it seems there is no nice or elegant way to do this. I am not entirely sure I can honestly recommend using it but this hack seems to work and it's the only way to do it I can think of. It shades anything new to the scene smooth. Pasting and duplicating will trigger it as well. You can save it to a .py file and install it as an add-on if you really need this functionality. You may also want to do something about ugly shading with sharp edges so you may want to uncomment the line enabling auto smooth.

bl_info = {
    "name": "Smooth shade new objects",
    "author": "-",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "Works every time new objects are added",
    "description": "Shades everything added to the scene smooth",
    "warning": "",
    "wiki_url": "",
    "category": "Mesh",
    }

import bpy
from bpy.app.handlers import persistent

bpy.last_count = 0

@persistent
def smooth_handler(dummy):

    if len(bpy.data.objects) < bpy.last_count:
        bpy.last_count = len(bpy.data.objects)
    elif len(bpy.data.objects) > bpy.last_count:
        bpy.last_count = len(bpy.data.objects)
        if bpy.context.object != None:
            #bpy.context.object.data.use_auto_smooth = True 
            bpy.ops.object.shade_smooth()



def register():
    bpy.app.handlers.scene_update_post.clear()
    bpy.app.handlers.scene_update_post.append(smooth_handler)

def unregister():
    bpy.app.handlers.scene_update_post.clear()

if __name__ == "__main__":
    register()
$\endgroup$
  • $\begingroup$ Thanks, very interesting! I guess if you combine this with "autosmooth" enabled with 30° angle, the ugly edges would be eliminated in most cases. That would be a good add-on for a hard-surface workflow. $\endgroup$ – Jan Jan 12 at 9:14
-1
$\begingroup$

you can do it with the startup file (the layout with the cube, camer.lamp setted by default) select the cube in edit mode, press w and select smooth shading, and you can also turn on auto smooth as well. and then go to file, save start up file. and like this you will have this already done on that cube for example, but if you add a new object for example a cilinder it wont be smooth shaded you will have to do the same process.

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.