[core] attribute: new initValue, independant from the resetToDefaultValue

Avoid to evaluate the default value if we don't need to.
This commit is contained in:
Fabien Castan 2024-06-13 23:55:53 +02:00
parent 0c3426250a
commit 020dbecc68
6 changed files with 37 additions and 29 deletions

View file

@ -924,10 +924,10 @@ class Reconstruction(UIGraph):
if rebuild:
# if rebuilding all intrinsics, for each Viewpoint:
for vp in cameraInitCopy.viewpoints.value:
vp.intrinsicId.resetValue() # reset intrinsic assignation
vp.metadata.resetValue() # and metadata (to clear any previous 'SensorWidth' entries)
vp.intrinsicId.resetToDefaultValue() # reset intrinsic assignation
vp.metadata.resetToDefaultValue() # and metadata (to clear any previous 'SensorWidth' entries)
# reset existing intrinsics list
cameraInitCopy.intrinsics.resetValue()
cameraInitCopy.intrinsics.resetToDefaultValue()
try:
self.setBuildingIntrinsics(True)