Commit: 8e97c6af0d8ba87a230cc647eb3709aa0f4d1f9c
Author: Julian Eisel
Date:   Sun Feb 12 21:27:43 2017 +0100
Branches: custom-manipulators
https://developer.blender.org/rB8e97c6af0d8ba87a230cc647eb3709aa0f4d1f9c

Merge branch 'blender2.8' into custom-manipulators

Conflicts:
        source/blender/blenkernel/intern/library_query.c
        source/blender/editors/include/ED_transform.h
        source/blender/editors/interface/resources.c
        source/blender/editors/transform/transform_manipulator.c

===================================================================



===================================================================

diff --cc source/blender/blenkernel/intern/library_query.c
index 048045ccb7,a071b3202b..ad89f3f005
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@@ -491,13 -534,12 +534,13 @@@ void BKE_library_foreach_ID_link(Main *
                                if (object->pose) {
                                        bPoseChannel *pchan;
  
-                                       data.cd_flag |= proxy_cd_flag;
+                                       data.cb_flag |= proxy_cb_flag;
                                        for (pchan = 
object->pose->chanbase.first; pchan; pchan = pchan->next) {
-                                               
CALLBACK_INVOKE(pchan->fmap_object, IDWALK_USER);
-                                               CALLBACK_INVOKE(pchan->custom, 
IDWALK_USER);
++                                              
CALLBACK_INVOKE(pchan->fmap_object, IDWALK_CB_USER);
+                                               CALLBACK_INVOKE(pchan->custom, 
IDWALK_CB_USER);
                                                
BKE_constraints_id_loop(&pchan->constraints, 
library_foreach_constraintObjectLooper, &data);
                                        }
-                                       data.cd_flag = data_cd_flag;
+                                       data.cb_flag = data_cb_flag;
                                }
  
                                if (object->rigidbody_constraint) {
diff --cc source/blender/editors/include/ED_armature.h
index 0cf1df4914,3bde01a1bd..ceaa378181
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@@ -37,10 -35,9 +37,10 @@@ extern "C" 
  #endif
  
  struct bArmature;
- struct Base;
+ struct BaseLegacy;
  struct bContext;
  struct Bone;
 +struct bPose;
  struct bPoseChannel;
  struct IDProperty;
  struct ListBase;
diff --cc source/blender/editors/include/ED_transform.h
index f432aec751,898eecd3e4..4fb82f6bb8
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@@ -113,13 -109,9 +113,13 @@@ enum TfmMode 
  bool calculateTransformCenter(struct bContext *C, int centerMode, float 
cent3d[3], float cent2d[2]);
  
  struct TransInfo;
 +struct ScrArea;
- struct Base;
+ struct BaseLegacy;
  struct Scene;
  struct Object;
 +struct wmManipulator;
 +struct wmManipulatorGroup;
 +struct wmManipulatorGroupType;
  struct wmOperator;
  
  /* UNUSED */
diff --cc source/blender/editors/interface/resources.c
index 846062fae4,fbfbdb13a5..3c14c8b97d
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@@ -2555,7 -2615,9 +2610,7 @@@ void init_userdef_do_versions(void
        
        if (!USER_VERSION_ATLEAST(269, 9)) {
                bTheme *btheme;
 -              
 -              U.tw_size = U.tw_size * 5.0f;
--              
++
                /* Action Editor (and NLA Editor) - Keyframe Colors */
                /* Graph Editor - larger vertex size defaults */
                for (btheme = U.themes.first; btheme; btheme = btheme->next) {
@@@ -2826,12 -2879,11 +2881,17 @@@
         * (keep this block even if it becomes empty).
         */
        {
-               bTheme *btheme;
-               for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+               for (bTheme *btheme = U.themes.first; btheme; btheme = 
btheme->next) {
+                       btheme->tcollections = btheme->tv3d;
+                       rgba_char_args_set_fl(btheme->tcollections.back,    
0.42, 0.42, 0.42, 1.0);
+                       rgba_char_args_set(btheme->tcollections.hilite, 255, 
140, 25, 255);  /* selected files */
+               }
++
++              for (bTheme *btheme = U.themes.first; btheme; btheme = 
btheme->next) {
 +                      rgba_char_args_set_fl(btheme->tui.xaxis, 1.0f, 0.27f, 
0.27f, 1.0f); /* red */
 +                      rgba_char_args_set_fl(btheme->tui.yaxis, 0.27f, 1.0f, 
0.27f, 1.0f); /* green */
 +                      rgba_char_args_set_fl(btheme->tui.zaxis, 0.27f, 0.27f, 
1.0f, 1.0f); /* blue */
 +              }
        }
  
        if (U.pixelsize == 0.0f)
diff --cc source/blender/editors/space_view3d/drawarmature.c
index 209a562f08,a7bff0a830..b25d145f6e
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@@ -1732,15 -1812,8 +1812,15 @@@ static void bone_matrix_translate_y(flo
        add_v3_v3(mat[3], trans);
  }
  
 +BLI_INLINE bool pchan_is_draw_fmap_only(const Scene *scene, const 
bPoseChannel *pchan)
 +{
 +      return ((scene->basact && scene->basact->object->mode & OB_MODE_POSE) &&
 +              (pchan->fmap != NULL) &&
 +              (pchan->bone->flag & BONE_DRAW_FMAP_ONLY));
 +}
 +
  /* assumes object is Armature with pose */
- static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base 
*base,
+ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, 
BaseLegacy *base,
                              const short dt, const unsigned char 
ob_wire_col[4],
                              const bool do_const_color, const bool is_outline)
  {
diff --cc source/blender/editors/space_view3d/view3d_draw.c
index 194d518d94,0427498bf4..e3d2cf5e49
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@@ -2103,12 -2098,42 +2105,42 @@@ static void view3d_draw_view(const bCon
  #endif
  }
  
+ static void view3d_render_pass(const bContext *C, ARegion *UNUSED(ar))
+ {
+       Scene *scene = CTX_data_scene(C);
+       RenderEngineType *type = RE_engines_find(scene->r.engine); /* In the 
future we should get that from Layers */
+ 
+       if (type->flag & RE_USE_OGL_PIPELINE) {
+               type->view_draw(NULL, C);
+       }
+       else {
+               // Offline Render engine
+       }
+ }
+ 
+ static void view3d_draw_view_new(const bContext *C, ARegion *ar, DrawData 
*UNUSED(draw_data))
+ {
+ 
+       view3d_draw_setup_view(C, ar);
+ 
+       /* Only 100% compliant on new spec goes bellow */
+       view3d_render_pass(C, ar);
+ 
+       view3d_draw_grid(C, ar);
 -      view3d_draw_manipulator(C);
++      view3d_draw_manipulators(C, ar);
+       view3d_draw_region_info(C, ar);
+ }
+ 
+ 
  void view3d_main_region_draw(const bContext *C, ARegion *ar)
  {
+       Scene *scene = CTX_data_scene(C);
        View3D *v3d = CTX_wm_view3d(C);
        RegionView3D *rv3d = ar->regiondata;
+       /* TODO layers - In the future we should get RE from Layers */
+       RenderEngineType *type = RE_engines_find(scene->r.engine);
  
-       if (IS_VIEWPORT_LEGACY(v3d)) {
+       if (IS_VIEWPORT_LEGACY(v3d) && ((type->flag & RE_USE_OGL_PIPELINE) == 
0)) {
                view3d_main_region_draw_legacy(C, ar);
                return;
        }
diff --cc source/blender/editors/transform/transform_manipulator.c
index 56e75424fc,33f065b436..e0cd474ea9
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@@ -595,9 -268,10 +595,10 @@@ bool gimbal_axis(Object *ob, float gmat
  /* returns total items selected */
  static int calc_manipulator_stats(const bContext *C)
  {
 -      ScrArea *sa = CTX_wm_area(C);
 -      ARegion *ar = CTX_wm_region(C);
 +      const ScrArea *sa = CTX_wm_area(C);
 +      const ARegion *ar = CTX_wm_region(C);
        Scene *scene = CTX_data_scene(C);
+       SceneLayer *sl = CTX_data_scene_layer(C);
        Object *obedit = CTX_data_edit_object(C);
        View3D *v3d = sa->spacedata.first;
        RegionView3D *rv3d = ar->regiondata;
@@@ -882,18 -561,43 +883,18 @@@
        else if (ob && (ob->mode & OB_MODE_ALL_PAINT)) {
                /* pass */
        }
 -      else if (ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
 -              PTCacheEdit *edit = PE_get_current(scene, ob);
 -              PTCacheEditPoint *point;
 -              PTCacheEditKey *ek;
 -              int k;
 -
 -              if (edit) {
 -                      point = edit->points;
 -                      for (a = 0; a < edit->totpoint; a++, point++) {
 -                              if (point->flag & PEP_HIDE) continue;
 -
 -                              for (k = 0, ek = point->keys; k < 
point->totkey; k++, ek++) {
 -                                      if (ek->flag & PEK_SELECT) {
 -                                              calc_tw_center(scene, (ek->flag 
& PEK_USE_WCO) ? ek->world_co : ek->co);
 -                                              totsel++;
 -                                      }
 -                              }
 -                      }
 -
 -                      /* selection center */
 -                      if (totsel)
 -                              mul_v3_fl(scene->twcent, 1.0f / (float)totsel); 
 // centroid!
 -              }
 -      }
        else {
 -
                /* we need the one selected object, if its not active */
-               ob = OBACT;
-               if (ob && !(ob->flag & SELECT))
-                       ob = NULL;
+               base = BASACT_NEW;
+               ob = OBACT_NEW;
+               if (base && ((base->flag & BASE_SELECTED) == 0)) ob = NULL;
  
-               for (base = scene->base.first; base; base = base->next) {
-                       if (TESTBASELIB(v3d, base)) {
+               for (base = sl->object_bases.first; base; base = base->next) {
+                       if (TESTBASELIB_NEW(base)) {
                                if (ob == NULL)
                                        ob = base->object;
 -                              calc_tw_center(scene, base->object->obmat[3]);
 -                              
protectflag_to_drawflags(base->object->protectflag, &rv3d->twdrawflag);
 +
 +                              calc_tw_center(scene, base->object->loc);
                                totsel++;
                        }
                }
diff --cc source/blender/makesrna/intern/rna_object.c
index 468161c4a6,f8b3bdd62e..03564f48d5
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@@ -3180,9 -2923,8 +3166,9 @@@ void RNA_def_object(BlenderRNA *brna
  
        RNA_define_animate_sdna(false);
        rna_def_object_game_settings(brna);
-       rna_def_object_base(brna);
+       rna_def_object_base_legacy(brna);
        rna_def_vertex_group(brna);
 +      rna_def_face_map(brna);
        rna_def_material_slot(brna);
        rna_def_dupli_object(brna);
        RNA_define_animate_sdna(true);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to