Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-02 14:14:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-02 14:14:22 +0300
commitda1765765baf3bc84059548a43beec0c3a1c2d41 (patch)
tree1eaef63f7ce63144a990d97285675bbf417ad4eb /source/blender/editors/object/object_group.c
parentda6081f26692833e980706bee094933dadda5fa5 (diff)
many operators uses Bases, for the python to set operators context python too needs to be able to access bases.
- added scene.bases (like scene.objects) - renamed group create operator. Example scene = bpy.data.scenes[0] C = {} C["scene"] = scene C["selected_editable_bases"] = [scene.bases[2], scene.bases[3]] bpy.ops.group.create(C) Also made operator fake modules not return __call__ (reported by Stani, fixes autocomp. bug)
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r--source/blender/editors/object/object_group.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 198838d6f05..ec8409e9aa1 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -198,11 +198,11 @@ static int group_create_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Group *group= NULL;
- char gid[32]; //group id
+ char name[32]; /* id name */
- RNA_string_get(op->ptr, "GID", gid);
+ RNA_string_get(op->ptr, "name", name);
- group= add_group(gid);
+ group= add_group(name);
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
add_to_group(group, base->object);
@@ -218,12 +218,12 @@ static int group_create_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GROUP_OT_group_create(wmOperatorType *ot)
+void GROUP_OT_create(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create New Group";
- ot->description = "Create an object group.";
- ot->idname= "GROUP_OT_group_create";
+ ot->description = "Create an object group from selected objects.";
+ ot->idname= "GROUP_OT_create";
/* api callbacks */
ot->exec= group_create_exec;
@@ -232,7 +232,7 @@ void GROUP_OT_group_create(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_string(ot->srna, "GID", "Group", 32, "Name", "Name of the new group");
+ RNA_def_string(ot->srna, "name", "Group", 32, "Name", "Name of the new group");
}
/****************** properties window operators *********************/