diff options
-rw-r--r-- | source/blender/editors/armature/armature_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 27 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 7 |
3 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index d1c50439c01..7caadf532e5 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -162,7 +162,7 @@ void ED_operatormacros_armature(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate"); otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index dce49cc4845..3f9e3e04411 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -151,11 +151,11 @@ static int gpencil_draw_poll (bContext *C) return (gpencil_data_get_pointers(C, NULL) != NULL); } -static int gpencil_project_check(tGPsdata *p) +/* check if projecting strokes into 3d-geometry in the 3D-View */ +static int gpencil_project_check (tGPsdata *p) { bGPdata *gpd= p->gpd; - - /* in 3d-space - pt->x/y/z are 3 side-by-side floats */ + if( (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) && (p->scene->toolsettings->snap_mode==SCE_SNAP_MODE_FACE) && (p->scene->toolsettings->snap_flag & SCE_SNAP_PROJECT) ) @@ -227,12 +227,14 @@ static void gp_stroke_convertcoords (tGPsdata *p, short mval[], float out[]) /* in 3d-space - pt->x/y/z are 3 side-by-side floats */ if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) { if(gpencil_project_check(p) && (view_autodist_simple(p->ar, mval, out))) { - /* pass */ + /* projecting onto 3D-Geometry + * - nothing more needs to be done here, since view_autodist_simple() has already done it + */ } else { const short mx=mval[0], my=mval[1]; float rvec[3], dvec[3]; - + /* Current method just converts each point in screen-coordinates to * 3D-coordinates using the 3D-cursor as reference. In general, this * works OK, but it could of course be improved. @@ -241,9 +243,9 @@ static void gp_stroke_convertcoords (tGPsdata *p, short mval[], float out[]) * - investigate using nearest point(s) on a previous stroke as * reference point instead or as offset, for easier stroke matching */ - + gp_get_3d_reference(p, rvec); - + /* method taken from editview.c - mouse_cursor() */ project_short_noclip(p->ar, rvec, mval); window_to_3d_delta(p->ar, dvec, mval[0]-mx, mval[1]-my); @@ -1136,6 +1138,8 @@ static void gpencil_draw_exit (bContext *C, wmOperator *op) /* cleanup */ if(gpencil_project_check(p)) { View3D *v3d= p->sa->spacedata.first; + + /* need to restore the original projection settings before packing up */ view3d_operator_needs_opengl(C); view_autodist_init(p->scene, p->ar, v3d); } @@ -1206,8 +1210,8 @@ static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *even { tGPsdata *p= op->customdata; ARegion *ar= p->ar; - //PointerRNA itemptr; - //float mousef[2]; + PointerRNA itemptr; + float mousef[2]; int tablet=0; /* convert from window-space to area-space mouse coordintes */ @@ -1242,7 +1246,6 @@ static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *even return; } -#if 0 // NOTE: disabled for now, since creating this data is currently useless anyways (and slows things down) /* fill in stroke data (not actually used directly by gpencil_draw_apply) */ RNA_collection_add(op->ptr, "stroke", &itemptr); @@ -1250,7 +1253,6 @@ static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *even mousef[1]= p->mval[1]; RNA_float_set_array(&itemptr, "mouse", mousef); RNA_float_set(&itemptr, "pressure", p->pressure); -#endif /* apply the current latest drawing point */ gpencil_draw_apply(C, op, p); @@ -1261,7 +1263,7 @@ static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *even /* ------------------------------- */ -/* operator 'redo' (i.e. after changing some properties) */ +/* operator 'redo' (i.e. after changing some properties, but also for repeat last) */ static int gpencil_draw_exec (bContext *C, wmOperator *op) { tGPsdata *p = NULL; @@ -1462,6 +1464,5 @@ void GPENCIL_OT_draw (wmOperatorType *ot) /* settings for drawing */ RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements."); - // xxx the stuff below is used only for redo operator, but is not really working RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 88dfe358f98..fbf4a8b41c5 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -862,7 +862,7 @@ static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_struct_type(prop, "FModifier"); RNA_def_property_pointer_funcs(prop, "rna_FCurve_active_modifier_get", "rna_FCurve_active_modifier_set", NULL); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Active fcurve modifier", "Active fcurve modifier."); + RNA_def_property_ui_text(prop, "Active F-Curve Modifier", "Active F-Curve Modifier."); /* Constraint collection */ func= RNA_def_function(srna, "new", "rna_FCurve_modifiers_new"); @@ -910,6 +910,7 @@ static void rna_def_fcurve(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "extend"); RNA_def_property_enum_items(prop, prop_mode_extend_items); RNA_def_property_ui_text(prop, "Extrapolation", ""); + RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this so that animation gets evaluated /* Pointers */ prop= RNA_def_property(srna, "driver", PROP_POINTER, PROP_NONE); @@ -920,18 +921,22 @@ static void rna_def_fcurve(BlenderRNA *brna) prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_FCurve_RnaPath_get", "rna_FCurve_RnaPath_length", "rna_FCurve_RnaPath_set"); RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property affected by F-Curve."); + RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this to that animation gets evaluated prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property affected by F-Curve if applicable."); + RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this so that animation gets evaluated /* Color */ prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_mode_color_items); RNA_def_property_ui_text(prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor."); + RNA_def_property_update(prop, NC_ANIMATION, NULL); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor."); + RNA_def_property_update(prop, NC_ANIMATION, NULL); /* Collections */ prop= RNA_def_property(srna, "sampled_points", PROP_COLLECTION, PROP_NONE); |