Skip to content

Conversation

@vanous
Copy link
Collaborator

@vanous vanous commented Nov 27, 2025

  • Update the library to be a bit more strict when writing
  • The Addresses.address and Addresses.network should be plural (list) like in all other places. I think that there is a small usage, so i will introduce this breaking change.
  • add better aliases to serialize scene and user_data:
    mvr_writer.serialize_scene(mvr_read.scene)
    mvr_writer.serialize_user_data(mvr_read.user_data)

@vanous vanous force-pushed the further_spec_improvements branch from 375a5ef to 38f9190 Compare November 27, 2025 22:24
@vanous vanous force-pushed the further_spec_improvements branch from 38f9190 to f640fdf Compare November 27, 2025 22:33
@vanous vanous merged commit 1795f4b into master Nov 27, 2025
17 checks passed
@vanous
Copy link
Collaborator Author

vanous commented Nov 29, 2025

@nrgsille76 this PR is a breaking change, it is a very small modification but one that bothered me for a while, because it is different then the rest of the library approach. Rather then keeping a bunch of machinery around for compatibility forever, i decided to just change it, please update on your side. Previous (pseudo code):

fixture.addresses.address
fixture.addresses.address.address1
fixture.addresses.address.address2
fixture.addresses.network.network1
fixture.addresses.network.network2

is now
fixture.addresses.addresses
fixture.addresses.addresses.address1
fixture.addresses.addresses.address2
fixture.addresses.networks.network1
fixture.addresses.networks.network2

See the open-stage/blender-dmx#322 , the update was simple:

- for address in fixture.addresses.address:
+ for address in fixture.addresses.addresses:

...

- addresses=pymvr.Addresses(address=new_addresses),
+ addresses=pymvr.Addresses(addresses=new_addresses),

I have also added a nicer convenience serialize methods for scene and user_data, but the originals are still present:

mvr_read.scene.to_xml(parent=mvr_writer.xml_root)
mvr_read.user_data.to_xml(parent=mvr_writer.xml_root)

mvr_writer.serialize_scene(mvr_read.scene)
mvr_writer.serialize_user_data(mvr_read.user_data)

The pymvr with this change has been pushed to pypi, i am planning to push BlenderDMX probably this weekend.

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.

2 participants