Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error won't allow to add custom shader properties #171

Closed
mokujinh opened this issue May 13, 2024 · 6 comments · Fixed by #168
Closed

Error won't allow to add custom shader properties #171

mokujinh opened this issue May 13, 2024 · 6 comments · Fixed by #168
Assignees
Labels
bug Something isn't working

Comments

@mokujinh
Copy link

Error:

Python: Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\MustardUI\menu\menu_configure.py", line 125, in draw
    sec = rig_settings.body_custom_properties_sections[scene.mustardui_section_uilist_index]
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: bpy_prop_collection[index]: index 0 out of range, size 0

The conditions for this error may be (not sure) because I added the old MustardUI Float/Bool names to the initial values for some skin shader properties, example:
Value node name: MustardUI Float - Subsurface
Value node label: Subsurface

While working in configuration mode every other option (including end configuration mode) will disappear after that error message, it'll come back after I manually delete the shader property, BUT it won't let me manually add the node values properties again without the error showing up again now, even after changing back the value nodes names without the mustardui part on it, not allowing me to continue configuring the model.

@Mustard2 Mustard2 self-assigned this May 15, 2024
@Mustard2 Mustard2 added the bug Something isn't working label May 15, 2024
@Mustard2
Copy link
Owner

Can you send me the Blender file?

@mokujinh
Copy link
Author

Can you send me the Blender file?

Here: https://drive.google.com/file/d/1OHlXGUYiNJF9fZiU18Mc_0noqCvShNBB
Blender version: 4.1.1
UI version: 0.31.1.9

@mokujinh
Copy link
Author

By the way, deleting the shader property is the only way to advance and finish the configuration mode, otherwise it gets "locked"

@mokujinh
Copy link
Author

For the record, these are the steps that lead to this error:

Created multiple value based properties in the shader editor (subsurface, wetness, nails color, makeup, etc).

They all included the old name format: "MustardUI Float - Subsurface"

Making the UI search for the properties on it's own in configuration mode lead to the error.

What I did to try to solve it but didn't work:

I deleted the properties from the UI menu, that made the remaining options including the ability to "end" configuration mode to come back.

Manually added the properties again, didn't work, lead to the same error.
Renamed the properties deleting the MustardUI Float name out of them, didn't work, lead to the same error.
Duplicated, deleted old mesh, purged, and restarted the UI configuration from scratch with new clean model, didn't work, lead to the same error.
Deleted and assigned new materials individually before adding properties again, didn't work lead to the same error.
New completely different model
Manually tried to add the properties values in configuration mode, same error.
So I think this is a global thing present for this version of the UI, no idea how to make this work.

@Mustard2
Copy link
Owner

Ok, I'll take a look asap! Sorry I'm a bit busy lately :(

@Mustard2
Copy link
Owner

Ok I found the issue, it was a missing check on the length of the section container.
I'm pushing a new version.

Thanks for reporting this!

Mustard2 added a commit that referenced this issue May 25, 2024
@Mustard2 Mustard2 linked a pull request May 25, 2024 that will close this issue
Mustard2 added a commit that referenced this issue May 25, 2024
* App version check has been rewritten to be optional (#165)
* Fix #166 (pull request #169 by @cl3m3c7 )
* Fix for #171
* Other small bug fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants