RE: Activating PaintTool from a script

Date : Wed, 28 Feb 2007 12:43:10 -0000
To : <XSI(at)Softimage.COM>
From : "Kim Aldis" <XSI(at)kim-aldis.co.uk>
Subject : RE: Activating PaintTool from a script

Same for the sketch curve tool.

 

From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of guillaume laforge
Sent: 28 February 2007 11:45
To: XSI(at)Softimage.COM
Subject: Re: Activating PaintTool from a script

 

> I think it would be great to open the paint tool in the SDK.

100% agree. There are a lot of things we can't do just because it is not possible to access the paint tool object.

On 2/28/07, Ahmidou Lyazidi <ahmidou.xsi(at)gmail.com> wrote:

Hi guillaume,
what I m after is more someting like LMB click to paint it: add a weightmap, add the deformer, paint and freeze)
but now lets say i want to make a custom thing like pinch , twirl or whatever on each click and i want to keep each operatio as simple as a move point ?
Should I rebuild a paint tool from the ground? I think it would be great to open the paint tool in the SDK.

Thanks anyway !!
A.

2007/2/28, guillaume laforge < guillaume.laforge.3d(at)gmail.com>:

>I would like to bypass the fact that you have to add a weight map, then add a smooth or push op...

You can create a command to group your new weight map and your new deformer operator like this :

var buttonPressed = XSIUIToolkit.Msgbox( "Clic Yes for a Smooth and No for a Push",
          siMsgYesNo, "Weighted Operators" ) ;

if ( buttonPressed == siMsgNo )
{
    var oWeight = CreateWeightMap(null, null, "PushWeightMap", null, null);
    var op = ApplyOp("Push", oWeight , 3, siPersistentOperation, null, 0);
    op.item(0).parameters("ampl").value = 2 ;

    PaintTool();
}
else
{
    var oWeight = CreateWeightMap(null, null, "SmoothWeightMap", null, null);
    ApplyOp("Smooth", oWeight , 3, siPersistentOperation, null, 0);
    PaintTool();

}

Nothing fancy but it can speed the modeling workflow.

Cheers

--
Guillaume Laforge



On 2/28/07, Ahmidou Lyazidi <ahmidou.xsi(at)gmail.com> wrote:

Hi, about the paint tool, is it possible to access it via scripting to do custom things but directly? I mean access the hardness, softness, spacing for each vertex that is paint and do what ever you want with this?
I would like to bypass the fact that you have to add a weight map, then add a smooth or push op, then paint, then freeze then add a weight map and so on.....
Just paint>deform, paint>deform again to speed up the workflow
Or maybe we need some OnPaint_events?
I don t know, if this is clear?!

thanks
A.

2007/2/27, Bradley Gabe < withanar(at)stanwinston.com>:

Thanks. I figured that out only moments after posting. Seems like I
can't get anything done anymore without making my stupid mistakes
public.


> PaintTool();
>
>
>
>
>         ______________________________________________________________
>         From: Bradley Gabe [mailto:withanar(at)stanwinston.com]
>         Sent: Tuesday, February 27, 2007 1:50 PM
>         To: xsi(at)Softimage.COM
>         Subject: Activating PaintTool from a script
>
>
>         Anyone know how to activate the PaintTool from scripting,
>         preferably from jscript?
>
>         I looked into the PaintPushTool script in the
>         $xsihome/Application/DSScripts/tools.vbs file, and they are
>         just doing a call to "PaintTool", but when I try the same
>         thing in my script, it raises an error.
>         Thanks!
>         -Brad

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

 



 




Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.