-
Notifications
You must be signed in to change notification settings - Fork 102
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 #463 by allowing other texture settings and only changing Flip an… #467
Fix #463 by allowing other texture settings and only changing Flip an… #467
Conversation
…nging Flip and Repeat
@@ -54,7 +54,8 @@ public void run() { | |||
if (texPreview == null) { | |||
texPreview = new TexturePreview(manager); | |||
} | |||
texPreview.requestPreview(stripQuotes(textureName), "", 80, 25, texturePreview, null); | |||
final String[] textureNameComponents = textureName.split(" "); | |||
texPreview.requestPreview(stripQuotes(textureNameComponents[textureNameComponents.length-1]), "", 80, 25, texturePreview, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split and take last segment to get actual texture name
} | ||
propertyValue += textureName; | ||
property.setValue(propertyValue); | ||
texturePreview.setToolTipText(propertyValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't replace whole line, just modify Flip and Repeat, if they exist
} | ||
property.setValue(textureName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simpler?
The following tests have been performed:
If someone wants to test this themselves, please do. Otherwise I'll merge this after an unspecified amount of time. |
…d Repeat
This is a preliminary fix. Not ready to merge yet.
I'd like a second set of eyes before merging.
So the cause was that all those "new" settings have never been implemented in the Material Editor.
Implementing all those is an undertaking I'm not ready to do right now. So my proposed interim solution is to not care about other settings than "Flip" and "Repeat", but not overwrite them either. This allows advanced users to keep modifying their materials in the Material Editor (but preview might be wrong? I'm not familiar with the settings).
Edit: Still need to update TexturePanelSquare. Only used in shader editor, I think