Skip to main content
eManu
Known Participant
June 10, 2021
Answered

Checkbox (MOGRT) ne fonctionne pas dans Premiere Pro

  • June 10, 2021
  • 2 replies
  • 2842 views

Bonjour à tous.

J'ai créé un MOGRT avec After Effects où j'ai deux compositions. J'ai créé un checkbox pour choisir laquelle des 2 activer. Mais une fois dans Premiere Pro, impossible d'activer ou de désactiver. Seule la première composition s'affiche masquant l'autre si je voulais activer l'autre.

Comme je suis débutant avec les MOGRT, voici ce que j'ai fait : 

1. ajouter de l'effet checkbox control sur chaque composition

2. lien de l'opacité (effect("Checkbox Control")("Checkbox")*100) avec "checkbox" sur chaque composition

3. Ajout dans Essential Graphics de l'effet "Checkbox" (On/Off).

4. Export

Est-ce que j'ai loupé un truc ?

Merci encore de votre aide.

Cordialement

Manu

 

Correct answer Roland Kahlenberg

Merci pour votre réponse.

Est-ce que comme ça cela convient ?


The way you have set up the Expressions and the Essential Graphics Panel (EGP) is what's causing your issue. You need only ONE Checkbox Control to serve both layers (nested comps). And of course, it is this Checkbox Control that is placed into the EGP.

 

I suggest you delete both checkboxes and the Expressions and start afresh because it looks like you need to have a better grasp on organizing the setup for Common Properties that will be placed into the EGP. A Common Property is a property used/shared by more than one property.

 

After deleting the two Checkboxes and Expressions, create a Null Object and name it, "Controller Layer".

Apply a Checkbox Expression Control to this Null.

 

In the first layer/nested comp, apply this Expression to the Opacity Property -

 

// check Checkbox for  its on-off switch and if it is ON ...

if(thisComp.layer("Controller Layer ").effect("Checkbox Control")(1)==1)

 

// if Checkbox is on then set Opacity value to 100

{100}

 

// if Checkbox is off then set Opacity value to 0

else  {0}

 

For the second layer/nested comp, use this Expression. This Expression is similar to the one above except that the values are reversed so that if the Checbox is on then the Opacity value is zero and vice versa.

// check Checkbox for  its on-off switch and if it is OFF ...

if(thisComp.layer("Controller Layer ").effect("Checkbox Control")(1)==0)

 

// if Checkbox is off then set Opacity value to 100

{100}

 

// if Checkbox is on then set Opacity value to 0

else  {0}

-----------------------------------------------------------------------------

By organizing your Common Properties onto an independent layer, it becomes much easier to construct relationships between properties and the Expressions referencing layers and their properties can be easily re-used with a simple copy-paste. HTH

HTH

2 replies

Participant
September 29, 2025

Hello ! 
Je pense avoir trouvé la solution à ton problème !
Bon la discussion date de 2021 mais je me dis que ça servira toujours à ceux comme moi qui ont eu ce souci et n'ont pas trouvé de réponses.

Le problème vient du fait que tu dois très probablement utiliser After Effects en anglais et Premiere en Français. 
C'est pourquoi Premiere ne reconnait pas "checkbox" dans ton expression car lui préfèrerait lire "Case à cocher".
Du coup, tu as deux solutions :

 

1. Passer Premiere en anglais

Fonctionnel mais pas idéal car si demain tu veux partager ton mogrt à quelqu'un ayant le logiciel dans une autre langue, ton mogrt ne fonctionnera pas chez lui/elle.

 

2. Remplacer le nom des effets par un chiffre.

La meilleure solution selon moi. Il te suffit alors de faire ceci : 

thisComp.layer("Nom de ton calque").effect(1)(1);

effect(1) = le 1er effet appliqué

(1) = le 1er paramètre de l’effet (la checkbox)

⚠️ Mais attention car tu dois :

  • Bien ordonner tes effets

  • Ne pas changer leur position après coup

 

Voilà j'espère que ça en aidera plus d'un.e 🙂

Roland Kahlenberg
Legend
June 10, 2021

The sequence of steps you've provided seem to be correct. However, it's the details that may be the issue.

 

For example, what is the exact Expression you used and on which layer were these Expressions applied?

How are your compositions structured - a screen capture of your timeline showing the nested comps will be a good insight.

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
eManu
eManuAuthor
Known Participant
June 10, 2021

Bonour Roland, merci pour ta réponse.

voici le screenshot

Roland Kahlenberg
Legend
June 10, 2021

Unfortunately, the Opacity property for the second layer has been cropped off.

 

Your first layer uses an Expression which if applied to both layers will lead to an end result where both layers will be enabled or disabled. What you want is to only have one layer enabled and this is dependent on the value of the checkbox.

 

If you still require assistance, I suggest you paste the Expression for BOTH layers. HTH

 

 

 

 

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV