Interface : CustomControlsOptions

This Core Interface can be used for debugging custom controls like Qt icons and text clipping. Available in in 3ds Max 2017 and higher.

   

Properties:

CustomControlsOptions.PrintIconPaths : bool : Read|Write

Get/set the state of the Print Icon Paths feature.

When set to True, rolling the mouse pointer over a custom control containing an icon will print information about its path to the MAXScript Listener.

When set to False (default), no icon path information will be printed.

EXAMPLE:

CustomControlsOptions.PrintIconPaths = true --enable the printing of icon paths
true

--Roll over the Render icon in the Main Toolbar.
Path of this control's QIcon: [C:\Program Files\Autodesk\3ds Max 2017\UI_LN\IconsDark.rcc] MainToolbar\RenderProduction
IconSize: 24x24 (native) IconState: off
Available Files: RenderProduction_24.png, RenderProduction_30.png, RenderProduction_36.png, RenderProduction_48.png

--Then roll over the “Box” button in the Create tab of the Modifier Panel which does not have an icon.
Icon does not exist (no icon on this CustButton)

   

CustomControlsOptions.PrintTextClippingIssues : bool : Read|Write

Get/set the state of the Print Text Clipping Issues feature.

When set to True, Custom Controls whose text exceeds the control's size along X or Y will be reported to the MAXScript Listener.

When set to False (default), no issues will be reported.

   

CustomControlsOptions.TextClippingIssuesSensitivityX : integer : Read|Write

Get/set the X Sensitivity value for the Print Text Clipping Issues feature.

This value defined the threshold above which clipping issues along X will be reported.

Default is 1.

   

CustomControlsOptions.TextClippingIssuesSensitivityY : integer : Read|Write

Get/set the Y Sensitivity value for the Print Text Clipping Issues feature.

This value defined the threshold above which clipping issues along Y will be reported.

Default is 1.

EXAMPLE:

CustomControlsOptions.PrintTextClippingIssues = true --enable the clipping issues printing
true
--Then open Material Editor and expand the Maps rollout of any Standard Material:
UI CLIPPING ERROR: hwnd: 0x60DAE - Static text clipped: 'Map Type' (22 px missing in x )
UI CLIPPING ERROR: hwnd: 0x50E8E - Checkbox text clipped: 'Ambient Color . . . . . . . . . . . . . . . . .' (98 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CEE - Checkbox text clipped: 'Diffuse Color . . . . . . . . . . . . . . . . .' (93 px missing in x )
UI CLIPPING ERROR: hwnd: 0x50E4E - Checkbox text clipped: 'Specular Color  . . . . . . . . . . . . . . . .' (96 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60C80 - Checkbox text clipped: 'Specular Level  . . . . . . . . . . . . . . . .' (96 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D5A - Checkbox text clipped: 'Glossiness  . . . . . . . . . . . . . . . . . .' (90 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D40 - Checkbox text clipped: 'Self-Illumination . . . . . . . . . . . . . . .' (93 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D38 - Checkbox text clipped: 'Opacity . . . . . . . . . . . . . . . . . . . .' (89 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CE8 - Checkbox text clipped: 'Filter Color  . . . . . . . . . . . . . . . . .' (86 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D60 - Checkbox text clipped: 'Bump  . . . . . . . . . . . . . . . . . . . . .' (88 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D1E - Checkbox text clipped: 'Reflection  . . . . . . . . . . . . . . . . . .' (89 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D82 - Checkbox text clipped: 'Refraction  . . . . . . . . . . . . . . . . . .' (91 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CD6 - Checkbox text clipped: 'Displacement  . . . . . . . . . . . . . . . . .' (97 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D16 - Checkbox text clipped: '. . . . . . . . . . . . . . . . . . . . . . . .' (77 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CDA - Checkbox text clipped: '. . . . . . . . . . . . . . . . . . . . . . . .' (77 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CD2 - Checkbox text clipped: '. . . . . . . . . . . . . . . . . . . . . . . .' (77 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CBA - Checkbox text clipped: '. . . . . . . . . . . . . . . . . . . . . . . .' (77 px missing in x )

CustomControlsOptions.TextClippingIssuesSensitivityX  = 90 --set the threshold to 90 px
90
--Collapse and expand the Maps rollout of a Standard Material again –
--only controls whose text is clipped above 90 pixels will be reported:
UI CLIPPING ERROR: hwnd: 0x50E8E - Checkbox text clipped: 'Ambient Color . . . . . . . . . . . . . . . . .' (98 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CEE - Checkbox text clipped: 'Diffuse Color . . . . . . . . . . . . . . . . .' (93 px missing in x )
UI CLIPPING ERROR: hwnd: 0x50E4E - Checkbox text clipped: 'Specular Color  . . . . . . . . . . . . . . . .' (96 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60C80 - Checkbox text clipped: 'Specular Level  . . . . . . . . . . . . . . . .' (96 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D40 - Checkbox text clipped: 'Self-Illumination . . . . . . . . . . . . . . .' (93 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60D82 - Checkbox text clipped: 'Refraction  . . . . . . . . . . . . . . . . . .' (91 px missing in x )
UI CLIPPING ERROR: hwnd: 0x60CD6 - Checkbox text clipped: 'Displacement  . . . . . . . . . . . . . . . . .' (97 px missing in x )

   

CustomControlsOptions.UIUserScaleFactor : float : Read|Write

Get/set the user-defined scale factor of the User Interface.

Default is 0.0 (no custom scaling, equivalent to 1.0).

A value of 1.0 performs no scaling.

A value of 2.0 will make all custom controls 2 times larger, and so on.

   

Methods:

<void>CustomControlsOptions.SetPrintIconPathsPersist <bool>print_paths <bool>persist

Sets the state and persistence of the Print Icon Paths feature.

The first argument sets the state - True to print the icon paths, False to disable printing.

The second argument sets the persistence - True to persist between 3ds Max sessions, False to set for the current session only.

   

<void>CustomControlsOptions.SetPrintTextClippingIssuesPersist <bool>print_issues <bool>persist

Sets the state and persistence of the Print Text Clipping Issues feature.

The first argument sets the state - True to print the issues, False to disable printing.

The second argument sets the persistence - True to persist between 3ds Max sessions, False to set for the current session only.

   

<void>CustomControlsOptions.SetTextClippingIssuesSensitivityXPersist <integer>sensitivity <bool>persist

Sets the value and persistence of the Print Text Clipping Issues X Sensitivity threshold.

The first argument defines the sensitivity value.

The second argument sets the persistence - True for the value to persist between 3ds Max sessions, False to set for the current session only.

   

<void>CustomControlsOptions.SetTextClippingIssuesSensitivityYPersist <integer>sensitivity <bool>persist

Sets the value and persistence of the Print Text Clipping Issues Y Sensitivity threshold.

The first argument defines the sensitivity value.

The second argument sets the persistence - True for the value to persist between 3ds Max sessions, False to set for the current session only.

   

Actions:

Related Functions:

<bitMap>getIconAsBitmap <string>iconPath

Returns a MAXScript bitmap value containing the specified icon.

   

<Point2 Array>getIconSizes <string>iconPath

Returns an array of Point2 values representing the available icon sizes.

   

<Point2>getQtTextExtent <string>UItext

Returns a Point2 value representing the Qt text size in pixels of the specified string.

The custom UI scale factor will not be taken into account.

   

<float>GetUIScaleFactor <int>monitorID

Gets the scale factor for High DPI monitors, for the specified monitor. If not specified, the default monitor (-1) is queried.

See also the CustomControlsOptions.UIUserScaleFactor interface property for getting and setting the UI scale.

EXAMPLE:

b = getIconAsBitmap @"MainToolbar\RenderSetup" --get the Render Setup icon as bitmap
display b --display the bitmap

getIconSizes @"MainToolbar\RenderSetup" --get the Render Setup icon as bitmap
#([24,24], [30,30], [36,36], [48,48])

getQtTextExtent "MAXScript"
[48,13]