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

Outstanding UAT fixes for 3.6.0 #601

Closed
3 tasks done
TheDuckCow opened this issue Jul 9, 2024 · 14 comments · Fixed by #603 or #611
Closed
3 tasks done

Outstanding UAT fixes for 3.6.0 #601

TheDuckCow opened this issue Jul 9, 2024 · 14 comments · Fixed by #603 or #611
Assignees
Labels
Milestone

Comments

@TheDuckCow
Copy link
Member

TheDuckCow commented Jul 9, 2024

From the prior PR, there's a couple outstanding items before we release:

  • Find missing textures is not really working well, at least for jmc2obj. I will review in another branch as I've started troubleshooting
  • When all textures are missing, Prep Materials also wrongly says "no materials found to modify", which kind of doesn't make sense - even if textures are missing, it should be able to prep them (and per above, if the tick box is selected, should replace the missing textures)
  • Blender 4.2 has an error when trying to use the geo nodes weather effects, see:
mcprep_addon dev response (requests lib) {'name': '-O19oCElybIt7FYFJ2bf'} at /1/track/usage_dev.json
Traceback (most recent call last):
  File "/Users/patrickcrawford/Library/Application Support/Blender/4.2/scripts/addons/MCprep_addon/tracking.py", line 887, in wrapper
    res = function(self, context)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/patrickcrawford/Library/Application Support/Blender/4.2/scripts/addons/MCprep_addon/spawner/effects.py", line 1057, in execute
    add_geonode_area_effect(context, effect)
  File "/Users/patrickcrawford/Library/Application Support/Blender/4.2/scripts/addons/MCprep_addon/spawner/effects.py", line 113, in add_geonode_area_effect
    geo_update_params(context, effect, geo_mod)
  File "/Users/patrickcrawford/Library/Application Support/Blender/4.2/scripts/addons/MCprep_addon/spawner/effects.py", line 469, in geo_update_params
    geo_mod[geo_inp_id[inp.name]] = value
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
TypeError: Cannot assign a 'float' value to the existing 'Input_18' Boolean IDProperty

Each of these can be handled in their own specific, focussed small PR so we get into the practice of that. But we can link them back to this one single issue.

@TheDuckCow TheDuckCow added the bug label Jul 9, 2024
@TheDuckCow TheDuckCow added this to the v3.6.0 milestone Jul 9, 2024
@TheDuckCow TheDuckCow self-assigned this Jul 9, 2024
@TheDuckCow
Copy link
Member Author

FYI @StandingPadAnimations that I'm assigning myself, but if you wanted to attempt any single one of these, just comment here before getting started. And yeah let's do 1 PR for each bullet above. I'll have more time later this week

@StandingPadAnimations
Copy link
Collaborator

The geometry nodes bug seems to be a noted breaking change: https://developer.blender.org/docs/release_notes/4.2/python_api/#statically-typed-idproperties

@StandingPadAnimations
Copy link
Collaborator

StandingPadAnimations commented Jul 14, 2024

I've tracked it down to the assets themselves

{
	"Camera Weather Nodes":{
		"Snow": {
			"Weather Type": 0,
			"Camera Rotation": "CAMERA_OBJ",
			"Weather Folower": "FOLLOW_OBJ",
			"Density": 0.960,
			"Main Directioanl XYZ": [0, 0, -34.31],
			"Spread": 7.690,
			"Time": 76.32,
			"Directioanl Ratio": 6.37,
			"Chaos Ratio": 6.57,
			"Random Rotation Ratio": 2.3,
			"Scale Ratio": 0.54,
			"On\\Off Random Scale": 0.0,
			"Size of Single Square": 23,
			"Weather Grid Size x": 33,
			"Weather Grid Size y": 33
		}

Blender now enforces proper types for geometry node inputs, and "On\\Off Random Scale" is meant to be a boolean. Swapping the uses of float to boolean for that particular key resolves the issue

@StandingPadAnimations
Copy link
Collaborator

Here is the fixed JSON file for geometry node effects:
weather_effects_geo_by_the3pooka.json

@TheDuckCow
Copy link
Member Author

Awesome, thank you for looking into this one. I just tried it out locally, and indeed it works. All the more reason that (after this release) we should look into a dedicate assets repository, since there's not even any checked in code change to associate with this. Other sad thing is that users to manually install the update (ie not via the built in updater, but via the Install Addon in preferences method), will not have their json files overwritten because... well, that method of installing updates only overwrites .py files :/ but, if people run into errors, we can just instruct them to do full removals + fresh installs after restarting blender.

Will take a quick look tonight at the other two issues, to see if there's something I can chink away at.

@StandingPadAnimations
Copy link
Collaborator

StandingPadAnimations commented Jul 20, 2024

Now that I'm looking at these issues in depth, I'm starting to wish we had a Python debugger in Blender to make things easier

@TheDuckCow
Copy link
Member Author

Addressing point one above, I present: a video where I am just very confused. I mention a workaround in the video, but I really don't like it. Curious @StandingPadAnimations or anyone else if anyone has any ideas of what's going on (and, whether the same things happen when you import the test objs in your own blender instances on e.g. windows, as this was on a mac for me)

https://youtu.be/zyOGGW5qQZ0

@StandingPadAnimations
Copy link
Collaborator

StandingPadAnimations commented Jul 20, 2024

I'm not able to reproduce this on my end (with a jmc2obj import), although I'm not sure if I did something different that allowed it to work (I renamed tex to _tex after importing so that it wouldn't find textures). Some textures aren't found but that's about it)

2024-07-20.14-35-40.mp4

@StandingPadAnimations
Copy link
Collaborator

Actually ignore what I just said, I can reproduce this
image

@StandingPadAnimations
Copy link
Collaborator

StandingPadAnimations commented Jul 20, 2024

Seems like there's some issue in Blender itself causing this. I'm getting the following output in my console:

GPUTexture: Blender Texture Not Loaded!

image

EDIT: This also occurs in Blender 4.1
EDIT 2: This seems to related to missing textures when Blender loads the viewport and it can't find them, sadly not much of an indicator

@StandingPadAnimations
Copy link
Collaborator

StandingPadAnimations commented Jul 20, 2024

Ok so I was looking into this issue and I found a related bug report on the Blender repo: https://projects.blender.org/blender/blender/issues/115984

From what I can see, it's a Blender-side issue that seems to impact multiple versions. I'm not sure why this hasn't manifested itself in the past, but that explains a couple of things.

On the report thread, someone mentioned that this script does resolve the issue. Although it's intended for image sequences, it resolves the issue on my end with Find Missing Textures (and image nodes don't change in ways that users wouldn't be able to understand):

import bpy

for im in bpy.data.images:
    if im.source == 'FILE':
        old = im.source
        im.source = 'SEQUENCE'
        im.source = old

@TheDuckCow
Copy link
Member Author

Wow, what a find. Thanks for doing all that investigation! Let me patch that and give it a go on my side, I'll chime back in once I've done so

@TheDuckCow
Copy link
Member Author

It worked, fyi @StandingPadAnimations I've added you as a reviewer here:
#603

@TheDuckCow
Copy link
Member Author

Last PR addresses the error message, so we should be good to go now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment