Skip to content

Commit

Permalink
Bug fix: Cannot create cameras or Marker data when the load mode is '…
Browse files Browse the repository at this point in the history
…replace'. Issue #38.
  • Loading branch information
david-cattermole committed Oct 26, 2019
1 parent 54b4b4d commit 2934db7
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions python/mmSolver/tools/loadmarker/ui/loadmarker_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,30 @@ def apply(self):
)
self.progressBar.setValue(50)

if camera_text == const.NEW_CAMERA_VALUE:
cam = lib.create_new_camera()
else:
cam = camera_data
if mkr_grp_text == const.NEW_MARKER_GROUP_VALUE:
mkr_grp = lib.create_new_marker_group(cam)
else:
mkr_grp = mkr_grp_data
self.progressBar.setValue(60)

if load_mode == const.LOAD_MODE_NEW_VALUE:
if camera_text == const.NEW_CAMERA_VALUE:
cam = lib.create_new_camera()
else:
cam = camera_data
if mkr_grp_text == const.NEW_MARKER_GROUP_VALUE:
mkr_grp = lib.create_new_marker_group(cam)
else:
mkr_grp = mkr_grp_data
self.progressBar.setValue(60)
mayareadfile.create_nodes(
mkr_data_list,
cam=cam,
mkr_grp=mkr_grp,
with_bundles=True,
load_bundle_position=load_bnd_pos,
)
if load_mode == const.LOAD_MODE_REPLACE_VALUE:

elif load_mode == const.LOAD_MODE_REPLACE_VALUE:
self.progressBar.setValue(60)
mkr_list = lib.get_selected_markers()
mayareadfile.update_nodes(mkr_list, mkr_data_list)
else:
raise ValueError('Load mode is not valid: %r' % load_mode)

self.progressBar.setValue(99)
lib.trigger_maya_to_refresh()
Expand Down

0 comments on commit 2934db7

Please sign in to comment.