Thanks for the replies Innula and Nova.
Innula, I want to take a rotation in Global co-ordinates, translate it so it is in local co-ordinates and then apply it to a prim (the avatar) on the furniture.
I have tried "rAvatar * rReported * rObject" but it always turns a small reported rotation into a much larger rotation. I have tried it as "rAvatar * (rReported * rObject)" but that did not help. I am guessing the (rReported * rObject) translates the reported delta rotation to local co-ordinates, similar to how your "grX45*llGetRot()" applied the 45 degress to the local X axis but no matter how I try it, it is never quite right. It either increases the size of the rotation drastically or rotates it along the wrong axis.
I have tried using PRIM_ROTATION and it did not work as expected.
I am not sure which part is going wrong. I just know why I apply the reported translation directly and the furniture's base rotation is not <0, 0, 0> (it is more like <90, 0, 90>) the avatar rotates around the wrong axis. But when the furniture's base rotation is <0, 0, 0> it works as expected.
Nova, I don't think that is going to solve the problems as expected. I can't exactly wrap my head around how it is going to work but the helper object would still be reporting that it rotated 5 degrees around the world's X axis, regardless of how it started out. And it would still need to translate to such a rotation to the avatar's rotation. Perhaps if the helper object had more than one prim it might help but that is getting complicated too.
Thanks for the ideas though,
legume.
*EDIT*
I don't think I described what my trouble was in this last edit very well. I will rotate the helper object 5 degrees in the global co-ordinate system (for example). When I apply the rotation to the avatar I want to keep applying based on the global co-ordinate system but it always applies it to the local co-ordinate system.
How do I translate the rotation so it will still be the same in the global system when applied to the location co-ordinate system?