[Bf-committers] Groups bug

Ton Roosendaal bf-committers@blender.org
Tue, 15 Apr 2003 11:57:20 +0200


I noticed the bug: the 'user' counter of Group structs is not used in  
Blender, so it has to be artificially set at '1' while loading. This  
exception also happens for Scene structs for example.

Open file: source/blender/blenloader/intern/readfile.c
Add in the bottom of the lib_link_group() function, before the line
	group= group->id.next;
this line:
	group->id.us= 1;

That'll do!

I also took time to review my Group code, and I noticed some weak parts  
in it. For example:
- groups are not removed when they're "empty"
- groups are a 'global' blender feature, they are not part of Scene. So  
groups can contain objects that have been moved to other scenes, that  
could become confusing.
- an expand_group() function is missing. That means, when browsing  
another Blender file (to append or link data) a Group is not expanded  
with the objects it contains.
- I noticed I didn't write automatic object selection (when you select  
a group member). It is part of a group menu... this is feature that  
should be tested if that's desirable.

Good luck!


On Tuesday, Apr 15, 2003, at 01:25 Europe/Amsterdam, instinctive new  
media wrote:

> Hello,
> it seems that saving a file _once_ doesn't mess up anything, all groups
> get saved correctly. But as soon as such a file is opened and THEN  
> saved
> again, arbitrary amounts of groups are lost in the new file.
> This seems to be some complex DNA issue, and maybe someone has enough
> experience to instantly say "Hah, the reason is this...".
> Hopefully. The grouping feature is nice, it shouldn't get buried  
> because
> of this problem.
> | alexander ewering           instinctive new media
> | ae@instinctive.de       http://www.instinctive.de
> |
> | fon: +49-2393-220558         fax: +49-2393-220559
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton@blender.org