0
$\begingroup$

I know there's a way to scale along the median point of an object's virtual geometry and actual geometry combined, which is here:

Scale about true center with Mirror modifier

But it's not very quick, especially if you have a lot of parts to scale near the center of your mirrored mesh. Quicker means better productivity, so it should be in my interests to become quicker while keeping quality high. Is there something I can use, maybe Python code or a plugin, to allow for this or a similar process to be done automatically, for example, when I select something and press a keyboard shortcut?

Thank you very much for any help. :)

$\endgroup$
  • 1
    $\begingroup$ Second answer offers rather quick solution on that. Something more quicker could be only to select edge loop located on the mirror plane and snap cursor to selection (use cursor as pivot point) $\endgroup$ – Mr Zak Nov 3 '16 at 22:10
2
$\begingroup$

Here's a quick little addon which streamlines the process outlined by your link:

# ##### 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 2
#  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, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

bl_info = {
    "name": "Snap Macro",
    "author": "Me",
    "version": (0, 0, 1),
    "blender": (2, 78, 0),
    "location": "View3D > Snap (Shift S)",
    "warning": "",
    "description": "Snaps Cursor to Selection, Sans Axis of Symmetry",
    "wiki_url": "http://i.imgur.com/j1N3Wqz.jpg",
    "category": "View3D",
}

import bpy
axSym = [
    ("0", "X", ""),
    ("1", "Y", ""),
    ("2", "Z", "")
    ]

def snapMacro(self, context):
    bpy.ops.wm.context_set_enum(data_path="space_data.pivot_point", value = "CURSOR")
    bpy.ops.view3d.snap_cursor_to_selected()
    context.space_data.cursor_location[int(self.sAxis)] = 0

class snap_macro(bpy.types.Operator):
    """Macro snaps cursor to selection and zeroes X-Axis"""
    bl_idname = 'view3d.snap_macro'
    bl_label = 'Snap Macro'
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def poll(cls, context):

        return context

    sAxis = bpy.props.EnumProperty(items = axSym, name = "Axis of Symmetry", default = "0")

    def execute(self, context):
        snapMacro(self, context)
        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator(snap_macro.bl_idname, text="Snap Macro")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.VIEW3D_MT_snap.append(menu_func)
    bpy.types.WindowManager.sAxis = snap_macro.sAxis

def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.VIEW3D_MT_snap.remove(menu_func)
    bpy.types.WindowManager.sAxis

if __name__ == "__main__":
    register()

Put this .py file into your User\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\ directory, or equivelent, depending on OS. Enable in user preferences (searching 'snap' brings it to the top of the list) and save user settings.

What it does:

  • Adds a macro to the snap menu Shift S
  • Snaps cursor to selected, with the exception of the axis of symmetry. X is default
  • Sets pivot point to cursor, since you'll always want to do that
  • Gives basic operator panel support, allows retroactive change of axis, remembers last axis setting
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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