[Bf-python] join bug with curves

Campbell Barton cbarton at metavr.com
Tue Dec 26 03:46:34 CET 2006


JMS was having a problem importing curves and joining them.
after finding and fixing some problems with Object_join() - (was messing 
up object usercount and loosing objects)

I found the problem is with curves, not join.


The news curves crash blender if you join them through Blender OR Python

if you save and reload the curves join fine, so It looks like some data 
isnt being setup properly.
_______________________________________________

from Blender import *
scn = Scene.GetCurrent()

def makeCurve():
	c = Curve.New()
	c.setResolu(24)
	ob = scn.objects.new(c)
	
	for i in xrange(10):
		cp1 =  1,2,3 , 4,5,6, 7,8,9,
		bez = BezTriple.New(cp1)
		bez = c.appendNurb(bez)
		bez.flagU += 1
	print 'done, joining'
	return ob

obs  = [makeCurve() for i in xrange(10)]
scn.objects.active = obs[0]

# now join manually or get blender to do if for you,.
# it will crash either way
# save and reopen, it wont crash.
"""
obj=obs.pop()
obj.join(obs)
"""



More information about the Bf-python mailing list