[Bf-blender-cvs] [8a57e68] experimental-build: Revert "squash multiview-spherical-stereo"

Dalai Felinto noreply at git.blender.org
Thu Mar 19 12:52:03 CET 2015


Commit: 8a57e681ca81c17e77736093948a35a0b8943faa
Author: Dalai Felinto
Date:   Thu Mar 19 12:51:53 2015 +0100
Branches: experimental-build
https://developer.blender.org/rB8a57e681ca81c17e77736093948a35a0b8943faa

Revert "squash multiview-spherical-stereo"

This reverts commit d33764baf9e76a8461b01bf1b9f1c7dff7238145.

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

M	intern/cycles/app/cycles_xml.cpp
M	intern/cycles/blender/addon/properties.py
M	intern/cycles/blender/addon/ui.py
M	intern/cycles/blender/blender_camera.cpp
M	intern/cycles/blender/blender_session.cpp
M	intern/cycles/blender/blender_session.h
M	intern/cycles/kernel/kernel_camera.h
M	intern/cycles/kernel/kernel_projection.h
M	intern/cycles/kernel/kernel_types.h
M	intern/cycles/render/camera.cpp
M	intern/cycles/render/camera.h
M	release/scripts/startup/bl_ui/properties_data_camera.py
M	release/scripts/startup/bl_ui/properties_render.py
M	release/scripts/startup/bl_ui/properties_render_layer.py
M	release/scripts/startup/bl_ui/space_image.py
M	release/scripts/startup/bl_ui/space_info.py
M	release/scripts/startup/bl_ui/space_sequencer.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/nodeitems_builtins.py
M	source/blender/blenkernel/BKE_camera.h
M	source/blender/blenkernel/BKE_image.h
M	source/blender/blenkernel/BKE_node.h
M	source/blender/blenkernel/BKE_scene.h
M	source/blender/blenkernel/BKE_sequencer.h
M	source/blender/blenkernel/BKE_writeavi.h
M	source/blender/blenkernel/BKE_writeffmpeg.h
M	source/blender/blenkernel/BKE_writeframeserver.h
M	source/blender/blenkernel/intern/bpath.c
M	source/blender/blenkernel/intern/camera.c
M	source/blender/blenkernel/intern/image.c
M	source/blender/blenkernel/intern/node.c
M	source/blender/blenkernel/intern/ocean.c
M	source/blender/blenkernel/intern/packedFile.c
M	source/blender/blenkernel/intern/scene.c
M	source/blender/blenkernel/intern/seqcache.c
M	source/blender/blenkernel/intern/sequencer.c
M	source/blender/blenkernel/intern/writeavi.c
M	source/blender/blenkernel/intern/writeffmpeg.c
M	source/blender/blenkernel/intern/writeframeserver.c
M	source/blender/blenlib/BLI_threads.h
M	source/blender/blenlib/intern/threads.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/collada/ImageExporter.cpp
M	source/blender/compositor/CMakeLists.txt
M	source/blender/compositor/COM_compositor.h
M	source/blender/compositor/intern/COM_CompositorContext.h
M	source/blender/compositor/intern/COM_Converter.cpp
M	source/blender/compositor/intern/COM_ExecutionSystem.cpp
M	source/blender/compositor/intern/COM_ExecutionSystem.h
M	source/blender/compositor/intern/COM_compositor.cpp
M	source/blender/compositor/nodes/COM_CompositorNode.cpp
M	source/blender/compositor/nodes/COM_ImageNode.cpp
M	source/blender/compositor/nodes/COM_ImageNode.h
M	source/blender/compositor/nodes/COM_OutputFileNode.cpp
M	source/blender/compositor/nodes/COM_RenderLayersNode.cpp
M	source/blender/compositor/nodes/COM_SplitViewerNode.cpp
D	source/blender/compositor/nodes/COM_SwitchViewNode.cpp
D	source/blender/compositor/nodes/COM_SwitchViewNode.h
M	source/blender/compositor/nodes/COM_ViewerNode.cpp
M	source/blender/compositor/operations/COM_CompositorOperation.cpp
M	source/blender/compositor/operations/COM_CompositorOperation.h
M	source/blender/compositor/operations/COM_ImageOperation.cpp
M	source/blender/compositor/operations/COM_ImageOperation.h
M	source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
M	source/blender/compositor/operations/COM_MultilayerImageOperation.h
D	source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
D	source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
M	source/blender/compositor/operations/COM_OutputFileOperation.cpp
M	source/blender/compositor/operations/COM_OutputFileOperation.h
M	source/blender/compositor/operations/COM_RenderLayersProg.cpp
M	source/blender/compositor/operations/COM_RenderLayersProg.h
M	source/blender/compositor/operations/COM_ViewerOperation.cpp
M	source/blender/compositor/operations/COM_ViewerOperation.h
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/include/UI_interface.h
M	source/blender/editors/interface/interface_ops.c
M	source/blender/editors/object/object_bake_api.c
M	source/blender/editors/render/render_intern.h
M	source/blender/editors/render/render_internal.c
M	source/blender/editors/render/render_opengl.c
M	source/blender/editors/render/render_ops.c
M	source/blender/editors/render/render_preview.c
M	source/blender/editors/render/render_shading.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/screen/screendump.c
M	source/blender/editors/sculpt_paint/paint_image.c
M	source/blender/editors/sculpt_paint/paint_image_2d.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/space_image/image_buttons.c
M	source/blender/editors/space_image/image_draw.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_node/drawnode.c
M	source/blender/editors/space_node/node_edit.c
M	source/blender/editors/space_node/node_intern.h
M	source/blender/editors/space_node/node_ops.c
M	source/blender/editors/space_sequencer/sequencer_add.c
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/space_sequencer/sequencer_intern.h
M	source/blender/editors/space_sequencer/sequencer_view.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
M	source/blender/gpu/GPU_draw.h
M	source/blender/gpu/intern/gpu_draw.c
M	source/blender/imbuf/CMakeLists.txt
M	source/blender/imbuf/IMB_imbuf.h
M	source/blender/imbuf/IMB_imbuf_types.h
M	source/blender/imbuf/intern/IMB_anim.h
M	source/blender/imbuf/intern/anim_movie.c
M	source/blender/imbuf/intern/indexer.c
M	source/blender/imbuf/intern/openexr/openexr_api.cpp
M	source/blender/imbuf/intern/openexr/openexr_multi.h
M	source/blender/imbuf/intern/openexr/openexr_stub.cpp
D	source/blender/imbuf/intern/stereoimbuf.c
M	source/blender/imbuf/intern/thumbs.c
M	source/blender/imbuf/intern/util.c
M	source/blender/imbuf/intern/writeimage.c
M	source/blender/makesdna/DNA_camera_types.h
M	source/blender/makesdna/DNA_image_types.h
M	source/blender/makesdna/DNA_node_types.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesdna/DNA_sequence_types.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/makesdna/DNA_windowmanager_types.h
M	source/blender/makesrna/RNA_access.h
M	source/blender/makesrna/RNA_enum_types.h
M	source/blender/makesrna/intern/rna_camera.c
M	source/blender/makesrna/intern/rna_color.c
M	source/blender/makesrna/intern/rna_image.c
M	source/blender/makesrna/intern/rna_image_api.c
M	source/blender/makesrna/intern/rna_main_api.c
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/makesrna/intern/rna_render.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_scene_api.c
M	source/blender/makesrna/intern/rna_sequencer.c
M	source/blender/makesrna/intern/rna_sequencer_api.c
M	source/blender/makesrna/intern/rna_space.c
M	source/blender/makesrna/intern/rna_ui_api.c
M	source/blender/makesrna/intern/rna_userdef.c
M	source/blender/makesrna/intern/rna_wm.c
M	source/blender/nodes/CMakeLists.txt
M	source/blender/nodes/NOD_composite.h
M	source/blender/nodes/NOD_static_types.h
M	source/blender/nodes/composite/node_composite_tree.c
M	source/blender/nodes/composite/nodes/node_composite_image.c
M	source/blender/nodes/composite/nodes/node_composite_outputFile.c
D	source/blender/nodes/composite/nodes/node_composite_switchview.c
M	source/blender/quicktime/apple/qtkit_export.m
M	source/blender/quicktime/quicktime_export.h
M	source/blender/render/extern/include/RE_engine.h
M	source/blender/render/extern/include/RE_pipeline.h
M	source/blender/render/intern/include/render_result.h
M	source/blender/render/intern/include/render_types.h
M	source/blender/render/intern/source/convertblender.c
M	source/blender/render/intern/source/envmap.c
M	source/blender/render/intern/source/external_engine.c
M	source/blender/render/intern/source/initrender.c
M	source/blender/render/intern/source/pipeline.c
M	source/blender/render/intern/source/render_result.c
M	source/blender/render/intern/source/rendercore.c
M	source/blender/render/intern/source/zbuf.c
M	source/blender/windowmanager/CMakeLists.txt
M	source/blender/windowmanager/WM_api.h
M	source/blender/windowmanager/intern/wm_draw.c
M	source/blender/windowmanager/intern/wm_files.c
M	source/blender/windowmanager/intern/wm_operators.c
D	source/blender/windowmanager/intern/wm_stereo.c
M	source/blender/windowmanager/intern/wm_subwindow.c
M	source/blender/windowmanager/intern/wm_window.c
M	source/blender/windowmanager/wm.h
M	source/blender/windowmanager/wm_draw.h
M	source/blenderplayer/bad_level_call_stubs/stubs.c

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

diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 168e04c..05e3438 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -348,10 +348,6 @@ static void xml_read_camera(const XMLReadState& state, pugi::xml_node node)
 	xml_read_float(&cam->fisheye_fov, node, "fisheye_fov");
 	xml_read_float(&cam->fisheye_lens, node, "fisheye_lens");
 
-	xml_read_float(&cam->use_spherical_stereo, node, "use_spherical_stereo");
-	xml_read_float(&cam->interocular_distance, node, "interocular_distance");
-	xml_read_float(&cam->convergence_distance, node, "convergence_distance");
-
 	xml_read_float(&cam->sensorwidth, node, "sensorwidth");
 	xml_read_float(&cam->sensorheight, node, "sensorheight");
 
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 5698229..a86f162 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -610,12 +610,6 @@ class CyclesCameraSettings(bpy.types.PropertyGroup):
                 subtype='ANGLE',
                 default=math.pi,
                 )
-        cls.use_spherical_stereo = BoolProperty(
-                name="Spherical Stereo",
-                description="Render every pixel rotating the camera around the "
-                            "middle of the interocular distance",
-                default=True,
-                )
 
     @classmethod
     def unregister(cls):
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 83c49a1..63518d7 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -18,7 +18,7 @@
 
 import bpy
 
-from bpy.types import Panel, Menu, Operator, UIList
+from bpy.types import Panel, Menu, Operator
 
 
 class CYCLES_MT_sampling_presets(Menu):
@@ -413,49 +413,6 @@ class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
         col.prop(rl, "use_pass_environment")
 
 
-class CyclesRender_PT_views(CyclesButtonsPanel, Panel):
-    bl_label = "Views"
-    bl_context = "render_layer"
-
-    def draw_header(self, context):
-        rd = context.scene.render
-        self.layout.prop(rd, "use_multiview", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        scene = context.scene
-        rd = scene.render
-        rv = rd.views.active
-
-
-        layout.active = rd.use_multiview
-        basic_stereo = (rd.views_format == 'STEREO_3D')
-
-        row = layout.row()
-        row.prop(rd, "views_format", expand=True)
-
-        if basic_stereo:
-            row = layout.row()
-            row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
-
-            row = layout.row()
-            row.label(text="File Suffix:")
-            row.prop(rv, "file_suffix", text="")
-
-        else:
-            row = layout.row()
-            row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
-
-            col = row.column(align=True)
-            col.operator("scene.render_view_add", icon='ZOOMIN', text="")
-            col.operator("scene.render_view_remove", icon='ZOOMOUT', text="")
-
-            row = layout.row()
-            row.label(text="Camera Suffix:")
-            row.prop(rv, "camera_suffix", text="")
-
-
 class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
     bl_label = "Post Processing"
     bl_options = {'DEFAULT_CLOSED'}
@@ -1462,7 +1419,6 @@ def get_panels():
         "DATA_PT_vertex_colors",
         "DATA_PT_camera",
         "DATA_PT_camera_display",
-        "DATA_PT_camera_stereoscopy",
         "DATA_PT_camera_safe_areas",
         "DATA_PT_lens",
         "DATA_PT_speaker",
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp
index 4676dad..dee9ee0 100644
--- a/intern/cycles/blender/blender_camera.cpp
+++ b/intern/cycles/blender/blender_camera.cpp
@@ -57,9 +57,6 @@ struct BlenderCamera {
 	float latitude_max;
 	float longitude_min;
 	float longitude_max;
-	bool use_spherical_stereo;
-	float interocular_distance;
-	float convergence_distance;
 
 	enum { AUTO, HORIZONTAL, VERTICAL } sensor_fit;
 	float sensor_width;
@@ -98,24 +95,7 @@ static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings b_render
 	bcam->full_height = render_resolution_y(b_render);
 }
 
-static float camera_shift_x(BL::RenderEngine b_engine, BL::Object b_ob, BL::Camera b_camera, bool use_spherical_stereo)
-{
-	if(use_spherical_stereo)
-		return b_camera.shift_x();
-	else
-		return b_engine.camera_shift_x(b_ob);
-}
-
-static void camera_model_matrix(BL::RenderEngine b_engine, BL::Object b_ob, bool use_spherical_stereo,
-                                BL::Array<float, 16> &r_matrix)
-{
-	if(use_spherical_stereo)
-		memcpy(r_matrix, b_ob.matrix_world(), sizeof(float)*16);
-	else
-		b_engine.camera_model_matrix(b_ob, r_matrix);
-}
-
-static float blender_camera_focal_distance(BL::RenderEngine b_engine, BL::Object b_ob, BL::Camera b_camera, bool use_spherical_stereo)
+static float blender_camera_focal_distance(BL::Object b_ob, BL::Camera b_camera)
 {
 	BL::Object b_dof_object = b_camera.dof_object();
 
@@ -123,29 +103,14 @@ static float blender_camera_focal_distance(BL::RenderEngine b_engine, BL::Object
 		return b_camera.dof_distance();
 	
 	/* for dof object, return distance along camera Z direction */
-	BL::Array<float, 16> b_ob_matrix;
-	camera_model_matrix(b_engine, b_ob, use_spherical_stereo, b_ob_matrix);
-	Transform obmat = transform_clear_scale(get_transform(b_ob_matrix));
+	Transform obmat = transform_clear_scale(get_transform(b_ob.matrix_world()));
 	Transform dofmat = get_transform(b_dof_object.matrix_world());
 	Transform mat = transform_inverse(obmat) * dofmat;
 
 	return fabsf(transform_get_column(&mat, 3).z);
 }
 
-static bool blender_camera_use_spherical_stereo(BL::RenderSettings b_render, BlenderCamera *bcam, PointerRNA *ccamera)
-{
-	if(b_render.use_multiview() &&
-	   b_render.views_format() == 0 && /* STEREO_3D */
-	   bcam->type == CAMERA_PANORAMA &&
-	   RNA_boolean_get(ccamera, "use_spherical_stereo"))
-	{
-		return true;
-	}
-	return false;
-}
-
-static void blender_camera_from_object(BlenderCamera *bcam, BL::RenderEngine b_engine, BL::RenderSettings b_render,
-                                       BL::Object b_ob, bool skip_panorama = false)
+static void blender_camera_from_object(BlenderCamera *bcam, BL::Object b_ob, bool skip_panorama = false)
 {
 	BL::ID b_ob_data = b_ob.data();
 
@@ -194,10 +159,6 @@ static void blender_camera_from_object(BlenderCamera *bcam, BL::RenderEngine b_e
 		bcam->longitude_min = RNA_float_get(&ccamera, "longitude_min");
 		bcam->longitude_max = RNA_float_get(&ccamera, "longitude_max");
 
-		bcam->interocular_distance = b_camera.stereo().interocular_distance();
-		bcam->convergence_distance = b_camera.stereo().convergence_distance();
-		bcam->use_spherical_stereo = blender_camera_use_spherical_stereo(b_render, bcam, &ccamera);
-
 		bcam->ortho_scale = b_camera.ortho_scale();
 
 		bcam->lens = b_camera.lens();
@@ -220,10 +181,10 @@ static void blender_camera_from_object(BlenderCamera *bcam, BL::RenderEngine b_e
 
 		bcam->apertureblades = RNA_int_get(&ccamera, "aperture_blades");
 		bcam->aperturerotation = RNA_float_get(&ccamera, "aperture_rotation");
-		bcam->focaldistance = blender_camera_focal_distance(b_engine, b_ob, b_camera, bcam->use_spherical_stereo);
+		bcam->focaldistance = blender_camera_focal_distance(b_ob, b_camera);
 		bcam->aperture_ratio = RNA_float_get(&ccamera, "aperture_ratio");
 
-		bcam->shift.x = camera_shift_x(b_engine, b_ob, b_camera, bcam->use_spherical_stereo);
+		bcam->shift.x = b_camera.shift_x();
 		bcam->shift.y = b_camera.shift_y();
 
 		bcam->sensor_width = b_camera.sensor_width();
@@ -388,11 +349,6 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
 	cam->longitude_min = bcam->longitude_min;
 	cam->longitude_max = bcam->longitude_max;
 
-	/* panorama stereo */
-	cam->use_spherical_stereo = bcam->use_spherical_stereo;
-	cam->interocular_distance = bcam->interocular_distance;
-	cam->convergence_distance = bcam->convergence_distance;
-
 	/* anamorphic lens bokeh */
 	cam->aperture_ratio = bcam->aperture_ratio;
 
@@ -446,38 +402,20 @@ void BlenderSync::sync_camera(BL::RenderSettings b_render, BL::Object b_override
 		b_ob = b_override;
 
 	if(b_ob) {
-		BL::Array<float, 16> b_ob_matrix;
-		blender_camera_from_object(&bcam, b_engine, b_render, b_ob);
-		camera_model_matrix(b_engine, b_ob, bcam.use_spherical_stereo, b_ob_matrix);
-		bcam.matrix = get_transform(b_ob_matrix);
+		blender_camera_from_object(&bcam, b_ob);
+		bcam.matrix = get_transform(b_ob.matrix_world());
 	}
 
 	/* sync */
 	Camera *cam = scene->camera;
 	blender_camera_sync(cam, &bcam, width, height);
-
-	/* multiview panorama */
-	if(cam->use_spherical_stereo) {
-		const char *active_view = b_engine.active_view_get();
-
-		if(strcmp(active_view, "left") == 0)
-			cam->stereo_eye = STEREO_LEFT;
-		else if(strcmp(active_view, "right") == 0)
-			cam->stereo_eye = STEREO_RIGHT;
-		else
-			cam->stereo_eye = STEREO_NONE;
-	}
-
-	/* force update to update the kernel camera */
-	cam->tag_update();
 }
 
 void BlenderSync::sync_camera_motion(BL::Object b_ob, float motion_time)
 {
 	Camera *cam = scene->camera;
-	BL::Array<float, 16> b_ob_matrix;
-	camera_model_matrix(b_engine, b_ob, cam->use_spherical_stereo, b_ob_matrix);
-	Transform tfm = get_transform(b_ob_matrix);
+
+	Transform tfm = get_transform(b_ob.matrix_world());
 	tfm = blender_camera_matrix(tfm, cam->type);
 
 	if(tfm != cam->matrix) {
@@ -495,12 +433,10 @@ void BlenderSync::sync_camera_motion(BL::Object b_ob, float motion_time)
 
 /* Sync 3D View Camera */
 
-static void blender_camera_view_subset(BL::RenderEngine b_engine, BL::RenderSettings b_render, BL::Scene b_scene, BL::Object b_ob, BL::SpaceView3D b_v3d,
+static void blender_camera_view_subset(BL::RenderSettings b_render, BL::Scene b_scene, BL::Object b_ob, BL::SpaceView3D b_v3d,
 	BL::RegionView3D b_rv3d, int width, int height, BoundBox2D *view_box, BoundBox2D *cam_box);
 
-static void blender_camera_fro

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list