I am following the tutorial of publishing a camera in Maya. I think I did everything in this page
But when I launch publish Panel, none of the camera has been collected. Debug is showing the following.
// Debug: Shotgun manager: Checking plugin: <PublishPluginInstance: {self}/publish_file.py:{config}/tk-multi-publish2/maya/publish_camera.py> //
// Debug: Shotgun manager: Item All Session Geometry (Geometry) with spec ‘maya.session.geometry’ does not match any plugin filters: ‘[‘maya.session.camera’]’ //
I would add some debugging to check that the camera is being collected correctly.
On the guide the collector should be creating an item with "maya.session.camera", which the plugin should act upon. The log line you highlighted is it rejecting the scene file, which I would expect, but it should be accepting the camera item if it’s been collected.
I would add some logging to this section of your collector:
...
# these camera items to perform other actions
cam_item = parent_item.create_item(
"maya.session.camera",
"Camera",
camera_name
)
...
I added, debug line at the bottom, it appears nothing has been collected.
cam_item = parent_item.create_item(
"maya.session.camera",
"Camera",
camera_name
)
# set the icon for the item
cam_item.set_icon_from_path(icon_path)
# store the camera name so that any attached plugin knows which
# camera this item represents!
cam_item.properties["camera_name"] = camera_name
cam_item.properties["camera_shape"] = camera_shape
self.logger.debug("Collected camera: " + camera_name)
It appears the function isn’t being called at all. Don’t really know why tho. I have set shot step to
“{self}/collector.py:{config}/tk-multi-publish2/maya/collector.py”.
Open your custom collector hook and add the following method call at the bottom of the process_current_session method where you added the call to collect meshes in the surfacing section:
Can the script be found in config/hooks/tk-multi-loader2/tk-maya_actions.py
I would search for “It will not be loaded” in your tk-maya.log.
You may have a line that looks a bit like:
App configuration Error for tk-multi-loader2 (configured in environment ‘/sg_toolkit/greyhounddev.shotgunstudio.com/configs/my_project/env/asset_step.yml’). It will not be loaded: Invalid configuration setting ‘actions_hook’ for tk-multi-loader2: The specified hook file ‘/sg_toolkit/greyhounddev.shotgunstudio.com/configs/my_project/hooks/tk-multi-loader2/tk-maya_actions.py’ does not exist.