NodeParametersWindow.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. using UnityEngine;
  4. using UnityEditor;
  5. using System.Collections.Generic;
  6. using UnityEditorInternal;
  7. namespace AmplifyShaderEditor
  8. {
  9. public sealed class NodeParametersWindow : MenuParent
  10. {
  11. private int m_lastSelectedNode = -1;
  12. private const string TitleStr = "Node Properties";
  13. private GUIStyle m_nodePropertiesStyle;
  14. private GUIContent m_dummyContent = new GUIContent();
  15. private GUIStyle m_propertyAdjustment;
  16. private ReorderableList m_functionInputsReordableList = null;
  17. private int m_functionInputsLastCount = 0;
  18. private ReorderableList m_functionSwitchesReordableList = null;
  19. private int m_functionSwitchesLastCount = 0;
  20. private ReorderableList m_functionOutputsReordableList = null;
  21. private int m_functionOutputsLastCount = 0;
  22. private ReorderableList m_propertyReordableList = null;
  23. private int m_lastCount = 0;
  24. private bool m_forceUpdate = false;
  25. [SerializeField]
  26. private List<PropertyNode> m_propertyReordableNodes = new List<PropertyNode>();
  27. // width and height are between [0,1] and represent a percentage of the total screen area
  28. public NodeParametersWindow( AmplifyShaderEditorWindow parentWindow ) : base( parentWindow, 0, 0, 285, 0, string.Empty, MenuAnchor.TOP_LEFT, MenuAutoSize.MATCH_VERTICAL )
  29. {
  30. SetMinimizedArea( -225, 0, 260, 0 );
  31. }
  32. public void OnShaderFunctionLoad()
  33. {
  34. m_functionInputsReordableList = null;
  35. m_functionSwitchesReordableList = null;
  36. m_functionOutputsReordableList = null;
  37. }
  38. public bool Draw( Rect parentPosition, ParentNode selectedNode, Vector2 mousePosition, int mouseButtonId, bool hasKeyboardFocus )
  39. {
  40. bool changeCheck = false;
  41. base.Draw( parentPosition, mousePosition, mouseButtonId, hasKeyboardFocus );
  42. if ( m_nodePropertiesStyle == null )
  43. {
  44. m_nodePropertiesStyle = UIUtils.GetCustomStyle( CustomStyle.NodePropertiesTitle );
  45. m_nodePropertiesStyle.normal.textColor = m_nodePropertiesStyle.active.textColor = EditorGUIUtility.isProSkin ? new Color( 1f, 1f, 1f ) : new Color( 0f, 0f, 0f );
  46. }
  47. if ( m_isMaximized )
  48. {
  49. KeyCode key = Event.current.keyCode;
  50. if ( m_isMouseInside || hasKeyboardFocus )
  51. {
  52. if ( key == ShortcutsManager.ScrollUpKey )
  53. {
  54. m_currentScrollPos.y -= 10;
  55. if ( m_currentScrollPos.y < 0 )
  56. {
  57. m_currentScrollPos.y = 0;
  58. }
  59. Event.current.Use();
  60. }
  61. if ( key == ShortcutsManager.ScrollDownKey )
  62. {
  63. m_currentScrollPos.y += 10;
  64. Event.current.Use();
  65. }
  66. }
  67. if( m_forceUpdate )
  68. {
  69. if( m_propertyReordableList != null )
  70. m_propertyReordableList.ReleaseKeyboardFocus();
  71. m_propertyReordableList = null;
  72. if ( m_functionInputsReordableList != null )
  73. m_functionInputsReordableList.ReleaseKeyboardFocus();
  74. m_functionInputsReordableList = null;
  75. if( m_functionSwitchesReordableList != null )
  76. m_functionSwitchesReordableList.ReleaseKeyboardFocus();
  77. m_functionSwitchesReordableList = null;
  78. if ( m_functionOutputsReordableList != null )
  79. m_functionOutputsReordableList.ReleaseKeyboardFocus();
  80. m_functionOutputsReordableList = null;
  81. m_forceUpdate = false;
  82. }
  83. GUILayout.BeginArea( m_transformedArea, m_content, m_style );
  84. {
  85. //Draw selected node parameters
  86. if ( selectedNode != null )
  87. {
  88. // this hack is need because without it the several FloatFields/Textfields/... would show wrong values ( different from the ones they were assigned to show )
  89. if ( m_lastSelectedNode != selectedNode.UniqueId )
  90. {
  91. m_lastSelectedNode = selectedNode.UniqueId;
  92. GUI.FocusControl( "" );
  93. }
  94. EditorGUILayout.BeginVertical();
  95. {
  96. EditorGUILayout.Separator();
  97. if ( selectedNode.UniqueId == ParentWindow.CurrentGraph.CurrentMasterNodeId )
  98. {
  99. m_dummyContent.text = "Output Node";
  100. }
  101. else
  102. {
  103. if ( selectedNode.Attributes != null )
  104. {
  105. m_dummyContent.text = selectedNode.Attributes.Name;
  106. }
  107. else if ( selectedNode is CommentaryNode )
  108. {
  109. m_dummyContent.text = "Commentary";
  110. }
  111. else
  112. {
  113. m_dummyContent.text = TitleStr;
  114. }
  115. }
  116. EditorGUILayout.LabelField( m_dummyContent, m_nodePropertiesStyle );
  117. EditorGUILayout.Separator();
  118. //UIUtils.RecordObject( selectedNode , "Changing properties on node " + selectedNode.UniqueId);
  119. m_currentScrollPos = EditorGUILayout.BeginScrollView( m_currentScrollPos, GUILayout.Width( 0 ), GUILayout.Height( 0 ) );
  120. float labelWidth = EditorGUIUtility.labelWidth;
  121. //if( selectedNode.TextLabelWidth > 0 )
  122. // EditorGUIUtility.labelWidth = selectedNode.TextLabelWidth;
  123. //else
  124. EditorGUIUtility.labelWidth = TransformedArea.width * 0.42f;
  125. changeCheck = selectedNode.SafeDrawProperties();
  126. EditorGUIUtility.labelWidth = labelWidth;
  127. EditorGUILayout.EndScrollView();
  128. }
  129. EditorGUILayout.EndVertical();
  130. if ( changeCheck )
  131. {
  132. if ( selectedNode.ConnStatus == NodeConnectionStatus.Connected )
  133. ParentWindow.SetSaveIsDirty();
  134. }
  135. }
  136. else
  137. {
  138. //Draw Graph Params
  139. EditorGUILayout.BeginVertical();
  140. {
  141. EditorGUILayout.Separator();
  142. EditorGUILayout.LabelField( "Graph Properties", m_nodePropertiesStyle );
  143. EditorGUILayout.Separator();
  144. m_currentScrollPos = EditorGUILayout.BeginScrollView( m_currentScrollPos, GUILayout.Width( 0 ), GUILayout.Height( 0 ) );
  145. float labelWidth = EditorGUIUtility.labelWidth;
  146. EditorGUIUtility.labelWidth = 90;
  147. bool generalIsVisible = m_parentWindow.InnerWindowVariables.ExpandedGeneralShaderOptions;
  148. NodeUtils.DrawPropertyGroup( ref generalIsVisible, " General", DrawGeneralFunction );
  149. m_parentWindow.InnerWindowVariables.ExpandedGeneralShaderOptions = generalIsVisible;
  150. AmplifyShaderFunction function = ParentWindow.CurrentGraph.CurrentShaderFunction;
  151. if( function != null )
  152. {
  153. //function.AdditionalIncludes.Draw( ParentWindow.CurrentGraph.CurrentOutputNode );
  154. //function.AdditionalPragmas.Draw( ParentWindow.CurrentGraph.CurrentOutputNode );
  155. function.AdditionalDirectives.Draw( ParentWindow.CurrentGraph.CurrentOutputNode );
  156. }
  157. bool inputIsVisible = m_parentWindow.InnerWindowVariables.ExpandedFunctionInputs;
  158. NodeUtils.DrawPropertyGroup( ref inputIsVisible, " Function Inputs", DrawFunctionInputs );
  159. m_parentWindow.InnerWindowVariables.ExpandedFunctionInputs = inputIsVisible;
  160. bool swicthIsVisible = m_parentWindow.InnerWindowVariables.ExpandedFunctionSwitches;
  161. NodeUtils.DrawPropertyGroup( ref swicthIsVisible, " Function Switches", DrawFunctionSwitches );
  162. m_parentWindow.InnerWindowVariables.ExpandedFunctionSwitches = swicthIsVisible;
  163. bool outputIsVisible = m_parentWindow.InnerWindowVariables.ExpandedFunctionOutputs;
  164. NodeUtils.DrawPropertyGroup( ref outputIsVisible, " Function Outputs", DrawFunctionOutputs );
  165. m_parentWindow.InnerWindowVariables.ExpandedFunctionOutputs = outputIsVisible;
  166. bool properties = ParentWindow.InnerWindowVariables.ExpandedProperties;
  167. NodeUtils.DrawPropertyGroup( ref properties, " Material Properties", DrawFunctionProperties );
  168. ParentWindow.InnerWindowVariables.ExpandedProperties = properties;
  169. EditorGUIUtility.labelWidth = labelWidth;
  170. EditorGUILayout.EndScrollView();
  171. }
  172. EditorGUILayout.EndVertical();
  173. }
  174. }
  175. // Close window area
  176. GUILayout.EndArea();
  177. }
  178. PostDraw();
  179. return changeCheck;
  180. }
  181. public void DrawGeneralFunction()
  182. {
  183. AmplifyShaderFunction function = ParentWindow.CurrentGraph.CurrentShaderFunction;
  184. if ( function == null )
  185. return;
  186. float cacheWidth = EditorGUIUtility.labelWidth;
  187. EditorGUIUtility.labelWidth = 115;
  188. SerializedObject serializedObject = new UnityEditor.SerializedObject( function );
  189. if ( serializedObject != null )
  190. {
  191. SerializedProperty temo = serializedObject.FindProperty( "m_description" );
  192. EditorGUILayout.PropertyField( temo, new GUIContent( " Description" ) );
  193. SerializedProperty url = serializedObject.FindProperty( "m_url" );
  194. EditorGUILayout.PropertyField( url , new GUIContent( "Custom URL" ) );
  195. SerializedProperty cat = serializedObject.FindProperty( "m_nodeCategory" );
  196. SerializedProperty ppos = serializedObject.FindProperty( "m_previewPosition" );
  197. EditorGUILayout.PropertyField( ppos, new GUIContent( "Preview Position" ) );
  198. cat.intValue = ParentWindow.CurrentGraph.CurrentOutputNode.EditorGUILayoutPopup( "Category", cat.intValue, UIUtils.CategoryPresets );
  199. if( cat.enumValueIndex == 0 )
  200. {
  201. SerializedProperty custCat = serializedObject.FindProperty( "m_customNodeCategory" );
  202. EditorGUILayout.PropertyField( custCat, new GUIContent( "Custom" ) );
  203. }
  204. SerializedProperty hidden = serializedObject.FindProperty( "m_hidden" );
  205. EditorGUILayout.PropertyField( hidden, new GUIContent( "Hidden" ) );
  206. SerializedProperty customHeader = serializedObject.FindProperty( "m_headerStyle" );
  207. EditorGUILayout.PropertyField( customHeader, new GUIContent( "Header Style" ) );
  208. if ( customHeader.intValue == ( int )AmplifyShaderFunction.HeaderStyle.Custom )
  209. {
  210. SerializedProperty headerColor = serializedObject.FindProperty( "m_headerColor" );
  211. EditorGUILayout.PropertyField( headerColor, new GUIContent( "Header Color" ) );
  212. }
  213. serializedObject.ApplyModifiedProperties();
  214. }
  215. EditorGUIUtility.labelWidth = cacheWidth;
  216. }
  217. public void DrawFunctionInputs()
  218. {
  219. List<FunctionInput> functionInputNodes = UIUtils.FunctionInputList();
  220. if ( m_functionInputsReordableList == null || functionInputNodes.Count != m_functionInputsLastCount )
  221. {
  222. functionInputNodes.Sort( ( x, y ) => { return x.OrderIndex.CompareTo( y.OrderIndex ); } );
  223. m_functionInputsReordableList = new ReorderableList( functionInputNodes, typeof( FunctionInput ), true, false, false, false );
  224. m_functionInputsReordableList.headerHeight = 0;
  225. m_functionInputsReordableList.footerHeight = 0;
  226. m_functionInputsReordableList.showDefaultBackground = false;
  227. m_functionInputsReordableList.drawElementCallback = ( Rect rect, int index, bool isActive, bool isFocused ) =>
  228. {
  229. EditorGUI.LabelField( rect, functionInputNodes[ index ].InputName );
  230. };
  231. m_functionInputsReordableList.onChangedCallback = ( list ) =>
  232. {
  233. //for ( int i = 0; i < functionInputNodes.Count; i++ )
  234. //{
  235. // functionInputNodes[ i ].OrderIndex = i;
  236. //}
  237. ForceInputReorder( ref functionInputNodes );
  238. };
  239. m_functionInputsLastCount = m_functionInputsReordableList.count;
  240. }
  241. if ( m_functionInputsReordableList != null )
  242. {
  243. if ( m_propertyAdjustment == null )
  244. {
  245. m_propertyAdjustment = new GUIStyle();
  246. m_propertyAdjustment.padding.left = 17;
  247. }
  248. EditorGUILayout.BeginVertical( m_propertyAdjustment );
  249. m_functionInputsReordableList.DoLayoutList();
  250. EditorGUILayout.EndVertical();
  251. }
  252. }
  253. public void ForceInputReorder( ref List<FunctionInput> functionInputNodes )
  254. {
  255. for( int i = 0; i < functionInputNodes.Count; i++ )
  256. {
  257. functionInputNodes[ i ].OrderIndex = i;
  258. }
  259. }
  260. public void DrawFunctionSwitches()
  261. {
  262. List<FunctionSwitch> functionSwitchNodes = UIUtils.FunctionSwitchList();
  263. if( m_functionSwitchesReordableList == null || functionSwitchNodes.Count != m_functionSwitchesLastCount )
  264. {
  265. functionSwitchNodes.Sort( ( x, y ) => { return x.OrderIndex.CompareTo( y.OrderIndex ); } );
  266. UIUtils.UpdateFunctionSwitchArr();
  267. m_functionSwitchesReordableList = new ReorderableList( functionSwitchNodes, typeof( FunctionSwitch ), true, false, false, false );
  268. m_functionSwitchesReordableList.headerHeight = 0;
  269. m_functionSwitchesReordableList.footerHeight = 0;
  270. m_functionSwitchesReordableList.showDefaultBackground = false;
  271. m_functionSwitchesReordableList.drawElementCallback = ( Rect rect, int index, bool isActive, bool isFocused ) =>
  272. {
  273. EditorGUI.LabelField( rect, functionSwitchNodes[ index ].OptionLabel );
  274. };
  275. m_functionSwitchesReordableList.onChangedCallback = ( list ) =>
  276. {
  277. ForceSwitchesReorder(ref functionSwitchNodes );
  278. };
  279. m_functionSwitchesLastCount = m_functionSwitchesReordableList.count;
  280. }
  281. if( m_functionSwitchesReordableList != null )
  282. {
  283. if( m_propertyAdjustment == null )
  284. {
  285. m_propertyAdjustment = new GUIStyle();
  286. m_propertyAdjustment.padding.left = 17;
  287. }
  288. EditorGUILayout.BeginVertical( m_propertyAdjustment );
  289. m_functionSwitchesReordableList.DoLayoutList();
  290. EditorGUILayout.EndVertical();
  291. }
  292. }
  293. public void ForceSwitchesReorder( ref List<FunctionSwitch> functionSwitchNodes )
  294. {
  295. for( int i = 0; i < functionSwitchNodes.Count; i++ )
  296. {
  297. functionSwitchNodes[ i ].OrderIndex = i;
  298. }
  299. UIUtils.UpdateFunctionSwitchArr();
  300. }
  301. public void DrawFunctionOutputs()
  302. {
  303. List<FunctionOutput> functionOutputNodes = UIUtils.FunctionOutputList();
  304. if ( m_functionOutputsReordableList == null || functionOutputNodes.Count != m_functionOutputsLastCount )
  305. {
  306. functionOutputNodes.Sort( ( x, y ) => { return x.OrderIndex.CompareTo( y.OrderIndex ); } );
  307. m_functionOutputsReordableList = new ReorderableList( functionOutputNodes, typeof( FunctionOutput ), true, false, false, false );
  308. m_functionOutputsReordableList.headerHeight = 0;
  309. m_functionOutputsReordableList.footerHeight = 0;
  310. m_functionOutputsReordableList.showDefaultBackground = false;
  311. m_functionOutputsReordableList.drawElementCallback = ( Rect rect, int index, bool isActive, bool isFocused ) =>
  312. {
  313. EditorGUI.LabelField( rect, functionOutputNodes[ index ].OutputName );
  314. };
  315. m_functionOutputsReordableList.onChangedCallback = ( list ) =>
  316. {
  317. for ( int i = 0; i < functionOutputNodes.Count; i++ )
  318. {
  319. functionOutputNodes[ i ].OrderIndex = i;
  320. }
  321. };
  322. m_functionOutputsLastCount = m_functionOutputsReordableList.count;
  323. }
  324. if ( m_functionOutputsReordableList != null )
  325. {
  326. if ( m_propertyAdjustment == null )
  327. {
  328. m_propertyAdjustment = new GUIStyle();
  329. m_propertyAdjustment.padding.left = 17;
  330. }
  331. EditorGUILayout.BeginVertical( m_propertyAdjustment );
  332. m_functionOutputsReordableList.DoLayoutList();
  333. EditorGUILayout.EndVertical();
  334. }
  335. }
  336. private void RefreshVisibleList( ref List<PropertyNode> allNodes )
  337. {
  338. // temp reference for lambda expression
  339. List<PropertyNode> nodes = allNodes;
  340. m_propertyReordableNodes.Clear();
  341. for( int i = 0; i < nodes.Count; i++ )
  342. {
  343. ReordenatorNode rnode = nodes[ i ] as ReordenatorNode;
  344. if( ( rnode == null || !rnode.IsInside ) && ( !m_propertyReordableNodes.Exists( x => x.PropertyName.Equals( nodes[ i ].PropertyName ) ) ) )
  345. m_propertyReordableNodes.Add( nodes[ i ] );
  346. }
  347. m_propertyReordableNodes.Sort( ( x, y ) => { return x.OrderIndex.CompareTo( y.OrderIndex ); } );
  348. }
  349. public void DrawFunctionProperties()
  350. {
  351. List<PropertyNode> nodes = UIUtils.PropertyNodesList();
  352. if( nodes.Count != m_lastCount )
  353. {
  354. RefreshVisibleList( ref nodes );
  355. m_lastCount = nodes.Count;
  356. }
  357. if( m_propertyReordableList == null )
  358. {
  359. m_propertyReordableList = new ReorderableList( m_propertyReordableNodes, typeof( PropertyNode ), true, false, false, false )
  360. {
  361. headerHeight = 0,
  362. footerHeight = 0,
  363. showDefaultBackground = false,
  364. drawElementCallback = ( Rect rect, int index, bool isActive, bool isFocused ) =>
  365. {
  366. var first = rect;
  367. first.width *= 0.60f;
  368. EditorGUI.LabelField( first, m_propertyReordableNodes[ index ].PropertyInspectorName );
  369. var second = rect;
  370. second.width *= 0.4f;
  371. second.x += first.width;
  372. if( GUI.Button( second, m_propertyReordableNodes[ index ].PropertyName, new GUIStyle( "AssetLabel Partial" ) ) )
  373. {
  374. UIUtils.FocusOnNode( m_propertyReordableNodes[ index ], 1, false );
  375. }
  376. },
  377. onReorderCallback = ( list ) =>
  378. {
  379. ReorderList( ref nodes );
  380. }
  381. };
  382. ReorderList( ref nodes );
  383. }
  384. if( m_propertyReordableList != null )
  385. {
  386. if( m_propertyAdjustment == null )
  387. {
  388. m_propertyAdjustment = new GUIStyle();
  389. m_propertyAdjustment.padding.left = 17;
  390. }
  391. EditorGUILayout.BeginVertical( m_propertyAdjustment );
  392. m_propertyReordableList.DoLayoutList();
  393. EditorGUILayout.EndVertical();
  394. }
  395. }
  396. public void ForceReordering()
  397. {
  398. List<PropertyNode> nodes = UIUtils.PropertyNodesList();
  399. ReorderList( ref nodes );
  400. List<FunctionInput> functionInputNodes = UIUtils.FunctionInputList();
  401. ForceInputReorder( ref functionInputNodes );
  402. List<FunctionSwitch> functionSwitchNodes = UIUtils.FunctionSwitchList();
  403. ForceSwitchesReorder( ref functionSwitchNodes );
  404. //RecursiveLog();
  405. }
  406. private void RecursiveLog()
  407. {
  408. List<PropertyNode> nodes = UIUtils.PropertyNodesList();
  409. nodes.Sort( ( x, y ) => { return x.OrderIndex.CompareTo( y.OrderIndex ); } );
  410. for( int i = 0; i < nodes.Count; i++ )
  411. {
  412. if( ( nodes[ i ] is ReordenatorNode ) )
  413. ( nodes[ i ] as ReordenatorNode ).RecursiveLog();
  414. else
  415. Debug.Log( nodes[ i ].OrderIndex + " " + nodes[ i ].PropertyName );
  416. }
  417. }
  418. private void ReorderList( ref List<PropertyNode> nodes )
  419. {
  420. // clear lock list before reordering because of multiple sf being used
  421. for( int i = 0; i < nodes.Count; i++ )
  422. {
  423. ReordenatorNode rnode = nodes[ i ] as ReordenatorNode;
  424. if ( rnode != null )
  425. rnode.RecursiveClear();
  426. }
  427. int propoffset = 0;
  428. int count = 0;
  429. for ( int i = 0; i < m_propertyReordableNodes.Count; i++ )
  430. {
  431. ReordenatorNode renode = m_propertyReordableNodes[ i ] as ReordenatorNode;
  432. if ( renode != null )
  433. {
  434. if ( !renode.IsInside )
  435. {
  436. m_propertyReordableNodes[ i ].OrderIndex = count + propoffset;
  437. if ( renode.PropertyListCount > 0 )
  438. {
  439. propoffset += renode.RecursiveCount();
  440. // the same reordenator can exist multiple times, apply ordering to all of them
  441. for( int j = 0; j < nodes.Count; j++ )
  442. {
  443. ReordenatorNode pnode = ( nodes[ j ] as ReordenatorNode );
  444. if ( pnode != null && pnode.PropertyName.Equals( renode.PropertyName ) )
  445. {
  446. pnode.OrderIndex = renode.RawOrderIndex;
  447. pnode.RecursiveSetOrderOffset( renode.RawOrderIndex, true );
  448. }
  449. }
  450. }
  451. else
  452. {
  453. count++;
  454. }
  455. }
  456. else
  457. {
  458. m_propertyReordableNodes[ i ].OrderIndex = 0;
  459. }
  460. }
  461. else
  462. {
  463. m_propertyReordableNodes[ i ].OrderIndex = count + propoffset;
  464. count++;
  465. }
  466. }
  467. }
  468. public override void Destroy()
  469. {
  470. base.Destroy();
  471. m_functionInputsReordableList = null;
  472. m_functionOutputsReordableList = null;
  473. m_propertyReordableList = null;
  474. }
  475. public bool ForceUpdate
  476. {
  477. get { return m_forceUpdate; }
  478. set { m_forceUpdate = value; }
  479. }
  480. }
  481. }