ZBrushCentral

IClick Interface item path for viewport

Hi guys.
In 2019 ZBrush i use this old macro. It emulates a viewport CTRL+SHIFT+LeftMouseButton Click and Drag to reverse visibility of a subtool parts.

[IButton,???,"reverse visibility key",
[IShowActions,0]
[IConfig,2019]
[IPress,Brush:SelectLasso]
[IKeyPress,CTRL+SHIFT,[IClick,1004,-4096,-4096,-4000,-4096]]
]

It seems that in ZBrush 2022 it didn’t work as it should.
It didn’t reverse visibility of a subtool parts. It just zoom in.
I assume that maybe it happens because the “1004” viewport item path changed.

Can some one share light on this issue ?

Hi,

It seems that the Ctrl+Shift+drag action outside the canvas will now zoom the model, so that’s what is causing the problem.

It can be made to work by doing the drag inside the canvas:

[IButton,???,"reverse visibility key",
	[IShowActions,0]
	[IConfig,2022]
	[VarSet,thumbOn,0]
	[IFreeze,
		[If,[IGet,Preferences:Thumbnail:T.Thumbnail],
			[VarSet,thumbOn,1]
			[ISet,Preferences:Thumbnail:T.Thumbnail,0]
		]
		[IKeyPress,768,[IClick,1004,10,10,20,20]]
		[If,thumbOn,
			[ISet,Preferences:Thumbnail:T.Thumbnail,1]
		]
	]
]

However, note that if your model goes over the top left corner of the canvas then it will be zoomed rather than visibility reversed. It would be possible to script a solution but I thought I’d post this simpler version to see if you can work with it.

Marcus

1 Like

Thank you Marcus.
It works like a charm.
And it also works faster than a simple canvas stroke macro.