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

Changes to how you add shaders in the UI #182

Conversation

NMC-TBone
Copy link
Contributor

  • The shaders will now be automatically loaded in a EnumProperty through the data path set in addon preferences
  • This includes a operator that will migrate the old "source" property over to the new "shader" enum property (and preserve all the other shader related data)
  • Made it possible to add "material_name" to the load_custom_shader and load_custom_shader_variation operators so it can be called through API without needing to have a active object with a active material to run the operators

Should hopefully fix #179

Introduce an early return check for the shader's variation. If the selected variation is the same as the previously active one, the function exits early, preventing any unnecessary resetting of shader parameters.

Fix StjerneIdioten#180
- The shaders will now be automatically loaded in a EnumProperty through the data path set in addon preferences
- This includes a operator that will migrate the old "source" property over to the new "shader" enum property (and preserve all the other shader related data)
- Made it possible to add "material_name" to the load_shader and load_shader_variation operators so it can be called through API without needing to have a active object with a active material to run the operators
merge dev inte shader-fixes
@ssnd292
Copy link
Contributor

ssnd292 commented Sep 30, 2023

Guess this would also fix #170

@StjerneIdioten StjerneIdioten changed the base branch from develop to feat/185/shader_pr_cleanup November 29, 2023 22:19
@StjerneIdioten StjerneIdioten merged commit c73843b into StjerneIdioten:feat/185/shader_pr_cleanup Nov 29, 2023
StjerneIdioten pushed a commit that referenced this pull request Feb 16, 2024
* fix(shader): Prevent resetting parameters in shader settings

Introduce an early return check for the shader's variation. If the selected variation is the same as the previously active one, the function exits early, preventing any unnecessary resetting of shader parameters.

Fix #180

* feat(material): New way of adding shaders

- The shaders will now be automatically loaded in a EnumProperty through the data path set in addon preferences
- This includes a operator that will migrate the old "source" property over to the new "shader" enum property (and preserve all the other shader related data)
- Made it possible to add "material_name" to the load_shader and load_shader_variation operators so it can be called through API without needing to have a active object with a active material to run the operators

* Added support to export new shader setup
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.

None yet

3 participants