[Bf-blender-cvs] [a272a299dc5] temp-graph-select-changes: Fix incorrect use of use_handle option
Julian Eisel
noreply at git.blender.org
Fri Nov 15 17:07:37 CET 2019
Commit: a272a299dc5b86b4df84d9690146c96629ce774b
Author: Julian Eisel
Date: Thu Nov 14 17:26:40 2019 +0100
Branches: temp-graph-select-changes
https://developer.blender.org/rBa272a299dc5b86b4df84d9690146c96629ce774b
Fix incorrect use of use_handle option
===================================================================
M source/blender/editors/transform/transform_convert.c
M source/blender/editors/transform/transform_convert.h
M source/blender/editors/transform/transform_convert_graph.c
===================================================================
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index 16ab468c139..db8f36883f8 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -1265,7 +1265,7 @@ void remake_graph_transdata(TransInfo *t, ListBase *anim_data)
{
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
bAnimListElem *ale;
- const bool use_handle = IS_USE_HANDLE(sipo);
+ const bool use_handle = (sipo->flag & SIPO_NOHANDLES) == 0;
/* sort and reassign verts */
for (ale = anim_data->first; ale; ale = ale->next) {
@@ -2080,7 +2080,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
else if (t->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
bAnimContext ac;
- const bool use_handle = IS_USE_HANDLE(sipo);
+ const bool use_handle = (sipo->flag & SIPO_NOHANDLES) == 0;
/* initialize relevant anim-context 'context' data */
if (ANIM_animdata_get_context(C, &ac) == 0) {
diff --git a/source/blender/editors/transform/transform_convert.h b/source/blender/editors/transform/transform_convert.h
index 1fa91e06d56..53ff9952d05 100644
--- a/source/blender/editors/transform/transform_convert.h
+++ b/source/blender/editors/transform/transform_convert.h
@@ -35,16 +35,6 @@ struct bContext;
struct bKinematicConstraint;
struct bPoseChannel;
-/* Always transform handles with the key if this is defined. */
-#define USE_HANDLES_AS_CHILD
-/* If USE_HANDLES_AS_CHILD is enabled, we always use handles in transform code,
- * otherwise only if handles are visible (SIPO_NOHANDLES is not set). */
-#ifdef USE_HANDLES_AS_CHILD
-# define IS_USE_HANDLE(sipo) (UNUSED_VARS(sipo), true)
-#else
-# define IS_USE_HANDLE(sipo) (((sipo)->flag & SIPO_NOHANDLES) == 0)
-#endif
-
/* transform_convert.c */
int count_set_pose_transflags(Object *ob,
const int mode,
diff --git a/source/blender/editors/transform/transform_convert_graph.c b/source/blender/editors/transform/transform_convert_graph.c
index da9b24a3b01..f6f982e854a 100644
--- a/source/blender/editors/transform/transform_convert_graph.c
+++ b/source/blender/editors/transform/transform_convert_graph.c
@@ -241,7 +241,7 @@ void createTransGraphEditData(bContext *C, TransInfo *t)
BezTriple *bezt;
int count = 0, i;
float mtx[3][3], smtx[3][3];
- const bool use_handle = IS_USE_HANDLE(sipo);
+ const bool use_handle = !(sipo->flag & SIPO_NOHANDLES);
const bool use_local_center = graph_edit_use_local_center(t);
const bool is_prop_edit = (t->flag & T_PROP_EDIT) != 0;
short anim_map_flag = ANIM_UNITCONV_ONLYSEL | ANIM_UNITCONV_SELVERTS;
More information about the Bf-blender-cvs
mailing list