예제 #1
0
        //    Description:
        //        Write out the anim curve from the clipboard item into the
        //        stream. The position of the anim curve in the clipboard
        //        and the attribute to which it is attached is written out in this
        //        method.
        //
        //        This method returns true if the write was successful.
        //
        protected void writeAnim( ref StreamWriter clip, 
            MAnimCurveClipboardItem clipboardItem,
            bool placeHolder = false,
            bool nodeNames = false)
        {
            if (clip == null)
            {
                throw new ArgumentNullException( "clip" );
            }

            clip.Write(kAnim);

            //	If this is a clipboard place holder then there will be no full
            //	or leaf attribute names.
            //
            if (placeHolder)
            {
                clip.Write(kSpaceChar + clipboardItem.nodeName );
            }
            else
            {
                clip.Write(kSpaceChar + clipboardItem.fullAttributeName);

                if (nodeNames)
                {
                    clip.Write( kSpaceChar + clipboardItem.leafAttributeName);
                    clip.Write( kSpaceChar + clipboardItem.nodeName );
                }
            }

            uint rowCount = 0, childCount = 0, attrCount = 0;
            clipboardItem.getAddressingInfo(ref rowCount, ref childCount, ref attrCount);

            clip.Write( kSpaceChar);
            clip.Write(rowCount);
            clip.Write(kSpaceChar);
            clip.Write(childCount);
            clip.Write(kSpaceChar);
            clip.Write(attrCount);
            clip.Write(kSemiColonChar);
            clip.Write(Environment.NewLine);
        }
예제 #2
0
		protected void writeAnim( ref StreamWriter clip, 
							 MAnimCurveClipboardItem clipboardItem,
							bool placeHolder = false,
							bool nodeNames = false)
		//	Description:
		//		Write out the anim curve from the clipboard item into the 
		//		stream. The position of the anim curve in the clipboard
		//		and the attribute to which it is attached is written out in this
		//		method.
		//
		//		This method returns true if the write was successful.
		//
		{
			if (clip == null)
			{
				throw new ArgumentNullException( "clip" );
			}

			clip.Write(kAnim);

			//	If this is a clipboard place holder then there will be no full
			//	or leaf attribute names.
			//
			if (placeHolder)
			{
				clip.Write(kSpaceChar + clipboardItem.nodeName );
			} 
			else 
			{
				clip.Write(kSpaceChar + clipboardItem.fullAttributeName);

				if (nodeNames) 
				{
					clip.Write( kSpaceChar + clipboardItem.leafAttributeName);
					clip.Write( kSpaceChar + clipboardItem.nodeName );
				}
			}

			uint rowCount = 0, childCount = 0, attrCount = 0;
			clipboardItem.getAddressingInfo(ref rowCount, ref childCount, ref attrCount);

			clip.Write( kSpaceChar);
			clip.Write(rowCount);
			clip.Write(kSpaceChar);
			clip.Write(childCount);
			clip.Write(kSpaceChar);
			clip.Write(attrCount);
			clip.Write(kSemiColonChar);
			clip.Write(Environment.NewLine);
		}