-
Notifications
You must be signed in to change notification settings - Fork 42
further updates to colorspace #38
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
base: master
Are you sure you want to change the base?
Changes from all commits
d095f94
1488195
8010607
8901cf9
314de7d
a6cbca9
1c03bb9
3048580
5313023
90d140a
ed2bc2a
bf1638e
73ff5c1
caf7ce4
9f02a92
db880c3
e36197e
116babc
8d044e4
c21e1ce
f3943c4
fca0f25
2ebe317
910eff5
56f3f81
02685ad
efc7e5e
12f1c7a
fc9467c
885dc6e
37f74c8
c743b19
254a831
3ebf993
35e77f5
c3dd4a3
d2419d9
43464d8
c316aa2
919c4e4
3d8031f
85d06d3
a2de57a
29032ab
ac562bd
b260d7c
63a57bc
66b549a
56add87
ccdfcd2
e3b76c4
ea6de3d
b446309
624a9d0
7e6115e
4676923
698f71a
ee9ca17
b0fe41e
2b4fbda
d53e129
361ef3c
5d29e8c
6136586
1272fa5
f20e2e4
196a625
06f3952
7403750
760a6b6
204edaf
f184b6c
fa2e3e2
792255f
d27d4f7
7a91d26
9f01b3b
b4ea29b
0f8a7bb
4991852
eef87e3
809dbbb
70100e4
abd6f0f
808652e
1e3443b
18dc56f
0ceb3a4
4373d5e
dbc730a
d0dfd80
fd7f6e9
afa4a01
d6f9adb
e7e5930
14c6dd7
d698ff1
1f4f478
d56bcd1
9721a70
57dfbd2
fbed06e
0e36c57
859ab06
79cecbd
a435915
565d936
b4da8a6
ad3938a
c49d442
7df8a1d
be87300
9f9857e
6147225
c5a4adb
826c433
e43bf39
b5914bb
a5b312d
34841a6
5a45b25
d400647
e1fee5f
6528bdc
ffb7436
bafb3bc
2a98973
54b0e0a
c310cf6
1caee51
8fac073
90f6c8b
b8bdc50
40cd76f
91b3bf6
5dee698
656dc78
2bda8b5
a749fb1
e3f4768
a70803d
3fbc1e3
d145122
fc6232b
daf8954
4892fbc
4b5ef9d
1fce42c
5539b09
5988c20
3a2932d
d82489b
4be1a58
b60912f
60bd85a
807e45d
9cb017d
571730c
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 |
|---|---|---|
|
|
@@ -153,7 +153,9 @@ def get_node_render_template(self, node): | |
| """ | ||
| Return the render template for the specified node | ||
| """ | ||
| return self.__write_node_handler.get_render_template(node) | ||
| write_type = self.__write_node_handler.get_node_write_type_name(node) | ||
|
|
||
| return self.__write_node_handler.get_render_template(node, write_type) | ||
|
|
||
| def get_node_publish_template(self, node): | ||
| """ | ||
|
|
@@ -204,7 +206,8 @@ def reset_node_render_path(self, node): | |
| """ | ||
| self.__write_node_handler.reset_render_path(node) | ||
|
|
||
| def convert_to_write_nodes(self, show_warning=False): | ||
| def convert_to_write_nodes(self, selected_node=None, show_warning=False): | ||
|
|
||
| """ | ||
| Convert all Shotgun write nodes found in the current Script to regular | ||
| Nuke Write nodes. Additional toolkit information will be stored on | ||
|
|
@@ -215,6 +218,7 @@ def convert_to_write_nodes(self, show_warning=False): | |
| :param create_folders: Optional bool that sets whether the operation will create the required output folders; | ||
| defaults to False | ||
| """ | ||
| self.__write_node_handler.convert_sg_to_nuke_write_nodes(selected_node=None) | ||
|
|
||
| # By default we want to convert the write nodes, unless the warning is shown and the user chooses to abort. | ||
| continue_with_convert = True | ||
|
|
@@ -265,33 +269,53 @@ def convert_from_write_nodes(self, show_warning=False): | |
| if continue_with_convert: | ||
| self.__write_node_handler.convert_nuke_to_sg_write_nodes() | ||
|
|
||
| def create_new_write_node(self, profile_name): | ||
| def create_new_write_node(self, profile_name, write_type): | ||
| """ | ||
| Creates a Shotgun write node using the provided profile_name. | ||
| """ | ||
| self.__write_node_handler.create_new_node(profile_name) | ||
| new_node = self.__write_node_handler.create_new_node(profile_name, write_type) | ||
|
|
||
| return new_node | ||
|
|
||
| # Private methods | ||
| # | ||
| def __add_write_node_commands(self, context=None): | ||
| """ | ||
| Creates write node menu entries for all write node configurations | ||
| and the convert to and from Shotgun write node actions if configured to do so. | ||
| """ | ||
| context = context or self.context | ||
|
|
||
| write_node_icon = os.path.join(self.disk_location, "resources", "tk2_write.png") | ||
|
|
||
| for profile_name in self.__write_node_handler.profile_names: | ||
| write_type = "Version" | ||
| profile_list = [] | ||
| write_node_icon = os.path.join(self.disk_location, "resources", "tk2_write.png").replace("\\","/") | ||
|
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. missing whitespace after ',' |
||
| profile_set = set(self.__write_node_handler.profile_names) | ||
|
|
||
| # Remove fileset types nt associated with Project | ||
| if not self.__write_node_handler.proj_info['sg_delivery_fileset']: | ||
| nuke.tprint("No fileset specified. Loading defaults...") | ||
| profile_list = self.__write_node_handler.profile_names | ||
| else: | ||
| if any(self.__write_node_handler.proj_info['sg_delivery_fileset']['name'] in s.lower() for s in self.__write_node_handler.profile_names): | ||
| if context.step['name'] != 'Roto': | ||
| match_set = {"Jpeg", self.__write_node_handler.proj_info['sg_delivery_fileset']['name'].title()} | ||
| else: | ||
| nuke.tprint("Context is " + context.step['name'] + ".") | ||
| match_set = {"Jpeg", "Exr"} | ||
|
|
||
| profile_list = list(match_set.intersection(profile_set)) | ||
| else: | ||
| nuke.tprint("Profile name not in list!") | ||
| profile_list = self.__write_node_handler.profile_names | ||
|
|
||
|
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. blank line contains whitespace |
||
| for profile_name in profile_list: | ||
| # add to toolbar menu | ||
| cb_fn = lambda pn=profile_name: self.__write_node_handler.create_new_node(pn) | ||
| cb_fn = lambda pn=profile_name,wt=write_type: self.__write_node_handler.create_new_node(pn,wt) | ||
|
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. do not assign a lambda expression, use a def |
||
| self.engine.register_command( | ||
| "%s [Shotgun]" % profile_name, | ||
| "%s" % profile_name, | ||
| cb_fn, | ||
| dict( | ||
| type="node", | ||
| icon=write_node_icon, | ||
| context=context, | ||
| icon=write_node_icon | ||
| ) | ||
| ) | ||
|
|
||
|
|
@@ -302,7 +326,8 @@ def __add_write_node_commands(self, context=None): | |
| # as these aren't supported when converting back | ||
| # todo: We should check the settings and then scan the scene to see if any SG write nodes use promoted knobs | ||
| write_nodes = self.get_setting("write_nodes") | ||
| promoted_knob_write_nodes = next((a_node for a_node in write_nodes if a_node['promote_write_knobs']), None) | ||
| if write_nodes: | ||
| promoted_knob_write_nodes = next((a_node for a_node in write_nodes if a_node['promote_write_knobs']), None) | ||
|
|
||
| if not promoted_knob_write_nodes: | ||
| # no presets use promoted knobs so we are OK to register the menus. | ||
|
|
||
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.
trailing whitespace