eoyilmaz / anima

VFX & Animation Pipeline Library
MIT License
137 stars 27 forks source link

Anima pipeline Workflow Q&A #23

Closed tws0002 closed 6 years ago

tws0002 commented 6 years ago

Hi I have an issue with files naming system

Thanks Desmond

eoyilmaz commented 6 years ago

https://pythonhosted.org/stalker/#examples

Erkan Ozgur Yilmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Mon, May 14, 2018 at 3:12 PM Desmond notifications@github.com wrote:

Hi I have an issue with files naming system

  • how can I set the default file naming system to the file naming system that I desire?

Thanks Desmond

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/23, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtF-OyGKhDu_wpDcDMtiGmmP5v8KMks5tyXSsgaJpZM4T9rQz .

tws0002 commented 6 years ago

Hi,

Thanks for the reply. Because i using anima pipeline for the current project but i cannot make the naming right!! Can you give some explanation about Jinja2 for filename in stalker? I was trying to have a naming like this ep101_s001c001_fxAMain_v01. but I don't know how to make it after all the try!! aniamq01 I was trying to name like this ep101_s001c001_fxAMain_v01

Please help Desmond

tws0002 commented 6 years ago

Hi Erkan, I have tried to fix my file naming system but I not sure if this the correct way to code it. can you give me some advice? here is my code

FT = FilenameTemplate(
    name="Filename_Template",
    target_entity_type="task",
    path='$REPO{{project.repository.id}}/{{project.code}}/{%- for parent_task in parent_tasks -%}{{parent_task.nice_name}}/{%- endfor -%}",
    filename="{% for ep in project.sequences %}{{ep.name}}{% endfor %}_{% for shot in project.shots %}{% set sh = shot %}{% for cut in sh.tasks %}{% set c = cut %}{% for fxsc in c.tasks %}{% for role in fxsc.tasks %}{{sh.name}}{{cut.name}}_{{role.name}}{% endfor %}{% endfor %}{% endfor %}{% endfor %}_{{version.take_name}}_v{{"%02d"|format(version.version_number)}}"
)

i found that my code is way too long!!

please give advice Desmond

eoyilmaz commented 6 years ago

Aside being long it is not correct. What you are doing is to put all the sequence names of the project side by side and then add all the shot names to is etc.

Here is what you are looking for:

ft = FilenameTemplate(
    name='Filename_Template',
    target_entity_type='Task',
    path='$REPO{{project.repository.id}}/{{project.code}}/{%- for parent_task in parent_tasks -%}{{parent_task.nice_name}}/{%- endfor -%}',
    #filename='{% for ep in project.sequences %}{{ep.name}}{% endfor %}_{% for shot in project.shots %}{% set sh = shot %}{% for cut in sh.tasks %}{% set c = cut %}{% for fxsc in c.tasks %}{% for role in fxsc.tasks %}{{sh.name}}{{cut.name}}_{{role.name}}{% endfor %}{% endfor %}{% endfor %}{% endfor %}_{{version.take_name}}_v{{"%02d"|format(version.version_number)}}',
    filename="""{%- for p in parent_tasks -%}
        {%- if p.entity_type == 'Sequence' -%}
            {{p.name}}
        {%- elif p.entity_type == 'Shot' -%}
            _{{p.name}}{{p.children[0].name}}
        {%- endif -%}
    {%- endfor -%}
    {%- set fx = parent_tasks[-2] -%}
    _{{fx.name}}_{{version.take_name}}_v{{"%02d"|format(version.version_number)}}""",
)
tws0002 commented 6 years ago

Thanks for the advice.

Question

eoyilmaz commented 6 years ago

No we generally use Sequence in place of Episodes, we give names like Ep001.