How to replace an existing RenderMaterialElement? #36
Replies: 2 comments 9 replies
-
Hi Peter, Currently the only option is to use IModelDb.Elements.updateElement which accepts the JSON representation of the element. The JSON representation of material elements is kind of ugly, which is why Note: the "old" tile generation logic will not detect a change to a render material, so it may continue to reuse cached tiles that were produced using the old version of the material. The "new", faster tiles produced by mesh export service will detect the material change and produce updated tiles. I believe the folks who are using your connector have migrated to the new tiles, in which case this shouldn't pose a problem. |
Beta Was this translation helpful? Give feedback.
-
Hello Paul (@pmconne) In your previous reply you mentioned
Currently I am trying to update the method of setting colours in the iModel geometry for the 3D assets in our model. Is this problem caused by the caching you mention? How can I determine if I am using the new tiling method or not? I used to have a "Try It" option, but this no longer appears in the UI? |
Beta Was this translation helpful? Give feedback.
-
The
RenderMaterialElement
class (https://www.itwinjs.org/reference/core-backend/elements/rendermaterialelement/)has an
insert
function to add new materials to an iModel.Is there a way to
update
orreplace
an existing material?For example in my connector application I would like to be able to change the texture material, or color of an object.
Beta Was this translation helpful? Give feedback.
All reactions