[Smtk-developers] Q: default for vector value possible?
Robert Michael O'Bara
bob.obara at kitware.com
Thu Nov 27 22:06:46 EST 2014
Hi David,
No - it would be relatively simple to put this in but care needs to be taken to keep things consistent when the item definition is modified:
The item must be non-extensible
When the Number of min required values is modified, the default array would also need to be updated
In the case of an extensible I'm guessing that the default array must be of size 1 and represents the value of newly added values.
Does this make sense?
Bob
Robert M. O'Bara, MEng.
Assistant Director of Scientific Computing
Kitware Inc.
28 Corporate Drive
Suite 101
Clifton Park, NY 12065
Phone: (518) 881- 4931
On Nov 12, 2014, at 12:59 PM, David Thompson <david.thompson at kitware.com> wrote:
> Hi all,
>
> I have an attribute item defined like this
>
> <Double Name="axis 0" NumberOfRequiredValues="3">
> <DefaultValue>1.0,0.0,0.0</DefaultValue>
> </Double>
>
> but when I create an instance of the attribute and examine its value, I get:
>
>>>> ax0 = smtk.attribute.to_concrete(att.find('axis 0'))
>>>> [ax0.value(i) for i in range(3)]
> [1.0, 1.0, 1.0]
>
> Is there a way to provide a default for each of the required values?
>
> Thanks,
> David
> _______________________________________________
> Smtk-developers mailing list
> Smtk-developers at smtk.org
> http://public.kitware.com/mailman/listinfo/smtk-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20141127/5bb25d24/attachment.html>
More information about the Smtk-developers
mailing list