svn merge ^/trunk/blender -r46714:46724 --- before tile branch merge

This commit is contained in:
Campbell Barton
2012-05-19 11:11:00 +00:00
8 changed files with 42 additions and 33 deletions

View File

@@ -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):

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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}

View File

@@ -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");

View File

@@ -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);