1. #1
    New Member 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 User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,729

    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,Tool:Deformation: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,Tool:Deformation:Offset,1]
      ]
        //turn off the Dynamesh button
      [ISet,Tool:Geometry:Dynamesh,0]
      //offset the tool a little
      [ISet,Tool:Deformation:Offset,1]
      //undo the offset
      [ISet,Tool:Deformation:Offset,-1]
      //turn on the Dynamesh button - mesh will update
      [ISet,Tool:Geometry:Dynamesh,1]
      //reset the Offset axis setting
      [IModSet,Tool:Deformation:Offset,#tmpMod]
    
    ]

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

    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 01:21 PM.

  4. #4
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,729

    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
  •