svn merge ^/trunk/blender -r49241:49244
authorCampbell Barton <ideasman42@gmail.com>
Thu, 26 Jul 2012 10:55:07 +0000 (10:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 26 Jul 2012 10:55:07 +0000 (10:55 +0000)
source/blender/blenkernel/BKE_blender.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/resources.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c

index 48c7103d8fd50ddebca3e4f59ebdab7d3113ef60..8476791a3201e0ad7c39923f3239eecff3943419 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         263
-#define BLENDER_SUBVERSION      14
+#define BLENDER_SUBVERSION      15
 
 #define BLENDER_MINVERSION      250
 #define BLENDER_MINSUBVERSION   0
index 51df30d6c285b120fb324f3308d2eef70b05a6cf..e879a01dbfb004b6212d01ff238d8f5391323af0 100644 (file)
@@ -127,6 +127,7 @@ enum {
        
        TH_BONE_SOLID,
        TH_BONE_POSE,
+       TH_BONE_POSE_ACTIVE,
        
        TH_STRIP,
        TH_STRIP_SELECT,
index bdf4d77993ab2ac928899fd460d236120ffcf83b..062239375af3bb20d1202ad8fcf4d0f88843800f 100644 (file)
@@ -303,6 +303,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
                                        cp = ts->bone_solid; break;
                                case TH_BONE_POSE:
                                        cp = ts->bone_pose; break;
+                               case TH_BONE_POSE_ACTIVE:
+                                       cp = ts->bone_pose_active; break;
                                case TH_STRIP:
                                        cp = ts->strip; break;
                                case TH_STRIP_SELECT:
@@ -739,6 +741,7 @@ void ui_theme_init_default(void)
        rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255);
        /* alpha 80 is not meant editable, used for wire+action draw */
        rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80);
+       rgba_char_args_set(btheme->tv3d.bone_pose_active, 140, 255, 255, 80);
 
        rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
        rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
@@ -1914,6 +1917,13 @@ void init_userdef_do_versions(void)
                }
        }
 
+       if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 15)) {
+               bTheme *btheme;
+               for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+                       rgba_char_args_set(btheme->tv3d.bone_pose_active, 140, 255, 255, 80);
+               }
+       }
+
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {
                U.texcollectrate = 60;
index 48b3672c144da0469cce1e4e7f9f0445174d7c5d..a05bc5eddc7790a17590b0c066acf1aa973464c9 100644 (file)
@@ -171,7 +171,7 @@ static short set_pchan_glColor(short colCode, int boneflag, short constflag)
                        }
                        else {
                                if ((boneflag & BONE_DRAW_ACTIVE) && (boneflag & BONE_SELECTED)) {
-                                       UI_ThemeColorShade(TH_BONE_POSE, 40);
+                                       UI_ThemeColor(TH_BONE_POSE_ACTIVE);
                                }
                                else if (boneflag & BONE_DRAW_ACTIVE) {
                                        UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */
index c7846b3935bc0b7a3c7a9d5ab74179874a893bef..8962174ffe2cb043eabac955095bcc962db36f3c 100644 (file)
@@ -73,6 +73,7 @@
 #include "BKE_context.h"
 #include "BKE_tessmesh.h"
 #include "BKE_tracking.h"
+#include "BKE_mask.h"
 
 #include "ED_anim_api.h"
 #include "ED_armature.h"
@@ -1449,8 +1450,26 @@ void calculateCenterCursor2D(TransInfo *t)
        }
        
        if (cursor) {
-               t->center[0] = cursor[0] * aspx;
-               t->center[1] = cursor[1] * aspy;
+               if (t->options & CTX_MASK) {
+                       float co[2];
+                       int width, height;
+                       float frame_size[2];
+                       SpaceImage *sima = (SpaceImage *)t->sa->spacedata.first;
+                       ED_space_image_get_size(sima, &width, &height);
+                       frame_size[0] = width;
+                       frame_size[1] = height;
+
+                       BKE_mask_coord_from_frame(co, cursor, frame_size);
+
+                       ED_space_image_get_aspect(sima, &aspx, &aspy);
+
+                       t->center[0] = co[0] * aspx;
+                       t->center[1] = co[1] * aspy;
+               }
+               else {
+                       t->center[0] = cursor[0] * aspx;
+                       t->center[1] = cursor[1] * aspy;
+               }
        }
        
        calculateCenter2D(t);
index 0f4f03e5b7170d877b169a43f3ee6df11391d155..eea316920d30b0b8199153663c520984afa68518 100644 (file)
@@ -3380,14 +3380,11 @@ static void UV_OT_reveal(wmOperatorType *ot)
 static int set_2d_cursor_exec(bContext *C, wmOperator *op)
 {
        SpaceImage *sima = CTX_wm_space_image(C);
-       float location[2];
 
        if (!sima)
                return OPERATOR_CANCELLED;
 
-       RNA_float_get_array(op->ptr, "location", location);
-       sima->cursor[0] = location[0];
-       sima->cursor[1] = location[1];
+       RNA_float_get_array(op->ptr, "location", sima->cursor);
        
        WM_event_add_notifier(C, NC_SPACE | ND_SPACE_IMAGE, NULL);
        
index 4e9ec0da0926b63538bcf424c7a7cadb0e80a5ca..7f52956d1e0191e36eb91ef9e4d4c411b369cea2 100644 (file)
@@ -215,7 +215,7 @@ typedef struct ThemeSpace {
        char extra_edge_len[4], extra_face_angle[4], extra_face_area[4], pad3[4];
        char normal[4];
        char vertex_normal[4];
-       char bone_solid[4], bone_pose[4];
+       char bone_solid[4], bone_pose[4], bone_pose_active[4];
        char strip[4], strip_select[4];
        char cframe[4];
        
@@ -264,8 +264,6 @@ typedef struct ThemeSpace {
 
        char skin_root[4]; /* Skin modifier root color */
        
-       int pad4;
-       
        /* NLA */
        char anim_active[4];     /* Active Action + Summary Channel */
        char anim_non_active[4]; /* Active Action = NULL */
index b2c4f9efd24852d712fed59406ace3d0b5d73a54..df98be71cfe89cc6db676325248dd4ecf3b0f9a9 100644 (file)
@@ -2045,7 +2045,7 @@ static void rna_def_space_image(BlenderRNA *brna)
        RNA_def_property_enum_sdna(prop, NULL, "mode");
        RNA_def_property_enum_items(prop, image_space_mode_items);
        RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceImageEditor_mode_update");
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update");
 
        /* grease pencil */
        prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
index 53a8616cb85f15e27deaf6c7f11d2e80e2f102de..03fd144f7dd47c591451d7f2cfa880514830da68 100644 (file)
@@ -1183,6 +1183,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Bone Pose", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
 
+       prop = RNA_def_property(srna, "bone_pose_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Bone Pose Active", "");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+
        prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
        RNA_def_property_float_sdna(prop, NULL, "cframe");
        RNA_def_property_array(prop, 3);