1. #1
    New Member Follow User Gallery
    Join Date
    Aug 2004
    Posts
    5

    Default Recalculate Dynamesh

    what is the command for recalculating a dynamesh object? I'm trying to create a few buttons that change the dynamesh resolution to 128,256,512 (blur 0) presets and I want my current tool to update with the new resolution without having to touch the mesh and ctrl+click drag on the canvas.

    thanks,
    z

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,690

    Default

    You can do it by offsetting the mesh temporarily, which will force DynaMesh to update:

    [CODE]
    [IButton,UpdateDynaMesh,"Update DynaMesh for current mesh",

    //first record the current axis setting for Offset
    [VarSet,tmpMod,[IModGet,Tooleformation:Offset]]
    //one of the axes must be set, so set it to 1
    [If,(#tmpMod != 1), //if it's not set to 1 (X axis)
    [IModSet,Tooleformation:Offset,1]
    ]
    //turn off the Dynamesh button
    [ISet,Tool:Geometryynamesh,0]
    //offset the tool a little
    [ISet,Tooleformation:Offset,1]
    //undo the offset
    [ISet,Tooleformation:Offset,-1]
    //turn on the Dynamesh button - mesh will update
    [ISet,Tool:Geometryynamesh,1]
    //reset the Offset axis setting
    [IModSet,Tooleformation:Offset,#tmpMod]

    ][/CODE]

  3. #3

    Thumbs up

    nice trick, worked great. thanks Marcus!

    btw here is the plugin, it creates 4 buttons under "DynaPresets" in the "Tool" subpallet for 128,256,512,728 (all with blur = 0) dynamesh rez.

    super simple but speeds up my workflow.
    Attached Files Attached Files
    Last edited by zwick; 09-29-12 at 02:21 PM.

  4. #4
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,690

    Default

    zwick,
    No problem, and thanks for sharing your plugin.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •