Saturday, March 30, 2024

Manual Editing of Favorite Morphs

It is possible to import the same morph twice, both as a standard morph and as a custom morph. If we have done that and then saved the morphs as favorite morphs, the duplicate morphs will be loaded to each new character that uses these favorites. This is a nuisance that I have run into several times, and since it turns out that I'm not alone, I will explain how I deal with this issue: by cheating. More exactly, by editing the json file with favorite morphs in a text editor.

Here we have loaded some FACS morphs, and also loaded some custom morphs that move the jaw. We notice that the FACS Jaw Open and Custom Open sliders always show the same value. This is because they are in fact the same slider; the custom property "facs_jnt_JawOpen". We want to remove this slider from the json file, so next time the slider only appears in the FACS panel.

Save favorite morphs to a new file. Disable the new Compact View option to make it easier to edit the json file.

Now open the json file that we just saved in a text editor. Each line contains information about one morph: the file where it is defined, the morph name, and the body type. We see that  several JawOpen morphs appear in both the FACS and Custom/Jaw sections. Delete the lines from the latter and save the json file.

If we now load the favorite morphs to a new character, the Jaw Open morph only appears in the FACS panel.

A warning. The json format is quite picky, and it is easy to change the file to illegal syntax. That is why I recommend that you save a new file, so the old one is not corrupted. 

Here is an example. Removing the last morph from the FACS section make the syntax illegal, because of the trailing comma at the end of the line before it. The elements of a json list are separated by commas, but there must be no comma after the last element.

If we try to load the corrupt file we get an error. More information about what went wrong is given in the console window.

JSON error while reading ascii file
"D:\home\myblends\New Folder\my-favos-noncompact.json"
Expecting value: line 14 column 13 (char 2101)

So the problem with the extra comma happens close to line 14 (the comma is actually on the line before).