DrawHUDText issue with viewport camera navigation
-
Hi!
I made an script back in C4D 2023 to draw some information on the viewport (filename, camera lens, frame number, etc). It was working perfectly in C4D 2023, but in 2024 it is glitching the viewport camera navigation.
It's like the drawn text is in front of everything and when you click to orbit the camera, you click on the drawn text instead of the object.
Let me try to explain with some GIFs.
2023: I click on the corner of the cube to orbit the camera around it and it works.
2024: I click on the corner of the cube to orbit the camera and the orbit pivot insn't on the cube, but on the center of the screen.
It's not about the navigation mode, I already made sure I'm on the "mouse" mode.
When I delete the script on 2024, everything goes back to the normal, so I know the problem is the script.
and here it is, it's on a python tag:
# Playblast Overlay by Flavio Diniz import c4d def main() -> None: pass def draw(bd: c4d.BaseDraw) -> bool: bd = doc.GetActiveBaseDraw() frame = bd.GetFrame() right = frame["cr"] bottom = frame["cb"] camera = "Camera: "+ bd.GetSceneCamera(doc).GetName() filename = doc[c4d.DOCUMENT_FILEPATH].split("\\",-1)[-1] focal = str(bd.GetSceneCamera(doc)[c4d.RSCAMERAOBJECT_FOCAL_LENGTH]) +" mm" frame = "Frame: "+ str(doc[c4d.DOCUMENT_TIME].GetFrame(doc.GetFps())) bd.DrawHUDText(int(right /2)-300, int(bottom)-20, "{0} | {1} - {2} | {3}".format(filename, camera, focal, frame)) return c4d.DRAWRESULT_OK
Does anyone have any idea of what could be happening ?
Thanks!Flavio Diniz
-
Hi Flavio,
Thanks for reaching out to us. Please excuse the delay.
I've created a ticket in our internal bug tracking system for this issue.
Cheers,
Ilia -
I think it must be a bug ! and I'm surprised I haven't heard anyone talking about this so far, since the "DrawHUDText" is so common for people to use
I also noticed the same problem happening with "DrawMultipleHUDText".Thanks!
Flavio Diniz -