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

Default values for materials[REOPEN] #6033

Open
lucian-student opened this issue Mar 3, 2025 · 2 comments
Open

Default values for materials[REOPEN] #6033

lucian-student opened this issue Mar 3, 2025 · 2 comments
Labels
Feature-Request Global flag to mark feature requests

Comments

@lucian-student
Copy link

Default variables for material Get method

Allow setting default variable, instead of using default hardcoded variablles.

Hardcoded variables feel very limiting, There should be way to override them.

Solution

  • Maybe overload Get method, with extra parameter with default.
  • Boolean flag to enable defaults.
  • add to aiReturn param missing option

Currently API seems to not support such option, which seems like oversight.

@lucian-student lucian-student added the Feature-Request Global flag to mark feature requests label Mar 3, 2025
@tellypresence
Copy link
Contributor

tellypresence commented Mar 4, 2025

@lucian-student
In the past I remember thinking that there were some compile/build-time #defines that I felt would have been better if they were converted to variables that could be set at runtime. I think that's what you're referring to? But unfortunately without any specifics, it's difficult to understand your request.

Would suggest if you can at the very least provide names of specific compile-time constants that you'd like converted to runtime variables (and preferably provide links to source files where they're defined and used) you might have better luck starting a conversation

(Also, title says [REOPEN] but it's a mystery what the original issue was, please provide a link to the closed issue you're referring to so it's clear)

@lucian-student
Copy link
Author

lucian-student commented Mar 5, 2025

@tellypresence thank u for answering my request. Iam refering to material loading and default variables. File with hardcoded variables inside constructor.

Currently when calling:

aiColor3d color = (0.f,0.f,0.f);
material->Get(AI_MATKEY,color);

U can't override default hardcoded variable. So i propose to allow such possibility, when material attribute isn't present in file.

Using default variables inside constructor without option to override them doesn't seem to be appropriate in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Request Global flag to mark feature requests
Projects
None yet
Development

No branches or pull requests

2 participants