Open JelaMiraj opened 3 months ago
It's basically like you have deduced, and should be an addon solution rather than something the user has to do.
The addon code basically just needs to update the environment and attribute properties to the Camera3D
only on change, rather than duplicating and reassigning the resource every frame. It was purposely written less efficiently like this to get the release and feature out sooner, hence the TODO optimization comment a few lines above the ones you referenced.
It shouldn't cause any issues as the resource ID is specific to the Camera3D
node. So the git change can be ignored / reverted for now.
Got a branch set up that circumvents the .duplicate()
approach and also allows for changing the properties during runtime. However, it's currently blocked due to a bug where not all properties emit the changed()
signal.
Have submitted an issue, it only covers attributes
for now, as I don't want to conflate both attributes
and environment
resources into one issue.
Issue description
I'm using Godot 4.3 dotnet release on windows 11. Everytime I load or save a scene (including caused by just by reopening the project in godot editor) backed by .tscn with my phantom camera setup the random slug ending of the name of the resource id of duplicated camera attributes and environment property nodes get rerolled causing that as a detected change by git. Most likely a result of how lines 598 to 602 of the phantom_camera_host.gd script plays out.
` if _active_pcam_3d.attributes != null: camera_3d.attributes = _active_pcam_3d.attributes.duplicate()
` I have 3 phantom cameras wide, main, and close with different priorities and leave the 2 i'm not currently using set to hidden. the scene has just one normal camera3d with the phantomcamerahost node with attached script as a child node.
Hopefully either some workaround that I've yet to find or an actual change in the addon can prevent this issue while preserving need functionality of different camera shots needing different physical camera attribute resources and pbr lighting needing environments...
I have minimal bug demo project options included while we sort this out. Hopefully the solution will be relatively easy to work through! 😻 👍
Steps to reproduce
(Optional) Minimal reproduction project
Reproduction minimal demo project with commits: Linked until I private when I know resolved Attached zip of git repo of min bug demo project at same commit at that time. PhantomCam_TScene_Save_HCam_AttrEnv_Glitch_Example-main.zip