-
Notifications
You must be signed in to change notification settings - Fork 129
Maya: Build workfile by template #3315
Maya: Build workfile by template #3315
Conversation
Exciting stuff! Should we have a task name regex for the profile, so we can be flexible with tasks of the same type but different names? |
Do we have to put a taks list like for the orignal build ? |
Have only skimmed this PR, so ignore my thought if it requires more work. |
Don't worry, i will do it! |
@@ -0,0 +1,61 @@ | |||
from openpype.pipeline import registered_host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to openpype.pipeline
? We're in process of reducing pipeline related functions from openpype.lib
to avoid cross imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a package of workfile template build. So maybe a folder with this file, abstract_template_loader.py
and build_template_exceptions.py
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I put the file build_template.py
, abstract_template_loader.py
and build_template_exceptions.py
in openpype/lib/build_workfile
or openpype/build_workfile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iLLiCiTiT Can you tell me which folder please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry for late response, just ./openpype/pipeline/workfiles
. There will be moved more workfiles related code over time.
Also keep updated changes in avalon_context.py
most of those functions were changed or removed over time.
return output | ||
|
||
|
||
@with_pipeline_io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function does not need the decorator.
@with_pipeline_io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big feature and a massive code change. I tested just the basic functionality
- creating templates
- modifying project settings
- the initial building of a scene
-
this is working good so far-
during further testing, I encountered a couple of issues
when running Update Workfile from a template (after the initial build of the scene with no asset loaded)
# Error: ValueError: file D:\REPO\OpenPype\openpype\hosts\maya\api\template_loader.py line 83: No object matches name: AVALON_CONTAINERS #
another issue is with Update Placeholder.
when you run it, it will open a window. If you close it without doing any change, it will remove custom attributes from the placeholder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two small things were fixed and it seems quite stable now.
we should let it go to production for a real-world test :)
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move "context specific" functionality from openpype.lib
to openpype.pipeline
. Function collect_last_version_repres
changed code over time so please update the code from latest develop. And get_loaders_by_name
should be moved into openpype.pipeline.load.utils.py
.
We will fix this on our end in an intermediate branch.
091feec
to
9756b1f
Compare
Brief description
Following discussion #2013 and resumption of work from ellipsanime #2202
Templated Build Workfile
Building a workfile using a template designed by users. Helping to assert homogeneous subsets hierarchy and imports. Template stored as file easy to define, change and customize for production needs.
1. Make a template
Make your template. Add families and everything needed for your tasks. Here is an example template for the modeling task using a placeholder to import a gauge.
If needed, you can add placeholders when the template needs to load some assets. OpenPype > Template Builder > Create Placeholder
Fill in the necessary fields (the optional fields are regex filters)
2. Configure Template
3. Build your workfile
Open maya
Build your workfile