2626from src .editors .smartprop_editor .property .set_variable import PropertyVariableValue
2727from src .editors .smartprop_editor .property .comment import PropertyComment
2828from src .editors .smartprop_editor .property .reference import PropertyReference
29+ from src .editors .smartprop_editor .property .warning import PropertyWarning
2930from PySide6 .QtGui import QCursor
3031from src .widgets import HierarchyItemModel
3132import uuid
@@ -71,27 +72,27 @@ class PropertyFrame(QWidget):
7172 'RandomOffset' : ['m_bEnabled' , 'm_vRandomPositionMin' , 'm_vRandomPositionMax' , 'm_vSnapIncrement' ],
7273 'RandomScale' : ['m_bEnabled' , 'm_flRandomScaleMin' , 'm_flRandomScaleMax' , 'm_flSnapIncrement' ],
7374 'RandomRotation' : ['m_bEnabled' , 'm_vRandomRotationMin' , 'm_vRandomRotationMax' , 'm_vSnapIncrement' ],
74- 'RandomColorTintColor' : ['m_bEnabled' , 'm_SelectionMode' , 'm_ColorPosition' , 'm_Mode' ],
75+ 'RandomColorTintColor' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_SelectionMode' , 'm_Color ' , 'm_ColorPosition' , 'm_Mode' ],
7576 'CreateSizer' : ['m_bEnabled' , 'm_Name' , 'm_bDisplayModel' ],
7677 'CreateRotator' : ['m_bEnabled' , 'm_Name' , 'm_vOffset' , 'm_vRotationAxis' , 'm_CoordinateSpace' , 'm_flDisplayRadius' , 'm_DisplayColor' , 'm_bApplyToCurrentTransform' , 'm_flSnappingIncrement' , 'm_flInitialAngle' , 'm_bEnforceLimits' , 'm_flMinAngle' , 'm_flMaxAngle' , 'm_OutputVariable' ],
7778 'CreateLocator' : ['m_bEnabled' , 'm_LocatorName' , 'm_vOffset' , 'm_flDisplayScale' , 'm_bConfigurable' , 'm_bAllowTranslation' , 'm_bAllowRotation' , 'm_bAllowScale' ],
7879 'RestoreState' : ['m_bEnabled' , 'm_bDiscardIfUknown' ],
7980 'TraceInDirection' : ['m_bEnabled' , 'm_DirectionSpace' , 'm_flSurfaceUpInfluence' , 'm_nNoHitResult' , 'm_flOriginOffset' , 'm_flTraceLength' ],
8081 'SaveState' : ['m_bEnabled' , 'm_StateName' ],
8182 'SetVariable' : ['m_bEnabled' , 'm_VariableValue' ],
82- 'RandomRotationSnapped' : ['m_bEnabled' , 'm_vMinAngles' , 'm_vMaxAngles' , 'm_flSnapIncrement' , 'm_RotationAxes' ],
83+ 'RandomRotationSnapped' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_vMinAngles' , 'm_vMaxAngles' , 'm_flSnapIncrement' , 'm_RotationAxes' ],
8384 'ResetRotation' : ['m_bEnabled' , 'm_bIgnoreObjectRotation' , 'm_bResetPitch' , 'm_bResetYaw' , 'm_bResetRoll' ],
8485 'ResetScale' : ['m_bEnabled' , 'm_bIgnoreObjectScale' ],
8586 'RotateTowards' : ['m_bEnabled' , 'm_vOriginPos' , 'm_vTargetPos' , 'm_vUpPos' , 'm_flWeight' , 'm_OriginSpace' , 'm_TargetSpace' , 'm_UpSpace' ],
86- 'SaveColor' : ['m_bEnabled' , 'm_VariableName' ],
87- 'SaveDirection' : ['m_bEnabled' , 'm_DirectionVector' , 'm_CoordinateSpace' , 'm_VariableName' ],
88- 'SavePosition' : ['m_bEnabled' , 'm_CoordinateSpace' , 'm_VariableName' ],
87+ 'SaveColor' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_VariableName' ],
88+ 'SaveDirection' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_DirectionVector' , 'm_CoordinateSpace' , 'm_VariableName' ],
89+ 'SavePosition' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_CoordinateSpace' , 'm_VariableName' ],
8990 'SaveScale' : ['m_bEnabled' , 'm_VariableName' ],
90- 'SaveSurfaceNormal' : ['m_bEnabled' , 'm_CoordinateSpace' , 'm_VariableName' ],
91- 'SetMateraialGroupChoice' : ['m_bEnabled' , 'm_VariableName' , 'm_SelectionMode' , 'm_ChoiceSelection' , 'm_MaterialGroupChoices' ],
91+ 'SaveSurfaceNormal' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_CoordinateSpace' , 'm_VariableName' ],
92+ 'SetMateraialGroupChoice' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_VariableName' , 'm_SelectionMode' , 'm_ChoiceSelection' , 'm_MaterialGroupChoices' ],
9293 'SetOrientation' : ['m_bEnabled' , 'm_vForwardVector' , 'm_ForwardDirectionSpace' , 'm_vUpVector' , 'm_UpDirectionSpace' , 'm_bPrioritizeUp' ],
9394 'SetPosition' : ['m_bEnabled' , 'm_vPosition' , 'm_CoordinateSpace' ],
94- 'Trace' : ['m_bEnabled' , 'm_Origin' , 'm_OriginSpace' , 'm_flOriginOffset' , 'm_flSurfaceUpInfluence' , 'm_nNoHitResult' , 'm_bIgnoreToolMaterials' , 'm_bIgnoreSky' , 'm_bIgnoreNoDraw' , 'm_bIgnoreTranslucent' , 'm_bIgnoreModels' , 'm_bIgnoreEntities' , 'm_bIgnoreCables' ],
95+ 'Trace' : ['_WARN_NOT_VERIFIED' , ' m_bEnabled' , 'm_Origin' , 'm_OriginSpace' , 'm_flOriginOffset' , 'm_flSurfaceUpInfluence' , 'm_nNoHitResult' , 'm_bIgnoreToolMaterials' , 'm_bIgnoreSky' , 'm_bIgnoreNoDraw' , 'm_bIgnoreTranslucent' , 'm_bIgnoreModels' , 'm_bIgnoreEntities' , 'm_bIgnoreCables' ],
9596 'Comment' : ['m_bEnabled' , 'm_Comment' ],
9697 'Expression' : ['m_bEnabled' , 'm_Expression' ],
9798 'Probability' : ['m_bEnabled' , 'm_flProbability' ],
@@ -195,6 +196,9 @@ def _resolve_dispatch(cls):
195196 'm_MaterialReplacements' : (PropertyMaterialReplacements , {}),
196197 'm_MaterialGroupChoices' : (PropertyMaterialGroupChoices , {}),
197198 'm_ChoiceSelection' : (PropertyFloat , {'int_bool' : True }),
199+ 'm_Color' : (PropertyColor , {}),
200+ 'm_ColorPosition' : (PropertyFloat , {'slider_range' : [0 , 1 ]}),
201+ 'm_Material' : (PropertyString , {'expression_bool' : False , 'placeholder' : 'Material name (.vmat)' , 'filter_types' : ['String' ]}),
198202 'm_flBendPoint' : (PropertyFloat , {'slider_range' : [0 , 1 ]}),
199203 'm_flWidth' : (PropertyFloat , {'slider_range' : [0 , 4096 ]}),
200204 'm_flLength' : (PropertyFloat , {'slider_range' : [0 , 4096 ]}),
@@ -213,6 +217,7 @@ def _resolve_dispatch(cls):
213217 'm_VariableName' : (PropertyString , {'expression_bool' : False , 'only_string' : False , 'only_variable' : True ,
214218 'force_variable' : True , 'placeholder' : 'Variable name' ,
215219 'filter_types' : ['String' ,'Int' ,'Float' ,'Bool' ]}),
220+ '_WARN_NOT_VERIFIED' : (PropertyWarning , {}),
216221 }
217222
218223 # Most frequent first; first matching substring wins after exact + combobox miss.
@@ -223,6 +228,7 @@ def _resolve_dispatch(cls):
223228 ('m_v' , PropertyVector3D , {}),
224229 ('m_b' , PropertyBool , {}),
225230 ('m_s' , PropertyString , {'expression_bool' : False , 'placeholder' : 'String' }),
231+ ('m_' , PropertyString , {'expression_bool' : False , 'placeholder' : 'String' }),
226232 ]
227233
228234 cls ._DISPATCH_RESOLVED = True
0 commit comments