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

Fix create F3D material error in Blender 3.1 #84

Merged
merged 1 commit into from
Mar 12, 2022

Conversation

Dragorn421
Copy link
Contributor

Fixing #83

Looks like consequences of Blender fixing one or more bugs in Blender 3.1 maybe, potentially introducing another one I'm not sure

See my debug branch Dragorn421@06179bf for understanding what's printed below


3.1 output

createTexCoordNode
<bpy_collection[2], NodeInputs> 2 ['', 'UV']
[bpy.data.node_groups['Create Tex Coord U F3D v3'].nodes["Group Output"].inputs[0], bpy.data.node_groups['Create Tex Coord U F3D v3'].nodes["Group Output"].inputs[1]]
<bpy_struct, NodeSocketVector("UV") at 0x7fba17462008>
UV <bpy_struct, NodeGroupOutput("Group Output") at 0x7fba17447e08>
node.name Group Output
type VECTOR
bl_idname NodeSocketVector

What's weird here is there are two input sockets to the output node, "" and "UV". this is what causes the issue with fast64 in the first place, the "" one is used but isn't an actual output so doesn't appear in the node group outputs

so the fix is using the created socket as returned by the new() call


2.93 output

createTexCoordNode
<bpy_collection[1], NodeInputs> 1 ['']
[bpy.data.node_groups['Create Tex Coord U F3D v3'].nodes["Group Output"].inputs[0]]
<bpy_struct, NodeSocketVirtual("") at 0x000001D83E429208>
 <bpy_struct, NodeGroupOutput("Group Output") at 0x000001D83E43D608>
node.name Group Output
type CUSTOM
bl_idname NodeSocketVirtual

this indeed has a single input socket to the outputs node, but new() returns a socket that doesn't actually get a link made for some reason, which makes the fix for 3.1-fast64 not backwards compatible. this looks like a bug too, which got fixed somewhere after 2.93 I guess


So I ended up hardcoding a version for the fix...

I tested in 2.93 (and it should work in any < 3.1 since the fast64 behavior should be unaltered for these versions) and 3.1.

Copy link
Contributor

@thecozies thecozies left a comment

Choose a reason for hiding this comment

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

so bizarre, nice find!

@Dragorn421 Dragorn421 merged commit 8abdcb1 into Fast-64:main Mar 12, 2022
@Dragorn421 Dragorn421 deleted the fix_node_issue_blender_3_1 branch March 12, 2022 16:07
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.

2 participants