daz3d / DazToBlender

Daz to Blender Bridge
https://www.daz3d.com/daz-to-blender-bridge
Other
213 stars 46 forks source link

RunOnce Script Fails to Install DazToBlender Scripts Menu #118

Open Riftr opened 2 years ago

Riftr commented 2 years ago

The DazToBlender runonce script fails to install the DAZ to Blender plugin within DAZ. This happens both when you install via DAZ Central or follow the manual instructions found on the main page to this repository.

The error appears to be that DAZ doesn't create the files it needs when the RunOnce script is executed, both under the program files and the users %appdata% directories. There isn't any permissions issues, DAZ just decides it can't find the files and gives up instead of making them. Creating them manually then running DAZ with the RunOnce script successfully installs the DazToBlender scripts and enables the menu as expected.

I found the solution via trial and error by looking at the DAZ log file. According to the logs, DAZ is having problems opening the following file:

2022-04-07 21:49:37.391 [ERROR] :: Open File Failed - The file could not be opened: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/layout.dsx

Manually creating (touching) that file then populates that file correctly with contents upon starting Daz again. Then you get the following errors:

2022-04-07 21:49:37.391 [ERROR] :: Open File Failed - The file could not be opened: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/actions.dsx
2022-04-07 21:49:37.391 [ERROR] :: Open File Failed - The file could not be opened: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/customactions.dsx
2022-04-07 21:49:37.391 [ERROR] :: Open File Failed - The file could not be opened: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/menus.dsx
2022-04-07 21:49:37.391 [ERROR] :: Open File Failed - The file could not be opened: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/actionmgr.dsx
2022-04-07 21:49:37.392 [ERROR] :: Open File Failed - The file could not be opened: C:/Daz 3D/Applications/64-bit/DAZ 3D/DAZStudio4/resources/actionmgr.dsx
2022-04-07 21:49:37.392 [ERROR] :: Open File Failed - The file could not be opened: C:/Daz 3D/Applications/64-bit/DAZ 3D/DAZStudio4/resources/dazstudio.mnu
2022-04-07 21:49:37.403 [ERROR] :: Open File Failed - The file could not be opened: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/toolbars.dsx

Manually creating all those files and starting DAZ with the RunOnce script in place again solves the issue. Firstly, Daz is now able to use those files correctly and populates them with various contents. Secondly, the Scripts menu appears as it should within DAZ including the DAZ to Blender bridge options:

image

Its also worth noting that the changes stick unless you change the layout, then the Scripts menu disappears again. Here are the logs for that:

2022-04-07 23:40:44.823 [ERROR] :: Rename File Failed: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/tempactions.dsx > C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/tempactions.dsx.bak
2022-04-07 23:40:44.833 [ERROR] :: Rename File Failed: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/tempmenus.dsx > C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/tempmenus.dsx.bak
2022-04-07 23:40:44.838 [ERROR] :: Rename File Failed: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/temptoolbars.dsx > C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/temptoolbars.dsx.bak
2022-04-07 23:40:44.844 [ERROR] :: Rename File Failed: C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/templayout.dsx > C:/Users/USER/AppData/Roaming/DAZ 3D/Studio4/temp/templayout.dsx.bak

To fix this again, close Daz then:

  1. Delete the files under the above \temp\ folder
  2. Place the RunOnce script (Daz to Blender_Install.dsa) under C:\Users\USER\AppData\Roaming\DAZ 3D\Studio4\RunOnce
  3. Start Daz