EngineCOMP does not use EnvironmentContext

It seems like that the TdEngine is not using the EnvironmentContext to load virtual environments.
I made sure that the tox-file is located at the same directory as the project it originates from but I do get an error (love that we can read them now, yaih!) from the engine that it can not find the specified module.

On a second note for that, it would be great if we could define, similiar to TouchEngine, a link to the ProjectRoot folder. This would remove the need for the tox to live in the root directory of the project which can get cramped when we have more then one tox-file.

Hi @plusplusone

I assume you are talking about the TDPyEnvManager and yaml / toml files to sideload a .venv?

I’m unsure I follow this bit.

Best,
Michel

Ah yes, sorry for not specifing that. I am talking about the TDPyEnvManagerContext.yaml / entries of the pyproject.toml

Regarding the TouchEngine bit:
To force a specific version of TouchDesigner to be used with TouchEngine I can either create a copy of a TD-Install-Folder or create a Shortcut to the Installationfolder called TouchEngine.

In a similiar manner, I would like to be able to create a similiar shortcut with a specified name to tell the TouchEngine in which place the engine should create the virtual .toe file that is used to mount the .tox file. (This is currently happening at the location of the .tox file i.E. if you print out project.folder in an engine it points to the folder of the tox-file.)

Understood thanks for the details.

The TDPyEnvManager was not really tested in the engine context. I assume that the issue here is that the path injection does not kick in, and that the paths from the main process are not passed to the engine process. I’ll have a look and confirm.

For the project.folder issue, this is purely a touchengine behaviour which might have to be discussed internally for design.

Best,
Michel

1 Like

You can control this in a limited way in an Engine COMP using the Asset Paths parameter - set it to Relative to Project File (.toe) so TouchEngine will use the project rather than the component directory.

We are using TouchEngine in Pixera so I think this is not an option there but good to know for TD-Internal setups. (I assume this will not touch the RelativePath parameter set on the toxfile itself though?)

Ah - that would be a feature request for Pixera in that case - it’s possible for a host to control it programmatically.

I’m pretty sure the RelativePath parameter should work in conjunction with the setting from TouchEngine - so if the .tox is set to use the project directory, the project directory will be the directory set from TouchEngine.

1 Like

Thanks for the info. Relayed that RFE to the Pixera Team.

@JetXS an chance to confirm? I can try to create an minimal example if that helps.