Always keep an active VR pose bookmark (as fallback)
This commit is contained in:
parent
6cbec3e789
commit
52d383c574
|
@ -252,9 +252,12 @@ class VIEW3D_OT_vr_pose_bookmark_remove(bpy.types.Operator):
|
|||
def execute(self, context):
|
||||
wm = context.window_manager
|
||||
bookmarks = wm.vr_pose_bookmarks
|
||||
bookmark_active_idx = wm.vr_pose_bookmarks_active
|
||||
|
||||
bookmarks.remove(bookmark_active_idx)
|
||||
if len(bookmarks) > 1:
|
||||
bookmark_active_idx = wm.vr_pose_bookmarks_active
|
||||
bookmarks.remove(bookmark_active_idx)
|
||||
|
||||
wm.vr_pose_bookmarks_active -= 1
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
@ -453,6 +456,12 @@ def register():
|
|||
name="Show Virtual Camera"
|
||||
)
|
||||
|
||||
# Ensure there's a default bookmark (scene camera by default).
|
||||
bookmarks = bpy.context.window_manager.vr_pose_bookmarks
|
||||
if len(bookmarks) == 0:
|
||||
bookmarks.add()
|
||||
bookmarks[0].type = 'SCENE_CAMERA'
|
||||
|
||||
|
||||
def unregister():
|
||||
for cls in classes:
|
||||
|
|
Loading…
Reference in New Issue