cmlibs / zinc

Source code repository for OpenCMISS-Zinc
Mozilla Public License 2.0
15 stars 18 forks source link

Zincjs empty export bug fix #201

Closed alan-wu closed 2 years ago

alan-wu commented 2 years ago

Mark an ZincJS export as empty and omit it from the metadata file. Update documentation for the relevant APIs. A test has also been added.

fix #200

hsorby commented 2 years ago

I have just tried this and it hasn't fixed the problem.

alan-wu commented 2 years ago

I have just tried this and it hasn't fixed the problem.

Do you have the input file and graphics settings I can try it with?

hsorby commented 2 years ago

Attached is a simple Argon document with an exnode file. Using sparc-converter (pip install sparc-converter) you can run the command (from the unzipped contents directory.):

sparc-convert web-gl -p only_surfaces only_surfaces_visualised.neon

This command should succeed and generate only valid JSON files linked from the metadata file.

simple_test_neon_plus_data.zip

alan-wu commented 2 years ago

sparc-convert web-gl -p only_surfaces only_surfaces_visualised.neon

Thanks, I received the following error when running the script

obj.append(viewObj) AttributeError: 'NoneType' object has no attribute 'append'

Not sure if this is from your side or mine - but it is required to test if the memory buffer returned as None now. Memory buffer returned as None can be ignored.

hsorby commented 2 years ago

Yes, but I would have thought that we would have zero resources and not one resource that is None.

hsorby commented 2 years ago

These changes resolve the issue at hand for me, some minor changes and I think this will be good to go.

alan-wu commented 2 years ago

Updated styles for false statement check.