• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Clear mogrt parameter field programmatically

Community Beginner ,
Jan 15, 2019 Jan 15, 2019

Copy link to clipboard

Copied

Using following function I'm able to import MOGrT, and set some values of it's parameter:

  importMOGRT: function(mogrtsPath, versionGroupName, subSequenceName, componentsString) {

    mogrtsPath = decodeURIComponent(mogrtsPath);

    var components = JSON.parse(decodeURIComponent(componentsString));

    versionGroupName = decodeURIComponent(versionGroupName);

    subSequenceName = decodeURIComponent(subSequenceName);

    if (mogrtsPath && versionGroupName && components) {

      var mogrtNodeId,

          sequences = this.getSequencesFromPremiere(['Merging', versionGroupName]);

      for (var premiereSequenceIndex = 0; premiereSequenceIndex < sequences.length; premiereSequenceIndex++) {

        var curPremiereSequence = sequences[premiereSequenceIndex];

        if (curPremiereSequence.name === subSequenceName) {

          var newTrackItem = curPremiereSequence.importMGT(mogrtsPath, 0, 1, 0);

          if (newTrackItem) {

            if (!mogrtNodeId) {

              mogrtNodeId = newTrackItem.projectItem.nodeId;

            }

            var moComp = newTrackItem.getMGTComponent();

            if (moComp) {

              var params = moComp.properties;

              for (var i = 0; i < components.length; i++) {

                var param = params.getParamForDisplayName(components['name']);

                if (param) {

                  try {

                    if (components['value']) {

                      param.setValue(components['value']);

                    } else {

                      param.setValue(" ");

                    }

                  } catch (e) {

                    //alert("Cannot set parameter to MoGRTs. Error " + e + "; Component: " + JSON.stringify(components));

                  }

                }

              }

            }

          } else {

            return false;

          }

        }

      }

      return mogrtNodeId;

    } else {

      return false;

    }

  },

What doesn't work is setting parameter value empty (s. line 29 of the script above). I have tried 'param.setValue("")' which seems to be logical (as far as I have not found any other helpful functions for this case in Samples/PremierePro.11.1.2.d.ts at master · Adobe-CEP/Samples · GitHub ), but it causes an error:

Premiere Pro has encountered an error.

[../../../../shared/adobe/MediaCore/MediaFoundation/API/Inc/MFBinaryData.h-62]

Bildschirmfoto 2019-01-15 um 12.42.57.png

Appreciate for any help, thanks in advance.

Premiere Version: 12.1.2

OS: Mac OS Sierra 10.12.6

TOPICS
SDK

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Employee , Jan 15, 2019 Jan 15, 2019

Yep, I found that problem too!

We're tracking the issue as DVAPR-4212419; no guarantees, but it's currently scheduled to be addressed in our next major release.

Votes

Translate

Translate
Adobe Employee , Apr 15, 2021 Apr 15, 2021

Confirmed! Fixed as of 13.1.

Votes

Translate

Translate
Adobe Employee ,
Jan 15, 2019 Jan 15, 2019

Copy link to clipboard

Copied

Yep, I found that problem too!

We're tracking the issue as DVAPR-4212419; no guarantees, but it's currently scheduled to be addressed in our next major release.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 09, 2019 Nov 09, 2019

Copy link to clipboard

Copied

Reporting that this is still an issue.

param.setValue("value", updateUI) crashes Premiere Pro

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

This seems to be fixed.

I can set empty values now in PP2019 and PP2020.

@Bruce Bullis can you confirm that?

 

Thanks and cheers,

guntram

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

Confirmed! Fixed as of 13.1.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 18, 2021 Aug 18, 2021

Copy link to clipboard

Copied

Premiere 13.1.4 on Windows and MacOS is not allowing setting empty values anymore:

META-ERROR.png
We needed to stick to PPro2019, because the only higher working version was 14.3.2 (14.4+ slows down our panel so much that we cannot use any of these) - but 14.3.2 cannot set booleans in mogrts => so back to 2019...
...and now reimplementing the dirty hotfix 😉

Cheers,

Guntram

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 18, 2021 Aug 18, 2021

Copy link to clipboard

Copied

Oh, I just realized that the "set empty value" was related to mogrt data, but my post also contains that we had to go to 2019 because we had problems with the checkboxes in mogrts...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 18, 2021 Aug 18, 2021

Copy link to clipboard

Copied

So this error occurs when setting XMP meta, in this special case setting sequence metadata.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 18, 2021 Aug 18, 2021

Copy link to clipboard

Copied

LATEST

Do you see similar problems, in current versions?

Also...can I have an ExtendScript snippet, that reproduces the problem?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines