[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34421] trunk/blender/source/blender/ editors/transform/transform_conversions.c: Small code reshuffle...
Joshua Leung
aligorith at gmail.com
Thu Jan 20 21:51:39 CET 2011
Revision: 34421
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34421
Author: aligorith
Date: 2011-01-20 20:51:38 +0000 (Thu, 20 Jan 2011)
Log Message:
-----------
Small code reshuffle... sequencer transform stuff was bisecting the
code for object transform stuff
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform_conversions.c
Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c 2011-01-20 20:24:18 UTC (rev 34420)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2011-01-20 20:51:38 UTC (rev 34421)
@@ -3821,48 +3821,8 @@
}
}
-/* *************************** Object Transform data ******************* */
+/* ******************* Sequencer 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;
-}
-
-
/* This function applies the rules for transforming a strip so duplicate
* checks dont need to be added in multiple places.
*
@@ -4267,6 +4227,47 @@
}
+/* *********************** 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)
{
More information about the Bf-blender-cvs
mailing list