using $OS in a rop confilicts with unexpandedString() method in afanasy.py

Post Reply
keyframe
Posts: 62
Joined: Sat Jan 21, 2017 9:43 pm
Location: Toronto

using $OS in a rop confilicts with unexpandedString() method in afanasy.py

Post by keyframe »

Heya Timur,

We use $OS.$F4.exr for vm_picture and $OS.$F4.ifd for soho_diskfile by convention. This allows us to name and version the images and ifds by simply renaming the rop.

However, in afanasy.py (version 2.2, line 504) you are setting:

Code: Select all

        if read_rop:
            images = ropnode.parm('vm_picture')
            files = ropnode.parm('soho_diskfile')
            afnode.parm('sep_images').set(images.unexpandedString())
            afnode.parm('sep_files').set(files.unexpandedString())
In our case, unexpandedStrings() returns $OS.$F4.exr (as expected), however, when it's actually evaluated, it returns the name of the afanasy rop, and not the mantra rop in question.

This results in ifd files and renders all being named (typically) afanasy1.$F4.ifd and afanasy1.$F4.exr respectively.

Thoughts? I'm hoping there is a handy workaround, without having to branch your afanasy.py file.

Best,

G
--
Rocky Linux 8.5, cgru 3.2.1
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: using $OS in a rop confilicts with unexpandedString() method in afanasy.py

Post by timurhai »

Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: using $OS in a rop confilicts with unexpandedString() method in afanasy.py

Post by timurhai »

Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
keyframe
Posts: 62
Joined: Sat Jan 21, 2017 9:43 pm
Location: Toronto

Re: using $OS in a rop confilicts with unexpandedString() method in afanasy.py

Post by keyframe »

This is a great solve. Thanks. I'll update the local file from the repo!

G
--
Rocky Linux 8.5, cgru 3.2.1
Post Reply