-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added RPR_InsertMedia as Project.import_media() and SetMediaItemSelected as Project.select_item() #112
base: master
Are you sure you want to change the base?
Added RPR_InsertMedia as Project.import_media() and SetMediaItemSelected as Project.select_item() #112
Conversation
Sorry! I totally forgot that I've also added By default, the item will be added to the current selection. By using the argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid, if still item object is needed — it's quite more flexible to make everything on the item side.
More than, there are some methods like make_only_selected_iteem
or something like these. I don't feel such project API is suitable here...
I'm not a valid reviewer here, so these are just suggestions as from contributor, But maybe they help)) Thanks! |
…res#112 I've added it in this branch as the branch already has `Item.is_selected.setter` property
Can't figure out why this isn't merged |
Maybe the indent of his code is not matched to original repo. |
Repository is not maintained. You always can use reapy-boost from my repository. And I try to approve all PR's, which do not break the repo. But I also almost forgot of this project, as stated to write extensions in rust, and, even added a lot of reapy philosophy there. |
Thanks a lot for your reply, And I am happy to use see your works. Actually, I am a new one to reaper programming, and I am going to spend time on translate reapy to c# version. I will read your code for further inspiration, thank you. |
Hi!
I've added the method to import a file in a REAPER project.
To use it simply call:
project.import_media('path/to/file')
REAPER will create a new track and place the imported
Item
at the beginning of the project [00:00].If the file is not found or invalid it will raise an Exception
You can also use the argument
addToSelectedTrack : bool [optional]
To import the media to the selected track in the project.
If no track is selected, it will raise an
IndexError
setToCursorPosition : bool [optional]
To set the imported Item's position to the cursor position
I also added a tool called
file_handler.validate_path('path/to/file/or/folder',ext=None, isFolder=False)
Basically this method executes some validation on the path and raises for multiple reasons.
reapy.Project().path
])ext
".