[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43737] trunk/blender: Action Constraint GUI - Refinements and Clarification

Dalai Felinto dfelinto at gmail.com
Fri Jan 27 03:11:05 CET 2012


Thanks Joshua!

The tracker is not working atm (some database slow down and timeout).
So if you are wondering about the follow up for that bug ...

 I got it working by changing space to Local Space (and using degrees in
the range) *. So the bug there seemed to be when using "world space" (it
seems that it has a 180 rotation difference between local and world,
although the object has rotation 0,0,0 and no parent).

Thanks again for the help, maybe a tooltip to suggest using degrees when
dealing with rotation may help other people too.

Dalai

* - in my case making it range from 0.0 to 57.296 (aka 1 radian) to match
the 0.0 to 1.0 range from the other transformation channels.

Dalai

2012/1/26 Joshua Leung <aligorith at gmail.com>

> Revision: 43737
>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43737
> Author:   aligorith
> Date:     2012-01-27 01:30:58 +0000 (Fri, 27 Jan 2012)
> Log Message:
> -----------
> Action Constraint GUI - Refinements and Clarification
>
> While looking at a bug report, I found that the current GUI for the Action
> Constraint actually didn't make sense, mixing up settings so that it wasn't
> clear which settings corresponded to which others. This commit cleans up
> the
> layout into a clearer two-column design to have a "from" -> "to" layout,
> making
> all the
> relationships between things clear.
>
> For more details see
> http://aligorith.blogspot.com/2012/01/action-constraint-
> gui-revised.html
>
> Modified Paths:
> --------------
>
>  trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
>    trunk/blender/source/blender/makesrna/intern/rna_constraint.c
>
> Modified:
> trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
> ===================================================================
> ---
> trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py 2012-01-26
> 19:45:59 UTC (rev 43736)
> +++
> trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py 2012-01-27
> 01:30:58 UTC (rev 43737)
> @@ -434,26 +434,29 @@
>     def ACTION(self, context, layout, con):
>         self.target_template(layout, con)
>
> -        layout.prop(con, "action")
> -
> -        layout.prop(con, "transform_channel")
> -
>         split = layout.split()
> -
> +
> +        col = split.column()
> +        col.label(text="From Target:")
> +        col.prop(con, "transform_channel", text="")
> +        col.prop(con, "target_space", text="")
> +
> +        col = split.column()
> +        col.label(text="To Action:")
> +        col.prop(con, "action", text="")
> +
> +        split = layout.split()
> +
>         col = split.column(align=True)
> -        col.label(text="Action Length:")
> -        col.prop(con, "frame_start", text="Start")
> -        col.prop(con, "frame_end", text="End")
> -
> -        col = split.column(align=True)
>         col.label(text="Target Range:")
>         col.prop(con, "min", text="Min")
>         col.prop(con, "max", text="Max")
> +
> +        col = split.column(align=True)
> +        col.label(text="Action Range:")
> +        col.prop(con, "frame_start", text="Start")
> +        col.prop(con, "frame_end", text="End")
>
> -        row = layout.row()
> -        row.label(text="Convert:")
> -        row.prop(con, "target_space", text="")
> -
>     def LOCKED_TRACK(self, context, layout, con):
>         self.target_template(layout, con)
>
>
> Modified: trunk/blender/source/blender/makesrna/intern/rna_constraint.c
> ===================================================================
> --- trunk/blender/source/blender/makesrna/intern/rna_constraint.c       2012-01-26
> 19:45:59 UTC (rev 43736)
> +++ trunk/blender/source/blender/makesrna/intern/rna_constraint.c       2012-01-27
> 01:30:58 UTC (rev 43737)
> @@ -1026,15 +1026,15 @@
>        PropertyRNA *prop;
>
>        static EnumPropertyItem transform_channel_items[] = {
> -               {20, "LOCATION_X", 0, "Location X", ""},
> -               {21, "LOCATION_Y", 0, "Location Y", ""},
> -               {22, "LOCATION_Z", 0, "Location Z", ""},
> -               {00, "ROTATION_X", 0, "Rotation X", ""},
> -               {01, "ROTATION_Y", 0, "Rotation Y", ""},
> -               {02, "ROTATION_Z", 0, "Rotation Z", ""},
> -               {10, "SCALE_X", 0, "Scale X", ""},
> -               {11, "SCALE_Y", 0, "Scale Y", ""},
> -               {12, "SCALE_Z", 0, "Scale Z", ""},
> +               {20, "LOCATION_X", 0, "X Location", ""},
> +               {21, "LOCATION_Y", 0, "Y Location", ""},
> +               {22, "LOCATION_Z", 0, "Z Location", ""},
> +               {00, "ROTATION_X", 0, "X Rotation", ""},
> +               {01, "ROTATION_Y", 0, "Y Rotation", ""},
> +               {02, "ROTATION_Z", 0, "Z Rotation", ""},
> +               {10, "SCALE_X", 0, "Z Scale", ""},
> +               {11, "SCALE_Y", 0, "Y Scale", ""},
> +               {12, "SCALE_Z", 0, "Z Scale", ""},
>                {0, NULL, 0, NULL, NULL}};
>
>        srna= RNA_def_struct(brna, "ActionConstraint", "Constraint");
> @@ -2011,12 +2011,12 @@
>        RNA_def_property_int_sdna(prop, NULL, "chainlen");
>        RNA_def_property_range(prop, 1, 255); // TODO: this should really
> check the max length of the chain the constraint is attached to
>        RNA_def_property_ui_text(prop, "Chain Length", "How many bones are
> included in the chain");
> -       RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT,
> "rna_Constraint_dependency_update");
> +       RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT,
> "rna_Constraint_dependency_update"); // XXX: this update goes wrong...
> needs extra flush?
>
>        /* direct access to bindings */
>        // NOTE: only to be used by experienced users
>        prop= RNA_def_property(srna, "joint_bindings", PROP_FLOAT,
> PROP_FACTOR);
> -       RNA_def_property_array(prop, 32); // XXX this is the maximum value
> allowed
> +       RNA_def_property_array(prop, 32); // XXX this is the maximum value
> allowed - why?
>        RNA_def_property_flag(prop, PROP_DYNAMIC);
>        RNA_def_property_dynamic_array_funcs(prop,
> "rna_SplineIKConstraint_joint_bindings_get_length");
>        RNA_def_property_float_funcs(prop,
> "rna_SplineIKConstraint_joint_bindings_get",
> "rna_SplineIKConstraint_joint_bindings_set", NULL);
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>


More information about the Bf-committers mailing list