Log in

View Full Version : Turning a user-defined function into a 'dot' function


hazel-ra
25th November 2008, 02:43
I have a user-defined function called unclip. It makes sure there isn't any popping when you join two clips together.

I use it thusly:
scene1 = unclip(trim( 0, 1001 ) )


However, I'm wondering if there's a way I can make it work like other functions where you can append its call to a scene itself.

Like this:

Scene1.unclip

?

Gavino
25th November 2008, 02:59
You don't need to do anything extra - it should work just as you wrote it.

Scene1.unclip is (means) the same thing as unclip(Scene1)

EDIT: Note that this still doesn't change Scene1 itself. If that's what you want, you need to reassign the result back to Scene1:

Scene1 = Scene1.unclip

hazel-ra
25th November 2008, 03:10
Gee, you think I would have simply tried it!
:p
:stupid:

hazel-ra
25th November 2008, 03:15
Also, is there a term for the syntax of the .appendage way of referencing functions?

Gavino
25th November 2008, 03:21
It's usually referred to as O-O notation (meaning object-oriented),
as used in languages like C++.