Hiding markers in the model view

Hi AnyBody team,

I realized MarkerDrawOnOff in the MoCap model actually does not work. Is there any way to hide markers in the model view?

Thanks
Mina

Hi Mina,

The MarkerDrawOnOff works as expected. This is a property of the AnyInputC3D class that controls the display of markers. A prerequisite of this display is that ConstructModelOnOff is set to On. You can read more about this in the reference manual.

However, your question led me to try switching off the marker drawing, which are generated by CreateMarkerDriverClass in the marker protocol. I realized it is somewhat broken at the moment. While you can switch off the markers, the marker arrows remain visible. We have a made fix for this and it will be available in the next release.

I can give you a workaround till then. While you will see the markers show during model load, they will be switched off when you are running MarkerTracking and InverseDynamics. This will control the drawing of all the markers. In your main file (or LabSpecificData.any), type the following code:

Main = {
  Main.Studies.MarkerTracking.InitialConditions.PreOperation = {
    AnyOperation &HideMarkers = Main.ModelSetup.Views.MarkerView.HideView;
    AnyOperation &HideMarkerArrow = Main.ModelSetup.Views.MarkerArrowsView.HideView;
  };
  Main.Studies.InverseDynamicStudy.InitialConditions.PreOperation = {
    AnyOperation &HideMarkers = Main.ModelSetup.Views.MarkerView.HideView;
    AnyOperation &HideMarkerArrow = Main.ModelSetup.Views.MarkerArrowsView.HideView;
  };  
};

For the code above to work, you will need to make another change in the AMMR file. Explore to Main.ModelSetup.Views.DrawGroups.All_MarkerArrows.Objects in the model tree and jump to its AnyScript location from the Information window. Update the search string:

Objects = ObjSearchRecursive("Main.HumanModel.BodyModel","Arrow*", "AnyDrawVector");

Alternatively, if you want to control the drawing of an individual marker, you can set them through the MarkerProtocol.any file, for example:

#ifdef _LPSI
// Marker on the Left Posterior Superior Iliac
CreateMarkerDriver LPSI ( 
UseC3DWeightResiduals = ON,
MarkerPlacement=Trunk.SegmentsLumbar.PelvisSeg,
PlaceMarkerAt=Left.PSIS,
OptX=OFF, OptY=OFF, OptZ=ON,
UseC3DWeightResiduals=ON
) = {
  sRelOpt = {-0.025,0,0.0};
  Driver.Draw.Visible = Off;
  Driver.DrawDroppedOutMarker.Visible = Off;
//  Driver.MarkerRef.Arrow_X.Visible = Off; // this is broken but will be fixed in next release
//  Driver.MarkerRef.Arrow_Y.Visible = Off; // this is broken but will be fixed in next release
//  Driver.MarkerRef.Arrow_Z.Visible = Off; // this is broken but will be fixed in next release
};
#endif

Best regards,
Dave

Hi Dave,

Thanks so much for taking the time to find a solution for this!

Best,
Mina

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.