Skip to content

Commit 15db82c

Browse files
committed
We now select top node instead of clip node
1 parent 351c8b8 commit 15db82c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

mocap_clipper/mocap_clipper_dcc_core.py

+4
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ def match_attribute_values_between_frames(self, controls, src_frame, tgt_frame):
334334
def select_node(self, node):
335335
self.log_missing_implementation(self.select_node)
336336

337+
def select_mocap_top_nodes(self, namespaces):
338+
self.log_missing_implementation(self.select_mocap_top_nodes)
339+
340+
337341
def set_attr(self, node, attr_name, value):
338342
self.log_missing_implementation(self.set_attr)
339343

mocap_clipper/mocap_clipper_dcc_maya.py

+9
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ def get_clip_data(self, te_clip):
9999
def select_node(self, node):
100100
pm.select(node)
101101

102+
def select_mocap_top_nodes(self, namespaces):
103+
select_nodes = []
104+
for namespace in namespaces:
105+
mocap_top_name = "{}:{}".format(namespace, k.SceneConstants.mocap_top_node_name)
106+
if pm.objExists(mocap_top_name):
107+
select_nodes.append(mocap_top_name)
108+
109+
pm.select(select_nodes, replace=True)
110+
102111
def get_attr(self, node, attr_name, default=None):
103112
if node.hasAttr(attr_name):
104113
attr_val = node.getAttr(attr_name)

mocap_clipper/mocap_clipper_ui.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,6 @@ def ui_update_clip_display_info(self):
366366
if clip_node:
367367
log.debug("Parsing data from: {}".format(clip_node))
368368

369-
mcs.dcc.select_node(clip_node)
370-
371369
self.ui.start_pose_CHK.setChecked(active_cd.start_pose_enabled)
372370
self.ui.end_pose_CHK.setChecked(active_cd.end_pose_enabled)
373371
self.ui.pose_match_CHK.setChecked(active_cd.pose_match)
@@ -407,6 +405,7 @@ def ui_update_clip_display_info(self):
407405

408406
# re-enable the selected mocap
409407
[mcs.dcc.set_mocap_visibility(ns, True) for ns in namespaces_to_show]
408+
mcs.dcc.select_mocap_top_nodes(namespaces_to_show)
410409

411410
if self.ui.set_time_range_from_selection_CHK.isChecked():
412411
start_frame = min(*start_frames) if len(start_frames) > 1 else start_frames[0]

0 commit comments

Comments
 (0)