I would like to create a shortcut for changing a solidify modifiers thickness much like changing the amount of subdivision with Ctrl + number or hitting the S key and typing the number for scaling. Is there an easy way to do that?
1 Answers
This can be easily done with python.
1. Get the script
Copy the script into blender's text editor and save it as "solidify_set.py" (NOT "solidify_set.py.txt").
OR
Download from github (see the comments for more info).
2. Install it as an add-on
(make sure to click the all category and the community supported level)
3. Add the hotkeys that you would like
It should be added in the "3D View > Object Mode" section where the subdivision set operator is.
Click Add New, then enter "solidify_raise", then enter your hotkey (and select any key modifiers you want...shift, ctrl, etc.). Click Add New, then enter "solidify_lower", then enter your hotkey (and select any key modifiers you want...shift, ctrl, etc.). You can click on the amount setting to set the amount it shifts. Clicking on the restore button, restores your hotkeys to the way they were before. Finally, don't forget to save user prefs with Save User Settings :-)
# Copyright 2016 Jake Dube # # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # ##### END GPL LICENSE BLOCK #####import bpy from bpy.types import Operator from bpy.props import FloatProperty
bl_info = { "name": "Solidify Set", "author": "Jake Dube", "version": (1, 0), "blender": (2, 77, 0), "location": "Spacebar > Solidify Raise/Lower", "category": "Object", }
class RaiseSolidify(Operator): """Raises solidify modifier.""" bl_idname = "object.solidify_raise" bl_label = "Solidify Raise" bl_options = {"REGISTER", "UNDO"}
amount = FloatProperty(name="Amount", default=0.01) def draw(self, context): layout = self.layout layout.prop(self, 'amount') def execute(self, context): scene = bpy.context.scene for obj in bpy.context.selected_objects: scene.objects.active = obj modifiers = obj.modifiers found = False for mod in modifiers: if mod.type == 'SOLIDIFY': mod.thickness += self.amount found = True break if not found: bpy.ops.object.modifier_add(type='SOLIDIFY') for mod in modifiers: if mod.type == 'SOLIDIFY': mod.thickness += self.amount return {'FINISHED'}class LowerSolidify(Operator): """Lowers solidify modifier.""" bl_idname = "object.solidify_lower" bl_label = "Solidify Lower" bl_options = {"REGISTER", "UNDO"}
amount = FloatProperty(name="Amount", default=0.01) def draw(self, context): layout = self.layout layout.prop(self, 'amount') def execute(self, context): scene = bpy.context.scene for obj in bpy.context.selected_objects: scene.objects.active = obj modifiers = obj.modifiers found = False for mod in modifiers: if mod.type == 'SOLIDIFY': mod.thickness -= self.amount found = True break if not found: bpy.ops.object.modifier_add(type='SOLIDIFY') for mod in modifiers: if mod.type == 'SOLIDIFY': mod.thickness -= self.amount return {'FINISHED'}def register(): bpy.utils.register_module(name)
def unregister(): bpy.utils.unregister_module(name)
if name == 'main': register()



__init__.pymodule that loads the rest and registers the add-on. – JakeD Sep 07 '16 at 20:32