chinedufn / landon

A collection of tools, data structures and methods for exporting Blender data (such as meshes and armatures) and preparing it for your rendering pipeline.
https://chinedufn.github.io/landon/
147 stars 17 forks source link

landon export fails: unknown field `vertex_positions` #12

Closed kevzettler closed 4 years ago

kevzettler commented 4 years ago

Hi @chinedufn the export is failing for me with an error about vertex_positions

Versions

kevs-mbp:crashgiants kevzettler$ landon -V
landon 0.7.1
kevs-mbp:crashgiants kevzettler$ rustc -V
rustc 1.44.0 (49cae5576 2020-06-01)
kevs-mbp:crashgiants kevzettler$ blender --version
Blender 2.80 (sub 75)
    build date: 2019-07-29
    build time: 18:27:51
    build commit date: 2019-07-29
    build commit time: 14:47
    build hash: f6cb5f54494e
    build platform: Darwin
    build type: Release
    build c flags:  -Wall -Werror=implicit-function-declaration -Werror=return-type -Wno-tautological-compare -Wno-unknown-pragmas -Wno-char-subscripts -Wstrict-prototypes -Wmissing-prototypes -Wunused-parameter  -mmacosx-version-min=10.11 -Xclang -fopenmp -I'/Users/azo/Code/blender/blender_build/blender/../lib/darwin/openmp/include' -std=gnu11   -msse -pipe -funsigned-char -msse2
    build c++ flags:  -Wall -Wno-tautological-compare -Wno-unknown-pragmas -Wno-char-subscripts -Wno-overloaded-virtual -Wno-sign-compare -Wno-invalid-offsetof  -mmacosx-version-min=10.11 -ftemplate-depth=1024 -stdlib=libc++ -Xclang -fopenmp -I'/Users/azo/Code/blender/blender_build/blender/../lib/darwin/openmp/include' -std=c++11   -msse -pipe -funsigned-char -msse2
    build link flags: -fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore -framework ForceFeedback -liconv -Xlinker -unexported_symbols_list -Xlinker '/Users/azo/Code/blender/blender_build/blender/source/creator/osx_locals.map' -stdlib=libc++
    build system: CMake

Error output

$ landon export -f ./assets/WiP-punch.blend
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unknown field `vertex_positions`, expected one of `armature_name`, `bounding_box`, `multi_indexed_vertex_attributes`, `materials`, `custom_properties`", line: 1, column: 19)', /Users/kevzettler/.cargo/registry/src/github.com-1ecc6299db9ec823/blender-mesh-0.7.1/src/export.rs:158:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
kevs-mbp:crashgiants kevzettler$ RUST_BACKTRACE=1 landon export -f ./assets/WiP-punch.blend
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unknown field `vertex_positions`, expected one of `armature_name`, `bounding_box`, `multi_indexed_vertex_attributes`, `materials`, `custom_properties`", line: 1, column: 19)', /Users/kevzettler/.cargo/registry/src/github.com-1ecc6299db9ec823/blender-mesh-0.7.1/src/export.rs:158:38
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::rust_panic_with_hook
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::option::expect_none_failed
   8: blender_mesh::export::parse_meshes_from_blender_stdout
   9: <landon::subcommands::export::ExportCmd as landon::Subcommand>::run
  10: landon::main
  11: std::rt::lang_start::{{closure}}
  12: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
kevzettler commented 4 years ago

The error points to this line:

https://github.com/chinedufn/landon/blob/master/blender-mesh/src/export.rs#L158

chinedufn commented 4 years ago

Ah - looks like you're running an older version of the addons. Sorry that it isn't yet clear that that's the case.

landon install --armature-to-json --mesh-to-json
kevzettler commented 4 years ago

okay with those installed i'm now seeing

kevs-mbp:crashgiants kevzettler$ landon export -f ./assets/WiP-punch.blend
Error: Error while exporting data from blender: Traceback (most recent call last):
  File "/Users/kevzettler/Library/Application Support/Blender/2.80/scripts/addons/blender-mesh-to-json.py", line 132, in execute
    boneIndex = allBoneNames.index(boneName)
ValueError: 'Group' is not in list

location: /Applications/Blender.app/Contents/Resources/2.80/scripts/modules/bpy/ops.py:201

location: /Applications/Blender.app/Contents/Resources/2.80/scripts/modules/bpy/ops.py:201
Traceback (most recent call last):
  File "<string>", line 13, in <module>
  File "/Applications/Blender.app/Contents/Resources/2.80/scripts/modules/bpy/ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "/Users/kevzettler/Library/Application Support/Blender/2.80/scripts/addons/blender-mesh-to-json.py", line 132, in execute
    boneIndex = allBoneNames.index(boneName)
ValueError: 'Group' is not in list

location: /Applications/Blender.app/Contents/Resources/2.80/scripts/modules/bpy/ops.py:201

location: <unknown location>:-1

location: <unknown location>:-1
chinedufn commented 4 years ago

Mind taking a look at your mesh’s vertex groups and seeing if there is one called “Group”

Seems like if you deleted that you’ll be in good shape

If you click on your mesh in object mode it’s the green triangle panel on the right

chinedufn commented 4 years ago

Or is that vertex group intentionally there for you?

chinedufn commented 4 years ago

Either way I’m currently looking into this error and once I am reproduce I’ll add a test case for this - thanks for reporting

kevzettler commented 4 years ago

I have a bunch of meshes, and not seeing a "Group" vertex group for any of them.

Screenshot 2020-06-09 15 15 41

chinedufn commented 4 years ago

image

boom I can reproduce. Gimme like 30 mins to add a test and push a fix

chinedufn commented 4 years ago

Published a fix as landon 0.7.2

https://github.com/chinedufn/landon/commit/0679337b84899285bcd1d554259a047a03dc9c5b

cargo install -f landon --version 0.7.2

chinedufn commented 4 years ago

Closing - just lmk if this is still broken