Hi,
accessing chunks works OK for me. What happens when you try to access the
returned data chunk? What size chunks are you trying to get?
If you turn on verbose logging, then perhaps you'll see a message like this
upon attempting to get the chunk:
*# VERBOSE : 5403 - The data is not set on this
.@listproc.autodesk.com
[softimage-boun...@listproc.autodesk.com] on behalf of Ciaran Moloney
[moloney.cia...@gmail.com]
Sent: Thursday, May 03, 2012 1:15 AM
To: softimage@listproc.autodesk.com
Subject: Re: Scripting: Accessing ICEAttributes at a specific ID using
GetDataArrayChunk?
Hi,
accessing chunks wo
> Autodesk Media and Entertainment
>
>
>
> From: softimage-boun...@listproc.autodesk.com [
> softimage-boun...@listproc.autodesk.com] on behalf of Ciaran Moloney [
> moloney.cia...@gmail.com]
> Sent: Thursday, May 03, 2012 1:15 AM
> To: softimage@listpro
quot; +
str(elem.Value(3,1)) + ":" + str(elem.Value(3,2)) + ":" + str(elem.Value(3,3)))
elif dataType == constants.siICENodeDataColor4:
xsi.LogMessage( "Color:" );
xsi.LogMessa
3, 2012 1:15 AM
To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com>
Subject: Re: Scripting: Accessing ICEAttributes at a specific ID using
GetDataArrayChunk?
Hi,
accessing chunks works OK for me. What happens when you try to access the
returned data chunk? What size chun
ftimage-boun...@listproc.autodesk.com> [
> softimage-boun...@listproc.autodesk.com softimage-boun...@listproc.autodesk.com>] on behalf of Ciaran Moloney [
> moloney.cia...@gmail.com<mailto:moloney.cia...@gmail.com>]
> Sent: Thursday, May 03, 2012 1:15 AM
> To: softimage@li
Here's a function that does what I needed, grabs data from an ICEAttribute
at a specific ID and returns it packaged in its corresponding XSI data type
object (except for Color which is output in an R,G,B,A array). Most
importantly, it's a whole heap faster than pulling the entire attribute
DataArra
Whoops! There was a minor type in that script.. missing a dot for
CreateVector3().
Here's the repaired version for posterity:
def getCloudData(inCloud, attName, index):
from win32com.client import constants
attr = inCloud.ActivePrimitive.Geometry.GetICEAttributeFromName(attName)
data = attr.Ge
Hi Bradley,
Just a small note:
Move this out of your python function for a neater code.
from win32com.client import constants
Import module should always be done at the top of your script.
Cheers.
Regards,
Chris Chia
Softimage QA Analyst
On 3 May, 2012, at 11:12 PM, "Bradley Gabe"
mailto:wit
Indeed, it is good manners. I just wanted it in there so folks could
copy/paste the function and have it work.
If I recall correctly, Python is smart enough to run the import only once.
On Thu, May 3, 2012 at 11:21 AM, Chris Chia wrote:
> Hi Bradley,
> Just a small note:
> Move this out of your
Yes, but it's more like for performance purpose. because that line will keep
appearing in the function stack and python keeps having to do the function
lookup to verify it has already imported every time the getCloudData func is
being called
Anyway, as long as you know what you are doing, I thi
Hey Brad,
Don't forget to check the attribute's .IsConstant property. If it's true
then it's a single value, not array and I would imagine your code would
fail as-is.
Just mentioning it if you want to use this for more general purposes where
you may not be sure there's an array coming.
Cheers,
Good advice in general. For my usage there will always be an array.
On Thu, May 3, 2012 at 12:58 PM, Alan Fregtman wrote:
> Hey Brad,
>
> Don't forget to check the attribute's .IsConstant property. If it's true
> then it's a single value, not array and I would imagine your code would
> fail as-is
13 matches
Mail list logo