ufe runtime handlers #2831
Replies: 2 comments 5 replies
-
@gelshoffNV From reading your post it appears that you are doing all of this in Python (instead of C++) - is that correct? It should work, but not something that we have tried since we ported the Ufe-Usd code from python to C++. Would you be able to share your code with us? You can take out any parts you want to keep secret. Just the basic overriding code and returning of your interfaces(s). Thanks, Sean |
Beta Was this translation helpful? Give feedback.
-
Hi, I've investigated your problem. There is no simple fix so far, as it uncovered internal problems in the C++ / Python bindings. But I do have some work-around, but they are ugly and I cannot vouch that they will always work in the future, although there are no reason why they would break. There are two issues at play:
The work-around are:
Concretely, in the code file attached below:
I hope these work-around fix all your problems. The fixed example: |
Beta Was this translation helpful? Give feedback.
-
I'm trying to override the usd AttributeHandler by creating my own ufe.AttributesHandler which will call my ufe.Attributes class if the usd not has certain properties, otherwise, it just returns the default usd handler. Overriding and returning the usd handler works, but when I return my custom ufe.Attributes class, certain select callbacks don't seem to work and the AttributeEditor doesn't update with the attributes returned by my class. If I call methods interactively in the script editor, I see all the correct stuff: attributeNames, attribute, etc. I thought it might be a pybind issue, so I started keeping handles to all my instances, but that didn't work. I also made sure to override all methods, not just the pure virtual ones. The frustrating part for me is, I remember having a prototype of this working months ago, and coming back to it, it's not working...possibly some maya updates have caused this, haven't had a chance to install older releases to try. Has anyone tried messing with these ufe handlers?
Beta Was this translation helpful? Give feedback.
All reactions