[Bf-python] returnvertsfromgroup

Stephen Swaney sswaney at swbell.net
Wed Oct 1 07:23:20 CEST 2003


Willian Padovani Germano wrote:
> 
> From: <models at paposo.com>
> > o.k. Ive tested this with getData(), link(), putRaw(), new() and anything
> > else i can think of.  I also fixed the names of the py exceptions. This
> > looks likes its the trick.
> 
> Mmm then probably object.link(mesh) isn't updating the object accordingly.
> Let's check the other methods and see what they do that object.link doesn't,
> this may solve this (and other) issues.

I haven't looked at the mesh update problem so I am not sure 
if this is the same problem you are seeing, but...

One of the issues I've run across messing with the Curve module
was the fact that after you change the Curve datablock ( using
setControlPoint for example ), the Object in the 3dview was
not getting updated until you tabbed in and out of edit mode.

The solution for Curves was to call makeDispList( obj ) on the
bender object.  Sadly, the BPy_Curve only has a reference to
the Curve datablock and not the ( possibly many! ) CurveObjects
linked to the datablock.  Ton and I discussed it and he agreed
the right thing to do is to chase down the blender's list of 
Objects, looking for Curve Objects whose data member points
to our Curve Datablock.  When you find one, call makeDispList( obj )
on the object reference.

I'm thinking this is a generic problem with all our types,
not just Curves, and rather than duplicating the code in 
each bpython type it would be nice to put this somewhere as 
a generic utility function they all could use.  Something like 

	updateDisplayLists( int ob_type, void* datablock );

-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list