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

Add non_color_options to mcprep base data json #616

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

TheDuckCow
Copy link
Member

It's another "one more thing" sort of thing, but the automated release script takes a step to refresh the json update. That is done via the line python mcprep_data_refresh.py -auto in the push_latest script. This pulls data from mcprep_base_data.json file before dynamically filling out the remaining values from Mineways/jmc2obj latest master versions & the latest local Minecraft game jar.

Before this change, I had auto committed the refresh mappings (as I often do) and then saw errors like these in automated tests:

Traceback (most recent call last):
  File "/Users/patrickcrawford/Documents/gits/mcprep/MCprep_addon/tracking.py", line 679, in execute
    raise RuntimeError(self.error_report)
RuntimeError:   File "<addon_path>/prep.py", line 262, in execute
    res = generate.matprep_cycles(
  File "<addon_path>/generate.py", line 356, in matprep_cycles
    res = matgen_cycles_principled(mat, options)
  File "<addon_path>/generate.py", line 1472, in matgen_cycles_principled
    texgen_specular(mat, options.passes, nodeInputs, options.use_reflections)
  File "<addon_path>/generate.py", line 1011, in texgen_specular
    res = util.apply_noncolor_data(nodeTexSpec)
  File "<addon_path>/util.py", line 77, in apply_noncolor_data
    options = env.json_data["non_color_options"]
KeyError: 'non_color_options'

Now all is resolved:

-------------------------------------------------------------------------------
bversion   	ran_tests	ran	skips	failed	errors
-------------------------------------------------------------------------------
(4.2.0)   	all_tests	69	2	0	No errors
(4.0.2)   	all_tests	69	2	0	No errors
(3.6.2)   	all_tests	69	2	0	No errors
(3.5.1)   	all_tests	69	2	0	No errors
(3.4.0)   	all_tests	69	2	0	No errors
(3.3.1)   	all_tests	69	2	0	No errors
(3.2.1)   	all_tests	69	2	0	No errors
(3.1.0)   	all_tests	69	2	0	No errors
(3.0.0)   	all_tests	69	2	0	No errors
(2.93.0)   	all_tests	68	3	0	No errors
(2.90.1)   	all_tests	68	3	0	No errors
(2.80.75)   	all_tests	67	4	0	No errors
tests took 274s to run, ending with code 0

@@ -4525,10 +4632,5 @@
"sunflower",
"water_still",
"water"
],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just calling out that the original problem was that this structure was removed entirely, since I gather it was at one point manually edited in a commit. Now, it is just moved up above since it's generated from the base mcprep json file.

@TheDuckCow
Copy link
Member Author

FYI @StandingPadAnimations in case it ever comes up, that we should never directly edit the mcprep_data_update.json file since it's generated, and perhaps we should add more safeguards in place to prevent the temptation. Updates should go in the mcprep_base_data file or in the script used to generate the combined updated mcprep_data_update.json file.

@TheDuckCow TheDuckCow merged commit e3f136e into dev Aug 8, 2024
1 check passed
@TheDuckCow TheDuckCow deleted the fix-update-data-generator branch August 8, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant