Commit Graph

14 Commits

Author SHA1 Message Date
4545da3510 ack- need to get the hang of usercounts better- it seems they need to be initialized as 1 for groups, just like images. 2006-11-02 23:05:10 +00:00
ce0f9a3cac On Matt's suggestion moved "Make Link->Groups" to the add groups menu as "Add to Active Objects Groups"
removed "Make Link -> DupliGroup" because Copy->Duplis does the same thing.

Python's Group.c had an unneeded scene/base lookup.
2006-10-12 13:13:45 +00:00
dda63a9dde added comparison function to many python types so you can do == and =! 2006-10-06 16:48:28 +00:00
7f7f35d1ca fixed mistakes and warnings in previous commit. 2006-09-24 09:21:18 +00:00
e8495d1fdd Extra generic errors for Scene, Groups and Metaballs to raise errors when trying to do anything with a python objects thats had its data removed in Blender.
Added to existing scn.objects
scn.objects.active    (get/set the active object for the scene)

scn.objects.selected    - an iterator that only uses selected objects
scn.objects.context    - an iterator on objects in the user context (visible in the current 3d views layer and selected)
These are the same type as scn.objects but .add() .remove() .new() .active etc raise errors. so scn.objects.selected.add() will raise an error.

Made nested loops possible with scn.objects, metaball.elements and ob.modifiers, by initializing the iter value as NULL and creating copys of the pyobject when _getIter() is called if ->iter is not NULL.
This is how pythons xrange() works.
2006-09-24 08:30:38 +00:00
5dbc4c5f8f Added scn.objects.new(obbdata) as a way of adding object data to a scene and createing the object data at once.
This functionality will probably be moved later on after discussion.
2006-08-27 16:27:34 +00:00
b56047a65a Added missing settings to Modifiers (could not set on Render/Cage/Editmode :/)
added GPL header to Group.c
2006-08-26 03:18:55 +00:00
8e7095a464 Added __copy__ to armature, material, curve, group 2006-08-15 11:24:08 +00:00
87949e5c67 warnings cleanup for the python project on windows 2006-04-24 15:09:07 +00:00
1632a2f888 Added Group to Blender.Types, tested and working.
Added Group Epydocs, with 2 examples.
also added http://en.wikibooks.org/wiki/Blender_3D:_Blending_Into_Python
  to the blender links main page.
2006-04-20 14:26:24 +00:00
Stephen Swaney
342bb99a19 a little spring cleaning to remove some compiler warnings for
implicit declarations, redundant redeclarations, missing initializers,
nested externs and other cruft.

Cleaned up includes and moved extern _Type decls from Types.h into
Types.c since that is the only place where they are needed now.

Did not touch Ipo.[ch] since work is on-going there.
2006-04-16 15:28:50 +00:00
59ed566e86 Added support for group objects
grp.objects

To have an iterator assigned as well as a list. Since gp.objects is an ietartor this is expected.
grp.objects= someGroup.objects works now.

Some other small fixes made.

Made a wrapper for add_to_group() That handles the OB_FROMGROUP flag. Should be moved to group.c's add_to_group()

void add_to_group_wraper(Group *group, Object *ob) {
	Base *base;
	add_to_group(group, ob);

	if (!(ob->flag & OB_FROMGROUP)) { /* do this to avoid a listbase lookup */
		ob->flag |= OB_FROMGROUP;

		base= object_in_scene(ob, G.scene);
		if (base)
			base->flag |= OB_FROMGROUP;
	}
}
2006-03-19 04:45:58 +00:00
bfe42eea43 Moved declerations to the top of the skope so as to work with MSVC?
started removeing // from constant.h to shut GCC's -pedantic up. realized // are used everywhere.
2006-03-18 15:23:02 +00:00
7b37efb35f Added Blender.Group module
The plans for the new Python API are too far off to have this module conform.

Needs testing with MSVC 6
2006-03-18 14:47:26 +00:00