makehumancommunity / mpfb2

MPFB2 is a free and open source human generator for Blender
http://static.makehumancommunity.org/mpfb.html
Other
317 stars 38 forks source link

MPFB2 should warn rather than crash if obj importer is not enabled #32

Closed aum7 closed 2 years ago

aum7 commented 2 years ago

hi i install mpfb2.0.0-a1, restart blender i open n-panel, go to mpfb tab, expand 'new human', 'from scratch' i click 'create human' - bang, error message

` Python: [ERROR] mpfb.init ..............................: Unhandled crash File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\ui\newhuman\operators\createhuman.py", line 139, in execute basemesh = HumanService.create_human( File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\services\humanservice.py", line 982, in create_human basemesh = ObjectService.load_base_mesh(context=bpy.context, scale_factor=scale, load_vertex_groups=True, exclude_vertex_groups=exclude) File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\services\objectservice.py", line 161, in load_base_mesh basemesh = ObjectService.load_wavefront_file(filepath, context) File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\services\objectservice.py", line 149, in load_wavefront_file bpy.ops.import_scene.obj(filepath=filepath, use_split_objects=False, use_split_groups=False) File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in call ret = _op_call(self.idname_py(), None, kw)

Calling operator "bpy.ops.import_scene.obj" error, could not be found

Traceback (most recent call last): File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\ui\newhuman\operators\createhuman.py", line 139, in execute basemesh = HumanService.create_human( File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\services\humanservice.py", line 982, in create_human basemesh = ObjectService.load_base_mesh(context=bpy.context, scale_factor=scale, load_vertex_groups=True, exclude_vertex_groups=exclude) File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\services\objectservice.py", line 161, in load_base_mesh basemesh = ObjectService.load_wavefront_file(filepath, context) File "C:\Users\chist\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\mpfb\services\objectservice.py", line 149, in load_wavefront_file bpy.ops.import_scene.obj(filepath=filepath, use_split_objects=False, use_split_groups=False) File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in call ret = _op_call(self.idname_py(), None, kw) AttributeError: Calling operator "bpy.ops.import_scene.obj" error, could not be found

location: :-1

` asus a15 laptop win 10 pro blender 3.1.2

thx for sharing have fun aum

Sandy10000 commented 2 years ago

HI.

"Import-Export: Wavefront OBJ format" An error may occur if this blender addon is not valid.

aum7 commented 2 years ago

thx for the reply enabling import obj addon solved the issue it might be wise to add error warning message: 'Import-Export: Wavefront OBJ format' addon must be enabled.

thx for sharing, have fun aum s love nia

joepal1976 commented 2 years ago

This might need some extra care for blender 3.2 too, as there's a new obj importer

joepal1976 commented 2 years ago

The fix in https://github.com/makehumancommunity/mpfb2/commit/a9782acc239343747702c1464b372a54681e560a seems to be valid for 3.2.0 too.

joepal1976 commented 2 years ago

Closing handled issues with no additional info for a month