mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #2877 from pypeclub/bugfix/missing_time_function
General: Missing time function
This commit is contained in:
commit
3cbc93d59c
7 changed files with 21 additions and 8 deletions
|
|
@ -63,7 +63,10 @@ from .anatomy import (
|
|||
Anatomy
|
||||
)
|
||||
|
||||
from .config import get_datetime_data
|
||||
from .config import (
|
||||
get_datetime_data,
|
||||
get_formatted_current_time
|
||||
)
|
||||
|
||||
from .python_module_tools import (
|
||||
import_filepath,
|
||||
|
|
@ -309,6 +312,7 @@ __all__ = [
|
|||
"Anatomy",
|
||||
|
||||
"get_datetime_data",
|
||||
"get_formatted_current_time",
|
||||
|
||||
"PypeLogger",
|
||||
"get_default_components",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class RenderInstance(object):
|
|||
|
||||
# metadata
|
||||
version = attr.ib() # instance version
|
||||
time = attr.ib() # time of instance creation (avalon.api.time())
|
||||
time = attr.ib() # time of instance creation (get_formatted_current_time)
|
||||
source = attr.ib() # path to source scene file
|
||||
label = attr.ib() # label to show in GUI
|
||||
subset = attr.ib() # subset name
|
||||
|
|
|
|||
|
|
@ -74,3 +74,9 @@ def get_datetime_data(datetime_obj=None):
|
|||
"S": str(int(seconds)),
|
||||
"SS": str(seconds),
|
||||
}
|
||||
|
||||
|
||||
def get_formatted_current_time():
|
||||
return datetime.datetime.now().strftime(
|
||||
"%Y%m%dT%H%M%SZ"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue