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:
-rw-r--r--release/ui/space_image.py33
-rw-r--r--source/blender/blenloader/intern/readfile.c24
-rw-r--r--source/blender/editors/armature/editarmature.c30
-rw-r--r--source/blender/editors/include/ED_armature.h7
-rw-r--r--source/blender/editors/object/object_edit.c58
-rw-r--r--source/blender/editors/screen/screen_ops.c1
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c5
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c2
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c1
-rw-r--r--source/blender/editors/space_outliner/outliner.c6
-rw-r--r--source/blender/makesdna/DNA_space_types.h36
-rw-r--r--source/blender/makesrna/RNA_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c15
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c18
16 files changed, 101 insertions, 144 deletions
diff --git a/release/ui/space_image.py b/release/ui/space_image.py
index cdb22fb0442..f8950892957 100644
--- a/release/ui/space_image.py
+++ b/release/ui/space_image.py
@@ -32,7 +32,7 @@ class IMAGE_MT_view(bpy.types.Menu):
for a, b in ratios:
text = "Zoom %d:%d" % (a, b)
- layout.item_floatO("image.view_zoom_ratio", "ratio", a/b, text=text)
+ layout.item_floatO("image.view_zoom_ratio", "ratio", a/float(b), text=text)
layout.itemS()
@@ -225,34 +225,6 @@ class IMAGE_HT_header(bpy.types.Header):
layout.template_ID(sima, "image", new="image.new")
- """
- /* image select */
-
- pinflag= (show_render)? 0: UI_ID_PIN;
- xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)sima->image, ID_IM, &sima->pin, xco, yco,
- sima_idpoin_handle, UI_ID_BROWSE|UI_ID_BROWSE_RENDER|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE|pinflag);
- xco += 8;
- """
-
- """
- if(ima && !ELEM3(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_VIEWER) && ima->ok) {
- /* XXX this should not be a static var */
- static int headerbuttons_packdummy;
-
- headerbuttons_packdummy = 0;
-
- if (ima->packedfile) {
- headerbuttons_packdummy = 1;
- }
- if (ima->packedfile && ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
- uiDefIconButBitI(block, TOG, 1, 0 /* XXX B_SIMA_REPACK */, ICON_UGLYPACKAGE, xco,yco,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Re-Pack this image as PNG");
- else
- uiDefIconButBitI(block, TOG, 1, 0 /* XXX B_SIMAPACKIMA */, ICON_PACKAGE, xco,yco,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Pack/Unpack this image");
-
- xco+= XIC+8;
- }
- """
-
# uv editing
if show_uvedit:
uvedit = sima.uv_editor
@@ -294,7 +266,8 @@ class IMAGE_HT_header(bpy.types.Header):
if ima.type == "COMPOSITE" and ima.source in ("MOVIE", "SEQUENCE"):
row.itemO("image.play_composite", icon="ICON_PLAY")
- layout.itemR(sima, "update_automatically", text="")
+ if show_uvedit or sima.image_painting:
+ layout.itemR(sima, "update_automatically", text="")
class IMAGE_PT_game_properties(bpy.types.Panel):
__space_type__ = "IMAGE_EDITOR"
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 8e33979b134..9f4a2456567 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4345,9 +4345,10 @@ static void lib_link_screen(FileData *fd, Main *main)
}
else if(sl->spacetype==SPACE_BUTS) {
SpaceButs *sbuts= (SpaceButs *)sl;
- sbuts->lockpoin= NULL;
sbuts->ri= NULL;
sbuts->pinid= newlibadr(fd, sc->id.lib, sbuts->pinid);
+ sbuts->mainbo= sbuts->mainb;
+ sbuts->mainbuser= sbuts->mainb;
if(main->versionfile<132)
butspace_version_132(sbuts);
}
@@ -4556,7 +4557,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
}
else if(sl->spacetype==SPACE_BUTS) {
SpaceButs *sbuts= (SpaceButs *)sl;
- sbuts->lockpoin= NULL;
sbuts->pinid = restore_pointer_by_name(newmain, sbuts->pinid, 0);
//XXX if (sbuts->ri) sbuts->ri->curtile = 0;
}
@@ -6267,7 +6267,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
if(main->versionfile <= 191) {
- bScreen *sc= main->screen.first;
Object *ob= main->object.first;
Material *ma = main->mat.first;
@@ -6283,22 +6282,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/*ob->quat[1]= 1.0f;*/ /* quats arnt used yet */
ob= ob->id.next;
}
-
- while(sc) {
- ScrArea *sa= sc->areabase.first;
- while(sa) {
- SpaceLink *sl= sa->spacedata.first;
- while(sl) {
- if(sl->spacetype==SPACE_BUTS) {
- SpaceButs *sbuts= (SpaceButs*) sl;
- sbuts->scaflag= BUTS_SENS_LINK|BUTS_SENS_ACT|BUTS_CONT_ACT|BUTS_ACT_ACT|BUTS_ACT_LINK;
- }
- sl= sl->next;
- }
- sa= sa->next;
- }
- sc= sc->id.next;
- }
}
if(main->versionfile <= 193) {
@@ -9764,7 +9747,8 @@ static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSetting
expand_doit(fd, mainvar, part->eff_group);
expand_doit(fd, mainvar, part->bb_ob);
- expand_animdata(fd, mainvar, part->adt);
+ if(part->adt)
+ expand_animdata(fd, mainvar, part->adt);
}
static void expand_group(FileData *fd, Main *mainvar, Group *group)
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 2da49731a95..cfae8ebb3a9 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -4614,44 +4614,28 @@ void add_verts_to_dgroups(Scene *scene, Object *ob, Object *par, int heat, int m
MEM_freeN(verts);
}
-void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par)
+void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par, int mode)
{
/* Lets try to create some vertex groups
* based on the bones of the parent armature.
*/
bArmature *arm= par->data;
- short mode;
- /* Prompt the user on whether/how they want the vertex groups
- * added to the child mesh */
- mode= pupmenu("Create Vertex Groups? %t|"
- "Don't Create Groups %x1|"
- "Name Groups %x2|"
- "Create From Envelopes %x3|"
- "Create From Bone Heat %x4|");
-
- mode= 3; // XXX
-
- switch (mode) {
- case 2:
+ if(mode == ARM_GROUPS_NAME) {
/* Traverse the bone list, trying to create empty vertex
* groups cooresponding to the bone.
*/
- bone_looper(ob, arm->bonebase.first, NULL,
- add_defgroup_unique_bone);
+ bone_looper(ob, arm->bonebase.first, NULL, add_defgroup_unique_bone);
+
if (ob->type == OB_MESH)
create_dverts(ob->data);
-
- break;
-
- case 3:
- case 4:
+ }
+ else if(mode == ARM_GROUPS_ENVELOPE || mode == ARM_GROUPS_AUTO) {
/* Traverse the bone list, trying to create vertex groups
* that are populated with the vertices for which the
* bone is closest.
*/
- add_verts_to_dgroups(scene, ob, par, (mode == 4), 0);
- break;
+ add_verts_to_dgroups(scene, ob, par, (mode == ARM_GROUPS_AUTO), 0);
}
}
/* ************* Clear Pose *****************************/
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 05ea4d2b506..3b5932b2950 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -112,9 +112,14 @@ void add_primitive_bone(struct Scene *scene, struct View3D *v3d, struct RegionVi
void transform_armature_mirror_update(struct Object *obedit);
void clear_armature(struct Scene *scene, struct Object *ob, char mode);
-void create_vgroups_from_armature(struct Scene *scene, struct Object *ob, struct Object *par);
void docenter_armature (struct Scene *scene, struct View3D *v3d, struct Object *ob, int centermode);
+#define ARM_GROUPS_NAME 1
+#define ARM_GROUPS_ENVELOPE 2
+#define ARM_GROUPS_AUTO 3
+
+void create_vgroups_from_armature(struct Scene *scene, struct Object *ob, struct Object *par, int mode);
+
void auto_align_armature(struct Scene *scene, struct View3D *v3d, short mode);
void unique_editbone_name(struct ListBase *ebones, char *name, EditBone *bone); /* if bone is already in list, pass it as param to ignore it */
void ED_armature_bone_rename(struct bArmature *arm, char *oldnamep, char *newnamep);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index cf37b0dd812..5c6c55e956b 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -2753,19 +2753,25 @@ void make_proxy(Scene *scene)
/* ******************** make parent operator *********************** */
-#define PAR_OBJECT 0
-#define PAR_ARMATURE 1
-#define PAR_BONE 2
-#define PAR_CURVE 3
-#define PAR_FOLLOW 4
-#define PAR_PATH_CONST 5
-#define PAR_LATTICE 6
-#define PAR_VERTEX 7
-#define PAR_TRIA 8
+#define PAR_OBJECT 0
+#define PAR_ARMATURE 1
+#define PAR_ARMATURE_NAME 2
+#define PAR_ARMATURE_ENVELOPE 3
+#define PAR_ARMATURE_AUTO 4
+#define PAR_BONE 5
+#define PAR_CURVE 6
+#define PAR_FOLLOW 7
+#define PAR_PATH_CONST 8
+#define PAR_LATTICE 9
+#define PAR_VERTEX 10
+#define PAR_TRIA 11
static EnumPropertyItem prop_make_parent_types[] = {
{PAR_OBJECT, "OBJECT", 0, "Object", ""},
{PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""},
+ {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, " With Empty Groups", ""},
+ {PAR_ARMATURE_AUTO, "ARMATURE_AUTO", 0, " With Automatic Weights", ""},
+ {PAR_ARMATURE_ENVELOPE, "ARMATURE_ENVELOPE", 0, " With Envelope Weights", ""},
{PAR_BONE, "BONE", 0, "Bone", ""},
{PAR_CURVE, "CURVE", 0, "Curve Deform", ""},
{PAR_FOLLOW, "FOLLOW", 0, "Follow Path", ""},
@@ -2809,6 +2815,7 @@ static int parent_set_exec(bContext *C, wmOperator *op)
Object *par= CTX_data_active_object(C);
bPoseChannel *pchan= NULL;
int partype= RNA_enum_get(op->ptr, "type");
+ int pararm= ELEM4(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO);
par->recalc |= OB_RECALC_OB;
@@ -2880,24 +2887,20 @@ static int parent_set_exec(bContext *C, wmOperator *op)
ob->loc[0] = vec[0];
ob->loc[1] = vec[1];
}
- else if(partype==PAR_ARMATURE && ob->type==OB_MESH && par->type == OB_ARMATURE) {
+ else if(pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) {
+ if(partype == PAR_ARMATURE_NAME)
+ create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_NAME);
+ else if(partype == PAR_ARMATURE_ENVELOPE)
+ create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_ENVELOPE);
+ else if(partype == PAR_ARMATURE_AUTO)
+ create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_AUTO);
- if(1) {
- /* Prompt the user as to whether he wants to
- * add some vertex groups based on the bones
- * in the parent armature.
- */
- create_vgroups_from_armature(scene, ob, par);
-
- /* get corrected inverse */
- ob->partype= PAROBJECT;
- what_does_parent(scene, ob, &workob);
-
- ob->partype= PARSKEL;
- }
- else
- what_does_parent(scene, ob, &workob);
+ /* get corrected inverse */
+ ob->partype= PAROBJECT;
+ what_does_parent(scene, ob, &workob);
+ ob->partype= PARSKEL;
+
Mat4Invert(ob->parentinv, workob.obmat);
}
else {
@@ -2908,7 +2911,7 @@ static int parent_set_exec(bContext *C, wmOperator *op)
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
- if( ELEM3(partype, PAR_CURVE, PAR_ARMATURE, PAR_LATTICE) )
+ if( ELEM(partype, PAR_CURVE, PAR_LATTICE) || pararm )
ob->partype= PARSKEL; /* note, dna define, not operator property */
else
ob->partype= PAROBJECT; /* note, dna define, not operator property */
@@ -2936,6 +2939,9 @@ static int parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* ob becomes parent, make the associated menus */
if(ob->type==OB_ARMATURE) {
uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_NAME);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_ENVELOPE);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_AUTO);
uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_BONE);
}
else if(ob->type==OB_CURVE) {
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 09af626da4a..32f09f489a6 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -210,7 +210,6 @@ int ED_operator_object_active(bContext *C)
int ED_operator_editmesh(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- printf("em %p %d\n", obedit, (obedit)? obedit->type == OB_MESH: -1);
if(obedit && obedit->type==OB_MESH)
return NULL != ((Mesh *)obedit->data)->edit_mesh;
return 0;
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 1ebab105086..3a3f5bd83ee 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -457,6 +457,11 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
}
}
+ /* always try to use the tab that was explicitly
+ * set to the user, so that once that context comes
+ * back, the tab is activated again */
+ sbuts->mainb= sbuts->mainbuser;
+
/* in case something becomes invalid, change */
if((flag & (1 << sbuts->mainb)) == 0) {
if(flag & BCONTEXT_OBJECT) {
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 0f6ef6fe570..b5af1ab598c 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -81,6 +81,8 @@ static void do_buttons_buttons(bContext *C, void *arg, int event)
sbuts->preview= 1;
break;
}
+
+ sbuts->mainbuser= sbuts->mainb;
}
void buttons_header_buttons(const bContext *C, ARegion *ar)
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 8284744d519..78392fceace 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -70,7 +70,6 @@ static SpaceLink *buttons_new(const bContext *C)
sbuts= MEM_callocN(sizeof(SpaceButs), "initbuts");
sbuts->spacetype= SPACE_BUTS;
- sbuts->scaflag= BUTS_SENS_LINK|BUTS_SENS_ACT|BUTS_CONT_ACT|BUTS_ACT_ACT|BUTS_ACT_LINK;
sbuts->align= BUT_AUTO;
/* header */
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index e3b8ac10481..f27dfcb4897 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -1864,7 +1864,7 @@ static int tree_element_active_texture(Scene *scene, SpaceOops *soops, TreeEleme
if(set) {
if(sbuts) {
// XXX sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
- sbuts->texfrom= 1;
+ // XXX sbuts->texfrom= 1;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
wrld->texact= te->index;
@@ -1878,7 +1878,7 @@ static int tree_element_active_texture(Scene *scene, SpaceOops *soops, TreeEleme
if(set) {
if(sbuts) {
// XXX sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
- sbuts->texfrom= 2;
+ // XXX sbuts->texfrom= 2;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
la->texact= te->index;
@@ -1894,7 +1894,7 @@ static int tree_element_active_texture(Scene *scene, SpaceOops *soops, TreeEleme
if(set) {
if(sbuts) {
//sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
- sbuts->texfrom= 0;
+ // XXX sbuts->texfrom= 0;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
ma->texact= (char)te->index;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 4760fd00bf2..3db97112090 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -94,7 +94,7 @@ typedef struct SpaceIpo {
float blockscale;
short blockhandler[8];
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
@@ -116,24 +116,12 @@ typedef struct SpaceButs {
struct RenderInfo *ri;
- short cursens, curact;
- short align, preview; /* align for panels, preview is signal to refresh */
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
- short mainb, menunr; /* texnr and menunr have to remain shorts */
- short pin, mainbo;
- void *lockpoin;
-
- short texnr;
- char texfrom, showgroup;
-
- short modeltype;
- short scriptblock;
- short scaflag;
- short re_align;
-
- short oldkeypress; /* for keeping track of the sub tab key cycling */
- char flag, texact;
+ short mainb, mainbo, mainbuser; /* context tabs */
+ short re_align, align; /* align for panels */
+ short preview; /* preview is signal to refresh */
+ char flag, pad[3];
void *path; /* runtime */
int pathflag, dataicon; /* runtime */
@@ -148,7 +136,7 @@ typedef struct SpaceSeq {
short blockhandler[8];
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
float xof, yof; /* offset for drawing the image preview */
short mainb;
@@ -222,7 +210,7 @@ typedef struct SpaceOops {
short blockhandler[8];
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
ListBase tree;
struct TreeStore *treestore;
@@ -277,7 +265,7 @@ typedef struct SpaceNla {
int pad;
struct bDopeSheet *ads;
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
} SpaceNla;
typedef struct SpaceText {
@@ -349,7 +337,7 @@ typedef struct SpaceTime {
int spacetype;
float blockscale;
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
int flag, redraws;
@@ -363,7 +351,7 @@ typedef struct SpaceNode {
short blockhandler[8];
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
struct ID *id, *from; /* context, no need to save in file? well... pinning... */
short flag, menunr; /* menunr: browse id block in header */
@@ -412,7 +400,7 @@ typedef struct SpaceImaSel {
short blockhandler[8];
- View2D v2d; /* depricated, copied to region */
+ View2D v2d; /* deprecated, copied to region */
struct FileList *files;
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 243551b527e..a1e98ae8a17 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -85,6 +85,11 @@ typedef enum PropertyFlag {
* for pointers and collections. */
PROP_EDITABLE = 1,
+ /* this property is editable even if it is lib linked,
+ * meaning it will get lost on reload, but it's useful
+ * for editing. */
+ PROP_LIB_EXCEPTION = 65536,
+
/* animateable means the property can be driven by some
* other input, be it animation curves, expressions, ..
* properties are animateable by default except for pointers
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d9d4852a72c..0a4cc2a023e 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -752,7 +752,7 @@ int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
id= ptr->id.data;
- return (flag & PROP_EDITABLE) && (!id || !id->lib);
+ return (flag & PROP_EDITABLE) && (!id || !id->lib || (flag & PROP_LIB_EXCEPTION));
}
int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index d77517f420d..cf20e92b289 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -157,6 +157,19 @@ static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
ED_armature_bone_rename(arm, oldname, newname);
}
+static void rna_Bone_name_set(PointerRNA *ptr, const char *value)
+{
+ bArmature *arm= (bArmature*)ptr->id.data;
+ Bone *bone= (Bone*)ptr->data;
+ char oldname[32], newname[32];
+
+ /* need to be on the stack */
+ BLI_strncpy(newname, value, 32);
+ BLI_strncpy(oldname, bone->name, 32);
+
+ ED_armature_bone_rename(arm, oldname, newname);
+}
+
static void rna_EditBone_layer_get(PointerRNA *ptr, int values[16])
{
EditBone *data= (EditBone*)(ptr->data);
@@ -320,6 +333,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
if(editbone) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_EditBone_name_set");
+ else RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Bone_name_set");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flags */
@@ -573,6 +587,7 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, NULL);
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 9e3f6948b1c..86e23c5bc8e 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1116,7 +1116,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#endif
static EnumPropertyItem engine_items[] = {
- {0, "BLENDER", 0, "Blender", ""},
+ {0, "BLENDER_RENDER", 0, "Blender Render", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SceneRenderData", NULL);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index bf475d49048..2afa1e6102b 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -242,17 +242,9 @@ StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
void rna_SpaceButtonsWindow_align_set(PointerRNA *ptr, int value)
{
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
- bScreen *sc= (bScreen*)(ptr->id.data);
- ScrArea *sa;
sbuts->align= value;
sbuts->re_align= 1;
-
-#if 0 // XXX -bad level call?
- for(sa=sc->areabase.first; sa; sa=sa->next)
- if(BLI_findindex(&sa->spacedata, sbuts) != -1)
- ED_area_tag_redraw(sa);
-#endif
}
/* Space Console */
@@ -321,8 +313,8 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
static EnumPropertyItem sticky_mode_items[] = {
{SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled."},
- {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "SHARED_LOCATION", "Select UVs that are at the same location and share a mesh vertex."},
- {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "SHARED_VERTEX", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
+ {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location", "Select UVs that are at the same location and share a mesh vertex."},
+ {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "Shared Vertex", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dt_uv_items[] = {
@@ -685,17 +677,17 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "SpaceButs");
RNA_def_struct_ui_text(srna, "Buttons Space", "Buttons Window space data");
- prop= RNA_def_property(srna, "buttons_context", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);
- RNA_def_property_ui_text(prop, "Buttons Context", "The type of active data to display and edit in the buttons window");
+ RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit.");
RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, align_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceButtonsWindow_align_set", NULL);
- RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels within the buttons window");
+ RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
RNA_def_property_update(prop, NC_WINDOW, NULL);
/* pinned data */