• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 Console Based or scriptable MCX

Messages
578
Country
france
Hello
@arno your MCX is really useful when it comes to access some libraries and update them.
I was working on updating some Libraries to PBR for P3D 4.5 and the library had 31 objects and I had to update only 2 objects so exporting all models manually and making the library again was time taking
what I think that we need is a new tool like scene proc that help us access the libraries or placements objects and update them, think of what we can do with it like scene proc does, it's limitless and can help many of us updating existing sceneries or converting sceneries to other sims (fsx to P3D or fs9 to P3D ............................... even xpl).

hope you like my suggestion.

or if you can, you can make a C# library that contains functions like read models and converting them to different sims and let the community be creative, this can give many people the opportunity making some tools that will help them winning time.

thnx in advance :)

PS: NO need for rendering, the read model data is enough as it helps to render anyway.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Did you have a look at the batch convert wizard in MCX already? I can help you to make certain changes to a lot of models at the same time.

When working on a library you can also just load the BGL file in MCX and then save the BGL file again after making the changes. No need to save each model individually first.

Some other tool developers already use the libraries I made for my tools in their tools. Mainly for the preview rendering part, but sometimes also for other functions. So that is always an option.
 
Messages
578
Country
france
i didn't try to use the libraries included in MCX folder i'll maybe check them out

how can i delete a model from a library in MCX and replace it with an other one without exporting anything?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
You can't change a model without exporting everything. MCX works on an internal data representation. So you always need to export everything. If you want to replace a model like that you would have to decompile the BGL and swap MDL files.

P.S. Distributing of the MCX DLL files is only allowed after permission from me, so if you make a useful tool please be sure to check that first.
 
Messages
578
Country
france
You can't change a model without exporting everything. MCX works on an internal data representation. So you always need to export everything. If you want to replace a model like that you would have to decompile the BGL and swap MDL files.

P.S. Distributing of the MCX DLL files is only allowed after permission from me, so if you make a useful tool please be sure to check that first.

can you help me to make my own tool, I wanna just decompile a library then extract all MDL and replace MDLs I select with my MDLs, doing everything manually is hard as the libraries i work with are so big
 

tgibson

Resource contributor
Messages
11,338
Country
us-california
I'm not sure what the problem is, I do this all the time. Yes, you have to Export the library BGL again but that is not a problem, is it?

1. Import the Library. (Back up this file first.)
2. If you are replacing objects and want to retain the same GUID numbers:
3. Click the green arrows until you find an object you want to replace.
4. Click the Object Information button, and press the Edit button. Copy the GUID and paste it into a text document (you'll need it later). Make sure you describe which object this is in the text file next to the GUID.
5. Repeat this for all objects you want to replace.
6. Click the Scenery Objects Editor button (next to the green arrows).
7. Find the object(s) you want to replace and click them. Click the Remove Object button. Repeat for all objects to be replaced.
8. Click the Add Object button and browse to your replacment MDL file. Click it. Click OK. Repeat for all objects to be replaced.
9. Use the green arrows to find a replaced object. Click the Object Information button, and the Edit button.
10. Copy the object's GUID from the text file and paste it, overwriting the existing GUID. Press the Edit button.
11. Repeat this for each replaced object.
12. Use *Export Scenery* and save it with the same name and a BGL sim format, overwriting your old library BGL file (you did back it up, right?). Now your updated objects will display instead of the originals.

Hope this helps,
 

tgibson

Resource contributor
Messages
11,338
Country
us-california
Of course this would be made SO MUCH easier if the Scenery Objects Editor would only have a Replace Objects choice, which replaces an object in one step, retaining the existing GUID. :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Of course this would be made SO MUCH easier if the Scenery Objects Editor would only have a Replace Objects choice, which replaces an object in one step, retaining the existing GUID. :)

That's probably only a few lines of code to add, I'll see if I can add something :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
can you help me to make my own tool, I wanna just decompile a library then extract all MDL and replace MDLs I select with my MDLs, doing everything manually is hard as the libraries i work with are so big

That would be more complex than it sounds in code as well :). MDL does not work with MDL files, it reads the objects (and other information from the BGL file) into an internal scenery representation. So to do this you would have to read both the BGL and the MDL files you want to use into such a representation. Then you can start to manipulate the internal representation to the result you want. But you manually have to take care of things like GUIDs, placements that don't get corrupt, etc. So probably easier to just use MCX :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
That's probably only a few lines of code to add, I'll see if I can add something :)

1561495937663.png


I'm currently on business trip, so it will be a few days before it's in the development release...
 
Messages
578
Country
france
Hey is scenery object editor included in MCX? I'll be surprised if so cus i never saw it :O
 

tgibson

Resource contributor
Messages
11,338
Country
us-california
Hi,

Yes, it's there. It's the button just to the right of the green arrows. Make sure you are using the latest development version, NOT the stable version.
 
Messages
578
Country
france
i already use it to select objects but i don't know how i never noticed the replace object button :O
 
Top