[Bf-blender-cvs] [84ea48d] gooseberry: Painstakingly merge branch 'master' into gooseberry
Antony Riakiotakis
noreply at git.blender.org
Mon Feb 16 12:49:09 CET 2015
Commit: 84ea48d58b90218f97025f94e0b924d7aea665cb
Author: Antony Riakiotakis
Date: Fri Feb 13 12:48:36 2015 +0100
Branches: gooseberry
https://developer.blender.org/rB84ea48d58b90218f97025f94e0b924d7aea665cb
Painstakingly merge branch 'master' into gooseberry
Conflicts:
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/BKE_screen.h
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/screen.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_270.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/include/ED_view3d.h
source/blender/editors/render/render_opengl.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_compositing.h
source/blender/gpu/GPU_extensions.h
source/blender/gpu/intern/gpu_compositing.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl
source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl
source/blender/gpu/shaders/gpu_shader_fx_lib.glsl
source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl
source/blender/gpu/shaders/gpu_shader_fx_vert.glsl
source/blender/makesdna/DNA_camera_types.h
source/blender/makesdna/DNA_gpu_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/properties_data_camera.py
index 00428f0,40cda36..16a6e12
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@@ -185,33 -186,12 +186,35 @@@ class DATA_PT_camera_dof(CameraButtonsP
col = split.column()
- col.active = cam.dof_object is None
- col.prop(cam, "dof_distance", text="Distance")
+ sub = col.column()
+ sub.active = cam.dof_object is None
+ sub.prop(cam, "dof_distance", text="Distance")
+ col.prop(dof_options, "fstop")
+class DATA_PT_camera_gpu_dof(Panel):
+ bl_label = "GPU Depth of Field"
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "data"
+
+ def draw(self, context):
+ layout = self.layout
+
+ cam = context.camera
+
+ dof_options = cam.gpu_dof
+ col = layout.column(align=True)
+ col.label("Focus object or distance is set in Depth Of Field Panel")
+ col.prop(dof_options, "dof_fstop")
+ col.prop(dof_options, "dof_focal_length")
+ col.prop(dof_options, "dof_sensor")
+
+ @classmethod
+ def poll(cls, context):
+ return context.camera
+
+
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
bl_label = "Display"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index e0f6cfb,845e568..a9b1001
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -2943,28 -2934,21 +2943,46 @@@ class VIEW3D_PT_view3d_shading(Panel)
if obj and obj.mode == 'EDIT':
col.prop(view, "show_occlude_wire")
++<<<<<<< HEAD
+ fxoptions = view.fxoptions
+
+ col.prop(view, "depth_of_field")
+ if view.depth_of_field:
+ if (view.region_3d.view_perspective == 'CAMERA'):
+ col.label("check dof properties in camera settings", icon='INFO')
+ else:
+ dof_options = fxoptions.dof_options
+ subcol = col.column(align=True)
+ subcol.prop(dof_options, "dof_focus_distance")
+ subcol.prop(dof_options, "dof_fstop")
+ subcol.prop(dof_options, "dof_focal_length")
+ subcol.prop(dof_options, "dof_sensor")
+ col.prop(view, "ssao")
+ if view.ssao:
+ ssao_options = fxoptions.ssao_options
+ subcol = col.column(align=True)
+ subcol.prop(ssao_options, "ssao_darkening")
+ subcol.prop(ssao_options, "ssao_distance_max")
+ subcol.prop(ssao_options, "ssao_attenuation")
+ subcol.prop(ssao_options, "ssao_ray_sample_mode")
+ subcol.prop(ssao_options, "ssao_color")
++=======
+ fx_settings = view.fx_settings
+
+ sub = col.column()
+ sub.active = view.region_3d.view_perspective == 'CAMERA'
+ sub.prop(fx_settings, "use_dof")
+
+ col.prop(fx_settings, "use_ssao", text="Ambient Occlusion")
+ if fx_settings.use_ssao:
+ ssao_settings = fx_settings.ssao
+ subcol = col.column(align=True)
+ subcol.prop(ssao_settings, "factor")
+ subcol.prop(ssao_settings, "distance_max")
+ subcol.prop(ssao_settings, "attenuation")
+ subcol.prop(ssao_settings, "samples")
+ subcol.prop(ssao_settings, "color")
++>>>>>>> master
class VIEW3D_PT_view3d_motion_tracking(Panel):
diff --cc source/blender/blenloader/intern/versioning_270.c
index c59e92a,1afdc34..28792a6
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -35,9 -35,9 +35,10 @@@
#define DNA_DEPRECATED_ALLOW
#include "DNA_brush_types.h"
+ #include "DNA_camera_types.h"
#include "DNA_cloth_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_key_types.h"
#include "DNA_sdna_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
@@@ -699,19 -604,17 +711,33 @@@ void blo_do_versions_270(FileData *fd,
}
}
+ if (!DNA_struct_elem_find(fd->filesdna, "ParticleInstanceModifierData", "float", "particle_amount")) {
+ Object *ob;
+ ModifierData *md;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_ParticleInstance) {
+ ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md;
+
+ pimd->particle_amount = 1.0f;
+ pimd->particle_offset = 0.0f;
+ }
+ }
+ }
+ }
++
+ if (!MAIN_VERSION_ATLEAST(main, 273, 8)) {
+ Object *ob;
+ for (ob = main->object.first; ob != NULL; ob = ob->id.next) {
+ ModifierData *md;
+ for (md = ob->modifiers.last; md != NULL; md = md->prev) {
+ if (modifier_unique_name(&ob->modifiers, md)) {
+ printf("Warning: Object '%s' had several modifiers with the "
+ "same name, renamed one of them to '%s'.\n",
+ ob->id.name + 2, md->name);
+ }
+ }
+ }
+ }
}
diff --cc source/blender/editors/include/ED_view3d.h
index 12b1823,e6434a1..7787a82
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@@ -64,10 -63,8 +64,11 @@@ struct wmOperatorType
struct wmWindow;
struct GPUFX;
struct GPUOffScreen;
- struct GPUFXOptions;
+ struct GPUFXSettings;
+ enum eGPUFXFlags;
+struct wmWidget;
+struct wmWidgetGroup;
+struct wmWidgetGroupType;
/* for derivedmesh drawing callbacks, for view3d_select, .... */
typedef struct ViewContext {
@@@ -308,12 -305,13 +309,15 @@@ void ED_view3d_check_mats_rv3d(struct R
#endif
int ED_view3d_scene_layer_set(int lay, const int *values, int *active);
+void ED_draw_object_facemap(struct Scene *scene, struct Object *ob, int facemap);
+
bool ED_view3d_context_activate(struct bContext *C);
void ED_view3d_draw_offscreen_init(struct Scene *scene, struct View3D *v3d);
- void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[4][4],
- float winmat[4][4], bool do_bgpic, bool do_sky, struct GPUFX *fx, bool is_persp, struct GPUOffScreen *ofs, struct GPUFXOptions *fxoptions, int fxflags);
+ void ED_view3d_draw_offscreen(
+ struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[4][4],
+ float winmat[4][4], bool do_bgpic, bool do_sky, bool is_persp,
+ struct GPUOffScreen *ofs,
+ struct GPUFX *fx, struct GPUFXSettings *fx_settings);
struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag,
bool draw_background, int alpha_mode, char err_out[256]);
diff --cc source/blender/editors/render/render_opengl.c
index aec8c88,402e72d..d40ced2
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@@ -227,7 -224,7 +224,8 @@@ static void screen_opengl_render_apply(
camera = v3d->camera;
RE_GetCameraWindow(oglrender->re, camera, scene->r.cfra, winmat);
is_persp = true;
- BKE_GPU_dof_from_camera(camera, &options);
++
+ BKE_camera_to_gpu_dof(camera, &fx_settings);
}
else {
rctf viewplane;
diff --cc source/blender/editors/space_view3d/space_view3d.c
index 4233566,ff212a1..55bba6d
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@@ -431,13 -420,10 +431,10 @@@ static void view3d_free(SpaceLink *sl
MEM_freeN(vd->defmaterial);
}
- if (vd->fxoptions) {
- MEM_freeN(vd->fxoptions->dof_options);
- if (vd->fxoptions->ssao_options)
- MEM_freeN(vd->fxoptions->ssao_options);
- if (vd->fxoptions->dof_options)
- MEM_freeN(vd->fxoptions);
- }
- if (vd->fx_settings.ssao)
- MEM_freeN(vd->fx_settings.ssao);
- if (vd->fx_settings.dof)
- MEM_freeN(vd->fx_settings.dof);
++ if (vd->fx_settings.ssao)
++ MEM_freeN(vd->fx_settings.ssao);
++ if (vd->fx_settings.dof)
++ MEM_freeN(vd->fx_settings.dof);
}
@@@ -478,12 -465,10 +475,11 @@@ static SpaceLink *view3d_duplicate(Spac
}
v3dn->properties_storage = NULL;
- if (v3do->fxoptions)
- {
- v3dn->fxoptions = MEM_callocN(sizeof(GPUFXOptions), "view3d fx options");
- v3dn->fxoptions->dof_options = MEM_dupallocN(v3do->fxoptions->dof_options);
- v3dn->fxoptions->ssao_options = MEM_dupallocN(v3do->fxoptions->ssao_options);
- }
++
+ if (v3dn->fx_settings.dof)
+ v3dn->fx_settings.dof = MEM_dupallocN(v3do->fx_settings.dof);
+ if (v3dn->fx_settings.ssao)
+ v3dn->fx_settings.ssao = MEM_dupallocN(v3do->fx_settings.ssao);
return (SpaceLink *)v3dn;
}
diff --cc source/blender/editors/space_view3d/view3d_draw.c
index 553ba56,28ba87f..c14812f
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@@ -2698,7 -2667,8 +2699,9 @@@ static void view3d_draw_objects
RegionView3D *rv3d = ar->regiondata;
Base *base;
const bool do_camera_frame = !draw_offscreen;
+ const bool is_wire_color = V3D_IS_WIRECOLOR(scene, v3d);
+ const bool draw_floor = (rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO);
+ const bool draw_grids = !draw_offscreen && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0;
if (!draw_offscreen) {
ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
diff --cc source/blender/gpu/intern/gpu_compositing.c
index ad25ee4,b423c14..f2044f2
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@@ -178,37 -252,10 +252,9 @@@ static GPUTexture * create_jitter_textu
return GPU_texture_create_2D_procedural(64, 64, &jitter[0][0], NULL);
}
- static void create_sample_directions(void)
- {
- int i;
- float dir[4][2] = {{1.0f, 0.0f},
- {0.0f,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list