@@ -50,55 +50,6 @@ These documents contain the authoritative information about the project. Always
5050- Follow snake_case naming convention
5151- Keep code compatible with Python 3.8+
5252
53- ### PDM System Patterns
54-
55- When working with PDM (Project Data Model) objects:
56-
57- 1 . ** Field Access** : Always use ` () ` to access field values:
58- ``` cpp
59- // Correct
60- QString name = m_myTextField();
61-
62- // Incorrect
63- QString name = m_myTextField;
64- ```
65-
66- 2 . ** Scriptable Fields** : Use scriptable initialization for Python API:
67- ``` cpp
68- CAF_PDM_InitScriptableField (&m_fieldName, "FieldName", defaultValue, "Display Name");
69- ```
70-
71- 3. **UI Attributes**: Use modern `setAttribute` pattern:
72- ```cpp
73- m_field.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::ADJUST_WIDTH_TO_CONTENTS, true );
74- ```
75-
76- ### Common Patterns
77-
78- #### Adding a new PDM field
79- ``` cpp
80- // In header (.h)
81- caf::PdmField<QString> m_myField;
82-
83- // In source (.cpp) constructor
84- CAF_PDM_InitScriptableField (&m_myField, "MyField", QString(), "Display Name");
85- ```
86-
87- #### Field validation
88- ```cpp
89- m_percentage.setRange(0.0, 100.0);
90- m_count.setMinValue(0);
91- m_value.setMaxValue(1000);
92- ```
93-
94- #### GRPC method integration
95- ``` cpp
96- QString RimcClassName_method::classKeywordReturnedType () const
97- {
98- return RimTargetClass::classKeywordStatic();
99- }
100- ```
101-
10253## When to Stop and Ask
10354
10455If you encounter any of these situations, stop and ask the developer:
0 commit comments