CLI: Name all components generated from an Alignment.

Hi there,

When an alignment is run, and more than one component is generated, it gets named something like: Component 0, Component 1, Component 2 , etc.

If another alignment is run after that, the components are named something like:
Component 0 (1), Component 1 (1), Component 2 (1), etc.

 

After a few passes like this, it can get really difficult to keep track of which components are being produced from which alignments - especially if some components get deleted between alignments.

 

Is there a way we could pass a command in CLI to name all of the components generated from an alignment to all match?  something like:
First Alignment:  NameHere 0, 1, 2, etc.
Second Alignment:  DifferentNameHere 0, 1, 2, etc.
Third Alignment:  AnotherNameHere 0, 1, 2, etc.

 

Would make it much easier to know which components came from where.  I’m not finding a way to do this from my searching so far… if it’s not possible, please consider it a feature request.  Thank you!

Hi,

instead of pressing the align button you could run a .bat like this:

@ echo off

set app="C:\Program Files\Capturing Reality\RealityCapture\RealityCapture.exe"

set /p compName=[what would you like to call the component?]

set /a totalLoops=40

set /a nameCount=0

%app% -delegateTo * -align

:nameLoop

%app% -delegateTo * -selectComponent "Component %nameCount%" -renameSelectedComponent "%compName% %nameCount%"

set /a nameCount+=1

if %nameCount%==%totalLoops% goto end

goto nameloop

:end

Just try to make sure you only have 1 instance of RC running and ready to align. You can then name the set of components from each alignment as you wish. If you think your dataset is likely to produce more than 39 components just increase the variable “totalLoops”.

Bare in mind this script should run with errors as it is by design meant to search for more components than are created, but it should do the intended job beforehand.

There is almost certainly a more elegant way of doing this, but this should do the job.

1 Like

That’s an interesting approach - but agreed, it would be nice if there was a more elegant solution that didn’t produce errors.

Maybe if there’s a way to query how many components there are after an alignment?

That way we could run the loop the correct amount of times, so no error would be produced.