Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 11 Oct 2016 10:09:59 +0000 (12:09 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 11 Oct 2016 10:09:59 +0000 (12:09 +0200)
1  2 
source/blender/makesrna/intern/rna_space.c

index d169720c02b84683c9fac5100287a4675cc1f03b,b6c393280ba012d3eae5bc05f67b1d52e78ba9b1..9eaff19770ae307e1b315dc60dd7d31d27a7b6ad
@@@ -206,6 -206,7 +206,6 @@@ static EnumPropertyItem buttons_context
        {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT_BONE, "Bone Constraints", "Bone constraints"},
        {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
        {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"},
 -      {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle"},
        {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"},
        {0, NULL, 0, NULL, NULL}
  };
@@@ -215,6 -216,7 +215,6 @@@ static EnumPropertyItem buttons_texture
        {SB_TEXC_MATERIAL, "MATERIAL", ICON_MATERIAL, "", "Show material textures"},
        {SB_TEXC_WORLD, "WORLD", ICON_WORLD, "", "Show world textures"},
        {SB_TEXC_LAMP, "LAMP", ICON_LAMP, "", "Show lamp textures"},
 -      {SB_TEXC_PARTICLES, "PARTICLES", ICON_PARTICLES, "", "Show particles textures"},
        {SB_TEXC_LINESTYLE, "LINESTYLE", ICON_LINE_DATA, "", "Show linestyle textures"},
        {SB_TEXC_OTHER, "OTHER", ICON_TEXTURE, "", "Show other data textures"},
        {0, NULL, 0, NULL, NULL}
@@@ -452,6 -454,15 +452,15 @@@ EnumPropertyItem *rna_TransformOrientat
  }
  
  /* Space 3D View */
+ static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+ {
+       View3D *v3d = (View3D *)(ptr->data);
+       if (v3d->scenelock) {
+               scene->camera = v3d->camera;
+               BKE_screen_view3d_main_sync(&bmain->screen, scene);
+       }
+ }
  static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, int value)
  {
        View3D *v3d = (View3D *)(ptr->data);
@@@ -1095,6 -1106,10 +1104,6 @@@ static EnumPropertyItem *rna_SpacePrope
                RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_TEXTURE);
        }
  
 -      if (sbuts->pathflag & (1 << BCONTEXT_PARTICLE)) {
 -              RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_PARTICLE);
 -      }
 -
        if (sbuts->pathflag & (1 << BCONTEXT_PHYSICS)) {
                RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_PHYSICS);
        }
@@@ -1138,6 -1153,10 +1147,6 @@@ static EnumPropertyItem *rna_SpacePrope
                RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_MATERIAL);
        }
  
 -      if (ED_texture_context_check_particles(C)) {
 -              RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_PARTICLES);
 -      }
 -
        if (ED_texture_context_check_linestyle(C)) {
                RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_LINESTYLE);
        }
@@@ -2358,7 -2377,7 +2367,7 @@@ static void rna_def_space_view3d(Blende
        RNA_def_property_pointer_sdna(prop, NULL, "camera");
        RNA_def_property_ui_text(prop, "Camera",
                                 "Active camera used in this view (when unlocked from the scene's active camera)");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_camera_update");
  
        /* render border */
        prop = RNA_def_property(srna, "use_render_border", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_ui_text(prop, "Volume Alpha", "Opacity (alpha) of the cameras' frustum volume");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
  
 +      /* *** Blender 2.8 Viewport temporary *** */
 +      prop = RNA_def_property(srna, "use_modern_viewport", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "tmp_compat_flag", V3D_NEW_VIEWPORT);
 +      RNA_def_property_ui_text(prop, "Modern Viewport", "Use modern viewport");
 +      RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 +
        /* *** Animated *** */
        RNA_define_animate_sdna(true);
        /* region */
@@@ -3669,6 -3682,11 +3678,6 @@@ static void rna_def_space_time(BlenderR
        RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL);
        
 -      prop = RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE);
 -      RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES);
 -      RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache");
 -      RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL);
 -      
        prop = RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH);
        RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache");
@@@ -3807,6 -3825,8 +3816,6 @@@ static void rna_def_fileselect_params(B
                {FILTER_ID_MSK, "MASK", ICON_MOD_MASK, "Masks", "Show/hide Mask data-blocks"},
                {FILTER_ID_NT, "NODE_TREE", ICON_NODETREE, "Node Trees", "Show/hide Node Tree data-blocks"},
                {FILTER_ID_OB, "OBJECT", ICON_OBJECT_DATA, "Objects", "Show/hide Object data-blocks"},
 -              {FILTER_ID_PA, "PARTICLE_SETTINGS", ICON_PARTICLE_DATA,
 -                             "Particles Settings", "Show/hide Particle Settings data-blocks"},
                {FILTER_ID_PAL, "PALETTE", ICON_COLOR, "Palettes", "Show/hide Palette data-blocks"},
                {FILTER_ID_PC, "PAINT_CURVE", ICON_CURVE_BEZCURVE, "Paint Curves", "Show/hide Paint Curve data-blocks"},
                {FILTER_ID_SCE, "SCENE", ICON_SCENE_DATA, "Scenes", "Show/hide Scene data-blocks"},
             "IMAGE", ICON_IMAGE_DATA, "Images & Sounds", "Show/hide images, movie clips, sounds and masks"},
                {FILTER_ID_CA | FILTER_ID_LA | FILTER_ID_SPK | FILTER_ID_WO,
             "ENVIRONMENT", ICON_WORLD_DATA, "Environment", "Show/hide worlds, lamps, cameras and speakers"},
 -              {FILTER_ID_BR | FILTER_ID_GD | FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_CF,
 +              {FILTER_ID_BR | FILTER_ID_GD | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_CF,
             "MISC", ICON_GREASEPENCIL, "Miscellaneous", "Show/hide other data types"},
            {0, NULL, 0, NULL, NULL}
        };