Blender VSE Driver deleted when stripe is copied or duplicated

Hi folks,
I need some insight or solution. In Blender VSE I have some transform strips with driver linked with another strip. Now I need to duplicate the transform strip with the driver. When I duplicate it, the driver is gone. How to resolve it or what is actually causing it? Is there any script or addon to deal with it?
Thanks in advance!

When you duplicate the strip you make another unique Blender object, I guess that breaks the link.

Thanks…Let’s see what can be done with it!

When you duplicate the strip you make another unique Blender object, I guess that breaks the link.

After a quick test it also looks like Drivers are treated as unique objects(?) at least they reference the object they are attached to, so when you make a duplicate the driver protocol is lost. This was a problem when copying audio fades between VSE strips in the past as well (but was addressed by bug tracker).

I note that copying drivers as a general function is not supported by Blender anyway. As a last resort I guess you could always write a script that would do it.

Thanks. Working on it. It’s almost finished. I will post the code block for review and suggestion.

I am trying to do a script to make drivers between various transform stripe in VSE through python. I am stuck in the middle of targets.id. What target.id will make the link with Scene?

Here’s the problem:
#start
import bpy

second = bpy.context.scene.sequence_editor.sequences_all["[TR]-second"]
root = bpy.context.scene.sequence_editor.sequences_all[’[TR]-root’]

drv = second.driver_add(“translate_start_x”)

#working, creating the driver

var = drv.driver.variables.new()
var.name = “transx”
var.type = “SINGLE_PROP”

#don’t know what target.id should be, tested with target.id.type as well but no luck.

target = var.targets
target.id.type = “SCENE”
target.id = bpy.data.scenes[“Scene”]
target.data_path = sequence_editor.sequences_all["[TR]-root"].translate_start_x
drv.driver.expression = ‘2 * %s’ % var.name

#code end

Error report: AttributeError: ‘bpy_prop_collection’ object has no attribute ‘id’

Please Help!

[solved]

It was the blackslashes and type:

var = drv.driver.variables.new()
var.name = “transx”
var.type = “SINGLE_PROP”
target = var.targets[0]
target.id_type = ‘SCENE’
target.id = bpy.data.scenes[“Scene”]
target.data_path = “sequence_editor.sequences_all[”[TR]-root"].translate_start_x"
drv.driver.expression = ‘2 * %s’ % var.name

Looks cool. How do you use this?

Thanks. It’s now hard coded. I have to make it dynamic in some way…I will post the updates as it progress…

Are you making an interactive translation tool to move strip media based on input from 3D view?

No, but that can be done as well…It’s a good idea. Thanks.

I made a fun “3D-view driver tool” for VSE color correction once. Not very practical but a good demonstration of the power of drivers.

Also I made a reverse version of a driver, from the VSE to 3D view. #113

That’s cool…I have subscribed to your channel a week ago! :smiley:

edit: Sorry double post

Oh here is the color corrector driver https://blenderartists.org/forum/showthread.php?326266-Live-VSE-Color-Corrector-TEST

It’s done! I am going to polish it more and more in my production stage. Memory buffer is super heavy now. Lets see if some kind of proxy can be done. Thanks for your support!

Here is the detail:

Wow that really was a lot of work. Congratulations. Can I suggest that you try to clean the audio of your recording with something like Audacity, it has a noise reduction feature :wink:

Thanks for the suggestion! I will do that in future.