Hi there,
I am working on a project to colour the walls of a Revit model based on parameter values using the speckle viewer in Vue.js. I am using version 2.23.8. The issue I am having is that when I call setUserObjectColors the order of the objectId matters. This is just a guess but from what I can tell the parent node will override child node colours. For example in the first photo the door is a separate colour to the wall which is correct as they have different values. However, in the second photo although the wall and door have different values they are the same colour (I assume the wall, as the parent node, has overwritten the door).
My next thought was to call the setUserObjectColors one at a time based on the surface type (floor, wall and door) so that I can ensure that the door’s colours would be applied last. However when I call setUserObjectColors the last call is the only one applied. For example if I choose to colour the floors last I get the first image and If I colour the walls last I get the last.
This wouldn’t be an issue if I only wanted to colour the walls and floors, however, because I want to colour the door it becomes an issue. Is it possible either to prevent a reset of the colouring when setUserObjectColors is called and call a reset of the colours manually or prevent the parent colouring child nodes?
I have looked at the docs for setUserObjectColors but can’t see any other parameters to pass to alter this behaviour. I know there is a potential solution to order the objectIds based on the surface type before passing it to setUserObjectColors but I was hoping there might be cleaner more robust solution.
Thanks in advance!