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:
authorJoshua Leung <aligorith@gmail.com>2011-01-20 23:51:38 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-20 23:51:38 +0300
commitdc2431c4919e23ba071f2c4582e533759a580d49 (patch)
tree9963e2b8fbfbccc2e195b0771fb16f596f72e8b9 /source/blender/editors/transform/transform_conversions.c
parent44fbbe7c5588dfa792b798dea30d16ee3830bf24 (diff)
Small code reshuffle... sequencer transform stuff was bisecting the
code for object transform stuff
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r--source/blender/editors/transform/transform_conversions.c83
1 files changed, 42 insertions, 41 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 196b6af84fe..03b03d211d9 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -3821,47 +3821,7 @@ void flushTransGraphData(TransInfo *t)
}
}
-/* *************************** Object Transform data ******************* */
-
-/* Little helper function for ObjectToTransData used to give certain
- * constraints (ChildOf, FollowPath, and others that may be added)
- * inverse corrections for transform, so that they aren't in CrazySpace.
- * These particular constraints benefit from this, but others don't, hence
- * this semi-hack ;-) - Aligorith
- */
-static short constraints_list_needinv(TransInfo *t, ListBase *list)
-{
- bConstraint *con;
-
- /* loop through constraints, checking if there's one of the mentioned
- * constraints needing special crazyspace corrections
- */
- if (list) {
- for (con= list->first; con; con=con->next) {
- /* only consider constraint if it is enabled, and has influence on result */
- if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0)) {
- /* (affirmative) returns for specific constraints here... */
- /* constraints that require this regardless */
- if (con->type == CONSTRAINT_TYPE_CHILDOF) return 1;
- if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) return 1;
- if (con->type == CONSTRAINT_TYPE_CLAMPTO) return 1;
-
- /* constraints that require this only under special conditions */
- if (con->type == CONSTRAINT_TYPE_ROTLIKE) {
- /* CopyRot constraint only does this when rotating, and offset is on */
- bRotateLikeConstraint *data = (bRotateLikeConstraint *)con->data;
-
- if ((data->flag & ROTLIKE_OFFSET) && (t->mode == TFM_ROTATION))
- return 1;
- }
- }
- }
- }
-
- /* no appropriate candidates found */
- return 0;
-}
-
+/* ******************* Sequencer Transform data ******************* */
/* This function applies the rules for transforming a strip so duplicate
* checks dont need to be added in multiple places.
@@ -4267,6 +4227,47 @@ static void createTransSeqData(bContext *C, TransInfo *t)
}
+/* *********************** Object Transform data ******************* */
+
+/* Little helper function for ObjectToTransData used to give certain
+ * constraints (ChildOf, FollowPath, and others that may be added)
+ * inverse corrections for transform, so that they aren't in CrazySpace.
+ * These particular constraints benefit from this, but others don't, hence
+ * this semi-hack ;-) - Aligorith
+ */
+static short constraints_list_needinv(TransInfo *t, ListBase *list)
+{
+ bConstraint *con;
+
+ /* loop through constraints, checking if there's one of the mentioned
+ * constraints needing special crazyspace corrections
+ */
+ if (list) {
+ for (con= list->first; con; con=con->next) {
+ /* only consider constraint if it is enabled, and has influence on result */
+ if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0)) {
+ /* (affirmative) returns for specific constraints here... */
+ /* constraints that require this regardless */
+ if (con->type == CONSTRAINT_TYPE_CHILDOF) return 1;
+ if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) return 1;
+ if (con->type == CONSTRAINT_TYPE_CLAMPTO) return 1;
+
+ /* constraints that require this only under special conditions */
+ if (con->type == CONSTRAINT_TYPE_ROTLIKE) {
+ /* CopyRot constraint only does this when rotating, and offset is on */
+ bRotateLikeConstraint *data = (bRotateLikeConstraint *)con->data;
+
+ if ((data->flag & ROTLIKE_OFFSET) && (t->mode == TFM_ROTATION))
+ return 1;
+ }
+ }
+ }
+ }
+
+ /* no appropriate candidates found */
+ return 0;
+}
+
/* transcribe given object into TransData for Transforming */
static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
{