示例#1
0
 public override void OnAdd()
 {
     m_createConstraintData.CreateInitialState(Parent.name);
     AttachmentFrameTool = new ConstraintAttachmentFrameTool(new AttachmentPair[]
     {
         m_createConstraintData.AttachmentPair
     },
                                                             Parent);
     AttachmentFrameTool.ReferenceFrameTool.TransformHandleActive = false;
     // Enabling reference frame transform handle when select tool
     // is done. When connected frame tool parent is set (first) we
     // still activate the reference frame transform handle since
     // this is the default behavior.
     AttachmentFrameTool.ReferenceFrameTool.OnToolDoneCallback = tool =>
     {
         AttachmentFrameTool.ReferenceFrameTool.TransformHandleActive = true;
     };
     AttachmentFrameTool.ConnectedFrameTool.OnToolDoneCallback = tool =>
     {
         AttachmentFrameTool.ReferenceFrameTool.TransformHandleActive = true;
     };
 }
 public override void OnAdd()
 {
     m_createConstraintData.CreateInitialState(Parent.name);
     AttachmentFrameTool = new ConstraintAttachmentFrameTool(m_createConstraintData.AttachmentPair, Parent);
 }
示例#3
0
 public override void OnAdd()
 {
     ConstraintAttachmentFrameTool = new ConstraintAttachmentFrameTool(GetTargets <Constraint>().Select(constraint => constraint.AttachmentPair).ToArray());
     AddChild(ConstraintAttachmentFrameTool);
 }