diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 329dc6d6a01..af8fcc6cbdc 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -93,14 +93,6 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel): row.prop(unit, "use_separate") -def draw_keyingset_options(data, layout): - # NOTE: keep in sync with rna_def_common_keying_flags() in rna_animation.c - # These are defined out like this because the standard names are too long - layout.prop_enum(data, "bl_options", text="Only Needed", value='INSERTKEY_NEEDED') - layout.prop_enum(data, "bl_options", text="Visual Keying", value='INSERTKEY_VISUAL') - layout.prop_enum(data, "bl_options", text="XYZ=RGB Coloring", value='INSERTKEY_XYZ_TO_RGB') - - class SCENE_PT_keying_sets(SceneButtonsPanel, Panel): bl_label = "Keying Sets" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -132,7 +124,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel): col = row.column(align=True) col.label(text="Keyframing Settings:") - draw_keyingset_options(ks, col) + col.prop(ks, "bl_options") class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel): @@ -188,7 +180,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel): col = row.column(align=True) col.label(text="Keyframing Settings:") - draw_keyingset_options(ks, col) + col.prop(ksp, "bl_options") class SCENE_PT_physics(SceneButtonsPanel, Panel): diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 17eabc3d7ac..17465e84a50 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4875,8 +4875,8 @@ static void lib_link_scene(FileData *fd, Main *main) if (base->object==NULL) { BKE_reportf_wrap(fd->reports, RPT_ERROR, - "LIB ERROR: Object lost from scene:'%s\'\n", - sce->id.name+2); + "LIB ERROR: Object lost from scene:'%s\'", + sce->id.name + 2); BLI_remlink(&sce->base, base); if (base==sce->basact) sce->basact= NULL; MEM_freeN(base); @@ -7290,8 +7290,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (prop) { BKE_reportf_wrap(fd->reports, RPT_WARNING, "Game property name conflict in object: \"%s\".\nText objects reserve the " - "[\"Text\"] game property to change their content through Logic Bricks.\n", - ob->id.name+2); + "[\"Text\"] game property to change their content through Logic Bricks.", + ob->id.name + 2); } } } @@ -9131,7 +9131,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) /* printf and reports for now... its important users know this */ BKE_reportf_wrap(basefd->reports, RPT_INFO, - "read library: '%s', '%s'\n", + "read library: '%s', '%s'", mainptr->curlib->filepath, mainptr->curlib->name); fd= blo_openblenderfile(mainptr->curlib->filepath, basefd->reports); @@ -9178,7 +9178,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) if (fd==NULL) { BKE_reportf_wrap(basefd->reports, RPT_ERROR, - "Can't find lib '%s'\n", + "Can't find lib '%s'", mainptr->curlib->filepath); } } @@ -9197,7 +9197,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) append_id_part(fd, mainptr, id, &realid); if (!realid) { BKE_reportf_wrap(fd->reports, RPT_ERROR, - "LIB ERROR: %s:'%s' missing from '%s'\n", + "LIB ERROR: %s:'%s' missing from '%s'", BKE_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath); } @@ -9236,8 +9236,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) if (id->flag & LIB_READ) { BLI_remlink(lbarray[a], id); BKE_reportf_wrap(basefd->reports, RPT_ERROR, - "LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", - BKE_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath); + "LIB ERROR: %s:'%s' unread libblock missing from '%s'", + BKE_idcode_to_name(GS(id->name)), id->name + 2, mainptr->curlib->filepath); change_idid_adr(mainlist, basefd, id, NULL); MEM_freeN(id); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index f1393e4def1..2df89a3df6c 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -834,7 +834,12 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op) static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) { - Object *obedit = CTX_data_edit_object(C); + Object *obedit; + + if (!C) /* needed for docs and i18n tools */ + return prop_similar_types; + + obedit = CTX_data_edit_object(C); if (obedit && obedit->type == OB_MESH) { EnumPropertyItem *item = NULL; @@ -862,7 +867,7 @@ static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUS return item; } - + return NULL; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index d73b53deecc..7cc11fa0209 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -356,8 +356,15 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) bActionConstraint *data = curcon->data; /* validate action */ - if (data->act == NULL) + if (data->act == NULL) { + /* must have action */ curcon->flag |= CONSTRAINT_DISABLE; + } + else if (data->act->idroot != ID_OB) { + /* only object-rooted actions can be used */ + data->act = NULL; + curcon->flag |= CONSTRAINT_DISABLE; + } } else if (curcon->type == CONSTRAINT_TYPE_FOLLOWPATH) { bFollowPathConstraint *data = curcon->data; @@ -409,12 +416,12 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) if (data->clip != NULL && data->track[0]) { MovieTracking *tracking = &data->clip->tracking; MovieTrackingObject *tracking_object; - + if (data->object[0]) tracking_object = BKE_tracking_named_object(tracking, data->object); else tracking_object = BKE_tracking_get_camera_object(tracking); - + if (!tracking_object) { curcon->flag |= CONSTRAINT_DISABLE; } @@ -428,14 +435,14 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) } else if (curcon->type == CONSTRAINT_TYPE_CAMERASOLVER) { bCameraSolverConstraint *data = curcon->data; - - if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0 && data->clip == NULL) + + if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0 && (data->clip == NULL)) curcon->flag |= CONSTRAINT_DISABLE; } else if (curcon->type == CONSTRAINT_TYPE_OBJECTSOLVER) { bObjectSolverConstraint *data = curcon->data; - - if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0 && data->clip == NULL) + + if ((data->flag & CAMERASOLVER_ACTIVECLIP) == 0 && (data->clip == NULL)) curcon->flag |= CONSTRAINT_DISABLE; } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index f340c53f528..3ff9c3c0520 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1099,7 +1099,11 @@ static void file_expand_directory(bContext *C) SpaceFile *sfile= CTX_wm_space_file(C); if (sfile->params) { - if ( sfile->params->dir[0] == '~' ) { + /* TODO, what about // when relbase isn't valid? */ + if (G.relbase_valid && strncmp(sfile->params->dir, "//", 2) == 0) { + BLI_path_abs(sfile->params->dir, G.main->name); + } + else if (sfile->params->dir[0] == '~') { char tmpstr[sizeof(sfile->params->dir)-1]; BLI_strncpy(tmpstr, sfile->params->dir+1, sizeof(tmpstr)); BLI_join_dirfile(sfile->params->dir, sizeof(sfile->params->dir), BLI_getDefaultDocumentFolder(), tmpstr); diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 7a8f48705a4..459482063b1 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -468,11 +468,11 @@ static void rna_def_common_keying_flags(StructRNA *srna, short reg) PropertyRNA *prop; static EnumPropertyItem keying_flag_items[] = { - {INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Insert Keyframes - Only Needed", + {INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves"}, - {INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Insert Keyframes - Visual", + {INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Visual Keying", "Insert keyframes based on 'visual transforms'"}, - {INSERTKEY_XYZ2RGB, "INSERTKEY_XYZ_TO_RGB", 0, "F-Curve Colors - XYZ to RGB", + {INSERTKEY_XYZ2RGB, "INSERTKEY_XYZ_TO_RGB", 0, "XYZ=RGB Colors", "Color for newly added transformation F-Curves (Location, Rotation, Scale) " "and also Color is based on the transform axis"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 7c981149aca..e1f1ab97726 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1105,6 +1105,7 @@ static void rna_def_constraint_action(BlenderRNA *brna) prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "act"); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Action_id_poll"); RNA_def_property_ui_text(prop, "Action", "The constraining action"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 3825bc35d3a..4d471ae4b41 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -202,7 +202,7 @@ static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, Repor seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_SOUND, sound->name); seq->sound = sound; - seq->len = ceil(sound_get_length(sound) * FPS); + seq->len = ceil((double)sound_get_length(sound) * FPS); seq->scene_sound = sound_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0);