← Back to team overview

phatch-dev team mailing list archive

[Bug 437161] Re: blender 2.49

 

I have a fix for the 2.48 issue in my branch (not merged to trunk yet).
If you want to "monkey patch" it, you could try doing following changes
to your /phatch/data/blender/object.py wherever that happens to be:

Beginning:
Instead of 
from Blender import Camera, Image, Material, Object, Texture 
from PIL import Image as PILImage 
from PIL import ImageOps 
 
try
from Blender import Camera, Image, Mathutils, Material, Object, Texture 
from PIL import Image as PILImage 
from PIL import ImageOps 

In addition you need to change to two functions a little bit. Search for
"vec1.cross(vec2)" and replace it with Mathutils.CrossVecs(vec1, vec2)
so you get something like this:

...
    vec1 = get_vec(edges[0]) 
    vec2 = get_vec(edges[1]) 
 
    return Mathutils.CrossVecs(vec1, vec2).normalize() 
 
You also need to replace vectors_on_same_side with this:
def vectors_on_same_side(v1, v2): 
    # checks if the vec are on the same side of a ball. expects that v1 
    # and v2 have been normalized already 
    return math.acos(Mathutils.DotVecs(v1, v2)) < math.pi 
 

The problem was caused by recent addition of cross and dot methods to
Blender's Vector class. This solution might work with some older
versions too. Note that you can modify "object.py" while running Phatch
so should you run into any errors, just do the necessary changes and run
the action again to see if it works after that.

-- 
blender 2.49
https://bugs.launchpad.net/bugs/437161
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: In Progress

Bug description:
Patch needs Blender 2.49 for some things. In Jaunty, blender 2.48 is the standard and when manually trying to install lender 2.49, the program wants to update some python packages. I dont know if other programs work with that version of python, so I don't install it.

Maybe it's bether to let Patc work with Blender 2.48 also....

Thanks ad advance, and keep up the good work. Patch is really a good program!

Maarten



References