todesk.com] On Behalf Of Ho Chung Nguyen
Sent: Sunday, March 24, 2013 8:43 PM
To: softimage@listproc.autodesk.com
Subject: RE: setting ICEAttribute.DataArray in JScript
- In Jscript, the array needs to be converted to safearray before you can set
it on ICE attribute data. Check out the code bel
Ok, here's the complete JScript for creating MaterialIDs.
A lot of hoops to jump through for something seemingly simple...
For some obscure reason the viewport does not update with the shader
colors. You have to render to see the result.
Also, I don't know why string attribute "Materials" can onl
Doh... you have to "wrap" the string twice in a safe array and use
DataArray2D...
You thought of this at the dentist's? Normally pain's no good for the
brain...
Many thanks!!
Am 25.03.2013 15:11, schrieb Stephen Blair:
http://wp.me/powV4-2E1
On 25/03/2013 4:29 AM, Eugen Sares wrote:
Thanks,
http://wp.me/powV4-2E1
On 25/03/2013 4:29 AM, Eugen Sares wrote:
Thanks, Ho Chung!
Writing to the MaterialID attribute works (array of integers), but not
to Materials (array of strings).
Workaround would be to create an ICE array via scripting, I got that
working already, but still I wonder wh
Thanks, Ho Chung!
Writing to the MaterialID attribute works (array of integers), but not
to Materials (array of strings).
Workaround would be to create an ICE array via scripting, I got that
working already, but still I wonder why the problem is.
Could you please check this code?
NewScene("",
ataArray = safearr
-Original Message-
From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Stephen Blair
Sent: Tuesday, March 12, 2013 7:29 PM
To: softimage@listproc.autodesk.com
Subject: Re: setting ICEAttribute.DataArray in JScript
Last time I tried, I gave up on JScript (it seemed impossible) and got
something to work in Python.
si = Application
from win32com.client import constants as C#
win32com.client.constants
oObj = si.Selection(0)
oICEAttrMats = oObj.ActivePrimitive.AddICEAttribute("MyString",
C.siIC
Ok... I'm trying this workaround:
- Create custom ICEAttributes instead of the factory ones via scripting,
with exactly the same type.
- Create a simple ICE graph that reads from the custom attributes and
writes to the factory attr via scripting.
I've managed to write the "MaterialID" this way
I don't think it is possible.
MaterialID becomes undefined/uninitialized pretty quick...
http://screencast.com/t/HeNPz4qgwlh
On 11/03/2013 12:25 PM, Eugen Sares wrote:
Thanks, Steven!
IsDefined is read-only, by the looks.
So how do I write to it to define it (outside of ICE), when it cannot
be
Thanks, Steven!
IsDefined is read-only, by the looks.
So how do I write to it to define it (outside of ICE), when it cannot be
written until it's defined??
Am 11.03.2013 17:15, schrieb Stephen Blair:
MaterialID isn't defined. Seems that you cannot set
MaterialID.DataArray unless IsDefined is
MaterialID isn't defined. Seems that you cannot set MaterialID.DataArray
unless IsDefined is True
On 11/03/2013 11:44 AM, Eugen Sares wrote:
Whereas this throws a warning:
NewScene("", "false");
var oObj = CreatePrim("grid", "MeshSurface", "", "");
SetValue("grid.polymsh.geom.subdivu", 2, null
Sorry, got interrupted... ;q
Thanks, Francis, that works (2013 SP1 )!
What still gives me troubles is setting the MaterialID attribute (exists
on every polymesh by default), which is what I actually need.
I cannot write to it. Reading works, though. Could you guys please have
a look?
This wor
),
XSIMath.CreateVector3( 0.0, 0.0, 1.0 ),
XSIMath.CreateVector3( 0.0, 0.0, 0.0 ) ]
--
Francis
-Original Message-
From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Stefan Kubicek
Sent: October 23, 2012 14:58
To: softi
day, October 23, 2012 10:40 AM
To: softimage@listproc.autodesk.com
Subject: setting ICEAttribute.DataArray in JScript
Hi, short question:
how do I set/write the ICEAttribute.DataArray from JScript? Can't find a code
example.
It is a safe array, that much I found out.
attr.DataArray = [23,44
] On Behalf Of Eugen Sares
Sent: Tuesday, October 23, 2012 11:30 AM
To: softimage@listproc.autodesk.com
Subject: Re: setting ICEAttribute.DataArray in JScript
Thanks, guys!
The Python example I found myself, but that does not help in JScript.
GridData must reside in a CustomProperty, right?
I would
image-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Eugen Sares
Sent: Tuesday, October 23, 2012 10:40 AM
To: softimage@listproc.autodesk.com
Subject: setting ICEAttribute.DataArray in JScript
Hi, short question:
how do I set/write the ICEAttribute.Data
ge-boun...@listproc.autodesk.com [mailto:
> softimage-boun...@listproc.autodesk.com] On Behalf Of Eugen Sares
> Sent: Tuesday, October 23, 2012 10:40 AM
> To: softimage@listproc.autodesk.com
> Subject: setting ICEAttribute.DataArray in JScript
>
> Hi, short question:
> how d
bject before
it will work.
Matt
-Original Message-
From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Eugen Sares
Sent: Tuesday, October 23, 2012 10:40 AM
To: softimage@listproc.autodesk.com
Subject: setting ICEAttribute.DataArr
>
> this is in the help somewhere, damned if i can find it again.
its python, but will print info about the a selections attributes:
hopefully that helps.
from win32com.client import constants
xsi = Application
#xsi.CreatePrim("Cone", "MeshSurface", "", "")
attrs = xsi.Selection(0).ActivePrimiti
Hi, short question:
how do I set/write the ICEAttribute.DataArray from JScript? Can't find a
code example.
It is a safe array, that much I found out.
attr.DataArray = [23,44,50]; is not working.
// WARNING : 3392 - Invalid offset specified while extracting data from
this attribute...
Thanks,
20 matches
Mail list logo