Closed dwhite5914 closed 7 years ago
Thank you for this feature @dwhite5914, it looks so good. I will check it as soon.
It's working perfectly, @dwhite5914 .
I think, in some cases, to dig object a bit might be handy. Just could you add a __z_offset__ property for tool shelf panel? Like this;
Property
bl_options = {'REGISTER', 'UNDO'}
z_offset = FloatProperty(name="Z Offset",
default=0.0, step=0.1, precision=3,
description="Z offset for center of object.")
def execute(self, context):
Adding
x, y, z = bpy.context.scene.cursor_location
z = obj.location.z - obj.dimensions.z / 2 + self.z_offset
bpy.context.scene.cursor_location = Vector((x, y, z))
@feedbackex Good thinking, I added the offset option. The only thing I changed was:
z = obj.location.z - obj.dimensions.z / 2 + self.z_offset
to
z = obj.location.z - obj.dimensions.z / 2 - self.z_offset
so that the z-offset aligns with the axis properly.
Let me know if you have any other recommendations and I'll add them.
That's fine @dwhite5914. As last thing, could you squash them into one commit before the merge?
@feedbackex All set, squashed into one commit and merged.
Convenience tool for quickly placing the origin at the base of an object (mesh, armature, or empty) and positioning the base of the object on top of the grid plane.