fireclawthefox / DirectGuiDesigner

A Visual Editor for Panda3Ds Direct GUI
BSD 2-Clause "Simplified" License
25 stars 2 forks source link

Error when adding objects with thumbs - Panda 1.10.11 #5

Closed pau1ie closed 2 years ago

pau1ie commented 2 years ago

Thanks for this program. It has been a great help in allowing me to design my UI.

Pip won't install Panda3d 1.10.8 any more, so I installed 1.10.11. This is probably what causes my problem. If I insert any object with a thumb, I get an error:

  File "~/panda3d/DirectGuiDesigner/DirectGuiDesigner/panels/PropertiesPanel.py", line 969, in __createBaseNInput
    if updateElement[parts[0]] is not None:
  File "~/panda3d/DirectGuiDesigner/dgd/lib/python3.10/site-packages/direct/gui/DirectGuiBase.py", line 484, in cget
    raise KeyError('Unknown option "' + option + \
KeyError: 'Unknown option "thumb" for DirectSlider'

I believe the problem is caused by option thumb_image_size, being split.

To reproduce:

Incidentally the Startup section readme also needs to be updated to change the name of the main program from DirectGuiDesigner.py to main.py

fireclawthefox commented 2 years ago

Hey, thanks for using the designer.

It seems this was a problem that will be fixed in the CoreAndUIRewrite branch which will probably be merged into main soon. I've also pushed my changes I had laying around here for the main branch, maybe they've fixed this problem too. Otherwise, you can already switch to the rewrite branch and see if it works for you. The main limitation of that currently is, it doesn't support custom widgets yet.

The outdated p3d version in the requirements file is definitely something that needed to be fixed which should be by now.

Also thanks for the hint regarding the wrong name in the readme I've pushed a fix for this.

pau1ie commented 2 years ago

Thanks for the very quick response. I still get the error on the updated master branch.I attach the full stack trace as that is likely to be more helpful than what I pasted above. I copied it from the terminal output. I will try the CoreAndUIRewrite branch later. master.txt

fireclawthefox commented 2 years ago

Thanks for the stack trace, I was able to find the problem and pushed a fix for it just now. It affected pretty much any component with sub components that could contain an image.

pau1ie commented 2 years ago

Thanks for that! I did some testing of the CoreAndUIRewrite branch, and it seems OK so far. I don't need custom widgets, so maybe I should stick with that. The issue I encountered is fixed. I found another issue in the master branch. If I insert an option menu to a new project, then save it and open it again I get errors. I attach the log DirectGuiDesigner.log.txt .

fireclawthefox commented 2 years ago

It seems there are still quite a few problems left there, which is also why I've created the core and UI rewrite. Since I'd really like to focus my time to finish the rewrite, I probably won't fix those other problems soon. Though I think I will finish it in the next few days since the last big step, supporting custom widgets is done by now. If you are good with using the branch in the meantime that would also help a lot since fixing bugs there will be the higher priority and will probably go much simpler and faster for me.

fireclawthefox commented 2 years ago

Finally fixed most of the remaining problems I had with the editor and was able to merge it into master. With that your problems should be solved and hence I'll close this issue. If you find any new problems just open up a new issue.

And again, thanks for the reports!