Hello, I just have question about changing field in X3DNode and triggering change on that. I am trying to change material for custom created geometry via X3DNodes when I click on geometry. I have found that I can either trigger to change whole tree via ChangedAll, or I can directly call Changed on FdField of for example Material, but that one did not work for me (on material in this case), only ChangedAll. Is it not implemented, bug, or any other problem? Thanks.
In general, we try to avoid the need to call
ChangedAll as this is costly.
Moreover, we try to avoid requiring you to manually call any
Changed* method – instead, if you change properties without using the
FdXxx.Value wrapper, but directly (like
MyMaterial.DiffuseColor := YellowRGB) then the appropriate “changed” method should be automatically called.
That said, we’re not yet perfect in this regard, so this is likely a bug. There are indeed cases that require calling “changed” method manually, and (what’s worse) there are cases that require calling costly
Please send a complete testcase to reproduce the issue. I will be happy to look at it, and I may optimize this specific case in the engine to be better.