-
Notifications
You must be signed in to change notification settings - Fork 60
SG-43677 Fix hooks to support multiple keyword arguments #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ class MaxActions(HookBaseClass): | |
| ############################################################################################################## | ||
| # public interface - to be overridden by deriving classes | ||
|
|
||
| def generate_actions(self, sg_publish_data, actions, ui_area): | ||
| def generate_actions(self, sg_publish_data, actions, ui_area, **kwargs): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why now?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because I'm injecting a new argument to the hook for flowam integration to work. This is not needed on all DCCs (i.e. 3ds, photoshop) but it crashes due to the unexpected argument. So this is just adding the placeholder. You can see the difference on this file and compare it to tk-maya_actions.py to have a better picture. |
||
| """ | ||
| Returns a list of action instances for a particular publish. | ||
| This method is called each time a user clicks a publish somewhere in the UI. | ||
|
|
@@ -101,7 +101,7 @@ def generate_actions(self, sg_publish_data, actions, ui_area): | |
|
|
||
| return action_instances | ||
|
|
||
| def execute_multiple_actions(self, actions): | ||
| def execute_multiple_actions(self, actions, **kwargs): | ||
| """ | ||
| Executes the specified action on a list of items. | ||
|
|
||
|
|
@@ -132,7 +132,7 @@ def execute_multiple_actions(self, actions): | |
| params = single_action["params"] | ||
| self.execute_action(name, params, sg_publish_data) | ||
|
|
||
| def execute_action(self, name, params, sg_publish_data): | ||
| def execute_action(self, name, params, sg_publish_data, **kwargs): | ||
| """ | ||
| Execute a given action. The data sent to this be method will | ||
| represent one of the actions enumerated by the generate_actions method. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this file? I'm surprised we missed it!