From 0b8d9467ea1a4dee9a7a3fc47f91e6a85a3a65ef Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Wed, 17 Jul 2013 17:07:11 +0000 Subject: Added some documentation for the minimal progress bar in blender_python_api --- source/blender/makesrna/intern/rna_wm_api.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 5805bcefdb4..c822378e76e 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -333,17 +333,23 @@ void RNA_api_wm(StructRNA *srna) /* Progress bar interface */ func = RNA_def_function(srna, "progress_begin", "rna_progress_begin"); + RNA_def_function_ui_description(func, "Start Progress bar"); + parm = RNA_def_property(func, "min", PROP_FLOAT, PROP_NONE); + RNA_def_property_ui_text(parm, "min", "any value in range [0,9999]"); RNA_def_property_flag(parm, PROP_REQUIRED); + parm = RNA_def_property(func, "max", PROP_FLOAT, PROP_NONE); RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_property_ui_text(parm, "max", "any value in range [min+1,9998]"); func = RNA_def_function(srna, "progress_update", "rna_progress_update"); parm = RNA_def_property(func, "value", PROP_FLOAT, PROP_NONE); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_property_ui_text(parm, "value", "any value between min and max as set in progress_init()"); + RNA_def_property_ui_text(parm, "value", "any value between min and max as set in progress_begin()"); func = RNA_def_function(srna, "progress_end", "rna_progress_end"); + RNA_def_function_ui_description(func, "Terminate Progress bar"); /* invoke functions, for use with python */ func = RNA_def_function(srna, "invoke_props_popup", "rna_Operator_props_popup"); -- cgit v1.2.3 From 64a172907ac12a940a4bcd0c2ad27e294c2f6192 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 17 Jul 2013 17:31:12 +0000 Subject: Hide unnecessary error print when showing tooltip over a property with no RNA path, ideally this would work everywhere but it's a known limitation, no need to print an error in the console each time it happens. --- source/blender/editors/interface/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 097f042d6c9..b59e06cbc0e 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -962,10 +962,10 @@ static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but, data_path = BLI_sprintfN("scene.%s", path); MEM_freeN(path); } - else { + /*else { printf("ERROR in %s(): Couldn't get path for scene property - %s\n", __func__, RNA_property_identifier(but->rnaprop)); - } + }*/ } } else { -- cgit v1.2.3 From f2db6949c2de2a45c5864384d14f669779a8d61a Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Wed, 17 Jul 2013 20:22:08 +0000 Subject: Fix: #36184 Collada import/export... leaf bone size was not set as needed. --- source/blender/collada/ArmatureImporter.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 0cd48707566..5c69c7b1e63 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -133,11 +133,7 @@ void ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBo add_v3_v3v3(bone->tail, bone->head, vec); // set parent tail - if (parent && totchild == 1) { - copy_v3_v3(parent->tail, bone->head); - - // not setting BONE_CONNECTED because this would lock child bone location with respect to parent - bone->flag |= BONE_CONNECTED; + if (parent) { // XXX increase this to prevent "very" small bones? const float epsilon = 0.000001f; @@ -148,9 +144,17 @@ void ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBo leaf_bone_length = length; } - // treat zero-sized bone like a leaf bone - if (length <= epsilon) { - add_leaf_bone(parent_mat, parent, node); + if (totchild == 1) { + copy_v3_v3(parent->tail, bone->head); + + // not setting BONE_CONNECTED because this would lock child bone location with respect to parent + bone->flag |= BONE_CONNECTED; + + + // treat zero-sized bone like a leaf bone + if (length <= epsilon) { + add_leaf_bone(parent_mat, parent, node); + } } } -- cgit v1.2.3 From 89f4445b446b269ba84ef1445ac29c806199386c Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Wed, 17 Jul 2013 21:06:27 +0000 Subject: Leaf bone length calculation used wrong bone tail --- source/blender/collada/ArmatureImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 5c69c7b1e63..eb92b089f48 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -139,7 +139,7 @@ void ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBo const float epsilon = 0.000001f; // derive leaf bone length - float length = len_v3v3(parent->head, parent->tail); + float length = len_v3v3(parent->head, bone->head); if ((length < leaf_bone_length || totbone == 0) && length > epsilon) { leaf_bone_length = length; } -- cgit v1.2.3 From 271ffb43e5a6e9fece21769cab4ae8a47a082cc4 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Wed, 17 Jul 2013 21:25:44 +0000 Subject: * Fix a typo in code. --- intern/cycles/kernel/kernel_light.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index 4983122fb34..5091eac41db 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -271,7 +271,7 @@ __device void lamp_light_sample(KernelGlobals *kg, int lamp, ls->pdf = invarea; if(type == LIGHT_SPOT) { - /* spot light attentuation */ + /* spot light attenuation */ float4 data2 = kernel_tex_fetch(__light_data, lamp*LIGHT_SIZE + 2); ls->eval_fac *= spot_light_attenuation(data1, data2, ls); } -- cgit v1.2.3 From 66f6ace9383713ec27f4a684ec7561ce1a189d93 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Jul 2013 02:59:28 +0000 Subject: fix for action editor view-selected behaving strangely. - when an fcurve had no selected keyframes, a default fallback value was used which caused view-selected to include frame 1, even when no selected frames were there. - the vertical axis was always reset, ideally we would center vertically too but the way this operator currently works we only know about the frame range, now don't change the vertical scroll when viewing selected since it would always jump to the top of the screen (view-all still acts this way). --- source/blender/blenkernel/BKE_fcurve.h | 2 +- source/blender/blenkernel/intern/fcurve.c | 4 ++- source/blender/editors/space_action/action_edit.c | 43 +++++++++++++++-------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index d7ef04195d5..64a6811bf51 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -216,7 +216,7 @@ struct FCurve *rna_get_fcurve(struct PointerRNA *ptr, struct PropertyRNA *prop, int binarysearch_bezt_index(struct BezTriple array[], float frame, int arraylen, bool *r_replace); /* get the time extents for F-Curve */ -void calc_fcurve_range(struct FCurve *fcu, float *min, float *max, +bool calc_fcurve_range(struct FCurve *fcu, float *min, float *max, const short do_sel_only, const short do_min_length); /* get the bounding-box extents for F-Curve */ diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 8958680d611..bd282095c33 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -577,7 +577,7 @@ short calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, flo } /* Calculate the extents of F-Curve's keyframes */ -void calc_fcurve_range(FCurve *fcu, float *start, float *end, +bool calc_fcurve_range(FCurve *fcu, float *start, float *end, const short do_sel_only, const short do_min_length) { float min = 999999999.0f, max = -999999999.0f; @@ -621,6 +621,8 @@ void calc_fcurve_range(FCurve *fcu, float *start, float *end, *start = min; *end = max; + + return foundvert; } /* ----------------- Status Checks -------------------------- */ diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 803e7b71c77..7c9d867aad6 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -231,11 +231,12 @@ void ACTION_OT_markers_make_local(wmOperatorType *ot) /* *************************** Calculate Range ************************** */ /* Get the min/max keyframes*/ -static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const short onlySel) +static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const short onlySel) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; + bool found = false; /* get data to filter, from Action or Dopesheet */ /* XXX: what is sel doing here?! @@ -261,6 +262,7 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const const float framenum = (float)gpf->framenum; *min = min_ff(*min, framenum); *max = max_ff(*max, framenum); + found = true; } } else if (ale->datatype == ALE_MASKLAY) { @@ -275,6 +277,7 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const const float framenum = (float)masklay_shape->frame; *min = min_ff(*min, framenum); *max = max_ff(*max, framenum); + found = true; } } else { @@ -282,16 +285,18 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const float tmin, tmax; /* get range and apply necessary scaling before processing */ - calc_fcurve_range(fcu, &tmin, &tmax, onlySel, TRUE); + if (calc_fcurve_range(fcu, &tmin, &tmax, onlySel, TRUE)) { - if (adt) { - tmin = BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP); - tmax = BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP); - } + if (adt) { + tmin = BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP); + tmax = BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP); + } - /* try to set cur using these values, if they're more extreme than previously set values */ - *min = min_ff(*min, tmin); - *max = max_ff(*max, tmax); + /* try to set cur using these values, if they're more extreme than previously set values */ + *min = min_ff(*min, tmin); + *max = max_ff(*max, tmax); + found = true; + } } } @@ -309,6 +314,8 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const *max = 100; } } + + return found; } /* ****************** Automatic Preview-Range Operator ****************** */ @@ -357,11 +364,12 @@ void ACTION_OT_previewrange_set(wmOperatorType *ot) /* ****************** View-All Operator ****************** */ -static int actkeys_viewall(bContext *C, const short onlySel) +static int actkeys_viewall(bContext *C, const bool only_sel, const bool only_xaxis) { bAnimContext ac; View2D *v2d; float extra; + bool found; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -369,15 +377,20 @@ static int actkeys_viewall(bContext *C, const short onlySel) v2d = &ac.ar->v2d; /* set the horizontal range, with an extra offset so that the extreme keys will be in view */ - get_keyframe_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, onlySel); + found = get_keyframe_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, only_sel); + + if (only_sel && (found == false)) + return OPERATOR_CANCELLED; extra = 0.1f * BLI_rctf_size_x(&v2d->cur); v2d->cur.xmin -= extra; v2d->cur.xmax += extra; /* set vertical range */ - v2d->cur.ymax = 0.0f; - v2d->cur.ymin = (float)-BLI_rcti_size_y(&v2d->mask); + if (only_xaxis == false) { + v2d->cur.ymax = 0.0f; + v2d->cur.ymin = (float)-BLI_rcti_size_y(&v2d->mask); + } /* do View2D syncing */ UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY); @@ -393,13 +406,13 @@ static int actkeys_viewall(bContext *C, const short onlySel) static int actkeys_viewall_exec(bContext *C, wmOperator *UNUSED(op)) { /* whole range */ - return actkeys_viewall(C, FALSE); + return actkeys_viewall(C, false, false); } static int actkeys_viewsel_exec(bContext *C, wmOperator *UNUSED(op)) { /* only selected */ - return actkeys_viewall(C, TRUE); + return actkeys_viewall(C, true, true); } void ACTION_OT_view_all(wmOperatorType *ot) -- cgit v1.2.3 From 1d4bd90c844ef2e9f48a97dbad1b8241e2abe29a Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Thu, 18 Jul 2013 07:54:19 +0000 Subject: Avoid creating Morph Controllers when shape key export is disabled --- source/blender/collada/ControllerExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp index 4c6f71ff1a6..d04ed8d6fa1 100644 --- a/source/blender/collada/ControllerExporter.cpp +++ b/source/blender/collada/ControllerExporter.cpp @@ -123,7 +123,7 @@ void ControllerExporter::operator()(Object *ob) if (ob_arm) { export_skin_controller(ob, ob_arm); } - if (key) { + if (key && this->export_settings->include_shapekeys) { export_morph_controller(ob, key); } } -- cgit v1.2.3 From 530bcc422e97afa18ac998aa5ecd11e8e9560c55 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 18 Jul 2013 10:08:28 +0000 Subject: Tradtional release commit! 2.68 splash and the numbering. - This should then follow the tagging - And I would still prefer to have at least 24 hours full freeze, for proper test and avoid last minute errors. --- release/datafiles/splash.png | Bin 94411 -> 177989 bytes source/blender/blenkernel/BKE_blender.h | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png index 01d903c457b..3c05ba86cd3 100644 Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 9e874c9aa15..e73b30ab98a 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -41,8 +41,8 @@ extern "C" { /* these lines are grep'd, watch out for our not-so-awesome regex * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ -#define BLENDER_VERSION 267 -#define BLENDER_SUBVERSION 1 +#define BLENDER_VERSION 268 +#define BLENDER_SUBVERSION 0 /* 262 was the last editmesh release but it has compatibility code for bmesh data */ #define BLENDER_MINVERSION 262 @@ -50,9 +50,9 @@ extern "C" { /* used by packaging tools */ /* can be left blank, otherwise a,b,c... etc with no quotes */ -#define BLENDER_VERSION_CHAR b +#define BLENDER_VERSION_CHAR /* alpha/beta/rc/release, docs use this */ -#define BLENDER_VERSION_CYCLE rc +#define BLENDER_VERSION_CYCLE release extern char versionstr[]; /* from blender.c */ -- cgit v1.2.3