Skip to content

Commit 0e956b0

Browse files
authored
Added bake on selected controls checkbox (#3)
1 parent ff1dd7c commit 0e956b0

5 files changed

+23
-1
lines changed

mocap_clipper/mocap_clipper_constants.py

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def __init__(self):
6161
self.run_euler_filter = False
6262
self.set_time_range = False
6363
self.run_adjustment_blend = False
64+
self.bake_selected = False
6465
self.save_clip = False
6566

6667
self.target_rig = None

mocap_clipper/mocap_clipper_dcc_core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_pose_files(self):
5858
self.log_missing_implementation(self.get_pose_files)
5959
return FAKE_DATA.get("pose_files") # list of paths
6060

61-
def bake_to_rig(self, mocap_ns, rig_name, start_frame, end_frame):
61+
def bake_to_rig(self, mocap_ns, rig_name, start_frame, end_frame, bake_selected=False):
6262
self.log_missing_implementation(self.bake_to_rig)
6363
return [] # rig controls, gets sent to rebuild_pose_anim_layer
6464

@@ -176,6 +176,7 @@ def main_bake_function(self, clip_data, bake_config):
176176
rig_name=rig_name,
177177
start_frame=start_frame,
178178
end_frame=end_frame,
179+
bake_selected=bake_config.bake_selected,
179180
)
180181

181182
if bake_config.run_euler_filter:

mocap_clipper/mocap_clipper_ui.py

+1
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ def bake_to_rig(self):
563563
bake_config.run_euler_filter = self.ui.euler_filter_CHK.isChecked()
564564
bake_config.set_time_range = self.ui.set_time_range_CHK.isChecked()
565565
bake_config.run_adjustment_blend = self.ui.adjustment_blend_CHK.isChecked()
566+
bake_config.bake_selected = self.ui.bake_on_selected_ctrl_CHK.isChecked()
566567
bake_config.save_clip = self.ui.save_clip_CHK.isChecked()
567568

568569
bake_config.target_rig = self.get_active_rig()

mocap_clipper/ui/mocap_clipper_widget.py

+9
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ def setupUi(self, MocapClipperWidget):
418418

419419
self.bake_configs.addWidget(self.adjustment_blend_CHK)
420420

421+
self.bake_on_selected_ctrl_CHK = QCheckBox(self.bake_configuration_widget)
422+
self.bake_on_selected_ctrl_CHK.setObjectName(u"bake_on_selected_ctrl_CHK")
423+
424+
self.bake_configs.addWidget(self.bake_on_selected_ctrl_CHK)
425+
421426
self.horizontalLayout_6 = QHBoxLayout()
422427
self.horizontalLayout_6.setSpacing(2)
423428
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
@@ -575,6 +580,10 @@ def retranslateUi(self, MocapClipperWidget):
575580
self.adjustment_blend_CHK.setToolTip(QCoreApplication.translate("MocapClipperWidget", u"Blend the Start and End pose layer using the intensity of the base animation", None))
576581
#endif // QT_CONFIG(tooltip)
577582
self.adjustment_blend_CHK.setText(QCoreApplication.translate("MocapClipperWidget", u"Run Adjustment Blend", None))
583+
#if QT_CONFIG(tooltip)
584+
self.bake_on_selected_ctrl_CHK.setToolTip(QCoreApplication.translate("MocapClipperWidget", u"Bake only selected controls", None))
585+
#endif // QT_CONFIG(tooltip)
586+
self.bake_on_selected_ctrl_CHK.setText(QCoreApplication.translate("MocapClipperWidget", u"Bake On Selected Controls", None))
578587
#if QT_CONFIG(tooltip)
579588
self.save_clip_CHK.setToolTip(QCoreApplication.translate("MocapClipperWidget", u"Enable this to automatically save the clip into the selected folder", None))
580589
#endif // QT_CONFIG(tooltip)

mocap_clipper/ui/mocap_clipper_widget.ui

+10
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,16 @@
701701
</property>
702702
</widget>
703703
</item>
704+
<item>
705+
<widget class="QCheckBox" name="bake_on_selected_ctrl_CHK">
706+
<property name="toolTip">
707+
<string>Bake only selected controls</string>
708+
</property>
709+
<property name="text">
710+
<string>Bake On Selected Controls</string>
711+
</property>
712+
</widget>
713+
</item>
704714
<item>
705715
<layout class="QHBoxLayout" name="horizontalLayout_6">
706716
<property name="spacing">

0 commit comments

Comments
 (0)