Vertex Size in maxscript

Vertex Size in maxscript

slava.lobanov.1990
Advocate Advocate
885 Views
6 Replies
Message 1 of 7

Vertex Size in maxscript

slava.lobanov.1990
Advocate
Advocate

Hi. As i can change Vertex size in Maxscript?

slavalobanov1990_0-1628626383395.png

 

0 Likes
886 Views
6 Replies
Replies (6)
Message 2 of 7

denisT.MaxDoctor
Advisor
Advisor

Obviously, this value is stored in one of the max INI files. But this thing is quite new, and it is difficult to know where it is. I could not find it ...
Old methods (preferences.useLargeVertexDots) overwrite this value to default ...

But If you really want to change it, then you can use UIAccessor ... this way has already been shown many times, for example:

 

fn toggleDisplayTopologyDependenceWarning = 
(
	fn PreferenceCallback = 
	(
		fn setCheckBoxState hwnd state = 
		(	
			local BN_CLICKED = 0
			local BM_SETCHECK = 241
			local WM_COMMAND = 273
				
			local parent = UIAccessor.getParentWindow hwnd
			local id = UIAccessor.getWindowResourceID hwnd
				
			windows.sendMessage hwnd BM_SETCHECK (if state then 1 else 0) 0
			windows.sendMessage parent WM_COMMAND ((bit.shift BN_CLICKED 16) + id) hwnd	
			ok
		)
		hWND = DialogMonitorOPS.GetWindowHandle()
		
		if (UIAccessor.GetWindowText hWND) != "Preference Settings"  do return true
		bt = windows.getchildhwnd hWND "Display Topology-Dependence Warning"

		act = (getIniSetting (getMAXIniFile()) #performance #TopoMessage) as integer
		setCheckBoxState bt[1] (act == 0)

		UIAccessor.SendMessageID  hWND #IDOK
		true
	)

	DialogMonitorOPS.RegisterNotification PreferenceCallback id:#preferencesConfigure
	DialogMonitorOPS.Enabled = true	
	max file preferences
	DialogMonitorOPS.unRegisterNotification id:#preferencesConfigure
	DialogMonitorOPS.Enabled = false
	(getIniSetting (getMAXIniFile()) #performance #TopoMessage) as integer
)
toggleDisplayTopologyDependenceWarning()

 

there are some methods to work with spinner as window :

fn editSpinner hwnd val = 
(
	WM_CHAR   = 0x0102
	VK_RETURN = 0x000D

	uiaccessor.setwindowtext hwnd (val as string)
	windows.sendMessage hwnd WM_CHAR VK_RETURN 0 -- press ENTER key
)
fn setSpinnerValue val name: = 
(
	hwnd = windows.getchildhwnd #max name
	hwnd = uiaccessor.getnextwindow hwnd[1]
	hwnd = uiaccessor.getfirstchildwindow hwnd
	hwnd = uiaccessor.getfirstchildwindow hwnd
	editSpinner hwnd val
)

 

You may have to switch TABs too ... but there are methods for this. You can search on the CGTalk ...

0 Likes
Message 3 of 7

slava.lobanov.1990
Advocate
Advocate
getINISetting (getMAXIniFile()) "Performance" "VertexDotType"
setINISetting (getMAXIniFile()) "Performance" "VertexDotType" "0" -- can be between 0 and 5, where 0=2 and 5=7

i find only this.

 

0 Likes
Message 4 of 7

denisT.MaxDoctor
Advisor
Advisor

@slava.lobanov.1990 wrote:
getINISetting (getMAXIniFile()) "Performance" "VertexDotType"
setINISetting (getMAXIniFile()) "Performance" "VertexDotType" "0" -- can be between 0 and 5, where 0=2 and 5=7

i find only this.

 


Hmm… what max version is it?

 

0 Likes
Message 5 of 7

denisT.MaxDoctor
Advisor
Advisor

@denisT.MaxDoctor wrote:

@slava.lobanov.1990 wrote:
getINISetting (getMAXIniFile()) "Performance" "VertexDotType"
setINISetting (getMAXIniFile()) "Performance" "VertexDotType" "0" -- can be between 0 and 5, where 0=2 and 5=7

i find only this.

 


Hmm… what max version is it?

 


Can't get this to work ... there is such a setting, but I don't see it affecting anything. And I don't see its corresponds to dot size in the Preferences dialog.

0 Likes
Message 6 of 7

klvnk
Collaborator
Collaborator

you'd need to restart max to see the result.

0 Likes
Message 7 of 7

domo.spaji
Advisor
Advisor

@klvnk wrote:

you'd need to restart max to see the result.


And that modified .ini will be overwritten by default "Save UI conf. on exit" 😁

And with all these conf. things overdone like in Max, God know what you will see! 😫

0 Likes