shotgunsoftware / python-api

A Python-based library for accessing Flow Production Tracking API.
https://developer.shotgridsoftware.com/python-api
Other
308 stars 198 forks source link

SG-10151: set field visibility via API #209

Closed jfboismenu closed 5 years ago

jfboismenu commented 5 years ago

Adds support for updating field visibility through the API.

This can be achieved by the following code:

sg.schema_field_update("Asset", "sg_my_custom_field", {"visible": False}, project)

where project is a dictionary referring to project in which we want to hide "sg_my_custom_field". Restoring visibility can be done via

sg.schema_field_update("Asset", "sg_my_custom_field", {"visible": True}, project)

Note: The build is currently failing because the feature hasn't been released in Shotgun. Once the feature is released the test will be updated to the right version check and the feature commited.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 1248


Files with Coverage Reduction New Missed Lines %
shotgun_api3/shotgun.py 159 82.78%
<!-- Total: 159 -->
Totals Coverage Status
Change from base Build 1207: -0.9%
Covered Lines: 6752
Relevant Lines: 9825

💛 - Coveralls