Skip to content

Instantly share code, notes, and snippets.

@Jerakin
Created September 27, 2023 19:40
Show Gist options
  • Save Jerakin/f7c2b082303beb48991c65d6d1606612 to your computer and use it in GitHub Desktop.
Save Jerakin/f7c2b082303beb48991c65d6d1606612 to your computer and use it in GitHub Desktop.
# https://blender.stackexchange.com/a/203990
bl_info = {
"name": "Lock View Rotation",
"blender": (3, 6, 4),
"category": "View",
}
import bpy
def draw_lock_rotation(self, context):
layout = self.layout
view = context.space_data
col = layout.column(align=True)
col.prop(view.region_3d, "lock_rotation", text="Lock View Rotation")
def register():
bpy.types.VIEW3D_PT_view3d_lock.append(draw_lock_rotation)
def unregister():
bpy.types.VIEW3D_PT_view3d_lock.remove(draw_lock_rotation)
if __name__ == "__main__":
register()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment