Confauto.prc file

I have such a question, why do I need a Confauto.prc file? It just does not update when compiling Panda3D according to the specified plugins. I’ll explain now.
I compiled a panda like this:

--nothing --threads=2 --optimize=3 --use-gl --use-openal --use-egg --windows-sdk=10 --msvc-version=14.1

But still in the Confauto.prc file there is a p3ptloader parameter, which is not in my assembly. What I see warning in the console. The question is, can I delete this file, will there be any problems with Panda3d? Although a quick check showed that the panda is starting, it is interesting to know why it is needed then.

If you don’t have it, none of the settings in it will be activated:

  • It will not register a loader for the .egg format.
  • It will not load the Assimp plug-in.
  • It will not load the FFMpeg plug-in, meaning you cannot load audio or video that is not already handled by other plug-ins.
  • It will not properly load .egg files that contain ObjectType definitions listed in Confauto.prc.
  • It will not define a gui-popup bin, which is needed for some DirectGUI elements to appear on top of others.
  • It will disable the behaviour whereby “model.egg” is loaded if you do loadModel(“model”).

If you do not need any of the behaviours above, then you can leave it out. If you do, you will need these prc settings specified somewhere.

makepanda should be removing p3ptloader if you are not building it. The fact that it’s not doing this, is a bug.

I loaded the egg, without errors and warnings.

Then either the .egg file had already been stored in your model-cache directory, or you had some other prc file on your system being loaded that contained this line.

True cleared the cache and the model does not load. So I need to manually disable p3ptloader in the file.As a quick option.

Now I have a question how can I load Confauto.prc by analogy with Config.prc. To eliminate manipulation by the user. It doesn’t work:

load_prc_file ("Confauto.prc");

I am not quite sure what you are asking here. If you are aiming to prevent the user from editing this file, you can embed the .prc data into a string, and use load_prc_file_data.

Namely, Confauto.prc cannot load like this:

 load_prc_file ("Confauto.prc");

This trick doesn’t work. Of course, I did not check load_prc_file_data, but I think this will not work either.

Although I get:

Warning: unable to auto-locate config files in directory named by “ etc”.

It seems to work, I just loaded the egg model for verification and cleared the cache first.

However, a thought crept in, as the panda by default loads the file with names from the folder bin:
Config.prc
Confauto.prc
In any case, this is a security hole. You can fix it if you remove the automatic load of these files and transfer them to programmers, that is, upload files manually.

You can recompile Panda not to load config files automatically from a particularly directory. In fact, when you use the setuptools-based deployment system, Panda turns this off as well.

I thought about it, but did not find in what place this can be done.
And yes, the blindness has passed, I found.

  --help            (print the help message you're reading now)
  --verbose         (print out more information)
  --runtime         (build a runtime build instead of an SDK build)
  --tests           (run the test suite)
  --installer       (build an installer)
  --wheel           (build a pip-installable .whl)
  --optimize X      (optimization level can be 1,2,3,4)
  --version X       (set the panda version number)
  --lzma            (use lzma compression when building Windows installer)
  --distributor X   (short string identifying the distributor of the build)
  --outputdir X     (use the specified directory instead of 'built')
  --host URL        (set the host url (runtime build only))
  --threads N       (use the multithreaded build system. see manual)
  --osxtarget N     (the OS X version number to build for (OS X only))
  --universal       (build universal binaries (OS X only))
> --override "O=V"  (override dtool_config/prc option value) 
  --static          (builds libraries for static linking)
  --target X        (experimental cross-compilation (android only))
  --arch X          (target architecture for cross-compilation)

--override "O=V"

But the question arose, how to use it?