(cls)
| 30 | |
| 31 | @classmethod |
| 32 | def get_bcfxml(cls) -> Union[bcf.bcfxml.BcfXml, None]: |
| 33 | if not cls.bcfxml: |
| 34 | props = tool.Bcf.get_bcf_props() |
| 35 | bcf_filepath = props.bcf_file |
| 36 | if not os.path.isabs(bcf_filepath): |
| 37 | bcf_filepath = os.path.abspath(os.path.join(bpy.path.abspath("//"), bcf_filepath)) |
| 38 | if bcf_filepath: |
| 39 | try: |
| 40 | cls.bcfxml = bcf.bcfxml.load(bcf_filepath) |
| 41 | except: |
| 42 | # there will be a plenty of "Permission denied" errors |
| 43 | # as many poll() methods will try to access the bcfxml simultaneously |
| 44 | # the first time it's loaded |
| 45 | pass |
| 46 | return cls.bcfxml |
| 47 | |
| 48 | @classmethod |
| 49 | def set(cls, bcfxml: Union[bcf.bcfxml.BcfXml, None], filepath: str) -> None: |
no test coverage detected