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 forgotten rename on surface material override #47915

Merged

Conversation

BastiaanOlij
Copy link
Contributor

@BastiaanOlij BastiaanOlij commented Apr 15, 2021

Just a rename of a propertie that was overlooked in the getter/setter of Meshinstance

Fixes #47913

@akien-mga
Copy link
Member

There's one more occurrence of material/, should it be changed too?

$ rg '"material/'
scene/3d/mesh_instance_3d.cpp
54:     if (p_name.operator String().begins_with("material/")) {
78:     if (p_name.operator String().begins_with("material/")) {

scene/scene_string_names.cpp
194:            mesh_materials[i] = "material/" + itos(i);

@BastiaanOlij
Copy link
Contributor Author

There's one more occurrence of material/, should it be changed too?

$ rg '"material/'
scene/3d/mesh_instance_3d.cpp
54:     if (p_name.operator String().begins_with("material/")) {
78:     if (p_name.operator String().begins_with("material/")) {

scene/scene_string_names.cpp
194:            mesh_materials[i] = "material/" + itos(i);

I don't think this is related, I think that is the normal material property on meshes

@akien-mga
Copy link
Member

akien-mga commented Apr 15, 2021

Actually it seems to be dead code?

$ rg mesh_materials
scene/scene_string_names.h
222:    StringName mesh_materials[MAX_MATERIALS];

scene/scene_string_names.cpp
194:            mesh_materials[i] = "material/" + itos(i);

Nothing uses it.

Edit: Made a PR: #47916.

@akien-mga akien-mga merged commit f109376 into godotengine:master Apr 15, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added this to the 4.0 milestone Apr 15, 2021
@clayjohn
Copy link
Member

Whoops! Thanks for cleaning up after me :)

@BastiaanOlij BastiaanOlij deleted the fix_surface_material_override branch April 20, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to set material override
3 participants