Skip to content

Commit

Permalink
Fixed settings parameter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamphues committed Oct 28, 2020
1 parent e5d8bcf commit 2b7415e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 235 deletions.
23 changes: 12 additions & 11 deletions hooks/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ def common_file_info(self):

# do this once to avoid unnecessary processing
self._common_file_info = {
"Object File": {
"extensions": ["obj"],
"icon": self._get_icon_path("file.png"),
"item_type": "file.obj"
},
"Alias File": {
"extensions": ["wire"],
"icon": self._get_icon_path("alias.png"),
Expand Down Expand Up @@ -205,9 +200,9 @@ def process_file(self, settings, parent_item, path):
self._collect_folder(parent_item, path)
return None
else:
return self._collect_file(settings, parent_item, path)
return self._collect_file(parent_item, path)

def _collect_file(self, settings, parent_item, path, frame_sequence=False):
def _collect_file(self, parent_item, path, frame_sequence=False):
"""
Process the supplied file path.
Expand Down Expand Up @@ -268,12 +263,16 @@ def _collect_file(self, settings, parent_item, path, frame_sequence=False):
try:
for (sequence_path, sequence_files) in frame_sequences:
file_item.properties["sequence_paths"] = sequence_files
self.logger.debug("Added %s to sequence_paths" % (sequence_files))
self.logger.debug("Added %s to sequence_paths" % (sequence_files))
except Exception as e:
self.logger.warning("Something happened while registering file sequences.")
self.logger.warning(
"Something happened while registering file sequences."
)
self.logger.error(e)

self.logger.debug("Set sequence_paths to %s" % (file_item.properties["sequence_paths"]))
self.logger.debug(
"Set sequence_paths to %s" % (file_item.properties["sequence_paths"])
)

self.logger.info("Collected file: %s" % (evaluated_path,))

Expand Down Expand Up @@ -427,7 +426,9 @@ def _get_item_info(self, path):

# everything should be populated. return the dictionary
return dict(
item_type=item_type, type_display=type_display, icon_path=icon_path,
item_type=item_type,
type_display=type_display,
icon_path=icon_path,
)

def _get_icon_path(self, icon_name, icons_folders=None):
Expand Down
5 changes: 3 additions & 2 deletions hooks/publish_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def settings(self):
"File Types": {
"type": "list",
"default": [
["Object File", "obj"],
["BGEO Cache", "bgeo", "bgeo.sc"],
["Alias File", "wire"],
["Alembic Cache", "abc"],
Expand Down Expand Up @@ -570,7 +569,9 @@ def get_publish_path(self, settings, item):
if work_template.validate(path):
work_fields = work_template.get_fields(path)
else:
self.logger.warning("Could not validate work_template property, check if it is configured correctly.")
self.logger.warning(
"Could not validate work_template property, check if it is configured correctly."
)

missing_keys = publish_template.missing_keys(work_fields)

Expand Down
222 changes: 0 additions & 222 deletions hooks/publish_standalone.py

This file was deleted.

0 comments on commit 2b7415e

Please sign in to comment.