Skip to content
Discussion options

You must be logged in to vote

Hi @zichenwang01 ,

Your custom class needs to be a subclass of mi.Object

class T(mi.Object):
    def __init__(self, transform:mi.Transform4f):
        self.transform = transform
        super().__init__(self)
        
    def traverse(self, callback):
        callback.put_parameter("p", self.transform.matrix[1, 3], mi.ParamFlags.Differentiable)

Hopefully your traversal should then work

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zichenwang01
Comment options

Answer selected by zichenwang01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants