ZBrushCentral

DynaMesh refresh script

Is there a way to refresh DynaMesh ? like

[DynaMesh, Refresh]

instead of record a macro of holding CTRL down and dragging somewhere in the window (Not sure if it records the XY coords - so his might no work for every instance)

[IConfig,4.73]
[CanvasStroke,(ZObjStrokeV03n108%p33A4BB8p22A2C90PNNn-F2FFs1A4FF8As1A4FF8As1A4FF8AZ=ZH4AAV82p35K2XH4ABV83YH4ABV84p45H4ABV85p53H4ACV8Ap6AH4ADV8Dp74H4ADV90p7BH4AFV97p87H4AFV9Cp8BH4B0VA0p8EH4B2VA9p94H4B3VAEp95H4B4VB3p96H4B4VB8p97H4B6VC2p9AH4B7VC6p9BH4B7VCBp9CH4B9VD4p9DH4B9VD8pA1H4BAVDCpA5H4BCVE4pABH4BCVE7pAEH4BDVEBpB0H4BEVEEpB1H4BFVF2pB3H4C0VF5pB4H4C1VF9pB5H4C2VFCpB7H4C4V102pB8H4C5V105pB9H4C6V107pBAH4C7V10BpBDXH4C8V10DYH4C8V10EpBEH4C9V110pBFXH4C9V111H4CAV112H4CAV113YH4CAV115pC0XH4CBV115H4CBV116H4CBV117YH4CCV117pD2XH4CCV116H4CDV115H4CEV114H4CEV113H4CFV113YH4CFV112pD3XH4CFV111H4D0V111H4D0V10FH4D1V10EH4D1V10DH4D1V10BH4D1V109H4D2V108H4D2V106H4D2V104H4D2V102H4D2V100H4D2VFEH4D2VFAH4D2VF8H4D2VF6H4D2VF2H4D2VF1H4D2VEFH4D2VEEH4D2VEDH4D2VECH4D2VEDH4D3VEEH4D3VEFH4D4VF0H4D5VF1H4D5VF2H4D6VF3H4D7VF4H4D8VF5H4D8VF6H4D9VF7H4DAVF8H4DBVFAH4DCVFCH4DDVFDH4DDVFEH4DFV100H4DFV101H4E0V102H4E1V103
H4E2V104H4E2V105YH4E3V105pD4H4E4V106pD3XH4E6V107H4E7V107YH4E8V108pD4H4E9V109pD3XH4EAV109H4EBV109H4ECV10AH4EDV10AH4EEV10AH4EEV10BH4EFV10BYH4EFV10Ap90H4EFV10AP)]

Thanks

You can use:

[IKeyPress,512,[CanvasClick,-4096,-4096,-4000,-4000]]

The IKeyPress,512 simulates holding the CTRL key, and the CanvasClick simulates a drag. The coordinates are off the canvas so it should always work, though if you change DynaMesh resolution you may still need to touch the mesh slightly.

That’s great!

Is there a list of numbers referencing key presses?
Or even better still a zscript to iterate over them :slight_smile:

check in preferences : utilities : keyboard :view keyboard status
the second slider tell you what is pressed from your keyboard

It’s simpler than u think :wink: U just have to [IUnPress] and [IPress] the dynamesh button.
I have added few lines to clear masking, show hidden geometry, and enable polipaint to not lose polipaint data when dynameshing.(Just keep in mind if you dynamesh with polipaint ON you will lose your polygroups)

[IButton,???,"ReDynamesh ",
[IConfig,4.6]
[IPress,Tool:visibility:showpt]
[IPress,Tool:masking:clear]
[IPress,Tool:polipaint:colorize]
[IUnPress,Tool:geometry:dynamesh]
[IPress, Tool:Geometry:dynamesh]
[IUnPress,Tool:polipaint:colorize]
]/End of ZScript/

I have assigned CTRL+R hotkey to this macro so now I just hit the key without worrying that i havent cleared mask or i have hidden part of the model or I will lose polipaint because i forgot to switch it on before redynameshing.

Hope that helps…
Cheers!
Piosio