Skip to content
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

hotfixes #92

Closed
wants to merge 17 commits into from
Closed

hotfixes #92

wants to merge 17 commits into from

Conversation

Levitanus
Copy link
Contributor

@Levitanus Levitanus commented Jun 24, 2020

fix undo blocks

fixed 0 flags to be -1 (hold everything, while 0 does nothing), added flags description to docstrings


several properties of Item and Take could be rewritten. + set_info_value

  • Item.is_selected.setter
  • Item.set_info_value()
  • Take.set_info_value()
  • Take.source.setter
  • Take.start_offset.setter

~ fix typo in Take.add_event() (take.pyi)


region fix + Project.loop_points


Marker fix, suppose

I'm not sure exactly what I've done. But it brought stability to my script.
Previously I've met a lot of errors caused by invoking of EnumProjectMarkers2 inside makrer.py
P.S. I feel, the problem is deeper and somehow connected to regions, that are counted by EbumProjectMarkers2. I'll investigate soon.


Markers indexing fix

Previously, marker index was enum index to be used in EnumProjectMarkers2, but now the additional member Marker.enum_index : int is introduced.
Marker.index now responses for the user-ID, that could be changed bu shift+click in the arrange-view


take name now can be set
fix item id typo

Added envelope points

class EnvelopePoint

Envelope methods:

  • get_point(self, index:int) -> EnvelopePoint
  • insert_point(self, point: EnvelopePoint, sort: bool = True) -> bool:
  • set_point(self, index: int, value: EnvelopePoint, sort: bool = True) -> bool:
  • sort_points(self) -> None:

Fix import psutil issue during installation

Since import reapy line is needed only for keeping the version, I've made it directly by file-parcing. Now there is no strict need to import reapy before setuptools make its work.


Region indexing fix

As within the same commit relative to markers I've divided region.index (which now is user-index from edit popup) and region.enum_index (which is what was index previously).


Added 'Item.make_only_selected_item` method as suggested in #112

I've added it in this branch as the branch already has Item.is_selected.setter property


fixed 0 flags to be -1 (hold everything, while 0 does nothing), added flags description to docstrings
+ Item.selected.setter
+ Item.set_info_value()
+ Take.set_info_value()
+ Take.source.setter
+ Take.start_offset.setter

~ fix typo in Take.add_event (take.pyi)
I'm not sure exactly what I've done. But it brang stability to my script
Previously, marker index was enum index to be used in EnumProjectMarkers2, but now the additional member Marker.enum_index : int is introduced.
Marker.index now responds for the user-ID, that could be changed bu shift+click in the arrange-view
class EnvelopePoint
Envelope methods:
* `get_point(self, index:int) -> EnvelopePoint`
* `insert_point(self, point: EnvelopePoint, sort: bool = True) -> bool:`
* `set_point(self, index: int, value: EnvelopePoint, sort: bool = True) -> bool:`
* `sort_points(self) -> None:`
Since `import reapy` line is needed only for keeping the version, I've made it directly by file-parcing. Now there is no strict need to import reapy before setuptools make its work.
@Levitanus
Copy link
Contributor Author

rebased to the actual master, conflicts resolved

As within the same commit relative to markers I've divided `region.index` (which now is user-index from edit popup) and `region.enum_index` (which is what was index previously).
@Levitanus
Copy link
Contributor Author

Levitanus commented Jan 11, 2021

I think, even with a long history of this PR, it is quite clean and easy to understand. More than, fixes really bugs, while not adding features)
Only thing I've not managed — changelog...

@Levitanus
Copy link
Contributor Author

The most surprising part here is — project.py, marker.py and region.py because of noticeable API change. But, after some usage of the changed marker\region indexing system — I found that almost everywhere marker index is needed — it is actually Marker ID (by the terminology of the original API) or Marker.index.

Enum index almost useless except of RPR.GetProjectMarker2 call.

So, even if it touches some already written source code — it probably, will not be noticed but just makes behavior more stable.

@Levitanus Levitanus closed this Nov 8, 2021
@Levitanus Levitanus deleted the hotfixes branch November 8, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant