Signals for geometry switching
pciccone
Posts: 661
Hi.
I need to be notified whenever a figure with object switching in the scene is triggered to switch the geometry.
I see that when The user switches the geometry, one or more materials are added to the figure. I have connected to the materialListChanged() signal for the shape, but that signal doesn't seem to be triggered when the geometry switching is used.
I need to be alerted when a new materials are introduced into a figure because of geometry switching. Is it possible?
Thank you in advance.
Comments
DzObject::currentShapeSwitched()
DzObject::materialListChanged()
-Rob
Thank you Rob, I'll try that.
The signal currentShapeSwitched() doesn't seem to be triggered when the geometry switching happens.
I have added the following in a function:
connect(obj, SIGNAL(currentShapeSwitched()), this, SLOT(shapeSwitchHandler()));
With this handler:
void Reality_DS::shapeSwitchHandler() {
RE_LOG_INFO() << "Shape shifted!";<br /> }
Where RE_LOG_INFO() is my logging stream and nothing happens when I switch the shape. I have a gatling gun from ShareGC that has several pose presets that switch wheels for legs and so on and then any of those presets is applied no call to the shapeSwitchHandler() function happens.
Any suggestion will be greatly appreciated.
I am guessing that gatlin gun uses alternate geometry?
The materialListChanged signal is triggered for alternate geometry, but shape change does not for alternate geometry.
Looks like you are going to have to connect to all the geomControl's on alternate geometries(a somewhat rare thing). It should look something like the following. I have not check it though.