Closed tws0002 closed 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 .
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!! I was trying to name like this ep101_s001c001_fxAMain_v01
Please help Desmond
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
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)}}""",
)
Thanks for the advice.
Question
No we generally use Sequence
in place of Episodes, we give names like Ep001
.
Hi I have an issue with files naming system
Thanks Desmond