a module/script to change a movie of 2layers simultaneously?
  • nbd
    member
    Posts: 31
    Joined: Sat Oct 22, 2005 1:03 pm

    a module/script to change a movie of 2layers simultaneously?

    by nbd » Sat May 27, 2006 11:26 pm

    Hi !

    Is there a way to do the follwing:
    I have 2 layers.
    with a click in my media window I like to apply this movie to both layers.

    Is that possible? How?

    I am thinking of a module that links itself "between" the media window and the layer set?

    Thank you all!
  • nbd
    member
    Posts: 31
    Joined: Sat Oct 22, 2005 1:03 pm

    by nbd » Sun May 28, 2006 4:15 pm

    possible thought:

    one layer is accessed directly via the KeywordEvent :

    Code: Select all

    if keyword=='ctrl_layer_media':


    the other layer is correlated to that via:

    Code: Select all

       modul8.setValue('ctrl_layer_media',param,2)


    problem: 2.5 beta2 crashes with that code.

    crash log has been sent to beta25.[/code]
  • User avatar
    boris
    garageCube team
    Posts: 911
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    by boris » Sun May 28, 2006 4:18 pm

    Maybe you can use the KeywordEvent (feedback) into the script.
    When one layer is changed you can change another.
    Boris * garageCube team
  • User avatar
    boris
    garageCube team
    Posts: 911
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    by boris » Sun May 28, 2006 4:21 pm

    Sorry I diden't see your answer :roll:
    We will check your crash, thanks !
    Boris * garageCube team
  • User avatar
    boris
    garageCube team
    Posts: 911
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    by boris » Sun May 28, 2006 4:36 pm

    Ok :P

    It's a python crash because you made a endless loop, is not a problem w/modul8 beta.
    You need to improve a litle bit your script :

    Code: Select all

    first add this on the init() :


    feedbackLock = 0

    and in your KeywordEvent :

    Code: Select all

    if not feedbackLock :
       feedbackLock = 1
       
       if keyword=='ctrl_layer_media':
          modul8.setValue('ctrl_layer_media',param,2)
          
       feedbackLock = 0


    And now an endless loop is not possible and it works ![/code]
    Last edited by boris on Sun May 28, 2006 5:58 pm, edited 1 time in total.
    Boris * garageCube team
  • User avatar
    boris
    garageCube team
    Posts: 911
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    by boris » Sun May 28, 2006 4:40 pm

    Sorry the 'TAB' seems to be not working into the forum...
    Boris * garageCube team
  • nbd
    member
    Posts: 31
    Joined: Sat Oct 22, 2005 1:03 pm

    by nbd » Sun May 28, 2006 4:42 pm

    A great, I understand:

    the KeywordEvent is repeatedly called by itself, because it is reacting on the thing itself changes.

    THX !
  • nbd
    member
    Posts: 31
    Joined: Sat Oct 22, 2005 1:03 pm

    by nbd » Sun May 28, 2006 4:53 pm

    code with TABS:

    Code: Select all

    if not feedbackLock:
       feedbackLock = 1
       if keyword=='ctrl_layer_media':
          modul8.setValue('ctrl_layer_media',param,2)

    feedbackLock = 0
  • User avatar
    boris
    garageCube team
    Posts: 911
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    by boris » Sun May 28, 2006 6:02 pm

    Just add one "tab" , but it works also without...
    Thanks for the tips about "code", I update my message...
    Boris * garageCube team

Who is online

Users browsing this forum: No registered users and 11 guests