Adding new parameter to hook class method

Good morning people!

I would like to add a new parameter to the execute method, that’s inside scene_operation-tk-maya, but I don’t see a way on how to retrieve this value, any tips or tricks to help? I did some research but couldn’t find any similar issues.

Thanks!

The question is not completely clear. If you subclass the scene operation hook, you can change its parameters as you wish. How are you passing that new parameter, though? This would be called from tk-maya, so are you using a forked engine to do that?
Also, you could use kwargs (which you can see as the last parameter) to add arbitrary named arguments in a dict.

@mmoshev Thanks for the reply!! Yep sorry I wasn’t clear, that was the real question how would I be able to pass this new parameter from x to this execute function

The hooks are triggered in the engine and corresponding apps. I am not familiar with tk-maya to provide more info. From a quick look, the engine does not fire additional hooks, so maybe relies on the superclass implementation for that.