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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/CMakeLists.txt4
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c15
-rw-r--r--source/blender/editors/animation/anim_filter.c77
-rw-r--r--source/blender/editors/include/ED_anim_api.h1
-rw-r--r--source/blender/editors/interface/interface_handlers.c7
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/editors/interface/resources.c5
-rw-r--r--source/blender/editors/object/object_constraint.c2
-rw-r--r--source/blender/editors/object/object_edit.c167
-rw-r--r--source/blender/editors/object/object_intern.h8
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/physics/physics_pointcache.c16
-rw-r--r--source/blender/editors/render/render_opengl.c14
-rw-r--r--source/blender/editors/screen/screen_ops.c3
-rw-r--r--source/blender/editors/space_action/action_edit.c36
-rw-r--r--source/blender/editors/space_action/action_select.c33
-rw-r--r--source/blender/editors/space_file/Makefile4
-rw-r--r--source/blender/editors/space_file/SConscript4
-rw-r--r--source/blender/editors/space_file/writeimage.c5
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c92
-rw-r--r--source/blender/editors/space_graph/graph_edit.c42
-rw-r--r--source/blender/editors/space_graph/graph_select.c22
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
-rw-r--r--source/blender/editors/space_image/Makefile4
-rw-r--r--source/blender/editors/space_image/SConscript2
-rw-r--r--source/blender/editors/space_image/image_ops.c5
-rw-r--r--source/blender/editors/space_logic/logic_window.c30
-rw-r--r--source/blender/editors/space_logic/space_logic.c1
-rw-r--r--source/blender/editors/space_nla/nla_select.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c8
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c27
-rw-r--r--source/blender/editors/space_view3d/drawobject.c40
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c3
-rw-r--r--source/blender/editors/transform/transform.c6
-rw-r--r--source/blender/editors/transform/transform_conversions.c64
-rw-r--r--source/blender/editors/transform/transform_generics.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c1
40 files changed, 598 insertions, 174 deletions
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index 58a52f7041d..50d511eea24 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -58,6 +58,10 @@ IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
+IF(WITH_TIFF)
+ ADD_DEFINITIONS(-DWITH_TIFF)
+ENDIF(WITH_TIFF)
+
IF(WITH_OPENJPEG)
ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 97c93c6a913..bdaf0bf700a 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -939,7 +939,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *op)
/* do groups only first (unless in Drivers mode, where there are none) */
if (ac.datatype != ANIMCONT_DRIVERS) {
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CHANNELS | ANIMFILTER_FOREDIT);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CHANNELS | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* delete selected groups and their associated channels */
@@ -978,7 +978,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *op)
/* now do F-Curves */
if (ac.datatype != ANIMCONT_GPENCIL) {
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* delete selected F-Curves */
@@ -1038,7 +1038,7 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *op)
ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
/* hide all channels not selected */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_UNSEL);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_UNSEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -1054,7 +1054,7 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *op)
BLI_freelistN(&anim_data);
/* make all the selected channels visible */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -1113,11 +1113,11 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get list of all channels that selection may need to be flushed to */
- filter= ANIMFILTER_CHANNELS;
+ filter= (ANIMFILTER_CHANNELS | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* See if we should be making showing all selected or hiding */
@@ -1215,7 +1215,8 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
}
/* filter data that we're working on */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
+ // XXX: noduplis enabled so that results don't cancel, but will be problematic for some channels where only type differs
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS | ANIMFILTER_NODUPLIS);
if (onlysel) filter |= ANIMFILTER_SEL;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 5ac7f6d4119..67f2cb834e0 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -68,6 +68,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
+#include "BLI_ghash.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
@@ -2512,6 +2513,65 @@ static short animdata_filter_dopesheet_summary (bAnimContext *ac, ListBase *anim
return 1;
}
+/* ----------- Cleanup API --------------- */
+
+/* Remove entries with invalid types in animation channel list */
+static int animdata_filter_remove_invalid (ListBase *anim_data)
+{
+ bAnimListElem *ale, *next;
+ int items = 0;
+
+ /* only keep entries with valid types */
+ for (ale= anim_data->first; ale; ale= next) {
+ next= ale->next;
+
+ if (ale->type == ANIMTYPE_NONE)
+ BLI_freelinkN(anim_data, ale);
+ else
+ items++;
+ }
+
+ return items;
+}
+
+/* Remove duplicate entries in animation channel list */
+static int animdata_filter_remove_duplis (ListBase *anim_data)
+{
+ bAnimListElem *ale, *next;
+ GHash *gh;
+ int items = 0;
+
+ /* build new hashtable to efficiently store and retrieve which entries have been
+ * encountered already while searching
+ */
+ gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "animdata_filter_duplis_remove gh");
+
+ /* loop through items, removing them from the list if a similar item occurs already */
+ for (ale = anim_data->first; ale; ale = next) {
+ next = ale->next;
+
+ /* check if hash has any record of an entry like this
+ * - just use ale->data for now, though it would be nicer to involve
+ * ale->type in combination too to capture corner cases (where same data performs differently)
+ */
+ if (BLI_ghash_haskey(gh, ale->data) == 0) {
+ /* this entry is 'unique' and can be kept */
+ BLI_ghash_insert(gh, ale->data, NULL);
+ items++;
+ }
+ else {
+ /* this entry isn't needed anymore */
+ BLI_freelinkN(anim_data, ale);
+ }
+ }
+
+ /* free the hash... */
+ BLI_ghash_free(gh, NULL, NULL);
+
+ /* return the number of items still in the list */
+ return items;
+}
+
/* ----------- Public API --------------- */
/* This function filters the active data source to leave only animation channels suitable for
@@ -2527,7 +2587,6 @@ int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode
/* only filter data if there's somewhere to put it */
if (data && anim_data) {
- bAnimListElem *ale, *next;
Object *obact= (ac) ? ac->obact : NULL;
/* firstly filter the data */
@@ -2572,16 +2631,12 @@ int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode
break;
}
- /* remove any weedy entries */
- // XXX this is weedy code!
- for (ale= anim_data->first; ale; ale= next) {
- next= ale->next;
-
- if (ale->type == ANIMTYPE_NONE) {
- items--;
- BLI_freelinkN(anim_data, ale);
- }
- }
+ /* remove any 'weedy' entries */
+ items = animdata_filter_remove_invalid(anim_data);
+
+ /* remove duplicates (if required) */
+ if (filter_mode & ANIMFILTER_NODUPLIS)
+ items = animdata_filter_remove_duplis(anim_data);
}
/* return the number of items in the list */
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 23cb697b453..230a3e8a3dd 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -192,6 +192,7 @@ typedef enum eAnimFilter_Flags {
ANIMFILTER_ANIMDATA = (1<<9), /* only return the underlying AnimData blocks (not the tracks, etc.) data comes from */
ANIMFILTER_NLATRACKS = (1<<10), /* only include NLA-tracks */
ANIMFILTER_SELEDIT = (1<<11), /* link editability with selected status */
+ ANIMFILTER_NODUPLIS = (1<<12), /* duplicate entries for animation data attached to multi-user blocks must not occur */
/* all filters - the power inside the bracket must be the last power for left-shifts + 1 */
ANIMFILTER_ALLFILTERS = ((1<<12) - 1)
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index ff56b14c653..2c9d5a8e131 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2119,8 +2119,13 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE
}
if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ int ret = WM_UI_HANDLER_BREAK;
+ /* XXX (a bit ugly) Special case handling for filebrowser drag button */
+ if(but->dragpoin && but->imb && ui_but_mouse_inside_icon(but, data->region, event)) {
+ ret = WM_UI_HANDLER_CONTINUE;
+ }
button_activate_state(C, but, BUTTON_STATE_EXIT);
- return WM_UI_HANDLER_BREAK;
+ return ret;
}
}
else if(data->state == BUTTON_STATE_WAIT_DRAG) {
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 762203272a3..d91cdd5c20d 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1107,7 +1107,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, ui
continue;
if(itemptr.type && RNA_struct_is_ID(itemptr.type))
- iconid= ui_id_icon_get((bContext*)C, itemptr.data, 0);
+ iconid= ui_id_icon_get((bContext*)C, itemptr.data, 1);
else
iconid = 0;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index aef24acc7a7..8cf6c2915c2 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -170,7 +170,7 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea
continue;
if(BLI_strcasestr(id->name+2, str)) {
- iconid= ui_id_icon_get((bContext*)C, id, 0);
+ iconid= ui_id_icon_get((bContext*)C, id, 1);
if(!uiSearchItemAdd(items, id->name+2, id, iconid))
break;
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 49c455d9299..82b195fb94a 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1488,6 +1488,11 @@ void init_userdef_do_versions(void)
if (U.v2d_min_gridsize == 0) {
U.v2d_min_gridsize= 35;
}
+
+ /* Single Column UI Value */
+ if (U.propwidth == 0) {
+ U.propwidth = 200;
+ }
/* funny name, but it is GE stuff, moves userdef stuff to engine */
// XXX space_set_commmandline_options();
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 039b18efb39..9163baf606f 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1340,7 +1340,7 @@ void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot)
void OBJECT_OT_constraint_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Constraints to Others";
+ ot->name= "Copy Constraints to Selected";
ot->description = "Copy constraints to other selected objects.";
ot->idname= "OBJECT_OT_constraint_copy";
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 4685c12fedd..da3798910e8 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -30,6 +30,7 @@
#include <time.h>
#include <float.h>
#include <ctype.h>
+#include <stddef.h> //for offsetof
#include "MEM_guardedalloc.h"
@@ -104,6 +105,7 @@
/* for menu/popup icons etc etc*/
+#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -1098,6 +1100,7 @@ void flip_subdivison(Scene *scene, View3D *v3d, int level)
static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
{
+//XXX no longer used - to be removed - replaced by game_properties_copy_exec
bProperty *prop;
Base *base;
int nr, tot=0;
@@ -1156,6 +1159,7 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob)
{
+//XXX no longer used - to be removed - replaced by logicbricks_copy_exec
Base *base;
for(base= FIRSTBASE; base; base= base->next) {
@@ -2203,3 +2207,166 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot)
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Property index to remove ", 0, INT_MAX);
}
+static EnumPropertyItem game_properties_copy_types[] ={
+ {1, "REPLACE", 0, "Replace Properties", ""},
+ {2, "MERGE", 0, "Merge Properties", ""},
+ {3, "CLEAR", 0, "Clear All", ""},
+ {4, "COPY", 0, "Copy a Property", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static int game_property_copy_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Object *ob= CTX_data_active_object(C);
+ bProperty *prop;
+ int tot=0;
+ uiPopupMenu *pup;
+ uiLayout *menu;
+
+ /* count number of available properties */
+ prop= ob->prop.first;
+ while(prop) {
+ tot++;
+ prop= prop->next;
+ }
+
+ /* start building */
+ pup= uiPupMenuBegin(C, op->type->name, 0);
+ menu= uiPupMenuLayout(pup);
+ uiLayoutSetOperatorContext(menu, WM_OP_EXEC_DEFAULT);
+
+ if(!tot)
+ uiItemEnumO(menu, "OBJECT_OT_game_property_copy", NULL, 0, "type", 3);//CLEAR);
+ else {
+ uiItemEnumO(menu, "OBJECT_OT_game_property_copy", NULL, 0, "type", 1);//REPLACE);
+ uiItemEnumO(menu, "OBJECT_OT_game_property_copy", NULL, 0, "type", 2);//MERGE);
+
+ //Menu Separator
+ uiItemL(menu, "Copy a Property", 0);
+
+ prop= ob->prop.first;
+ while(prop) {
+ uiItemStringO(menu, prop->name, 0, "OBJECT_OT_game_property_copy", "property", prop->name);
+ prop= prop->next;
+ }
+ }
+ uiPupMenuEnd(C, pup);
+
+ /* this operator is only for a menu, not used further */
+ return OPERATOR_CANCELLED;
+}
+
+static int game_property_copy_exec(bContext *C, wmOperator *op)
+{
+ Object *ob=ED_object_active_context(C);
+ bProperty *prop;
+ char prop_name[32];
+
+ int type = RNA_enum_get(op->ptr, "type");
+ RNA_string_get(op->ptr, "property", prop_name);
+
+ if ( type == 1 || type == 2 || type == 3) {
+ CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ if (ob != ob_iter) {
+ if (ob->data != ob_iter->data){
+ if (type == 2) {/* merge */
+ for(prop = ob->prop.first; prop; prop= prop->next ) {
+ set_ob_property(ob_iter, prop);
+ }
+ } else /* replace or clear */
+ copy_properties( &ob_iter->prop, &ob->prop );
+ }
+ }
+ }
+ CTX_DATA_END;
+ }
+ else if(strlen(prop_name) > 0) { /* copy */
+ prop = (bProperty *) BLI_findstring(&ob->prop, prop_name, offsetof(bProperty, name));
+
+ if(prop) {
+ CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ if (ob != ob_iter) {
+ if (ob->data != ob_iter->data)
+ set_ob_property(ob_iter, prop);
+ }
+ } CTX_DATA_END;
+ }
+ }
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_game_property_copy(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Copy Game Property";
+ ot->idname= "OBJECT_OT_game_property_copy";
+
+ /* api callbacks */
+ ot->invoke= game_property_copy_invoke;
+ ot->exec= game_property_copy_exec;
+ ot->poll= ED_operator_object_active_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", game_properties_copy_types, 4, "Operation", "");
+ RNA_def_string(ot->srna, "property", "", 32, "Name", "Name of the property to copy");
+}
+
+/************************ Copy Logic Bricks ***********************/
+
+static int logicbricks_copy_exec(bContext *C, wmOperator *op)
+{
+ Object *ob=ED_object_active_context(C);
+
+ CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ if(ob != ob_iter) {
+ if (ob->data != ob_iter->data){
+ /* first: free all logic */
+ free_sensors(&ob_iter->sensors);
+ unlink_controllers(&ob_iter->controllers);
+ free_controllers(&ob_iter->controllers);
+ unlink_actuators(&ob_iter->actuators);
+ free_actuators(&ob_iter->actuators);
+
+ /* now copy it, this also works without logicbricks! */
+ clear_sca_new_poins_ob(ob);
+ copy_sensors(&ob_iter->sensors, &ob->sensors);
+ copy_controllers(&ob_iter->controllers, &ob->controllers);
+ copy_actuators(&ob_iter->actuators, &ob->actuators);
+ set_sca_new_poins_ob(ob_iter);
+
+ /* some menu settings */
+ ob_iter->scavisflag= ob->scavisflag;
+ ob_iter->scaflag= ob->scaflag;
+
+ /* set the initial state */
+ ob_iter->state= ob->state;
+ ob_iter->init_state= ob->init_state;
+ }
+ if(ob_iter->totcol==ob->totcol) {
+ ob_iter->actcol= ob->actcol;
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter);
+ }
+ }
+ }
+ CTX_DATA_END;
+
+ WM_event_add_notifier(C, NC_LOGIC, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_logic_bricks_copy(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Copy Logic Bricks to Selected";
+ ot->description = "Copy logic bricks to other selected objects.";
+ ot->idname= "OBJECT_OT_logic_bricks_copy";
+
+ /* api callbacks */
+ ot->exec= logicbricks_copy_exec;
+ ot->poll= ED_operator_object_active_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 7e1f2cbbfdc..2d8faa60bea 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -85,6 +85,11 @@ void OBJECT_OT_shade_flat(struct wmOperatorType *ot);
void OBJECT_OT_paths_calculate(struct wmOperatorType *ot);
void OBJECT_OT_paths_clear(struct wmOperatorType *ot);
+void OBJECT_OT_game_property_new(struct wmOperatorType *ot);
+void OBJECT_OT_game_property_remove(struct wmOperatorType *ot);
+void OBJECT_OT_game_property_copy(struct wmOperatorType *ot);
+void OBJECT_OT_logic_bricks_copy(struct wmOperatorType *ot);
+
/* object_select.c */
void OBJECT_OT_select_all(struct wmOperatorType *ot);
void OBJECT_OT_select_inverse(struct wmOperatorType *ot);
@@ -201,9 +206,6 @@ void OBJECT_OT_vertex_group_set_active(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_sort(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_move(struct wmOperatorType *ot);
-void OBJECT_OT_game_property_new(struct wmOperatorType *ot);
-void OBJECT_OT_game_property_remove(struct wmOperatorType *ot);
-
/* object_shapekey.c */
void OBJECT_OT_shape_key_add(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_remove(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 4cfed57f9c7..3c5928d86c2 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -413,7 +413,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
multires_force_update(ob);
if (mmd && mti->type==eModifierTypeType_OnlyDeform) {
- multiresModifier_reshapeFromDeformMod (mmd, ob, md);
+ multiresModifier_reshapeFromDeformMod (ob, md);
} else {
dm = mesh_create_derived_for_modifier(scene, ob, md);
if (!dm) {
@@ -972,7 +972,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if(!multiresModifier_reshape(mmd, ob, secondob)) {
+ if(!multiresModifier_reshape(ob, secondob)) {
BKE_report(op->reports, RPT_ERROR, "Objects do not have the same number of vertices.");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 759e13bffb0..ce1967a1d44 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -183,6 +183,8 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_game_property_new);
WM_operatortype_append(OBJECT_OT_game_property_remove);
+ WM_operatortype_append(OBJECT_OT_game_property_copy);
+ WM_operatortype_append(OBJECT_OT_logic_bricks_copy);
WM_operatortype_append(OBJECT_OT_shape_key_add);
WM_operatortype_append(OBJECT_OT_shape_key_remove);
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 57a123d8f17..5ebbb00939e 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -71,7 +71,7 @@ static int ptcache_bake_all_poll(bContext *C)
static int ptcache_poll(bContext *C)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
return (ptr.data && ptr.id.data);
}
@@ -89,7 +89,7 @@ void bake_console_progress_end(void *arg)
static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
- wmWindow *win = CTX_wm_window(C);
+ wmWindow *win = G.background ? NULL : CTX_wm_window(C);
PTCacheBaker baker;
@@ -171,8 +171,8 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
static int ptcache_bake_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- wmWindow *win = CTX_wm_window(C);
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ wmWindow *win = G.background ? NULL : CTX_wm_window(C);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
Object *ob= ptr.id.data;
PointCache *cache= ptr.data;
PTCacheBaker baker;
@@ -216,7 +216,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
}
static int ptcache_free_bake_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
PointCache *cache= ptr.data;
if(cache->edit) {
@@ -233,7 +233,7 @@ static int ptcache_free_bake_exec(bContext *C, wmOperator *op)
}
static int ptcache_bake_from_cache_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
PointCache *cache= ptr.data;
cache->flag |= PTCACHE_BAKED;
@@ -285,7 +285,7 @@ void PTCACHE_OT_bake_from_cache(wmOperatorType *ot)
static int ptcache_add_new_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
Object *ob= ptr.id.data;
PointCache *cache= ptr.data;
PTCacheID *pid;
@@ -308,7 +308,7 @@ static int ptcache_add_new_exec(bContext *C, wmOperator *op)
}
static int ptcache_remove_exec(bContext *C, wmOperator *op)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
Scene *scene= CTX_data_scene(C);
Object *ob= ptr.id.data;
PointCache *cache= ptr.data;
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index ee5363a00f9..aded83c0d16 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -211,7 +211,7 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
if(oglrender->timer) { /* exec will not have a timer */
scene->r.cfra= oglrender->cfrao;
- scene_update_for_newframe(scene, scene->lay);
+ scene_update_for_newframe(scene, scene->lay|oglrender->v3d->lay);
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), oglrender->timer);
}
@@ -268,16 +268,16 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
/* go to next frame */
while(CFRA<oglrender->nfra) {
- if(scene->lay & 0xFF000000)
- lay= scene->lay & 0xFF000000;
- else
- lay= scene->lay;
+ lay = scene->lay | oglrender->v3d->lay;
+
+ if(lay & 0xFF000000)
+ lay &= 0xFF000000;
scene_update_for_newframe(scene, lay);
CFRA++;
}
-
- scene_update_for_newframe(scene, scene->lay);
+
+ scene_update_for_newframe(scene, scene->lay | oglrender->v3d->lay);
if(oglrender->rv3d->persp==RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) {
/* since scene_update_for_newframe() is used rather
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 244997775fc..8b1c0045fd3 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3040,7 +3040,8 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELDOWNMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELUPMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1);
- WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 1);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 1);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 0);
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index a0616b5f37b..b6e3327bd12 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -133,7 +133,7 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max)
int filter;
/* get data to filter, from Action or Dopesheet */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
@@ -284,7 +284,7 @@ static short copy_action_keys (bAnimContext *ac)
free_anim_copybuf();
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* copy keyframes */
@@ -303,7 +303,7 @@ static short paste_action_keys (bAnimContext *ac)
int filter, ok=0;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* paste keyframes */
@@ -421,7 +421,7 @@ static void insert_action_keys(bAnimContext *ac, short mode)
short flag = 0;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
if (mode == 2) filter |= ANIMFILTER_SEL;
else if (mode == 3) filter |= ANIMFILTER_ACTGROUPED;
@@ -508,9 +508,9 @@ static void duplicate_action_keys (bAnimContext *ac)
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
@@ -586,9 +586,9 @@ static void delete_action_keys (bAnimContext *ac)
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
@@ -659,7 +659,7 @@ static void clean_action_keys (bAnimContext *ac, float thresh)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and clean curves */
@@ -727,7 +727,7 @@ static void sample_action_keys (bAnimContext *ac)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
@@ -797,7 +797,7 @@ static void setexpo_action_keys(bAnimContext *ac, short mode)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting mode per F-Curve */
@@ -868,7 +868,7 @@ static void setipo_action_keys(bAnimContext *ac, short mode)
KeyframeEditFunc set_cb= ANIM_editkeyframes_ipo(mode);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
@@ -952,7 +952,7 @@ static void sethandles_action_keys(bAnimContext *ac, short mode)
KeyframeEditFunc sel_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting flags for handles
@@ -1036,7 +1036,7 @@ static void setkeytype_action_keys(bAnimContext *ac, short mode)
KeyframeEditFunc set_cb= ANIM_editkeyframes_keytype(mode);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
@@ -1118,7 +1118,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *op)
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop over action data, averaging values */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -1186,7 +1186,7 @@ static void snap_action_keys(bAnimContext *ac, short mode)
if (ac->datatype == ANIMCONT_GPENCIL)
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing callbacks */
@@ -1311,9 +1311,9 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* mirror keyframes */
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 29a87ec849b..33f918c0711 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -95,9 +95,9 @@ static void deselect_action_keys (bAnimContext *ac, short test, short sel)
/* determine type-based settings */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_VISIBLE);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
/* filter data */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -212,7 +212,7 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short
UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax-2, &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get filtering flag for dopesheet data (if applicable) */
@@ -389,7 +389,7 @@ static void markers_selectkeys_between (bAnimContext *ac)
ked.f2= max;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys in-between */
@@ -572,7 +572,7 @@ static int actkeys_select_linked_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -627,7 +627,7 @@ static void select_moreless_action_keys (bAnimContext *ac, short mode)
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -800,9 +800,9 @@ static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short
/* filter data */
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_VISIBLE);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys on the side where most data occurs */
@@ -823,13 +823,14 @@ static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short
/* Sync marker support */
if((select_mode==SELECT_ADD) && (ac->spacetype==SPACE_ACTION) && ELEM(leftright, ACTKEYS_LRSEL_LEFT, ACTKEYS_LRSEL_RIGHT)) {
SpaceAction *saction= ac->sa->spacedata.first;
+
if (saction && saction->flag & SACTION_MARKERS_MOVE) {
TimeMarker *marker;
-
+
for (marker= scene->markers.first; marker; marker= marker->next) {
- if( ((leftright == ACTKEYS_LRSEL_LEFT) && marker->frame < CFRA) ||
- ((leftright == ACTKEYS_LRSEL_RIGHT) && marker->frame >= CFRA)
- ) {
+ if( ((leftright == ACTKEYS_LRSEL_LEFT) && (marker->frame < CFRA)) ||
+ ((leftright == ACTKEYS_LRSEL_RIGHT) && (marker->frame >= CFRA)) )
+ {
marker->flag |= SELECT;
}
else {
@@ -864,9 +865,9 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
* based on the keys found to be selected above
*/
if (ac->datatype == ANIMCONT_GPENCIL)
- filter= (ANIMFILTER_VISIBLE);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NODUPLIS);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -997,10 +998,8 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
gpl_to_keylist(ads, gpl, &anim_keys, NULL);
}
- // the call below is not strictly necessary, since we have adjacency info anyway
- //BLI_dlrbTree_linkedlist_sync(&anim_keys);
-
/* loop through keyframes, finding one that was within the range clicked on */
+ // TODO: replace this with API calls instead of inlining
for (ak= anim_keys.root; ak; ak= akn) {
if (IN_RANGE(ak->cfra, rectf.xmin, rectf.xmax)) {
/* set the frame to use, and apply inverse-correction for NLA-mapping
diff --git a/source/blender/editors/space_file/Makefile b/source/blender/editors/space_file/Makefile
index 43b2f09ed2d..29548b51222 100644
--- a/source/blender/editors/space_file/Makefile
+++ b/source/blender/editors/space_file/Makefile
@@ -63,3 +63,7 @@ ifeq ($(WITH_OPENEXR), true)
CPPFLAGS += -DWITH_OPENEXR
endif
+ifeq ($(WITH_TIFF), true)
+ CPPFLAGS += -DWITH_TIFF
+endif
+
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript
index b22a265dcbc..9de705e99d3 100644
--- a/source/blender/editors/space_file/SConscript
+++ b/source/blender/editors/space_file/SConscript
@@ -12,9 +12,13 @@ defs = []
if env['WITH_BF_OPENJPEG']:
defs.append('WITH_OPENJPEG')
+
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
+if env['WITH_BF_TIFF']:
+ defs.append('WITH_TIFF')
+
if env['OURPLATFORM'] == 'linux2':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c
index c9b30983b93..05efdc12596 100644
--- a/source/blender/editors/space_file/writeimage.c
+++ b/source/blender/editors/space_file/writeimage.c
@@ -143,10 +143,11 @@ void save_image_filesel_str(Scene *scene, char *str)
case R_BMP:
strcpy(str, "Save BMP");
break;
+#ifdef WITH_TIFF
case R_TIFF:
- if (G.have_libtiff)
- strcpy(str, "Save TIFF");
+ strcpy(str, "Save TIFF");
break;
+#endif
#ifdef WITH_OPENEXR
case R_OPENEXR:
strcpy(str, "Save OpenEXR");
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 5751fb0300e..bf433923707 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -208,11 +208,88 @@ static void graph_panel_properties(const bContext *C, Panel *pa)
uiLayoutSetEnabled(subrow, (fcu->color_mode==FCURVE_COLOR_CUSTOM));
uiItemR(subrow, &fcu_ptr, "color", 0, "", 0);
- /* TODO: the following settings could be added here
- * - Access details (ID-block + RNA-Path + Array Index)
- * - ...
+ MEM_freeN(ale);
+}
+
+/* ******************* active Keyframe ************** */
+
+/* get 'active' keyframe for panel editing */
+static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezTriple **prevbezt)
+{
+ BezTriple *b;
+ int i;
+
+ /* zero the pointers */
+ *bezt = *prevbezt = NULL;
+
+ /* sanity checks */
+ if ((fcu->bezt == NULL) || (fcu->totvert == 0))
+ return 0;
+
+ /* find first selected keyframe for now, and call it the active one
+ * - this is a reasonable assumption, given that whenever anyone
+ * wants to edit numerically, there is likely to only be 1 vert selected
*/
+ for (i=0, b=fcu->bezt; i < fcu->totvert; i++, b++) {
+ if (BEZSELECTED(b)) {
+ /* found
+ * - 'previous' is either the one before, of the keyframe itself (which is still fine)
+ * XXX: we can just make this null instead if needed
+ */
+ *prevbezt = (i > 0) ? b-1 : b;
+ *bezt = b;
+
+ return 1;
+ }
+ }
+
+ /* not found */
+ return 0;
+}
+static void graph_panel_key_properties(const bContext *C, Panel *pa)
+{
+ bAnimListElem *ale;
+ FCurve *fcu;
+ BezTriple *bezt, *prevbezt;
+
+ uiLayout *layout = pa->layout;
+ uiLayout *col;
+ uiBlock *block;
+
+ if (!graph_panel_context(C, &ale, &fcu))
+ return;
+
+ block = uiLayoutGetBlock(layout);
+ uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL);
+
+ /* only show this info if there are keyframes to edit */
+ if (get_active_fcurve_keyframe_edit(fcu, &bezt, &prevbezt)) {
+ PointerRNA bezt_ptr;
+
+ /* RNA pointer to keyframe, to allow editing */
+ RNA_pointer_create(ale->id, &RNA_Keyframe, bezt, &bezt_ptr);
+
+ /* interpolation */
+ col= uiLayoutColumn(layout, 0);
+ uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, 0);
+
+ /* numerical coordinate editing */
+ col= uiLayoutColumn(layout, 1);
+ /* keyframe itself */
+ uiItemR(col, &bezt_ptr, "co", 0, "Key", 0);
+
+ /* previous handle - only if previous was Bezier interpolation */
+ if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ))
+ uiItemR(col, &bezt_ptr, "handle1", 0, NULL, 0);
+
+ /* next handle - only if current is Bezier interpolation */
+ if (bezt->ipo == BEZT_IPO_BEZ)
+ uiItemR(col, &bezt_ptr, "handle2", 0, NULL, 0);
+ }
+ else
+ uiItemL(layout, "No active keyframe on F-Curve", 0);
+
MEM_freeN(ale);
}
@@ -631,6 +708,7 @@ void graph_buttons_register(ARegionType *art)
strcpy(pt->idname, "GRAPH_PT_view");
strcpy(pt->label, "View Properties");
pt->draw= graph_panel_view;
+ pt->flag |= PNL_DEFAULT_CLOSED;
BLI_addtail(&art->paneltypes, pt);
pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
@@ -639,6 +717,14 @@ void graph_buttons_register(ARegionType *art)
pt->draw= graph_panel_properties;
pt->poll= graph_panel_poll;
BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel properties");
+ strcpy(pt->idname, "GRAPH_PT_key_properties");
+ strcpy(pt->label, "Active Keyframe");
+ pt->draw= graph_panel_key_properties;
+ pt->poll= graph_panel_poll;
+ BLI_addtail(&art->paneltypes, pt);
+
pt= MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers");
strcpy(pt->idname, "GRAPH_PT_drivers");
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index c762912b297..9322bae13c9 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -86,7 +86,7 @@ void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, flo
int filter;
/* get data to filter, from Dopesheet */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* set large values to try to override */
@@ -258,7 +258,7 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end)
}
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
@@ -417,7 +417,7 @@ static void insert_graph_keys(bAnimContext *ac, short mode)
short flag = 0;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
if (mode == 2) filter |= ANIMFILTER_SEL;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -456,8 +456,6 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op)
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- if (ac.datatype == ANIMCONT_GPENCIL)
- return OPERATOR_CANCELLED;
/* which channels to affect? */
mode= RNA_enum_get(op->ptr, "type");
@@ -599,7 +597,7 @@ static short copy_graph_keys (bAnimContext *ac)
free_anim_copybuf();
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* copy keyframes */
@@ -617,7 +615,7 @@ static short paste_graph_keys (bAnimContext *ac)
int filter, ok=0;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* paste keyframes */
@@ -713,7 +711,7 @@ static void duplicate_graph_keys (bAnimContext *ac)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
@@ -785,7 +783,7 @@ static void delete_graph_keys (bAnimContext *ac)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and delete selected keys */
@@ -852,7 +850,7 @@ static void clean_graph_keys (bAnimContext *ac, float thresh)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and clean curves */
@@ -919,7 +917,7 @@ static void bake_graph_curves (bAnimContext *ac, int start, int end)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
@@ -1066,7 +1064,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
end = CFRA + sbi.length - 1;
/* filter anim channels */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through all selected F-Curves, replacing its data with the sound samples */
@@ -1144,7 +1142,7 @@ static void sample_graph_keys (bAnimContext *ac)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
@@ -1213,7 +1211,7 @@ static void setexpo_graph_keys(bAnimContext *ac, short mode)
int filter;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting mode per F-Curve */
@@ -1282,7 +1280,7 @@ static void setipo_graph_keys(bAnimContext *ac, short mode)
KeyframeEditFunc set_cb= ANIM_editkeyframes_ipo(mode);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting BezTriple interpolation
@@ -1364,7 +1362,7 @@ static void sethandles_graph_keys(bAnimContext *ac, short mode)
KeyframeEditFunc sel_cb= ANIM_editkeyframes_ok(BEZT_OK_SELECTED);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through setting flags for handles
@@ -1475,7 +1473,7 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
*/
/* step 1: extract only the rotation f-curves */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_FOREDIT);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -1554,7 +1552,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *op)
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop over action data, averaging values */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -1632,7 +1630,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
KeyframeEditFunc edit_cb;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing callbacks */
@@ -1770,7 +1768,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
}
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* mirror keyframes */
@@ -1854,7 +1852,7 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* smooth keyframes */
@@ -1945,7 +1943,7 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
type= RNA_enum_get(op->ptr, "type");
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
if (RNA_boolean_get(op->ptr, "only_active"))
filter |= ANIMFILTER_ACTIVE;
else
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 9c898cf1cd7..f347bfea290 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -95,7 +95,7 @@ static void deselect_graph_keys (bAnimContext *ac, short test, short sel)
KeyframeEditFunc test_cb, sel_cb;
/* determine type-based settings */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
/* filter data */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -213,7 +213,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_CURVEVISIBLE);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* get beztriple editing/validation funcs */
@@ -402,7 +402,7 @@ static void markers_selectkeys_between (bAnimContext *ac)
ked.f2= max;
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys in-between */
@@ -442,7 +442,7 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
/* build list of columns */
switch (mode) {
case GRAPHKEYS_COLUMNSEL_KEYS: /* list of selected keys */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next)
@@ -474,7 +474,7 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
/* loop through all of the keys and select additional keyframes
* based on the keys found to be selected above
*/
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -561,7 +561,7 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -616,7 +616,7 @@ static void select_moreless_graph_keys (bAnimContext *ac, short mode)
memset(&ked, 0, sizeof(KeyframeEditData));
/* loop through all of the keys and select additional keyframes based on these */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -834,7 +834,7 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, int mval[2], ListBa
* - if the option to only show keyframes that belong to selected F-Curves is enabled,
* include the 'only selected' flag...
*/
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
if (sipo->flag & SIPO_SELCUVERTSONLY) // FIXME: this should really be check for by the filtering code...
filter |= ANIMFILTER_SEL;
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -1055,7 +1055,7 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s
/* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */
if (nvi->fcu->flag & FCURVE_SELECTED) {
- int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nvi->fcu, ANIMTYPE_FCURVE);
}
}
@@ -1107,7 +1107,7 @@ static void graphkeys_mselect_leftright (bAnimContext *ac, short leftright, shor
}
/* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* select keys on the side where most data occurs */
@@ -1180,7 +1180,7 @@ static void graphkeys_mselect_column (bAnimContext *ac, int mval[2], short selec
/* loop through all of the keys and select additional keyframes
* based on the keys found to be selected above
*/
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 2c66cb51fba..e7cee30f374 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -521,7 +521,7 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
* - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
* mismatch between channel-colors and the drawn curves
*/
- filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY|ANIMFILTER_NODUPLIS);
items= ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop over F-Curves, assigning colors */
diff --git a/source/blender/editors/space_image/Makefile b/source/blender/editors/space_image/Makefile
index af15b1d9724..4f532166bc7 100644
--- a/source/blender/editors/space_image/Makefile
+++ b/source/blender/editors/space_image/Makefile
@@ -57,3 +57,7 @@ ifeq ($(WITH_OPENEXR), true)
CPPFLAGS += -DWITH_OPENEXR
endif
+ifeq ($(WHITH_TIFF), true)
+ CPPFLAGS += -DWITH_TIFF
+endif
+
diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript
index dd43559645d..b38e1473a0c 100644
--- a/source/blender/editors/space_image/SConscript
+++ b/source/blender/editors/space_image/SConscript
@@ -13,6 +13,8 @@ if env['WITH_BF_LCMS']:
defs.append('WITH_LCMS')
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
+if env['WITH_BF_TIFF']:
+ defs.append('WITH_TIFF')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 1241dbd9f4e..64d24ed578a 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -637,8 +637,9 @@ static const EnumPropertyItem image_file_type_items[] = {
{R_JP2, "JPEG_2000", 0, "Jpeg 2000", ""},
#endif
{R_IRIS, "IRIS", 0, "Iris", ""},
- //if(G.have_libtiff)
+#ifdef WITH_TIFF
{R_TIFF, "TIFF", 0, "Tiff", ""},
+#endif
{R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""},
{R_CINEON, "CINEON", 0, "Cineon", ""},
{R_DPX, "DPX", 0, "DPX", ""},
@@ -1155,7 +1156,6 @@ static int reload_exec(bContext *C, wmOperator *op)
BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_RELOAD);
WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima);
- ED_area_tag_redraw(CTX_wm_area(C));
return OPERATOR_FINISHED;
}
@@ -1168,7 +1168,6 @@ void IMAGE_OT_reload(wmOperatorType *ot)
/* api callbacks */
ot->exec= reload_exec;
- ot->poll= space_image_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index f9310909f2c..69fd740d288 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -3221,9 +3221,14 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr)
bArmatureSensor *as = (bArmatureSensor *) sens->data;
Object *ob = (Object *)ptr->id.data;
PointerRNA pose_ptr, pchan_ptr;
- PropertyRNA *bones_prop;
+ PropertyRNA *bones_prop= NULL;
uiLayout *row;
+ if(ob->type != OB_ARMATURE){
+ uiItemL(layout, "Sensor only available for armatures", 0);
+ return;
+ }
+
if (ob->pose) {
RNA_pointer_create((ID *)ob, &RNA_Pose, ob->pose, &pose_ptr);
bones_prop = RNA_struct_find_property(&pose_ptr, "bones");
@@ -3588,6 +3593,10 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr)
PointerRNA settings_ptr;
uiLayout *row;
+ if(ob->type != OB_ARMATURE){
+ uiItemL(layout, "Actuator only available for armatures", 0);
+ return;
+ }
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
row= uiLayoutRow(layout, 0);
@@ -3623,6 +3632,11 @@ static void draw_actuator_armature(uiLayout *layout, PointerRNA *ptr)
Object *ob = (Object *)ptr->id.data;
PointerRNA pose_ptr, pchan_ptr;
PropertyRNA *bones_prop;
+
+ if(ob->type != OB_ARMATURE){
+ uiItemL(layout, "Actuator only available for armatures", 0);
+ return;
+ }
if (ob->pose) {
RNA_pointer_create((ID *)ob, &RNA_Pose, ob->pose, &pose_ptr);
@@ -3782,6 +3796,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr)
static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
{
+ Object *ob = (Object *)ptr->id.data;
uiLayout *row, *split, *subsplit;
uiItemR(layout, ptr, "mode", 0, NULL, 0);
@@ -3805,6 +3820,10 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
case ACT_EDOB_END_OBJECT:
break;
case ACT_EDOB_REPLACE_MESH:
+ if(ob->type != OB_MESH) {
+ uiItemL(layout, "Mode only available for mesh objects", 0);
+ break;
+ }
split = uiLayoutSplit(layout, 0.6, 0);
uiItemR(split, ptr, "mesh", 0, NULL, 0);
row = uiLayoutRow(split, 0);
@@ -3819,6 +3838,10 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
uiItemR(subsplit, ptr, "enable_3d_tracking", UI_ITEM_R_TOGGLE, NULL, 0);
break;
case ACT_EDOB_DYNAMICS:
+ if(ob->type != OB_MESH) {
+ uiItemL(layout, "Mode only available for mesh objects", 0);
+ break;
+ }
uiItemR(layout, ptr, "dynamic_operation", 0, NULL, 0);
if (RNA_enum_get(ptr, "dynamic_operation") == ACT_EDOB_SET_MASS)
uiItemR(layout, ptr, "mass", 0, NULL, 0);
@@ -4144,6 +4167,11 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr)
PointerRNA settings_ptr;
uiLayout *row;
+ if(ob->type != OB_MESH){
+ uiItemL(layout, "Actuator only available for mesh objects", 0);
+ return;
+ }
+
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
row= uiLayoutRow(layout, 0);
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 89eff3beb0c..ed3d956ce01 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -182,6 +182,7 @@ void logic_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "LOGIC_OT_properties", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "LOGIC_OT_links_cut", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_menu(keymap, "LOGIC_MT_logicbricks_add", AKEY, KM_PRESS, KM_SHIFT, 0);
}
static void logic_refresh(const bContext *C, ScrArea *sa)
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index b76d90bd0f9..1416e0afdc9 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -70,7 +70,7 @@ static short selmodes_to_flagmodes (short sel)
break;
case SELECT_INVERT:
- return ACHANNEL_SETFLAG_TOGGLE;
+ return ACHANNEL_SETFLAG_INVERT;
break;
case SELECT_ADD:
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 164ca6c21b0..9deb0ba4a0a 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1650,10 +1650,10 @@ static int sequencer_cut_invoke(bContext *C, wmOperator *op, wmEvent *event)
Scene *scene = CTX_data_scene(C);
ARegion *ar= CTX_wm_region(C);
View2D *v2d= UI_view2d_fromcontext(C);
-
- int cut_side, cut_frame;
-
- cut_frame= CFRA;
+
+ int cut_side= SEQ_SIDE_BOTH;
+ int cut_frame= CFRA;
+
if (ED_operator_sequencer_active(C) && v2d)
cut_side= mouse_frame_side(v2d, event->x - ar->winrct.xmin, cut_frame);
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index 0a8f19493fa..1bc51de4471 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -199,6 +199,21 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar,
glVertex3fv(mpv->co);
glEnd();
+ /* Draw big green dot where the current frame is */
+ // NOTE: only do this when drawing keyframes for now...
+ if (avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) {
+ UI_ThemeColor(TH_CFRAME);
+ glPointSize(6.0f);
+
+ glBegin(GL_POINTS);
+ mpv = mpv_start + (CFRA - sfra);
+ glVertex3fv(mpv->co);
+ glEnd();
+
+ glPointSize(1.0f);
+ UI_ThemeColor(TH_TEXT_HI);
+ }
+
/* Draw frame numbers at each framestep value */
if (avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) {
for (i=0, mpv=mpv_start; i < len; i+=stepsize, mpv+=stepsize) {
@@ -220,9 +235,9 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar,
}
}
}
-
+
/* Keyframes - dots and numbers */
- if (avs->path_viewflag & MOTIONPATH_VIEW_KFNOS) {
+ if (avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) {
AnimData *adt= BKE_animdata_from_id(&ob->id);
DLRBT_Tree keys;
@@ -230,8 +245,10 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar,
BLI_dlrbTree_init(&keys);
if (adt) {
- /* for now, it is assumed that keyframes for bones are all grouped in a single group */
- if (pchan) {
+ /* it is assumed that keyframes for bones are all grouped in a single group
+ * unless an option is set to always use the whole action
+ */
+ if ((pchan) && (avs->path_viewflag & MOTIONPATH_VIEW_KFACT)==0) {
bActionGroup *agrp= action_groups_find_named(adt->action, pchan->name);
if (agrp) {
@@ -261,7 +278,7 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar,
glPointSize(1.0f);
/* Draw frame numbers of keyframes */
- if (avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) {
+ if (avs->path_viewflag & MOTIONPATH_VIEW_KFNOS) {
for (i=0, mpv=mpv_start; i < len; i++, mpv++) {
float mframe= (float)(sfra + i);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 70f20df507b..7c0ccfa770c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -30,10 +30,6 @@
#include "MEM_guardedalloc.h"
-
-
-
-
#include "DNA_camera_types.h"
#include "DNA_curve_types.h"
#include "DNA_constraint_types.h" // for drawing constraint
@@ -2488,7 +2484,8 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
if (ob==OBACT && paint_facesel_test(ob)) draw_wire = 0;
if(dt==OB_BOUNDBOX) {
- draw_bounding_volume(scene, ob);
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ draw_bounding_volume(scene, ob);
}
else if(hasHaloMat || (totface==0 && totedge==0)) {
glPointSize(1.5);
@@ -2714,8 +2711,9 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glDepthMask(0); // disable write in zbuffer, selected edge wires show better
}
- dm->drawEdges(dm, (dt==OB_WIRE || totface==0), 0);
-
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_SOLID)==0)
+ dm->drawEdges(dm, (dt==OB_WIRE || totface==0), 0);
+
if (dt!=OB_WIRE && draw_wire==2) {
glDepthMask(1);
bglPolygonOffset(rv3d->dist, 0.0);
@@ -3082,7 +3080,8 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B
glDisable(GL_LIGHTING);
GPU_end_object_materials();
} else {
- drawCurveDMWired (ob);
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_SOLID)==0)
+ drawCurveDMWired (ob);
}
return 0;
@@ -5839,8 +5838,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
set_inverted_drawing(0);
}
}
- else if(dt==OB_BOUNDBOX)
- draw_bounding_volume(scene, ob);
+ else if(dt==OB_BOUNDBOX) {
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ draw_bounding_volume(scene, ob);
+ }
else if(boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb))
empty_object= drawDispList(scene, v3d, rv3d, base, dt);
@@ -5852,8 +5853,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(cu->editnurb) {
drawnurb(scene, v3d, rv3d, base, cu->editnurb->first, dt);
}
- else if(dt==OB_BOUNDBOX)
- draw_bounding_volume(scene, ob);
+ else if(dt==OB_BOUNDBOX) {
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ draw_bounding_volume(scene, ob);
+ }
else if(boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
empty_object= drawDispList(scene, v3d, rv3d, base, dt);
@@ -5867,8 +5870,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(mb->editelems)
drawmball(scene, v3d, rv3d, base, dt);
- else if(dt==OB_BOUNDBOX)
- draw_bounding_volume(scene, ob);
+ else if(dt==OB_BOUNDBOX) {
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ draw_bounding_volume(scene, ob);
+ }
else
empty_object= drawmball(scene, v3d, rv3d, base, dt);
break;
@@ -5905,7 +5910,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
}
- if((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
if(ob->soft /*&& flag & OB_SBMOTION*/){
float mrt[3][3],msc[3][3],mtr[3][3];
@@ -6103,7 +6108,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(dtx & OB_AXIS) {
drawaxes(rv3d, rv3d->viewmatob, 1.0f, flag, OB_ARROWS);
}
- if(dtx & OB_BOUNDBOX) draw_bounding_volume(scene, ob);
+ if(dtx & OB_BOUNDBOX) {
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0)
+ draw_bounding_volume(scene, ob);
+ }
if(dtx & OB_TEXSPACE) drawtexspace(ob);
if(dtx & OB_DRAWNAME) {
/* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 9f9733bc80c..53fd0125329 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1965,7 +1965,10 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
/* set flags */
G.f |= G_RENDER_OGL;
- GPU_free_images();
+
+ /* free images which can have changed on frame-change
+ * warning! can be slow so only free animated images - campbell */
+ GPU_free_images_anim();
/* set background color, fallback on the view background color */
if(scene->world) {
@@ -2030,7 +2033,8 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
/* draw grease-pencil stuff - needed to get paint-buffer shown too (since it's 2D) */
draw_gpencil_view3d_ext(scene, ar, 0);
- GPU_free_images();
+ /* freeing the images again here could be done after the operator runs, leaving for now */
+ GPU_free_images_anim();
/* restore size */
ar->winx= bwinx;
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 6a661f18959..31ddc442cc2 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1719,7 +1719,8 @@ int ED_view3d_context_activate(bContext *C)
ARegion *ar;
RegionView3D *rv3d;
- if(sa->spacetype != SPACE_VIEW3D)
+ /* sa can be NULL when called from python */
+ if(sa==NULL || sa->spacetype != SPACE_VIEW3D)
for(sa=sc->areabase.first; sa; sa= sa->next)
if(sa->spacetype==SPACE_VIEW3D)
break;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 2002eb5a549..aab9f0d5d62 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -258,9 +258,8 @@ void projectFloatView(TransInfo *t, float *vec, float *adr)
void applyAspectRatio(TransInfo *t, float *vec)
{
- SpaceImage *sima= t->sa->spacedata.first;
-
if ((t->spacetype==SPACE_IMAGE) && (t->mode==TFM_TRANSLATION)) {
+ SpaceImage *sima= t->sa->spacedata.first;
float aspx, aspy;
if((sima->flag & SI_COORDFLOATS)==0) {
@@ -279,9 +278,8 @@ void applyAspectRatio(TransInfo *t, float *vec)
void removeAspectRatio(TransInfo *t, float *vec)
{
- SpaceImage *sima= t->sa->spacedata.first;
-
if ((t->spacetype==SPACE_IMAGE) && (t->mode==TFM_TRANSLATION)) {
+ SpaceImage *sima= t->sa->spacedata.first;
float aspx, aspy;
if((sima->flag & SI_COORDFLOATS)==0) {
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index d1b6838c517..499631ff755 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -3256,7 +3256,9 @@ static void createTransActionData(bContext *C, TransInfo *t)
/* Helper function for createTransGraphEditData, which is reponsible for associating
* source data with transform data
*/
-static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, BezTriple *bezt, int bi, short selected, short ishandle, short intvals)
+static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, BezTriple *bezt,
+ int bi, short selected, short ishandle, short intvals,
+ float mtx[3][3], float smtx[3][3])
{
float *loc = bezt->vec[bi];
float *cent = bezt->vec[1];
@@ -3326,8 +3328,9 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt,
if (intvals)
td->flag |= TD_INTVALUES;
- unit_m3(td->mtx);
- unit_m3(td->smtx);
+ /* copy space-conversion matrices for dealing with non-uniform scales */
+ copy_m3_m3(td->mtx, mtx);
+ copy_m3_m3(td->smtx, smtx);
}
static void createTransGraphEditData(bContext *C, TransInfo *t)
@@ -3348,6 +3351,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
BezTriple *bezt;
int count=0, i;
float cfra;
+ float mtx[3][3], smtx[3][3];
/* determine what type of data we are operating on */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -3387,7 +3391,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
/* F-Curve may not have any keyframes */
if (fcu->bezt == NULL)
continue;
-
+
/* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse */
for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
if (FrameOnMouseSide(t->frame_side, bezt->vec[1][0], cfra)) {
@@ -3409,7 +3413,8 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
if (bezt->f1 & SELECT) count++;
if (bezt->f3 & SELECT) count++;
}
- } else {
+ }
+ else {
/* for 'normal' pivots - just include anything that is selected */
if (bezt->f1 & SELECT) count++;
if (bezt->f2 & SELECT) count++;
@@ -3436,12 +3441,31 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
td= t->data;
td2d= t->data2d;
+ /* precompute space-conversion matrices for dealing with non-uniform scaling of Graph Editor */
+ unit_m3(mtx);
+ unit_m3(smtx);
+
+ if (ELEM(t->mode, TFM_ROTATION, TFM_RESIZE)) {
+ float xscale, yscale;
+
+ /* apply scale factors to x and y axes of space-conversion matrices */
+ UI_view2d_getscale(v2d, &xscale, &yscale);
+
+ /* mtx is data to global (i.e. view) conversion */
+ mul_v3_fl(mtx[0], xscale);
+ mul_v3_fl(mtx[1], yscale);
+
+ /* smtx is global (i.e. view) to data conversion */
+ if (IS_EQ(xscale, 0.0f) == 0) mul_v3_fl(smtx[0], 1.0f/xscale);
+ if (IS_EQ(yscale, 0.0f) == 0) mul_v3_fl(smtx[1], 1.0f/yscale);
+ }
+
/* loop 2: build transdata arrays */
for (ale= anim_data.first; ale; ale= ale->next) {
AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
FCurve *fcu= (FCurve *)ale->key_data;
short intvals= (fcu->flag & FCURVE_INT_VALUES);
-
+
/* convert current-frame to action-time (slightly less accurate, espcially under
* higher scaling ratios, but is faster than converting all points)
*/
@@ -3463,31 +3487,33 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
short h1=1, h2=1;
/* only include handles if selected, irrespective of the interpolation modes.
- also, only treat handles specially if the center point isn't selected. */
+ * also, only treat handles specially if the center point isn't selected.
+ */
if (!ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE) || !(bezt->f2 & SELECT)) {
if (bezt->f1 & SELECT) {
hdata = initTransDataCurveHandles(td, bezt);
- bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals);
- } else
+ bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals, mtx, smtx);
+ }
+ else
h1= 0;
-
+
if (bezt->f3 & SELECT) {
if (hdata==NULL)
hdata = initTransDataCurveHandles(td, bezt);
- bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals);
- } else
+ bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals, mtx, smtx);
+ }
+ else
h2= 0;
}
-
+
+ /* only include main vert if selected */
if (bezt->f2 & SELECT) {
- /*move handles relative to center*/
+ /* move handles relative to center */
if (ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE)) {
if (bezt->f1 & SELECT) td->flag |= TD_MOVEHANDLE1;
if (bezt->f3 & SELECT) td->flag |= TD_MOVEHANDLE2;
}
-
- /* only include main vert if selected */
-
+
/* if scaling around individuals centers, do not include keyframes */
if (sipo->around != V3D_LOCAL) {
/* if handles were not selected, store their selection status */
@@ -3496,7 +3522,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
hdata = initTransDataCurveHandles(td, bezt);
}
- bezt_to_transdata(td++, td2d++, adt, bezt, 1, 1, 0, intvals);
+ bezt_to_transdata(td++, td2d++, adt, bezt, 1, 1, 0, intvals, mtx, smtx);
}
/* special hack (must be done after initTransDataCurveHandles(), as that stores handle settings to restore...):
@@ -4473,7 +4499,7 @@ static void clear_trans_object_base_flags(TransInfo *t)
if(base->flag & BA_WAS_SEL)
base->flag |= SELECT;
- base->flag &= ~(BA_WAS_SEL|BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA|BA_DO_IPO|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT);
+ base->flag &= ~(BA_WAS_SEL|BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA|BA_TEMP_TAG|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT);
}
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 99793f4010a..58fc93de745 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -960,7 +960,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
{
t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation");
- if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C) - 1)
+ if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C))
{
t->current_orientation = V3D_MANIP_GLOBAL;
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index e9d372abfec..739aac86713 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -516,6 +516,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
case V3D_MANIP_GIMBAL:
unit_m3(t->spacemtx);
if (gimbal_axis(ob, t->spacemtx)) {
+ strcpy(t->spacename, "gimbal");
break;
}
/* no gimbal fallthrough to normal */