Blender 3D, April 24th, 2025

Might go well with the other script

bpy.data.objects["Camera_LifeIsValuable"].location = [0, 0, 0]

A Named Attribute used on a mesh could be referenced from a Python repeated timer to allow moving the Camera in Geometry Nodes. Active Camera object and Object Info both in Input -> Scene cannot be moved with set position currently or transform geometry currently. This would allow updating the Named Attribute on original mesh with a vertex (x,y,z) that could then be used to move the Camera like set position or transform geometry. Getting original location value of Camera is possible through Object Info (Input->Scene->Object Info). Set the Named Attribute (Store Named Attribute Geometry Node) using that location + any transform and then have the timer use the named attribute to call the script above to set the location of the Camera.

If you need the Camera to rotate, I believe there are other properties for that. Vertex (x,y,z) will move the Camera but it won’t change what the Camera is focusing on – thus the script above might be more useful with ability to rotate and change other useful camera properties.

Tried with constraints and moving an object via Geometry Nodes previously and didn’t seem to work. The script I tested yesterday works, the script above I tested today – both work, haven’t tried them yet in tandem.

Other script found here – Blender 3D April 23rd, 2025 – My Tech Blog

Worth of reminding when re-opening the Blender file you have to rerun the script so it registers the timer. Might be useful for first person point of view. Also worthy of note the script is saved to a different file thus if you are sending the file to others they will need the script as well.

Another thought Blender 3D could poll a script file and run it every few seconds – and then one could have a Java or other project update the script file. Likely are some open interfaces that I don’t have expertise in that might allow more direct calls to Blender from Java or another language. That said I am not sure of what restrictions Blender has on opening outside files – cybersecurity concern, might need to run Blender as Administrator which might be problematic.

blender.org – Home of the Blender project – Free and Open 3D Creation Software

Blender 3D uses Python for its scripting language – Welcome to Python.org

Of note I saw this cool tutorial on Blender 3D that separates RGB channels of an image and then casts them like a projector – that could be used to follow around the Camera at the same angle – Thus a 3D scene with a 2D overlay – might be cool to try not sure how good it would look. Not quite 2D because the light would wrap around objects with Z-depth.

Leave a comment