PyPRP error "ValueError:" (self-answered!)

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

PyPRP error "ValueError:" (self-answered!)

Postby He'uman » Fri Sep 24, 2010 2:28 pm

I'm a beginner, so I'm hoping this is simple :?

There is absolutely nothing special about the age. I have only built a terrain and several items for it.
There is exactly one UV map used on the terrain (not the object in question).
The object is now simple (broke up the more complex version) with 204 vertexes. I've checked it over every way I can think of (removed dups, checked for complete point participation in faces, etc.) but I keep getting the error on it. I even tried deleting it and recreating it ... same results.

It seems to be complaining about "bone.weight" ... but I've got no bones in the model. Never even created and deleted one in it!

Console output from export ("Generate release") as follows:
Code: Select all
[Visual Object Collector.Ring]
 [LogicHelper]
   No actions in list
None
   Exporting modifiers
   No modifiers
None
 [Draw Interface Collector.Ring]
Traceback (most recent call last):
  File "/home/latham/.blender/scripts/PyPRP/prp_Export.py", line 174, in open_file
    export_age(agename,basepath,selection,merge)
  File "/home/latham/.blender/scripts/PyPRP/prp_Export.py", line 88, in export_age
    page.export_all(selection)
  File "/home/latham/.blender/scripts/PyPRP/prp_ResManager.py", line 783, in export_all
    plDrawInterface.Export(self,obj,scnobj,name,SceneNodeRef,isdynamic,softVolumeParser, water)
  File "/home/latham/.blender/scripts/PyPRP/prp_DrawClasses.py", line 1576, in _Export
    drawi.data.export_obj(obj,SceneNodeRef,isdynamic,softVolParser, water)
  File "/home/latham/.blender/scripts/PyPRP/prp_DrawClasses.py", line 1731, in export_obj
    bone,weight = mesh.getVertexInfluences(vector.index)
ValueError: need more than 1 value to unpack


And the answer is ...
Apparently vertex groups are not processed properly.

Even when I guaranteed that the vertex groups were all non-empty, I still got the error. Only when I removed all the vertex group names, did I get rid of the error.
Apparently, the code tries to determine a blending factor from vertex groups, and thus is looking for the "weights" assigned. I did not want to take the time to assign weights for texture blending (maybe further down the line), so it may work if you assign weights on all named vertex groups.

Still, when I get the time, I'll post this as a bug ... the code should protect itself against a lack of weights in a vertex group.
He'uman
 
Posts: 1
Joined: Fri Sep 24, 2010 2:15 pm

Re: PyPRP error "ValueError:" (self-answered!)

Postby Aloys » Sat Sep 25, 2010 5:32 am

He'uman wrote:Still, when I get the time, I'll post this as a bug ... the code should protect itself against a lack of weights in a vertex group.[/color]

I agree, vertex groups can be a pretty useful help when modeling an Age and getting rid of them just for the export process is a bit cumbersome.
It was the same at some point with modifiers: they were ignored so we had to manually apply them before exporting, now they are automatically applied by PyPRP. :) It's always a big time saver when the tools can do automatically those kinds of tedious steps.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: PyPRP error "ValueError:" (self-answered!)

Postby Jojon » Sun Sep 26, 2010 9:32 am

I can't recall (or find) the motivation for the error message thrown, but we will need the vertex groups and weights (influence factor), once bone animation gets implemented in PyPRP.
I can not imagine why one would use vertex weights from groups, to determine per-vertex blending, when there are already vertex colour layers, unless possibly to automagically create duplicates of parts of meshes, with vertex alphas.
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am


Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests

cron