I'm having difficulty modifying settings for the AT in the python SDK, more precisely on how to only set positioning with control points to the adjustment constraints. Do you have an example for that?
I'm always getting 2 methods instead of only having the control points one.
Thank you
I'm not able to reproduce this issue, can you share you script? I have good results using the following functions:
blockAT=ccmasterkernel.Block(project)project.addBlock(blockAT)blockAT.setBlockTemplate(ccmasterkernel.BlockTemplate.Template_adjusted, block)settings=blockAT.getAT().getSettings()settings.adjustmentConstraints=ccmasterkernel.AdjustmentAndPositioning.Positioning_ControlPointsprint(settings.adjustmentConstraints)blockAT.getAT().setSettings(settings)blockAT.getAT().submitProcessing()
Thanks
It works fine on my side when I check the project settings in ccmaster...
Could you try to skip the "loadPreset" line and see if it fixes the issue?If yes, could you share the preset file you load?
Yes it works... But shouldn't only affect the second part of the settings?
ATSettings.cfg
Adjustment constraints and rigid registration options are also defined in the AT settings file so loading it before updating some options should solve your problem.
The python script should not print "Positioning_ControlPoints" only... I'll check this on my side.
Even if I run loadPreset before setting the adjustementConstraints, it still doesn't set only one option.
Ok, thanks for the feedback, I'm gonna investigate and I'll let you know.
Can you also check on how to combine the multiple values? Thank you
You can simply add them, like numbers:
settings.adjustmentConstraints=ccmasterkernel.AdjustmentAndPositioning.Positioning_ControlPointssettings.adjustmentConstraints+=ccmasterkernel.AdjustmentAndPositioning.Positioning_PositionMetadata
I'm really not able to reproduce the issue: the last option set (through the preset file or directly in the python script) is the last one that is actually used and I get the same information in ContextCapture and on the script output in all the cases.
Could you double-check on your side?