Yes, an attribute can exist in different groups, but what
get_attribcontext() does in the NDK, is look it up and return the first
match, by order of importance (Vertex, Point, Material, Primitive, Object).

I suppose one can wrap their own python function to do the same, by looping
through each group and type, though.

Cheers,
Ivan


On Tue, Aug 28, 2012 at 2:02 PM, Nathan Rusch <[email protected]>wrote:

>   Alright, request submitted. As far as being able to look up an
> attribute by name, I’m not sure how feasible that would be, since I believe
> you can have multiple attributes with the same name, as long as they are in
> different groups.
>
> -Nathan
>
>
>  *From:* Ivan Busquets <[email protected]>
> *Sent:* Tuesday, August 28, 2012 11:12 AM
> *To:* Nuke Python discussion <[email protected]>
> *Subject:* Re: [Nuke-python] GeoInfo Attribute value from AttribContext?
>
> I had noticed that as well, but never got to report it.
> Please do!
>
> Additionally, it'd be great to be able to get an AttribContext for a given
> attribute ("uv", "N", etc), without having to know its group and type
> beforehand.
> In the NDK, you can do:
>
> GeoInfo.get_attribcontext( "uv" )
>
> But if I'm not mistaken, in the Python API, GeoInfo.attribContext requires
> the name, the group the attribute applies to, and the type of attribute to
> be known.
>
>
>
> On Tue, Aug 28, 2012 at 10:55 AM, Nathan Rusch 
> <[email protected]>wrote:
>
>>   Hey all,
>>
>> Before I put in a feature request or similar, I wanted to make sure I’m
>> not missing something.
>>
>> Currently, it seems that it is not possible to get a GeoInfo attribute
>> value from an AttribContext object in Python, either for built-in or custom
>> attributes. All the attribute properties are available (group, type, name,
>> etc.), but the actual value seems to be as yet unexposed. Am I crazy?
>>
>> Thanks,
>>
>> -Nathan
>>
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>  ------------------------------
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to