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

MCX Model Merging and ModelDef/P3D

Messages
10,149
Country
us-arizona
Hey all,

Arno, I may have found a bug in MCX. Im not sure.

I am now animating parts in the VC of my plane. When I export the models (4 total), I am finding issues with custom animations not working. However, the basic stock animations work fine. Very odd.

The MouseRect's for all of these also do not work.

In Options, I have directed MCX to the ModelDef in the Prepar3D location, which is in 3DSM2012/Plugins folder of the SDK package.

I double checked the 'setting' for ModelDef and its still on the Prepar3D location, but when redoing the animations to see if it was my issue, the parts still arent animating.

What would you recommend? Should I place a copy of my ModelDef into a diff location such as the FSX 3DS Max 9 Plugins folder and see if that might do it?


Also, I noted that Prepar3D isnt in the options for favored sim in MCX. :S

Sorry to bring you bugs.

Bill
 
I just tried using the alternate location for the Microsoft SDK for the ModelDef and that didnt work either.
 
Hi Bill,

Do you remember I told you there are probably some aircraft specific features that don't work yet when I added the visibility tags? I think you just found two of them :D.

Specific animations that can not be found in the modeldef.xml are indeed one of these problems. I think with the visibility tags I found a way to deal with them, so I can fix this part in the future.

For the mouse rectangles, do you have some more information for me how they are defined? Then I can probably add support for them as well.
 
Hey Arno,

Roger that and yep, you said there would be bugs.

I'll do some digging and post some data on the MouseRects.

Side information; oddly, some of the parts animate fine, while some of the parts are not animating at all. For instance, the control yokes and pedals animate fine, the starter switch and mixture animate fine, but the throttle knob and all the switches do not animate. Nothing has functioning MouseRects, even in the mixture knob or starter/magnetos switch. They have MouseRects written in for them in their code blocks, but the MouseRects are not working. So, some things are animating, but no mouserects.

Also, I tried linking the XWriter in MCX to the ModelDef so that they were a common address link which did nothing either. I was doing research on this to see if I could figure it out, if it was a setting. I noted that a ModelXWriter would write on the parts exporting, then a XWriter or XWrite program also kicked in. I looked for them in the MCX folder but didnt see them. I think they are interlaced in the MCX command code. But, I was just curious if they know where the ModelDef is. I did find a link setting in MCX for one of them to ModelDef and mine was going to Flight Simulator X SDK, not the P3D SDK ModelDef. I changed that, reexported, nada.




(Am I the only one that thinks of MouseRects as mouse rectums? For several years, without asking about those, I thought of that. I think Bill Leaming was the one that finally told me what they 'really' are... Still, when I see or hear about a MouseRect, that is what I think of... :S )
 
Ive copied out 3 sections of part codes that have MouseRects.

Note that on the parts list (ModelDef) that they have a top area in the parts sheet that is nothing but GUID's and data such as amount of travel of the part animation; 50 KF's, 100 KF's with KF being Key Frames of animation travel.

The second section is in the lower half of the ModelDef, having the core data of how the part animates (speed, code strings, etc) and then their MouseRect sections which also can include sound activators, etc.





<Animation name="pa20_switch_panel_light" guid="cf2a3a2d-bfbf-4fe0-a5da-427c1dbe05b7" length="50" type="Sim" typeParam2="pa20_switch_panel_light" typeParam="AutoPlay" />

<PartInfo>
<Name>pa20_switch_panel_light</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>LIGHT PANEL</Variable>
<Units>bool</Units>
<Scale>50</Scale>
</Sim>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_LIGHT_SWITCH_PANEL</HelpID>
<TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_PANEL</TooltipID>
<CallbackCode>
(&gt;K:PANEL_LIGHTS_TOGGLE)
1 (&gt;L:XMLSND7,enum)
</CallbackCode>
</MouseRect>
</PartInfo>


<Animation name="pacer_skirts_selector" guid="0720eee4-c306-46fc-884f-f88063d24442" length="50" type="Sim" typeParam2="pacer_skirts_selector" typeParam="AutoPlay" />

<PartInfo>
<Name>pacer_skirts_selector</Name>
<Animation>
<Parameter>
<Code>
(L:press skirt,bool) 100 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Wheel Skirts Selector System; (%((L:SKIRTS SHOW,enum))%{case}%{:0}Old Skirts)%{:1}New Skirts)%{:2}No Skirts)%{End}</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>(M:Event) 'LeftSingle' scmp 0 == if{ (L:SKIRTS SHOW,enum) 1 + 4 % (>L:SKIRTS SHOW,enum) 1 (>L:XMLSND1=7 ,enum) 1 (>L:press skirt,bool) } (M:Event) 'LeftRelease' scmp 0 == if{ (>L:press skirt,bool) }</CallbackCode>
</MouseRect>
</PartInfo>





<Animation name="da40_switch_strobe_light" guid="7fef9258-9a81-4a43-81c7-ba639157b1d3" length="50" type="Sim" typeParam2="da40_switch_strobe_light" typeParam="AutoPlay" />


<PartInfo>
<Name>da40_switch_strobe_light</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>LIGHT STROBE</Variable>
<Units>bool</Units>
<Scale>50</Scale>
</Sim>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_LIGHT_SWITCH_STROBE</HelpID>
<TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_STROBE</TooltipID>
<CallbackCode>
(>K:STROBES_TOGGLE)
1 (&gt;L:XMLSND7,enum)
</CallbackCode>
</MouseRect>
</PartInfo>


Here they are in a code enclosure:

Code:
    <Animation name="pa20_switch_panel_light" guid="cf2a3a2d-bfbf-4fe0-a5da-427c1dbe05b7" length="50" type="Sim" typeParam2="pa20_switch_panel_light" typeParam="AutoPlay" />

    <PartInfo>
        <Name>pa20_switch_panel_light</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>LIGHT PANEL</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_LIGHT_SWITCH_PANEL</HelpID>
            <TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_PANEL</TooltipID>
            <CallbackCode>
                  (&gt;K:PANEL_LIGHTS_TOGGLE)
               1 (&gt;L:XMLSND7,enum)
            </CallbackCode>
        </MouseRect>
    </PartInfo>


    <Animation name="pacer_skirts_selector" guid="0720eee4-c306-46fc-884f-f88063d24442" length="50" type="Sim" typeParam2="pacer_skirts_selector" typeParam="AutoPlay" />

 <PartInfo>
  <Name>pacer_skirts_selector</Name>
    <Animation>
      <Parameter>
        <Code>
           (L:press skirt,bool) 100 *
        </Code>
       <Lag>100</Lag>
      </Parameter>
    </Animation>
  <MouseRect>
  <Cursor>Hand</Cursor>
 <TooltipText>Wheel Skirts Selector System; (%((L:SKIRTS SHOW,enum))%{case}%{:0}Old Skirts)%{:1}New Skirts)%{:2}No Skirts)%{End}</TooltipText>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>(M:Event) 'LeftSingle' scmp 0 == if{ (L:SKIRTS SHOW,enum) 1 + 4 % (>L:SKIRTS SHOW,enum) 1 (>L:XMLSND1=7 ,enum) 1 (>L:press skirt,bool) } (M:Event) 'LeftRelease' scmp 0 == if{ (>L:press skirt,bool) }</CallbackCode>
  </MouseRect>
  </PartInfo>





    <Animation name="da40_switch_strobe_light" guid="7fef9258-9a81-4a43-81c7-ba639157b1d3" length="50" type="Sim" typeParam2="da40_switch_strobe_light" typeParam="AutoPlay" />


    <PartInfo>
        <Name>da40_switch_strobe_light</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>LIGHT STROBE</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_LIGHT_SWITCH_STROBE</HelpID>
            <TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_STROBE</TooltipID>
           <CallbackCode>
               (>K:STROBES_TOGGLE)
               1 (&gt;L:XMLSND7,enum)
           </CallbackCode>
        </MouseRect>
    </PartInfo>
 
Arno, here is my ModelDef file I use on my planes. Its massive, but will show you how all the GUID's are on the top, and then all the blocks of code are on the bottom second section. For some reason, they separate the two into two sections.
 
Last edited:
Hi bill,

How are those mouse rectangles assigned to the model? Also using the attach tool script?
 
Arno,

Yes.

One selects the Attach Point Tool in the Aces rollout. On there, you select MouseRect and then find the matching animation name. There is a button that says 'Apply to Selected Geometry'.

You have to be careful to select the proper matching MouseRect with its animation, as some animations will not function with a mis-matched MouseRect.

Then, you can find the data on the MouseRect in the Object Properties, under the User Defined tab. There, you will see Mouserect and any other major 'Attach Point' condition associated to that part, such as Visibility, Effect, etc.

See attached JPG.
 
Last edited:
Hi,

Ok, clear. And one part can have both a mouse rectangle and a visibility tag?
 
Hi,

Ok, clear. And one part can have both a mouse rectangle and a visibility tag?

Yes... all such are contained in the User Defined tab of the Attachpoint tool's domain. Presumably wherever you are finding the visibility tag info, you will also find the mouse rectangle tag.
 
I hope so, then it should not be too hard to add support for them as well :).
 
Back
Top