@@ -139,25 +139,30 @@ bool attribute_has_complex_connection(MFnDependencyNode &depend_node,
139
139
bool is_writable = source_attr_fn.isWritable ();
140
140
if (is_readable && !is_writable) {
141
141
// This means the attribute is an 'output attribute'.
142
+ const MString source_node_name = source_node_fn.name ();
143
+ const MString source_attr_name = source_attr_fn.name ();
144
+ const MString node_name = depend_node.name ();
142
145
MMSOLVER_MAYA_WRN (
143
146
" MM Scene Graph: Complex attribute connection detected from "
144
- << " \" " << source_node_fn. name () .asChar () << " ."
145
- << source_attr_fn. name () .asChar () << " \" "
147
+ << " \" " << source_node_name .asChar () << " ."
148
+ << source_attr_name .asChar () << " \" "
146
149
<< " to "
147
- << " \" " << depend_node.name ().asChar () << " ." << name.asChar ()
148
- << " \" : "
150
+ << " \" " << node_name.asChar () << " ." << name.asChar () << " \" : "
149
151
<< " attr_is_readable=" << is_readable
150
152
<< " attr_is_writable=" << is_writable);
151
153
return true ;
152
154
}
153
155
154
156
// This means the attribute is an 'output attribute'.
157
+ const MString source_node_name = source_node_fn.name ();
158
+ const MString source_attr_name = source_attr_fn.name ();
159
+ const MString node_name = depend_node.name ();
155
160
MMSOLVER_MAYA_VRB (
156
161
" MM Scene Graph: No complex attribute connection detected from "
157
- << " \" " << source_node_fn. name (). asChar () << " ."
158
- << source_attr_fn. name (). asChar () << " \" "
162
+ << " \" " << source_node_name. asChar () << " ." << source_attr_name. asChar ()
163
+ << " \" "
159
164
<< " to "
160
- << " \" " << depend_node. name () .asChar () << " ." << name.asChar () << " \" : "
165
+ << " \" " << node_name .asChar () << " ." << name.asChar () << " \" : "
161
166
<< " attr_is_readable=" << is_readable
162
167
<< " attr_is_writable=" << is_writable);
163
168
@@ -568,26 +573,29 @@ MStatus check_transform_node(MDagPath &dag_path) {
568
573
CHECK_MSTATUS_AND_RETURN_IT (status);
569
574
if (!path_valid) {
570
575
status = MS::kFailure ;
576
+ const MString node_name = dag_path.fullPathName ();
571
577
MMSOLVER_MAYA_WRN (" MM Scene Graph: Invalid DAG path: "
572
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
578
+ << " \" " << node_name .asChar () << " \" " );
573
579
CHECK_MSTATUS_AND_RETURN_IT (status);
574
580
}
575
581
576
582
auto is_instanced = dag_path.isInstanced (&status);
577
583
CHECK_MSTATUS_AND_RETURN_IT (status);
578
584
if (is_instanced) {
579
585
status = MS::kFailure ;
586
+ const MString node_name = dag_path.fullPathName ();
580
587
MMSOLVER_MAYA_WRN (" MM Scene Graph: No support for instanced nodes: "
581
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
588
+ << " \" " << node_name .asChar () << " \" " );
582
589
CHECK_MSTATUS_AND_RETURN_IT (status);
583
590
}
584
591
585
592
MObject node_mobject = dag_path.node (&status);
586
593
CHECK_MSTATUS_AND_RETURN_IT (status);
587
594
if (node_mobject.isNull ()) {
588
595
status = MS::kFailure ;
596
+ const MString node_name = dag_path.fullPathName ();
589
597
MMSOLVER_MAYA_WRN (" MM Scene Graph: Invalid node MObject: "
590
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
598
+ << " \" " << node_name .asChar () << " \" " );
591
599
CHECK_MSTATUS_AND_RETURN_IT (status);
592
600
}
593
601
@@ -597,9 +605,10 @@ MStatus check_transform_node(MDagPath &dag_path) {
597
605
CHECK_MSTATUS_AND_RETURN_IT (status);
598
606
if (!is_zero (scale_pivot)) {
599
607
status = MS::kFailure ;
608
+ const MString node_name = dag_path.fullPathName ();
600
609
MMSOLVER_MAYA_WRN (
601
610
" MM Scene Graph: No support for non-zero scale pivot: "
602
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
611
+ << " \" " << node_name .asChar () << " \" " );
603
612
CHECK_MSTATUS_AND_RETURN_IT (status);
604
613
}
605
614
@@ -608,9 +617,10 @@ MStatus check_transform_node(MDagPath &dag_path) {
608
617
CHECK_MSTATUS_AND_RETURN_IT (status);
609
618
if (!is_zero (scale_pivot_translation)) {
610
619
status = MS::kFailure ;
620
+ const MString node_name = dag_path.fullPathName ();
611
621
MMSOLVER_MAYA_WRN (
612
622
" MM Scene Graph: No support for non-zero scale pivot translation: "
613
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
623
+ << " \" " << node_name .asChar () << " \" " );
614
624
CHECK_MSTATUS_AND_RETURN_IT (status);
615
625
}
616
626
@@ -619,9 +629,10 @@ MStatus check_transform_node(MDagPath &dag_path) {
619
629
CHECK_MSTATUS_AND_RETURN_IT (status);
620
630
if (!is_zero (rotate_pivot)) {
621
631
status = MS::kFailure ;
632
+ const MString node_name = dag_path.fullPathName ();
622
633
MMSOLVER_MAYA_WRN (
623
634
" MM Scene Graph: No support for non-zero rotate pivot: "
624
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
635
+ << " \" " << node_name .asChar () << " \" " );
625
636
CHECK_MSTATUS_AND_RETURN_IT (status);
626
637
}
627
638
@@ -630,10 +641,11 @@ MStatus check_transform_node(MDagPath &dag_path) {
630
641
CHECK_MSTATUS_AND_RETURN_IT (status);
631
642
if (!is_zero (rotate_pivot_translation)) {
632
643
status = MS::kFailure ;
644
+ const MString node_name = dag_path.fullPathName ();
633
645
MMSOLVER_MAYA_WRN (
634
646
" MM Scene Graph: No support for non-zero rotate pivot "
635
647
" translation\" : "
636
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
648
+ << " \" " << node_name .asChar () << " \" " );
637
649
CHECK_MSTATUS_AND_RETURN_IT (status);
638
650
}
639
651
@@ -642,89 +654,98 @@ MStatus check_transform_node(MDagPath &dag_path) {
642
654
auto tx_has_conn = attribute_has_complex_connection (dg_node, tx_attr_name);
643
655
if (tx_has_conn) {
644
656
status = MS::kFailure ;
657
+ const MString node_name = dag_path.fullPathName ();
645
658
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
646
659
<< " \" " << tx_attr_name.asChar () << " \" : "
647
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
660
+ << " \" " << node_name .asChar () << " \" " );
648
661
CHECK_MSTATUS_AND_RETURN_IT (status);
649
662
}
650
663
651
664
auto ty_attr_name = MString (" translateY" );
652
665
auto ty_has_conn = attribute_has_complex_connection (dg_node, ty_attr_name);
653
666
if (ty_has_conn) {
654
667
status = MS::kFailure ;
668
+ const MString node_name = dag_path.fullPathName ();
655
669
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
656
670
<< " \" " << ty_attr_name.asChar () << " \" : "
657
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
671
+ << " \" " << node_name .asChar () << " \" " );
658
672
CHECK_MSTATUS_AND_RETURN_IT (status);
659
673
}
660
674
661
675
auto tz_attr_name = MString (" translateZ" );
662
676
auto tz_has_conn = attribute_has_complex_connection (dg_node, tz_attr_name);
663
677
if (tz_has_conn) {
664
678
status = MS::kFailure ;
679
+ const MString node_name = dag_path.fullPathName ();
665
680
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
666
681
<< " \" " << tz_attr_name.asChar () << " \" : "
667
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
682
+ << " \" " << node_name .asChar () << " \" " );
668
683
CHECK_MSTATUS_AND_RETURN_IT (status);
669
684
}
670
685
671
686
auto rx_attr_name = MString (" rotateX" );
672
687
auto rx_has_conn = attribute_has_complex_connection (dg_node, rx_attr_name);
673
688
if (rx_has_conn) {
674
689
status = MS::kFailure ;
690
+ const MString node_name = dag_path.fullPathName ();
675
691
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
676
692
<< " \" " << rx_attr_name.asChar () << " \" : "
677
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
693
+ << " \" " << node_name .asChar () << " \" " );
678
694
CHECK_MSTATUS_AND_RETURN_IT (status);
679
695
}
680
696
681
697
auto ry_attr_name = MString (" rotateY" );
682
698
auto ry_has_conn = attribute_has_complex_connection (dg_node, ry_attr_name);
683
699
if (ry_has_conn) {
684
700
status = MS::kFailure ;
701
+ const MString node_name = dag_path.fullPathName ();
685
702
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
686
703
<< " \" " << ry_attr_name.asChar () << " \" : "
687
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
704
+ << " \" " << node_name .asChar () << " \" " );
688
705
CHECK_MSTATUS_AND_RETURN_IT (status);
689
706
}
690
707
691
708
auto rz_attr_name = MString (" rotateZ" );
692
709
auto rz_has_conn = attribute_has_complex_connection (dg_node, rz_attr_name);
693
710
if (rz_has_conn) {
694
711
status = MS::kFailure ;
712
+ const MString node_name = dag_path.fullPathName ();
695
713
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
696
714
<< " \" " << rz_attr_name.asChar () << " \" : "
697
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
715
+ << " \" " << node_name .asChar () << " \" " );
698
716
CHECK_MSTATUS_AND_RETURN_IT (status);
699
717
}
700
718
701
719
auto sx_attr_name = MString (" scaleX" );
702
720
auto sx_has_conn = attribute_has_complex_connection (dg_node, sx_attr_name);
703
721
if (sx_has_conn) {
704
722
status = MS::kFailure ;
723
+ const MString node_name = dag_path.fullPathName ();
705
724
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
706
725
<< " \" " << sx_attr_name.asChar () << " \" : "
707
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
726
+ << " \" " << node_name .asChar () << " \" " );
708
727
CHECK_MSTATUS_AND_RETURN_IT (status);
709
728
}
710
729
711
730
auto sy_attr_name = MString (" scaleY" );
712
731
auto sy_has_conn = attribute_has_complex_connection (dg_node, sy_attr_name);
713
732
if (sy_has_conn) {
714
733
status = MS::kFailure ;
734
+ const MString node_name = dag_path.fullPathName ();
715
735
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
716
736
<< " \" " << sy_attr_name.asChar () << " \" : "
717
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
737
+ << " \" " << node_name .asChar () << " \" " );
718
738
CHECK_MSTATUS_AND_RETURN_IT (status);
719
739
}
720
740
721
741
auto sz_attr_name = MString (" scaleZ" );
722
742
auto sz_has_conn = attribute_has_complex_connection (dg_node, sz_attr_name);
723
743
if (sz_has_conn) {
724
744
status = MS::kFailure ;
745
+ const MString node_name = dag_path.fullPathName ();
725
746
MMSOLVER_MAYA_WRN (" MM Scene Graph: Unsupported attribute connection on "
726
747
<< " \" " << sz_attr_name.asChar () << " \" : "
727
- << " \" " << dag_path. fullPathName () .asChar () << " \" " );
748
+ << " \" " << node_name .asChar () << " \" " );
728
749
CHECK_MSTATUS_AND_RETURN_IT (status);
729
750
}
730
751
0 commit comments