Jump to content
3DCoat Forums

How do I skip the decimation confirm callback?


Recommended Posts

  • Member

I'm trying to automate Decimate to retopo but if the user selects a polycount larger than 50k, a dialogue appears that I can't seem to skip without skipping the decimation slider dialog.  is there a way to get the SetModalDialogCallback to effect this dialog?

This is the modal dialog I want to keep:

this is the one I want to skip if it comes up:

these are the commands I'd using.  The scripting documentation doesn't mention this sub modal dialog.  any pointers on how to skip it would be appreciated.

// SetModalDialogCallback("ModalDialogCallbackOverDecimation");
// RemoveModalDialogCallbacks();

fyi: Honestly I'd rather skip both of these dialogs and use a custom window with a numeric entry field to specify a target polycount,  but when I did this,  it only works on low poly vox layers.  when the incoming mesh count is too high, the ReductionPercent slider float precision is too low and it fails out.

void ModalDialogCallbackDecimateToTargetPolyCount(){
    cmd("$DialogButton#1");/*press Ok*/        

void ModalDialogCallbackSaveSession(){
    cmd("$DialogButton#1");/*press Ok*/        

Link to comment
Share on other sites

  • Contributor

Try this:

/ This function should be called before you call any of modal dialogs
// function if you want to press button number ButtonIndex
// (first button is 1, second is 2).
void PressInNextModalDialogs(int ButtonIndex);
// For example, if you have Yes and No buttons and you call
// PressInNextDialogs(1) before showing dialog then Yes will be
// pressed automatically.
// You should call PressInNextDialogs(-1) to stop automatical
// pressing of buttons.

Source: https://pilgway.com/files/scriptdocs/ABuildDialogs.html

You would probably have to insert this at the end of your decimation dialog callback function. Otherwise it would press buttons in the decimation dialog.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...