RE: Two scripting questions

Date : Thu, 9 Aug 2007 12:22:48 -0400
To : <XSI(at)Softimage.COM>
From : "Vincent Fortin" <vincent.fortin(at)ubisoft.com>
Subject : RE: Two scripting questions
Thanks for this, very enlightening :)

Vincent

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Stephen Blair
Sent: Thursday, August 09, 2007 12:08 PM
To: XSI(at)Softimage.COM
Subject: RE: Two scripting questions


Doesn't pressing w log PaintWeights?


I don't think there is a Sketch Particles command.
You can look for it:

var c = Application.Commands;
LogMessage( c.Count );

oEnum = new Enumerator( c  ) ;
var re = /Sketch/ig;

for (;!oEnum.atEnd();oEnum.moveNext() )
{
	var oSelItem = oEnum.item() ;
	if ( oSelItem.ScriptingName.match( re ) )
	{
			LogMessage( oSelItem.scriptingname );
			//EditCommand( oSelItem.scriptingname );

	}
} 

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Vincent Fortin
Sent: Thu 09 August 2007 11:41 AM
To: XSI(at)Softimage.COM
Subject: RE: Two scripting questions

AH! Thank you for your answer, Stephen.

May I bring your attention on my second question?
A solution to this would really make my day (and keep me quiet for some
time).

Vincent

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Stephen Blair
Sent: Thursday, August 09, 2007 11:32 AM
To: XSI(at)Softimage.COM
Subject: RE: Two scripting questions

Hi Vincent

WidthPercentage does not work with buttons.
Already logged as UDEV00045199.



-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Vincent Fortin
Sent: Thu 09 August 2007 9:23 AM
To: XSI(at)Softimage.COM
Subject: RE: Two scripting questions

Hey Greg,
Fair guess but still no luck. It doesn't work on Python either.
I'm puzzled!

Also got me to wonder why other constants like siUIAlign* have gone
unsupported. They'd have been useful in my situation.

Vincent

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Greg Smith
Sent: Wednesday, August 08, 2007 6:18 PM
To: XSI_MailingList
Subject: Re: Two scripting questions

Hmm is your scripting language seeing the value as an integer or a long
value?
I know that the widthPercentage works with long values, so for example
in Python this is how I would do it.

import win32com.client as w32c
c = w32c.constants

oPSet = Application.ActiveSceneRoot.AddProperty("CustomProperty", False,
"myCustomProperty")

oLayout = oPSet.PPGLayout

myButton = oLayout.AddButton("myButton", "Hello")
myButton.SetAttribute(c.siUIWidthPercentage, 50.0)

I hope this helps, 

Greg 

On Wed, 2007-08-08 at 15:38 -0400, Vincent Fortin wrote:
> PPGItem.WidthPercentage
> 
> For some reasons I can't get this property to work on my layout 
> buttons. The buttons are within a row call.
> 
> I tried accessing it using PPGItem.SetAttribute(siUIWidthPercentage,
> 50) but nothing happens.
> 
> Every other siAttributes work well though. Any ideas?
> 
>  
> 
> The Weight Paint Tool
> 
> ...and other paint tools like the "Sketch Particles" don't leave 
> anything in the command log. How can they be triggered by scripting?
> 
>  
> 
> Thanks
> 
>  
> 
> Vincent
> 
> 


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

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

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

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

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

---
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.