Sync Channels

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Sync Channels

Post by dkwroot »

Is there a way to sync channels in a reference layer using code? I can't seem to find the function.
User avatar
hayasidist
Posts: 3511
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Sync Channels

Post by hayasidist »

first of all a health warning -- I've never used this function, so I can't tell you what needs to be done before / after!

but hopefully this will set you on the way : MohoLayer:UpdateReferencedLayer(syncOptions) -- see: http://mohoscripting.com/index.php?show ... er&id=1117
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Re: Sync Channels

Post by dkwroot »

This doesn't say anything about updating the channels though. I'm trying to find a way to sync the channels with the reference source.
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Sync Channels

Post by synthsin75 »

That should sync all channels for that layer. Are you needing to selectively sync channels?
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Re: Sync Channels

Post by dkwroot »

Yeah, I was planning to create a script that would iterate through all layers and sync certain channels to their source.
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Sync Channels

Post by synthsin75 »

Sorry, I'm not seeing any access to resyncing individual channels by script. And UpdateReferencedLayer doesn't do the channels either.
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Re: Sync Channels

Post by dkwroot »

Okay, I'll go ahead and make a ticket regarding this. There definitely needs to be a better way for managing reference layers.
GaryC
Posts: 53
Joined: Tue Feb 03, 2015 1:02 pm

Re: Sync Channels

Post by GaryC »

I actually already created a ticket for this problem:

https://mantis.smithmicro.com/view.php?id=39002

It was targeted for the 12.2 release but doesn't seem to have been included.
Post Reply