Skip to content

Stopped getting custom values from BSDFs #899

Answered by njroussel
Frollo24 asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, this is not supported currently

It wouldn't take much work to properly support it though. This is where all of this logic happens. Basically we would need an extra case in put_object to run the callback on the nested object too.

Something like this might be enough:

diff --git a/src/render/bsdf.cpp b/src/render/bsdf.cpp
index d03c6769..bac64118 100644
--- a/src/render/bsdf.cpp
+++ b/src/render/bsdf.cpp
@@ -55,6 +55,8 @@ struct AttributeCallback : public TraversalCallback {
                 result = func_object(texture);
                 found = true;
             }
+        } else {
+            obj->traverse(this);
         }
     };

I'd welcome a PR for this change if you …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Frollo24
Comment options

@njroussel
Comment options

@Frollo24
Comment options

@njroussel
Comment options

Answer selected by Frollo24
@Frollo24
Comment options

@njroussel
Comment options

@Frollo24
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants