View Full Version : Mel SculptGeometryTool commands

11 November 2012, 02:40 PM
Hey all,
I'm starting out in Mel and trying to make a UI window that houses all my commonly used tools for speed modeling. I'm currently trying to add the sculpt tools but having issues with it. I've got a button for pull, push, smooth, and relax. I've used:

button -label "Pull" -command "SculptGeometryTool";

This gets the Sculpt tool to activate but I'm not quite sure how to get the buttons to call specific sculpt options. like if you click the smooth btn, you get the sculpt geometry tool with the smooth operation.
I've tried just popping in what's in the script history, but it loses context once the Sculpt Geometry Tool is closed:

artUpdatePuttyOperation artPuttyCtx smooth ;
artPuttyValues artPuttyContext;

I'm still a N00B with scripting so I'm not quite sure how to define the parameters for this... Any help or ideas are greatly aprisiated. ;)

11 November 2012, 03:24 PM
Hey i wrote a script for my Ninja_Topo to use the sculpt tool.

global proc NinjaTopo_Sculpt(string $SculptMode)

if ($SculptMode == "Smooth")
artPuttyCtx -e -mtm "smooth" `currentCtx`;

if ($SculptMode == "Relax")
artPuttyCtx -e -mtm "relax" `currentCtx`;

if ($SculptMode == "Pinch")
artPuttyCtx -e -mtm "pinch" `currentCtx`;


then for each button you would call that procedure with the scuplt type
button -l "Smooth" -c ("NinjaTopo_Sculpt Smooth");

11 November 2012, 07:45 PM
Excellent! Just what i needed. Many thanks :thumbsup:

CGTalk Moderation
11 November 2012, 07:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.