You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/architecture.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ for each_seq in tl.tracks:
52
52
print each_item.media_reference
53
53
```
54
54
55
-
or, in the case of any nested composition, like this:
55
+
Or, in the case of a nested composition, like this:
56
56
57
57
```python
58
58
import opentimelineio as otio
@@ -72,7 +72,7 @@ A clip may set its timing information (which is used to compute its `duration()`
72
72
-`source_range`
73
73
The range of media that is cut into the sequence, in the space of the available range (if it is set). In other words, it further truncates the available_range.
74
74
75
-
A clip must have at least one set or else its duration is not computable.
75
+
A clip must have at least one set or else its duration is not computable:
Copy file name to clipboardExpand all lines: docs/tutorials/contributing.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ Now you fetch the latest changes from Pixar's OpenTimelineIO repo like this:
39
39
40
40
```bash
41
41
git fetch upstream
42
+
git merge upstream/master
42
43
```
43
44
44
45
All the development should happen against the `master` branch. We recommend you create a new branch for each feature or fix that you'd like to make and give it a descriptive name so that you can remember it later. You can checkout a new branch and create it simultaneously like this:
Copy file name to clipboardExpand all lines: docs/tutorials/write-a-hookscript.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,13 @@
3
3
OpenTimelineIO Hook Scripts are plugins that run at predefined points during the execution of various OTIO functions, for example after an adapter has read a file into memory but before the media linker has run.
4
4
5
5
To write a new hook script, you create a python source file that defines a
6
-
a function named ``hook_function`` with signature:
The first argument is the timeline to process, and the second one is a dictionary of arguments that can be passed to it by the adapter or media linker. Only one hook function can be defined per python file.
@@ -47,13 +46,15 @@ To create a new OTIO hook script, you need to create a file myhooks.py. Then add
47
46
48
47
The ``hook_scripts`` section will register the plugin with the system, and the ``hooks`` section will attach the scripts to hooks.
49
48
50
-
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is "`:`" separated). You may also define media linkers and adapters via the same manifest.
49
+
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows). You may also define media linkers and adapters via the same manifest.
51
50
52
51
## Running a Hook Script
53
52
54
-
If you would like to call a hook script from a plugin, the hooks need not be one of the ones that otio pre-defines. You can have a plugin adapter or media linker, for example, that defines its own hooks and calls your own custom studio specific hook scripts. To run a hook script from your custom code, you can call:
53
+
If you would like to call a hook script from a plugin, the hooks need not be one of the ones that OTIO pre-defines. You can have a plugin adapter or media linker, for example, that defines its own hooks and calls your own custom studio specific hook scripts. To run a hook script from your custom code, you can call:
This will call the ``some_hook`` hook script and pass in ``some_timeline`` and ``optional_argument_dict``.
59
60
@@ -76,7 +77,7 @@ print hook_list # ['c','b','a']
76
77
77
78
Now c will run, then b, then a.
78
79
79
-
To delete a function the list:
80
+
To delete a function in the list:
80
81
```python
81
82
del hook_list[1]
82
83
```
@@ -85,7 +86,7 @@ del hook_list[1]
85
86
86
87
### Replacing part of a path for drive mapping
87
88
88
-
An example use-case would be to create a pre-write adapter hook that checks the argument map for style being identified as nucoda and then preforms a path replacement on the reference url
89
+
An example use-case would be to create a pre-write adapter hook that checks the argument map for a style being identified as nucoda and then preforms a path replacement on the reference url:
Copy file name to clipboardExpand all lines: docs/tutorials/write-a-media-linker.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ To create a new OTIO Adapter, you need to create a file mymedialinker.py. Then a
30
30
]
31
31
}
32
32
33
-
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is "`:`" separated).
33
+
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows).
34
34
35
35
Finally, to specify this linker as the default media linker, set `OTIO_DEFAULT_MEDIA_LINKER` to the name of the media linker:
0 commit comments