-
Notifications
You must be signed in to change notification settings - Fork 76
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
Export of animations #43
Comments
Thanks for reporting this. I will file this as a bug since, technically, the Though another way to achieve the same outcome should be to set the property "imagefilename" (or whichever property name may apply) of a given export node and then just run the node. (I have not tested this, I'm basing this on your description.) I will look into supporting animations in |
I took a fairly quick look and I think this could get complicated - one of those cases where the COMSOL API is just very ambiguous. I use the demo model and added a quick Animation export using the GUI. Then:
and lastly
In a first step, we could distinguish the nodes for image and animation data via the implemented In [20]: (m/'exports/image').type()
Out[20]: 'Image'
In [21]: (m/'exports/data').type()
Out[21]: 'Data'
In [22]: (m/'exports/Animation 1').type()
Out[22]: 'Animation' Using this and the supplied suffix, we could run a check if the suffix is valid for the type of export and if yes, set the right |
As Max points out, this could get complicated. So I changed the status from "bug" to "feature request" and will add a note to the docs that animations aren't supported. It could also be not that complicated. Maybe it's enough to look at the Java code Comsol generates when we add the animation. Might be a good first issue for someone. It would also require a test to come along with it though. |
Animations can now be exported via `Model.export()`, just like images and data files. The animation type is deduced from the file ending as either a GIF, Flash, AVI, or WebM encoded movie, or a PNG image sequence. This covers all animation types supported by Comsol 5.6. Much like in #66, we no longer allow specifying nodes via a string such as `'export/image'`. This was never documented anyway and may lead to problems with node names that actually contain a forward slash (which would be escaped as `//`). The node must be given as either a string such as `'image'` or a reference like `model/'exports'/'image'`.
Fixed in MPh 1.1.3, released today. |
Hi,
Currently, exporting animations specifying the filename is not working, mainly because animation don't use "filename" as a property, but different ones depending on the file type used.
I made a little workaround for my case. I'm exporting not animations but image sequences so i can load them later, so i modified very naively the export function so it can treat my accordingly. Here is the code so it can work as an inspiration hahaha
def export(self, node=None, file=None, anim = False):
other filenames used by animation are "giffilename", "avifilename", "flashfilename", so there must by a way to tell the function which to use.
Cheers!
The text was updated successfully, but these errors were encountered: