• 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.

How to make a unanimation modelpart clickable

Messages
34
Country
taiwan
Hi,Everyone!I want to change some of the switches that I can't click. I know that I need to use AttchTool, but I can't find it in my SDK. I found their "name" in INIT.xml. (What does this mean? What should I do to achieve my goal?Help much apperaciated!
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
You can use ModelConverterX. I think the Hierarchy Editor can make a part clickable by clicking the Mouse Rectangle section and choosing from the list.
 
Last edited:
Messages
34
Country
taiwan
You can use ModelConverterX. The Hierarchy Editor can make a part clickable by clicking the Mouse Rectangle section and choosing from the list.
Hi,Tginson!But I can't find the modelpart code for these switches in the Hairarchy Editor.What should I do?
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
In the Hierarchy Editor you can highlight selected parts in red. It has to turn red at some point if it's in there.

If it's combined with other parts, setting CollapseModelParts to FALSE in the Options might separate it. You will need to Import it again after setting that.
 
Messages
34
Country
taiwan
In the Hierarchy Editor you can highlight selected parts in red. It has to turn red at some point if it's in there.

If it's combined with other parts, setting CollapseModelParts to FALSE in the Options might separate it. You will need to Import it again after setting that.
Hi,Tgibson!Thanks for your help!But I still can't find it in the HAIRARCHY editor. If there is no code for these switches, what do these names mean?
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
The entries in the drop down box for the Mouse Rectangle line are located in the modeldef.xml file (the one that you pointed MCX to in the Options). If there is not an appropriate definition there, you would have to add one of your own to that file.
 
Messages
34
Country
taiwan
Hi,tgibson!Yes, I did not find these definitions in the modeldef. I think I can add this code by modifying the modeldef in the SDK. How do I edit this code?
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
1. Copy a section from PartInfo to /PartInfo that has code similar to what you want.
2. Paste it back in between parts.
3. Give it a new Name.
4. Edit the code as required.
5. If this is for an animation, copy a line like this (simple visibilities do not need this):

<Animation name="lever_trimtab_aileron_key" guid="d603198d-182b-46cd-a15b-bf862dc37195" length="100" type="Sim" typeParam2="lever_trimtab_aileron_key" typeParam="AutoPlay" />

6. Paste it back just above the part you made.
7. Change the names in quotes to the name you just created in step 3 (two places).
8. Change the GUID - either use an online GUID generator or just change a number or two in this one (do not add or delete characters).
9. Check if the new GUID is unique in this file (Edit/Find).

Hope this helps,
 
Messages
34
Country
taiwan
1. Copy a section from PartInfo to /PartInfo that has code similar to what you want.
2. Paste it back in between parts.
3. Give it a new Name.
4. Edit the code as required.
5. If this is for an animation, copy a line like this (simple visibilities do not need this):

<Animation name="lever_trimtab_aileron_key" guid="d603198d-182b-46cd-a15b-bf862dc37195" length="100" type="Sim" typeParam2="lever_trimtab_aileron_key" typeParam="AutoPlay" />

6. Paste it back just above the part you made.
7. Change the names in quotes to the name you just created in step 3 (two places).
8. Change the GUID - either use an online GUID generator or just change a number or two in this one (do not add or delete characters).
9. Check if the new GUID is unique in this file (Edit/Find).

Hope this helps,
Hi,tgibson!Thanks for your help again!If it doesn't have animations, then I only need to make the first four steps in modeldef.xml, right?
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
Correct, if it only has a Visibility section and no Animation section.
 
Messages
34
Country
taiwan
Correct, if it only has a Visibility section and no Animation section.
Hi,tgibson!Oh. . My God, I found that I seem to be mistaken, I have nothing to gain after adding the code, I think the original model does not have the corresponding ATTCHPOINT for these switches.
 

tgibson

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

You do not need an attachpoint to make a part clickable. In the image below I chose the fire handles (which do nothing in my VC) and added the Mouse Rectangle switch_landing_light:

dc6b_vc_mouserect_mcx.jpg


When I load the VC into FSX, I can click on the fire handles and the landing lights turn on and off:

dc6b_vc_mouserect.jpg


There is no attachpoint at the fire handles.

Note that if your code does not include a MouseRect section that part will not be clickable. Also, if you *only* have a MouseRect section I'm not sure that works? I've never tried it though.

Hope this helps,
 
Last edited:
Messages
34
Country
taiwan
Hi,

You do not need an attachpoint to make a part clickable. In the image below I chose the fire handles (which do nothing in my VC) and added the Mouse Rectangle switch_landing_light:

View attachment 46173

When I load the VC into FSX, I can click on the fire handles and the landing lights turn on and off:

View attachment 46174

There is no attachpoint at the fire handles.

Note that if your code does not include a MouseRect section that part will not be clickable. Also, if you *only* have a MouseRect section I'm not sure that works? I've never tried it though.

Hope this helps,
Yes, but I couldn't find the relevant modelpart in HAIRARCHY EDITOR. After I edited the code, I still couldn't find it.Here is the code I edited I n the modeldef.xml
<PartInfo>
<Name>L:F22_SW_FLCS_BIT</Name>
<MouseRect>
<Callbackcode>
3 (&gt;K:APU_EXTINGUISH_FIRE)
</Callbackcode>
</MouseRect>
</PartInfo>
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
Are saying you clicked on every part in the Hierarchy Editor and it never turned red? Even when you clicked the SceneGraphNode at the very top?
 
Top