[Regression] Cannot attach two Stransform to the same parent transform
Summary
We can no longer attach two STransform
to the same parent node. They both try to create it. This would also happen simply if the parent node if managed by an another STransform
.
This was probably introduced by ITransformable
refactor at 5fd30df4.
Steps to reproduce
I noticed that in one of our private application, but this can be reproduced easily in TutoOgreGenericScene with some light modifications. Add the following adaptors:
<service uid="tAdaptor" type="::visuOgreAdaptor::STransform" >
<inout key="transform" uid="cameraTF" />
<config layer="default" transform="tf1" parent="parentTransform" />
</service>
<service uid="tAdaptor2" type="::visuOgreAdaptor::STransform" >
<inout key="transform" uid="cameraTF" />
<config layer="default" transform="tf2" parent="parentTransform" />
</service>
Of course do not forget to add them in the adaptors list of the render service and start them. You should get the following exception in the error log :
[1][00:00:00.946132][error] /home/fbridault/dev/sight/src/sight/Bundles/visu/visuOgre/src/visuOgre/Plugin.cpp:82: ItemIdentityException: A scene node with the name parentTransform already exists in SceneManager::createSceneNode at /home/jenkins/.conan/data/ogre/1.11.4/sight/stable/build/f312d0df2422c67b2da245676f37143bc388b18a/source_subfolder/OgreMain/src/OgreSceneManager.cpp (line 759)
[2][00:00:00.946475][error] /home/fbridault/dev/sight/src/sight/SrcLib/core/fwServices/src/fwServices/IService.cpp:587: Error while STARTING service 'TutoOgreGenericScene_1_tAdaptor2' : ItemIdentityException: A scene node with the name parentTransform already exist
Possible fixes
Verify node existence. I'm working on it.