Page 2 of 5

Posted: Thu Jul 03, 2003 6:12 am
by theeth
would be nice if the objects returned by the Effect module had a Refresh function of some sort.


Posted: Thu Jul 03, 2003 8:20 am
by willian
t_revs wrote:Can't seem to get name in PutRaw to return anything except None
Hi, this is fixed in cvs now, thanks for reporting. PutRaw will return the object when one had to be created or None when the object already existed, as in 2.25. Besides that, the 'name' field (mesh name) can now be changed.


Posted: Thu Jul 03, 2003 8:58 am
by sumedho
OS: osx 10.2.5
Python: python 2.2.3


When starting blender the following error:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
no font found for international support
Using a clean Global Dictionary.
Run Python script "Text" ...

Printing sys.path gives:

['/usr/local/lib/python2.2', '/sw/lib/python2.2/', '/sw/lib/python2.2/plat-darwin', '/sw/lib/python2.2/lib-tk', '/sw/lib/lib-dynload', '/Users/sumedho/blender/', '', '']

Works fine on tuopoh and blender2.27. Normally the sys.path is
/usr/local/lib/python2.2 but for some reason this version of blender appends /sw/lib/python2.2/ instead. Setting PYTHONHOME enables some features working but causes problems in normal python operation.

Crash with Blender 2.27 NewPy1

Posted: Thu Jul 03, 2003 4:31 pm
by jgreen
Not sure if you were also interested in general non-python related problems with the pre-release of blender, but.. I get a crash on Linux with either the static or dynamic versions of the pre-release. I did not have this problem with 2.27. Here is a gdb back trace for the static blender binary:
Program terminated with signal 4, Illegal instruction.
#0 0x082d2f76 in png_handle_gAMA ()
#1 0x082c4031 in png_read_info ()
#2 0x0828d759 in imb_png_decode ()
#3 0x08284890 in IMB_ibImageFromMemory ()
#4 0x080d4859 in BIF_resources_init ()
#5 0x080e7965 in BIF_write_autosave ()
#6 0x080e7a08 in BIF_init ()
#7 0x0809c0df in main ()

Quick Issues

Posted: Thu Jul 03, 2003 8:04 pm
by Bischofftep

Some quick issues from OS X build from CVS as of 7-3-03 am:

Traceback (most recent call last):
File "lanc_povanim226_14h.p", line 1670, in draw4
File "", line 4004, in draw_buttons
File "", line 2408, in gettext
AttributeError: 'str' object has no attribute 'name'
focale = cam.Lens / (aspect * 32.0)

AttributeError: Lens
There doesn't seem to be any support for accessing lights yet?

YABLE does not return any info on any selected lights.

Otherwise excellent continued work everyone!!


Posted: Fri Jul 04, 2003 4:37 pm
by jms
Now povanim works with Blender2.27-new-py
but little changes are needed:

Code: Select all

def matrix2sizrotloc(mat0,O):
                    from math import cos, sin, acos, asin, atan2, atan
                    global B228
                    if not B228: 
                        LocX = mat0[3][0]
                        LocY = mat0[3][1]
                        LocZ = mat0[3][2]
                        return(LocX, LocY, LocZ, \
                                RotX, RotY, RotZ, \
                                SizeX, SizeY, SizeZ)
                    elif B228==1 and O!=None:
                        return(O.LocX,O.LocY, O.LocZ, \
                                O.RotX, O.RotY, O.RotZ, \
                                O.SizeX,O.SizeY , O.SizeZ)

Code: Select all

if not funblender and not B228:
elif funblender:
elif B228:      

Re: Report problems with the new Python API here please!

Posted: Fri Jul 04, 2003 5:27 pm
by jms
jms wrote: in module BLender.Object

Code: Select all

import Blender
for o in OBJLIST:
return this:

Using a clean Global Dictionary.
Run Python script "Text" ...
Traceback (most recent call last):
File "Text", line 4, in ?
AttributeError: 'str' object has no attribute 'name'
Same problem with Blender.Image.Get().

Posted: Fri Jul 04, 2003 7:05 pm
by jms

Code: Select all

import Blender
print me.materials

Code: Select all

import Blender
print str(me.materials)
no problem.

Posted: Fri Jul 04, 2003 7:44 pm
by jms
In edit button window.
TextFace and VertCol can be used together
if the mesh is "vertex painted" after it was

But button VertCol remains on Make and
no signal is given to the python.

VertCol alone works correctely.

Posted: Fri Jul 04, 2003 9:03 pm
by jms ...

This temporary version of the povanim script is the result of all my remarks upon

GetSelected() vs Get()

Posted: Sun Jul 06, 2003 1:07 am
by Anthony
GetSelected() vs Get()

I'm updating my IO Suite for 2.27.New-Py1 and stumbled on this strange behavior:

Blender.Object.GetSelected(): returns <type 'Blender Object'>
Blender.Object.Get(): returns <type 'str'>

Shouldn't Get() return Blender Objects as well?

Posted: Sun Jul 06, 2003 6:02 pm
by xand
my script in this blend ... axis.blend crashes blender.
it works fine in 2.27. it seems relatred to matrix manipulation

code :

Code: Select all

#Realign Script
#Aout 2001
#Choisir la source puis la cible, appuyer sur Alt+P, les axes de cible sont alignés sur ceux de source mais le mesh ne bouge pas.
#l'échelle ne joue pas
#Select Source then Cible, press Alt+p, Cible's axis are realigned with Source's axis but the mesh don't move.
#The rotation is size free
#Free for use with Blender

from Blender import Object, NMesh, Redraw
import vect
#pourquoi toujours réinventer la roue, en plus ça clarifie le script
from math import *

def applyTransform(mesh,mat):
	for v in mesh.verts:
		#applique la transformation à chaque vertex
		vec = ([0],[1],[2])
		vec = vect.matxvec(mat,vec)[0],[1],[2] = vec[0], vec[1], vec[2]

def matrot(ob):
	# récupère la matrice de rotation
	#normalise la matrice par rapport aux paramètres size
	return mat

oblist =Object.GetSelected()

if lenob !=2:
	#envoie un message d'erreur si 2 objets ne sont pas sélectionnés
	raise ValueError,'Select 2 objects'


if source.rot!=cible.rot:
	#pour éviter de faire tourner les vertices si le script est appliqué plusieurs fois
	#calcul de la matrice de passage
	#en fait, on fait tourner les vertices dans l'autre sens et on ramène dans l'axe tout l'objet
	rotsourcet = vect.invmat(rotsource)
	#récupère les datas et applique la transformation aux vertices
	#réaligne les axes
the vect module is the one from Martin Strubel


No more layer attribute for objects ?

Posted: Wed Jul 09, 2003 10:30 am
by FouKevin
I used to use the layer attribute of objects for exporting purpose.
But it seems this attribute has disappeared from the new Python API.

objList = Object.GetSelected()
for o in objList:
print, o.layer

reports me an AttributeError: layer

Is there another way to get the layer of an object ? will it be reimplemented ?

Thank you a lot.
Thanks for making Blender.

Vertex Influences

Posted: Wed Jul 09, 2003 12:40 pm
by FouKevin
Trying to get information about Vertex Influences through python
Using this code :

Code: Select all

m = NMesh.GetRaw(
for v in range(len(m.verts)):
    vi = m.getVertexInfluences(v)
    print vi
Works fine.
But when a vertex is assigned to 2 different groups, I get a Segmentation Fault.

Thank you !

Posted: Mon Jul 14, 2003 5:06 pm
by Money_YaY!
ok from my side.
Have no clue where python log is. And no clue of version. (installed from source took 6 hours, not doing that again)

But ! I am happy to report that alt-p brings GUI's back .
Tried Make human, yafray, and head make. None however did anything
after that. Gui sliders and buttons work, just nothing happens. And it just goes back to the script when the task is done.

osx 10.2.4

^v^ find it.