[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36466] branches/cycles: Cycles: first batch of windows build fixes, not quite there yet.

2011-05-03 Thread Brecht Van Lommel
Revision: 36466
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36466
Author:   blendix
Date: 2011-05-03 18:29:11 + (Tue, 03 May 2011)
Log Message:
---
Cycles: first batch of windows build fixes, not quite there yet.

Modified Paths:
--
branches/cycles/intern/cycles/blender/CMakeLists.txt
branches/cycles/intern/cycles/blender/blender_camera.cpp
branches/cycles/intern/cycles/blender/blender_util.h
branches/cycles/intern/cycles/bvh/bvh.cpp
branches/cycles/intern/cycles/bvh/bvh.h
branches/cycles/intern/cycles/bvh/bvh_build.cpp
branches/cycles/intern/cycles/cmake/external_libs.cmake
branches/cycles/intern/cycles/cmake/platforms.cmake
branches/cycles/intern/cycles/device/CMakeLists.txt
branches/cycles/intern/cycles/device/device_cuda.cpp
branches/cycles/intern/cycles/kernel/kernel_film.h
branches/cycles/intern/cycles/kernel/svm/svm_noise.h
branches/cycles/intern/cycles/kernel/svm/svm_texture.h
branches/cycles/intern/cycles/render/CMakeLists.txt
branches/cycles/intern/cycles/render/buffers.h
branches/cycles/intern/cycles/render/nodes.cpp
branches/cycles/intern/cycles/render/object.h
branches/cycles/intern/cycles/render/shader.h
branches/cycles/intern/cycles/render/svm.h
branches/cycles/intern/cycles/subd/subd_build.cpp
branches/cycles/intern/cycles/subd/subd_split.cpp
branches/cycles/intern/cycles/util/util_map.h
branches/cycles/intern/cycles/util/util_math.h
branches/cycles/intern/cycles/util/util_set.h
branches/cycles/intern/cycles/util/util_types.h
branches/cycles/intern/guardedalloc/MEM_guardedalloc.h
branches/cycles/source/blender/makesrna/RNA_types.h
branches/cycles/source/blender/makesrna/intern/makesrna.c

Modified: branches/cycles/intern/cycles/blender/CMakeLists.txt
===
--- branches/cycles/intern/cycles/blender/CMakeLists.txt2011-05-03 
15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/blender/CMakeLists.txt2011-05-03 
18:29:11 UTC (rev 36466)
@@ -29,7 +29,8 @@
../util
../subd
${BLENDER_INCLUDE_DIRS}
-   ${PYTHON_INCLUDE_DIRS})
+   ${PYTHON_INCLUDE_DIRS}
+   ${GLEW_INCLUDE_PATH})
 
 SET(LIBRARIES
cycles_render
@@ -41,7 +42,6 @@
${Boost_LIBRARIES}
${OPENGL_LIBRARIES}
${OPENIMAGEIO_LIBRARY}
-   ${PYTHON_LIBRARIES}
${GLUT_LIBRARIES}
${GLEW_LIBRARIES}
${BLENDER_LIBRARIES})
@@ -58,10 +58,21 @@
LIST(APPEND LIBRARIES ${OPENCL_LIBRARIES})
 ENDIF()
 
+LINK_DIRECTORIES(${PYTHON_LIBPATH})
 SET(CMAKE_MODULE_LINKER_FLAGS ${PYTHON_MODULE_FLAGS})
 
 ADD_LIBRARY(cycles_blender MODULE ${sources} ${headers})
 ADD_DEPENDENCIES(cycles_blender bf_rna)
+
+IF(WIN32)
+   TARGET_LINK_LIBRARIES(cycles_blender ${PYTHON_LINKFLAGS})
+   TARGET_LINK_LIBRARIES(cycles_blender debug ${PYTHON_LIBRARY}_d)
+   TARGET_LINK_LIBRARIES(cycles_blender optimized ${PYTHON_LIBRARY})
+
+   SET_TARGET_PROPERTIES(cycles_blender PROPERTIES PREFIX lib)
+   SET_TARGET_PROPERTIES(cycles_blender PROPERTIES SUFFIX .pyd)
+ENDIF()
+
 TARGET_LINK_LIBRARIES(cycles_blender ${LIBRARIES})
 
 INSTALL(FILES ${addonfiles} DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
@@ -71,3 +82,13 @@
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES INSTALL_RPATH 
$ORIGIN/lib)
 ENDIF()
 
+# Install DLL's
+
+IF(WIN32)
+   FILE(GLOB OIIO_DLLS ${CYCLES_OIIO}/bin/*.dll)
+   FILE(GLOB BOOST_DLLS ${CYCLES_BOOST}/lib/*.dll)
+   INSTALL(FILES ${OIIO_DLLS} ${BOOST_DLLS}
+   DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
+ENDIF()
+
+

Modified: branches/cycles/intern/cycles/blender/blender_camera.cpp
===
--- branches/cycles/intern/cycles/blender/blender_camera.cpp2011-05-03 
15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/blender/blender_camera.cpp2011-05-03 
18:29:11 UTC (rev 36466)
@@ -218,7 +218,7 @@
blender_camera_from_object(bcam, b_ob);
 
/* magic zoom formula */
-   bcam.zoom = b_rv3d.view_camera_zoom();
+   bcam.zoom = (float)b_rv3d.view_camera_zoom();
bcam.zoom = (1.41421f + bcam.zoom/50.0f);
bcam.zoom *= bcam.zoom;
bcam.zoom = 2.0f/bcam.zoom;

Modified: branches/cycles/intern/cycles/blender/blender_util.h
===
--- branches/cycles/intern/cycles/blender/blender_util.h2011-05-03 
15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/blender/blender_util.h2011-05-03 
18:29:11 UTC (rev 36466)
@@ -77,7 +77,7 @@
 
 static inline bool object_is_modified(BL::Object self, BL::Scene scene, bool 
preview)
 {
-   return rna_Object_is_modified(self.ptr.data, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36479] branches/cycles/intern/cycles/ blender/addon/__init__.py: Cycles: fix scene not updating for animation render, patch by David Rodriguez Garcia

2011-05-04 Thread Brecht Van Lommel
Revision: 36479
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36479
Author:   blendix
Date: 2011-05-04 09:41:45 + (Wed, 04 May 2011)
Log Message:
---
Cycles: fix scene not updating for animation render, patch by David Rodriguez 
Garcia.

Modified Paths:
--
branches/cycles/intern/cycles/blender/addon/__init__.py

Modified: branches/cycles/intern/cycles/blender/addon/__init__.py
===
--- branches/cycles/intern/cycles/blender/addon/__init__.py 2011-05-04 
08:44:08 UTC (rev 36478)
+++ branches/cycles/intern/cycles/blender/addon/__init__.py 2011-05-04 
09:41:45 UTC (rev 36479)
@@ -48,6 +48,7 @@
engine.free(self)
 
def render(self, scene):
+   scene.frame_set(scene.frame_current) # should this be done 
already?
engine.create(self, scene, True)
engine.render(self, scene)
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36480] branches/cycles/intern/cycles: Cycles: some more windows build fixes, based on patch by Francisco De La Cruz.

2011-05-04 Thread Brecht Van Lommel
Revision: 36480
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36480
Author:   blendix
Date: 2011-05-04 09:58:02 + (Wed, 04 May 2011)
Log Message:
---
Cycles: some more windows build fixes, based on patch by Francisco De La Cruz.

Modified Paths:
--
branches/cycles/intern/cycles/cmake/platforms.cmake
branches/cycles/intern/cycles/kernel/CMakeLists.txt
branches/cycles/intern/cycles/util/util_math.h

Modified: branches/cycles/intern/cycles/cmake/platforms.cmake
===
--- branches/cycles/intern/cycles/cmake/platforms.cmake 2011-05-04 09:41:45 UTC 
(rev 36479)
+++ branches/cycles/intern/cycles/cmake/platforms.cmake 2011-05-04 09:58:02 UTC 
(rev 36480)
@@ -11,7 +11,7 @@
 ENDIF(APPLE)
 
 IF(WIN32)
-   SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /EHsc 
/fp:fast)
+   SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} /Ox /Ot /arch:SSE2 
-D_CRT_SECURE_NO_WARNINGS /EHsc /fp:fast)
SET(RTTI_DISABLE_FLAGS /GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID)
SET(PYTHON_MODULE_FLAGS -DLL)
 ENDIF(WIN32)

Modified: branches/cycles/intern/cycles/kernel/CMakeLists.txt
===
--- branches/cycles/intern/cycles/kernel/CMakeLists.txt 2011-05-04 09:41:45 UTC 
(rev 36479)
+++ branches/cycles/intern/cycles/kernel/CMakeLists.txt 2011-05-04 09:58:02 UTC 
(rev 36480)
@@ -71,6 +71,12 @@
 
 # CUDA module
 
+IF(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+   SET(CUDA_BITS 64)
+ELSE()
+   SET(CUDA_BITS 32)
+ENDIF()
+
 IF(WITH_CYCLES_CUDA)
SET(cuda_sources kernel.cu ${headers})
SET(cuda_cubins)
@@ -80,7 +86,7 @@
 
ADD_CUSTOM_COMMAND(
OUTPUT ${cuda_cubin}
-   COMMAND ${CUDA_NVCC} -arch=${arch} -m64 --cubin 
${CMAKE_CURRENT_SOURCE_DIR}/kernel.cu --use_fast_math -o 
${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin} --ptxas-options=-v 
--maxrregcount=${CYCLES_CUDA_MAXREG} --opencc-options -OPT:Olimit=0 
-I${CMAKE_CURRENT_SOURCE_DIR}/../util -I${CMAKE_CURRENT_SOURCE_DIR}/svm 
-DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END=
+   COMMAND ${CUDA_NVCC} -arch=${arch} -m${CUDA_BITS} 
--cubin ${CMAKE_CURRENT_SOURCE_DIR}/kernel.cu --use_fast_math -o 
${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin} --ptxas-options=-v 
--maxrregcount=${CYCLES_CUDA_MAXREG} --opencc-options -OPT:Olimit=0 
-I${CMAKE_CURRENT_SOURCE_DIR}/../util -I${CMAKE_CURRENT_SOURCE_DIR}/svm 
-DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC
DEPENDS ${cuda_sources})
 
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin} 
DESTINATION ${CYCLES_INSTALL_PATH}/cycles/lib)

Modified: branches/cycles/intern/cycles/util/util_math.h
===
--- branches/cycles/intern/cycles/util/util_math.h  2011-05-04 09:41:45 UTC 
(rev 36479)
+++ branches/cycles/intern/cycles/util/util_math.h  2011-05-04 09:58:02 UTC 
(rev 36480)
@@ -48,9 +48,13 @@
 
 #ifdef _WIN32
 
+#ifndef __KERNEL_GPU__
+
 #define copysignf(x, y) ((float)_copysign(x, y))
 #define hypotf(x, y) _hypotf(x, y)
 
+#endif
+
 __device_inline float fmaxf(float a, float b)
 {
return (a  b)? a: b;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36486] branches/cycles/intern/cycles: Cycles: fix for UV texture coordinates lookup with more than one mesh, bug in corner attribute storage.

2011-05-04 Thread Brecht Van Lommel
Revision: 36486
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36486
Author:   blendix
Date: 2011-05-04 14:01:38 + (Wed, 04 May 2011)
Log Message:
---
Cycles: fix for UV texture coordinates lookup with more than one mesh, bug in 
corner attribute storage.

Modified Paths:
--
branches/cycles/intern/cycles/kernel/kernel_triangle.h
branches/cycles/intern/cycles/render/mesh.cpp

Modified: branches/cycles/intern/cycles/kernel/kernel_triangle.h
===
--- branches/cycles/intern/cycles/kernel/kernel_triangle.h  2011-05-04 
13:15:42 UTC (rev 36485)
+++ branches/cycles/intern/cycles/kernel/kernel_triangle.h  2011-05-04 
14:01:38 UTC (rev 36486)
@@ -116,10 +116,10 @@
return sd-u*f0 + sd-v*f1 + (1.0f - sd-u - sd-v)*f2;
}
else if(elem == ATTR_ELEMENT_CORNER) {
-   int tri = offset + sd-prim;
-   float f0 = kernel_tex_fetch(__attributes_float, tri*3 + 0);
-   float f1 = kernel_tex_fetch(__attributes_float, tri*3 + 1);
-   float f2 = kernel_tex_fetch(__attributes_float, tri*3 + 2);
+   int tri = offset + sd-prim*3;
+   float f0 = kernel_tex_fetch(__attributes_float, tri + 0);
+   float f1 = kernel_tex_fetch(__attributes_float, tri + 1);
+   float f2 = kernel_tex_fetch(__attributes_float, tri + 2);
 
 #ifdef __RAY_DIFFERENTIALS__
if(dx) *dx = sd-du.dx*f0 + sd-dv.dx*f1 - (sd-du.dx + 
sd-dv.dx)*f2;
@@ -159,10 +159,10 @@
return sd-u*f0 + sd-v*f1 + (1.0f - sd-u - sd-v)*f2;
}
else if(elem == ATTR_ELEMENT_CORNER) {
-   int tri = offset + sd-prim;
-   float3 f0 = as_float3(kernel_tex_fetch(__attributes_float3, 
tri*3 + 0));
-   float3 f1 = as_float3(kernel_tex_fetch(__attributes_float3, 
tri*3 + 1));
-   float3 f2 = as_float3(kernel_tex_fetch(__attributes_float3, 
tri*3 + 2));
+   int tri = offset + sd-prim*3;
+   float3 f0 = as_float3(kernel_tex_fetch(__attributes_float3, tri 
+ 0));
+   float3 f1 = as_float3(kernel_tex_fetch(__attributes_float3, tri 
+ 1));
+   float3 f2 = as_float3(kernel_tex_fetch(__attributes_float3, tri 
+ 2));
 
 #ifdef __RAY_DIFFERENTIALS__
if(dx) *dx = sd-du.dx*f0 + sd-dv.dx*f1 - (sd-du.dx + 
sd-dv.dx)*f2;

Modified: branches/cycles/intern/cycles/render/mesh.cpp
===
--- branches/cycles/intern/cycles/render/mesh.cpp   2011-05-04 13:15:42 UTC 
(rev 36485)
+++ branches/cycles/intern/cycles/render/mesh.cpp   2011-05-04 14:01:38 UTC 
(rev 36486)
@@ -469,11 +469,13 @@
}
 
/* mesh vertex/triangle index is global, not per 
object, so we sneak
-  a correct for that in here */
+  a correction for that in here */
if(req.element == ATTR_ELEMENT_VERTEX)
req.offset -= mesh-vert_offset;
-   else
+   else if(mattr-element == Attribute::FACE)
req.offset -= mesh-tri_offset;
+   else if(mattr-element == Attribute::CORNER)
+   req.offset -= 3*mesh-tri_offset;
 
if(progress.get_cancel()) return;
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36488] branches/cycles: Cycles: rename UV geometry node output to Parametric to avoid confusion with uv texture coordinates .

2011-05-04 Thread Brecht Van Lommel
Revision: 36488
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36488
Author:   blendix
Date: 2011-05-04 15:22:15 + (Wed, 04 May 2011)
Log Message:
---
Cycles: rename UV geometry node output to Parametric to avoid confusion with uv 
texture coordinates.

Modified Paths:
--
branches/cycles/intern/cycles/kernel/osl/nodes/node_geometry.osl
branches/cycles/intern/cycles/render/nodes.cpp
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_geometry.c

Modified: branches/cycles/intern/cycles/kernel/osl/nodes/node_geometry.osl
===
--- branches/cycles/intern/cycles/kernel/osl/nodes/node_geometry.osl
2011-05-04 15:09:48 UTC (rev 36487)
+++ branches/cycles/intern/cycles/kernel/osl/nodes/node_geometry.osl
2011-05-04 15:22:15 UTC (rev 36488)
@@ -27,7 +27,7 @@
output normal Tangent = normal(0.0, 0.0, 0.0),
output normal TrueNormal = normal(0.0, 0.0, 0.0),
output vector Incoming = vector(0.0, 0.0, 0.0),
-   output point UV = point(0.0, 0.0, 0.0),
+   output point Parametric = point(0.0, 0.0, 0.0),
output float Backfacing = 0.0)
 {
Position = P;
@@ -35,16 +35,16 @@
Tangent = normalize(dPdu);
TrueNormal = Ng;
Incoming = I;
-   UV = point(u, v, 0.0);
+   Parametric = point(u, v, 0.0);
Backfacing = backfacing();
 
if(bump_offset == dx) {
Position += Dx(Position);
-   UV += Dx(UV);
+   Parametric += Dx(Parametric);
}
else if(bump_offset == dy) {
Position += Dy(Position);
-   UV += Dy(UV);
+   Parametric += Dy(Parametric);
}
 }
 

Modified: branches/cycles/intern/cycles/render/nodes.cpp
===
--- branches/cycles/intern/cycles/render/nodes.cpp  2011-05-04 15:09:48 UTC 
(rev 36487)
+++ branches/cycles/intern/cycles/render/nodes.cpp  2011-05-04 15:22:15 UTC 
(rev 36488)
@@ -1251,7 +1251,7 @@
add_output(Tangent, SHADER_SOCKET_NORMAL);
add_output(True Normal, SHADER_SOCKET_NORMAL);
add_output(Incoming, SHADER_SOCKET_VECTOR);
-   add_output(UV, SHADER_SOCKET_POINT);
+   add_output(Parametric, SHADER_SOCKET_POINT);
add_output(Backfacing, SHADER_SOCKET_FLOAT);
 }
 
@@ -1295,7 +1295,7 @@
compiler.add_node(geom_node, NODE_GEOM_I, out-stack_offset);
}
 
-   out = output(UV);
+   out = output(Parametric);
if(!out-links.empty()) {
compiler.stack_assign(out);
compiler.add_node(geom_node, NODE_GEOM_uv, out-stack_offset);

Modified: branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_geometry.c
===
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_geometry.c
2011-05-04 15:09:48 UTC (rev 36487)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_geometry.c
2011-05-04 15:22:15 UTC (rev 36488)
@@ -37,7 +37,7 @@
{   SOCK_VECTOR, 1, Tangent,  0.0f, 0.0f, 
0.0f, 0.0f, 0.0f, 1.0f},
{   SOCK_VECTOR, 1, True Normal,  0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
{   SOCK_VECTOR, 1, Incoming, 0.0f, 0.0f, 
0.0f, 0.0f, 0.0f, 1.0f},
-   {   SOCK_VECTOR, 1, UV,   0.0f, 0.0f, 
0.0f, 0.0f, 0.0f, 1.0f},
+   {   SOCK_VECTOR, 1, Parametric,   0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
{   SOCK_VALUE,  1, Backfacing,   0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
{   -1, 0,}
 };

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36495] branches/cycles/source: Cycles refactoring: put external engine code into separate file.

2011-05-05 Thread Brecht Van Lommel
Revision: 36495
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36495
Author:   blendix
Date: 2011-05-05 09:43:45 + (Thu, 05 May 2011)
Log Message:
---
Cycles refactoring: put external engine code into separate file.

Modified Paths:
--
branches/cycles/source/blender/blenloader/intern/readfile.c
branches/cycles/source/blender/editors/render/render_shading.c
branches/cycles/source/blender/editors/space_view3d/space_view3d.c
branches/cycles/source/blender/editors/space_view3d/view3d_draw.c
branches/cycles/source/blender/makesrna/intern/rna_render.c
branches/cycles/source/blender/makesrna/intern/rna_scene.c
branches/cycles/source/blender/render/CMakeLists.txt
branches/cycles/source/blender/render/SConscript
branches/cycles/source/blender/render/extern/include/RE_pipeline.h
branches/cycles/source/blender/render/intern/include/renderpipeline.h
branches/cycles/source/blender/windowmanager/intern/wm_draw.c
branches/cycles/source/blender/windowmanager/intern/wm_init_exit.c
branches/cycles/source/creator/creator.c

Added Paths:
---
branches/cycles/source/blender/render/extern/include/RE_engine.h
branches/cycles/source/blender/render/intern/pipeline/
branches/cycles/source/blender/render/intern/pipeline/engine.c
branches/cycles/source/blender/render/intern/source/pipeline.c

Removed Paths:
-
branches/cycles/source/blender/render/intern/source/pipeline.c

Modified: branches/cycles/source/blender/blenloader/intern/readfile.c
===
--- branches/cycles/source/blender/blenloader/intern/readfile.c 2011-05-05 
08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/blenloader/intern/readfile.c 2011-05-05 
09:43:45 UTC (rev 36495)
@@ -139,7 +139,7 @@
 #include BLO_undofile.h
 #include BLO_readblenfile.h // streaming read pipe, for BLO_readblenfile 
BLO_readblenfilememory
 
-#include RE_pipeline.h
+#include RE_engine.h
 
 #include readfile.h
 

Modified: branches/cycles/source/blender/editors/render/render_shading.c
===
--- branches/cycles/source/blender/editors/render/render_shading.c  
2011-05-05 08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/editors/render/render_shading.c  
2011-05-05 09:43:45 UTC (rev 36495)
@@ -238,7 +238,7 @@
 #include DNA_screen_types.h
 #include DNA_view3d_types.h
 
-#include RE_pipeline.h
+#include RE_engine.h
 
 static void update_render_engines(Main *bmain, int tagged_only)
 {

Modified: branches/cycles/source/blender/editors/space_view3d/space_view3d.c
===
--- branches/cycles/source/blender/editors/space_view3d/space_view3d.c  
2011-05-05 08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/editors/space_view3d/space_view3d.c  
2011-05-05 09:43:45 UTC (rev 36495)
@@ -58,7 +58,7 @@
 #include WM_api.h
 #include WM_types.h
 
-#include RE_pipeline.h
+#include RE_engine.h
 
 #include RNA_access.h
 

Modified: branches/cycles/source/blender/editors/space_view3d/view3d_draw.c
===
--- branches/cycles/source/blender/editors/space_view3d/view3d_draw.c   
2011-05-05 08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/editors/space_view3d/view3d_draw.c   
2011-05-05 09:43:45 UTC (rev 36495)
@@ -63,6 +63,7 @@
 #include BKE_scene.h
 #include BKE_unit.h
 
+#include RE_engine.h
 #include RE_pipeline.h   // make_stars
 
 #include IMB_imbuf_types.h

Modified: branches/cycles/source/blender/makesrna/intern/rna_render.c
===
--- branches/cycles/source/blender/makesrna/intern/rna_render.c 2011-05-05 
08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/makesrna/intern/rna_render.c 2011-05-05 
09:43:45 UTC (rev 36495)
@@ -35,6 +35,7 @@
 
 #include rna_internal.h
 
+#include RE_engine.h
 #include RE_pipeline.h
 
 #include BKE_utildefines.h

Modified: branches/cycles/source/blender/makesrna/intern/rna_scene.c
===
--- branches/cycles/source/blender/makesrna/intern/rna_scene.c  2011-05-05 
08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/makesrna/intern/rna_scene.c  2011-05-05 
09:43:45 UTC (rev 36495)
@@ -41,6 +41,7 @@
 #include DNA_userdef_types.h
 
 /* Include for Bake Options */
+#include RE_engine.h
 #include RE_pipeline.h
 
 #ifdef WITH_QUICKTIME

Modified: branches/cycles/source/blender/render/CMakeLists.txt
===
--- branches/cycles/source/blender/render/CMakeLists.txt2011-05-05 
08:36:14 UTC (rev 36494)
+++ branches/cycles/source/blender/render/CMakeLists.txt2011-05-05 
09:43:45 UTC (rev 36495)
@@ -77,7 +77,9 @@

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36497] branches/cycles: Cycles: svn merge -r36352:36495 https://svn.blender.org/svnroot/bf-blender/trunk/ blender/

2011-05-05 Thread Brecht Van Lommel
Revision: 36497
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36497
Author:   blendix
Date: 2011-05-05 10:14:56 + (Thu, 05 May 2011)
Log Message:
---
Cycles: svn merge -r36352:36495 
https://svn.blender.org/svnroot/bf-blender/trunk/blender/

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36352

Modified Paths:
--
branches/cycles/CMakeLists.txt
branches/cycles/build_files/buildbot/config/user-config-i686.py
branches/cycles/build_files/buildbot/config/user-config-x86_64.py
branches/cycles/build_files/package_spec/debian/menu
branches/cycles/build_files/scons/tools/btools.py
branches/cycles/doc/python_api/examples/bpy.types.Operator.1.py
branches/cycles/extern/CMakeLists.txt
branches/cycles/extern/SConscript
branches/cycles/intern/ghost/GHOST_C-api.h
branches/cycles/intern/ghost/GHOST_ISystem.h
branches/cycles/intern/ghost/intern/GHOST_C-api.cpp
branches/cycles/intern/ghost/intern/GHOST_Debug.h
branches/cycles/intern/ghost/intern/GHOST_SystemCarbon.h
branches/cycles/intern/ghost/intern/GHOST_SystemCocoa.h
branches/cycles/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/cycles/intern/ghost/intern/GHOST_SystemWin32.h
branches/cycles/intern/ghost/intern/GHOST_SystemX11.cpp
branches/cycles/intern/ghost/intern/GHOST_SystemX11.h
branches/cycles/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/cycles/intern/ghost/intern/GHOST_WindowWin32.h
branches/cycles/intern/ghost/test/gears/GHOST_C-Test.c
branches/cycles/intern/guardedalloc/MEM_sys_types.h
branches/cycles/intern/opennl/superlu/superlu_sys_types.h
branches/cycles/release/scripts/modules/bpy/utils.py
branches/cycles/release/scripts/presets/interaction/blender.py
branches/cycles/release/scripts/presets/interaction/maya.py
branches/cycles/release/scripts/startup/bl_operators/mesh.py
branches/cycles/release/scripts/startup/bl_operators/presets.py
branches/cycles/release/scripts/startup/bl_operators/wm.py
branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/cycles/release/scripts/startup/bl_ui/properties_game.py
branches/cycles/release/scripts/startup/bl_ui/properties_material.py
branches/cycles/release/scripts/startup/bl_ui/properties_physics_cloth.py
branches/cycles/release/scripts/startup/bl_ui/properties_texture.py
branches/cycles/release/scripts/startup/bl_ui/space_image.py
branches/cycles/release/scripts/startup/bl_ui/space_userpref.py
branches/cycles/release/scripts/startup/bl_ui/space_userpref_keymap.py
branches/cycles/release/scripts/startup/bl_ui/space_view3d.py
branches/cycles/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/cycles/release/scripts/templates/operator_export.py
branches/cycles/source/blender/blenfont/BLF_api.h
branches/cycles/source/blender/blenfont/intern/blf.c
branches/cycles/source/blender/blenfont/intern/blf_font.c
branches/cycles/source/blender/blenfont/intern/blf_internal_types.h
branches/cycles/source/blender/blenkernel/BKE_cloth.h
branches/cycles/source/blender/blenkernel/BKE_collision.h
branches/cycles/source/blender/blenkernel/BKE_image.h
branches/cycles/source/blender/blenkernel/BKE_sequencer.h
branches/cycles/source/blender/blenkernel/BKE_shrinkwrap.h
branches/cycles/source/blender/blenkernel/CMakeLists.txt
branches/cycles/source/blender/blenkernel/SConscript
branches/cycles/source/blender/blenkernel/intern/DerivedMesh.c
branches/cycles/source/blender/blenkernel/intern/action.c
branches/cycles/source/blender/blenkernel/intern/blender.c
branches/cycles/source/blender/blenkernel/intern/cdderivedmesh.c
branches/cycles/source/blender/blenkernel/intern/cloth.c
branches/cycles/source/blender/blenkernel/intern/collision.c
branches/cycles/source/blender/blenkernel/intern/constraint.c
branches/cycles/source/blender/blenkernel/intern/context.c
branches/cycles/source/blender/blenkernel/intern/depsgraph.c
branches/cycles/source/blender/blenkernel/intern/font.c
branches/cycles/source/blender/blenkernel/intern/idprop.c
branches/cycles/source/blender/blenkernel/intern/image.c
branches/cycles/source/blender/blenkernel/intern/implicit.c
branches/cycles/source/blender/blenkernel/intern/library.c
branches/cycles/source/blender/blenkernel/intern/node.c
branches/cycles/source/blender/blenkernel/intern/object.c
branches/cycles/source/blender/blenkernel/intern/particle.c
branches/cycles/source/blender/blenkernel/intern/pointcache.c
branches/cycles/source/blender/blenkernel/intern/sequencer.c
branches/cycles/source/blender/blenkernel/intern/subsurf_ccg.c
branches/cycles/source/blender/blenkernel/intern/texture.c
branches/cycles/source/blender/blenlib/BLI_listbase.h

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36498] branches/cycles/source/blender/ modifiers/intern/MOD_warp.c: Cycles merge: add missing file.

2011-05-05 Thread Brecht Van Lommel
Revision: 36498
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36498
Author:   blendix
Date: 2011-05-05 10:36:43 + (Thu, 05 May 2011)
Log Message:
---
Cycles merge: add missing file.

Added Paths:
---
branches/cycles/source/blender/modifiers/intern/MOD_warp.c

Added: branches/cycles/source/blender/modifiers/intern/MOD_warp.c
===
--- branches/cycles/source/blender/modifiers/intern/MOD_warp.c  
(rev 0)
+++ branches/cycles/source/blender/modifiers/intern/MOD_warp.c  2011-05-05 
10:36:43 UTC (rev 36498)
@@ -0,0 +1,365 @@
+/*
+* $Id: MOD_warp.c 36420 2011-05-01 23:16:16Z gsrb3d $
+*
+* * BEGIN GPL LICENSE BLOCK *
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software  Foundation,
+* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* Contributor(s): Campbell Barton
+*
+* * END GPL LICENSE BLOCK *
+*
+*/
+
+#include string.h
+
+#include MEM_guardedalloc.h
+
+#include BLI_math.h
+#include BLI_utildefines.h
+
+#include BKE_cdderivedmesh.h
+#include BKE_modifier.h
+#include BKE_deform.h
+#include BKE_texture.h
+#include BKE_colortools.h
+
+#include DNA_object_types.h
+#include DNA_meshdata_types.h
+
+#include depsgraph_private.h
+
+#include RE_shader_ext.h
+
+#include MOD_util.h
+
+
+static void initData(ModifierData *md)
+{
+   WarpModifierData *wmd = (WarpModifierData*) md;
+
+   wmd-curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+   wmd-texture = NULL;
+   wmd-strength = 1.0f;
+   wmd-falloff_radius = 1.0f;
+   wmd-falloff_type = eWarp_Falloff_Smooth;
+   wmd-flag = 0;
+}
+
+static void copyData(ModifierData *md, ModifierData *target)
+{
+   WarpModifierData *wmd = (WarpModifierData*) md;
+   WarpModifierData *twmd = (WarpModifierData*) target;
+
+   twmd-object_from = wmd-object_from;
+   twmd-object_to = wmd-object_to;
+
+   twmd-strength = wmd-strength;
+   twmd-falloff_radius = wmd-falloff_radius;
+   twmd-falloff_type = wmd-falloff_type;
+   strncpy(twmd-defgrp_name, wmd-defgrp_name, sizeof(twmd-defgrp_name));
+   twmd-curfalloff = curvemapping_copy(wmd-curfalloff);
+
+   /* map info */
+   twmd-texture = wmd-texture;
+   twmd-map_object = wmd-map_object;
+   strncpy(twmd-uvlayer_name, wmd-uvlayer_name, 
sizeof(twmd-uvlayer_name));
+   twmd-texmapping= wmd-texmapping;
+}
+
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
+{
+   WarpModifierData *wmd = (WarpModifierData *)md;
+   CustomDataMask dataMask = 0;
+
+   /* ask for vertexgroups if we need them */
+   if(wmd-defgrp_name[0]) dataMask |= (1  CD_MDEFORMVERT);
+   dataMask |= (1  CD_MDEFORMVERT);
+
+   /* ask for UV coordinates if we need them */
+   if(wmd-texmapping == MOD_DISP_MAP_UV) dataMask |= (1  CD_MTFACE);
+
+   return dataMask;
+}
+
+static int dependsOnTime(ModifierData *md)
+{
+   WarpModifierData *wmd = (WarpModifierData *)md;
+
+   if(wmd-texture) {
+   return BKE_texture_dependsOnTime(wmd-texture);
+   }
+   else {
+   return 0;
+   }
+}
+
+static void freeData(ModifierData *md)
+{
+   WarpModifierData *wmd = (WarpModifierData *) md;
+   curvemapping_free(wmd-curfalloff);
+}
+
+
+static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
+{
+   WarpModifierData *wmd = (WarpModifierData*) md;
+
+   return !(wmd-object_from  wmd-object_to);
+}
+
+static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc 
walk, void *userData)
+{
+   WarpModifierData *wmd = (WarpModifierData*) md;
+
+   walk(userData, ob, wmd-object_from);
+   walk(userData, ob, wmd-object_to);
+   walk(userData, ob, wmd-map_object);
+}
+
+static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void 
*userData)
+{
+   WarpModifierData *wmd = (WarpModifierData*) md;
+
+   walk(userData, ob, (ID **)wmd-texture);
+
+   walk(userData, ob, (ID **)wmd-object_from);
+   walk(userData, ob, (ID **)wmd-object_to);
+   walk(userData, ob, (ID **)wmd-map_object);
+}
+
+static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene 
*UNUSED(scene),
+   Object *UNUSED(ob), DagNode *obNode)
+{
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36500] branches/cycles/intern/cycles: Cycles: two 32 bit fixes with help from IRC user Agiofws.

2011-05-05 Thread Brecht Van Lommel
Revision: 36500
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36500
Author:   blendix
Date: 2011-05-05 13:51:33 + (Thu, 05 May 2011)
Log Message:
---
Cycles: two 32 bit fixes with help from IRC user Agiofws.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_python.cpp
branches/cycles/intern/cycles/util/util_system.cpp

Modified: branches/cycles/intern/cycles/blender/blender_python.cpp
===
--- branches/cycles/intern/cycles/blender/blender_python.cpp2011-05-05 
13:29:16 UTC (rev 36499)
+++ branches/cycles/intern/cycles/blender/blender_python.cpp2011-05-05 
13:51:33 UTC (rev 36500)
@@ -41,34 +41,34 @@
 
 static PyObject *create_func(PyObject *self, PyObject *args)
 {
-   Py_ssize_t pyengine, pydata, pyscene, pyregion, pyv3d, pyrv3d;
+   PyObject *pyengine, *pydata, *pyscene, *pyregion, *pyv3d, *pyrv3d;
 
-   if(!PyArg_ParseTuple(args, nn, pyengine, pydata, pyscene, 
pyregion, pyv3d, pyrv3d))
+   if(!PyArg_ParseTuple(args, OO, pyengine, pydata, pyscene, 
pyregion, pyv3d, pyrv3d))
return NULL;
 
/* RNA */
PointerRNA engineptr;
-   RNA_pointer_create(NULL, RNA_RenderEngine, (void*)pyengine, 
engineptr);
+   RNA_pointer_create(NULL, RNA_RenderEngine, 
(void*)PyLong_AsVoidPtr(pyengine), engineptr);
BL::RenderEngine engine(engineptr);
 
PointerRNA dataptr;
-   RNA_id_pointer_create((ID*)pydata, dataptr);
+   RNA_id_pointer_create((ID*)PyLong_AsVoidPtr(pydata), dataptr);
BL::BlendData data(dataptr);
 
PointerRNA sceneptr;
-   RNA_id_pointer_create((ID*)pyscene, sceneptr);
+   RNA_id_pointer_create((ID*)PyLong_AsVoidPtr(pyscene), sceneptr);
BL::Scene scene(sceneptr);
 
PointerRNA regionptr;
-   RNA_id_pointer_create((ID*)pyregion, regionptr);
+   RNA_id_pointer_create((ID*)PyLong_AsVoidPtr(pyregion), regionptr);
BL::Region region(regionptr);
 
PointerRNA v3dptr;
-   RNA_id_pointer_create((ID*)pyv3d, v3dptr);
+   RNA_id_pointer_create((ID*)PyLong_AsVoidPtr(pyv3d), v3dptr);
BL::SpaceView3D v3d(v3dptr);
 
PointerRNA rv3dptr;
-   RNA_id_pointer_create((ID*)pyrv3d, rv3dptr);
+   RNA_id_pointer_create((ID*)PyLong_AsVoidPtr(pyrv3d), rv3dptr);
BL::RegionView3D rv3d(rv3dptr);
 
/* create session */
@@ -91,12 +91,12 @@
 
 static PyObject *free_func(PyObject *self, PyObject *args)
 {
-   Py_ssize_t pysession;
+   PyObject *pysession;
 
-   if(!PyArg_ParseTuple(args, n, pysession))
+   if(!PyArg_ParseTuple(args, O, pysession))
return NULL;
 
-   delete (BlenderSession*)pysession;
+   delete (BlenderSession*)PyLong_AsVoidPtr(pysession);
 
Py_INCREF(Py_None);
return Py_None;
@@ -104,14 +104,14 @@
 
 static PyObject *render_func(PyObject *self, PyObject *args)
 {
-   Py_ssize_t pysession;
+   PyObject *pysession;
 
-   if(!PyArg_ParseTuple(args, n, pysession))
+   if(!PyArg_ParseTuple(args, O, pysession))
return NULL;

Py_BEGIN_ALLOW_THREADS
 
-   BlenderSession *session = (BlenderSession*)pysession;
+   BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession);
session-render();
 
Py_END_ALLOW_THREADS
@@ -122,16 +122,16 @@
 
 static PyObject *draw_func(PyObject *self, PyObject *args)
 {
-   Py_ssize_t pysession, pyv3d, pyrv3d;
+   PyObject *pysession, *pyv3d, *pyrv3d;
 
-   if(!PyArg_ParseTuple(args, nnn, pysession, pyv3d, pyrv3d))
+   if(!PyArg_ParseTuple(args, OOO, pysession, pyv3d, pyrv3d))
return NULL;

-   BlenderSession *session = (BlenderSession*)pysession;
+   BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession);
 
bool draw_text = false;
 
-   if(pyrv3d) {
+   if(PyLong_AsVoidPtr(pyrv3d)) {
/* 3d view drawing */
int viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
@@ -164,12 +164,12 @@
 
 static PyObject *sync_func(PyObject *self, PyObject *args)
 {
-   Py_ssize_t pysession;
+   PyObject *pysession;
 
-   if(!PyArg_ParseTuple(args, n, pysession))
+   if(!PyArg_ParseTuple(args, O, pysession))
return NULL;
 
-   BlenderSession *session = (BlenderSession*)pysession;
+   BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession);
session-synchronize();
 
Py_INCREF(Py_None);

Modified: branches/cycles/intern/cycles/util/util_system.cpp
===
--- branches/cycles/intern/cycles/util/util_system.cpp  2011-05-05 13:29:16 UTC 
(rev 36499)
+++ branches/cycles/intern/cycles/util/util_system.cpp  2011-05-05 13:51:33 UTC 
(rev 36500)
@@ -60,7 +60,18 @@
 #ifndef _WIN32
 static void 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36510] trunk/blender/source/blenderplayer /CMakeLists.txt: Patch #27225: blenderplayer resource compilation error fix for cmake + mingw,

2011-05-06 Thread Brecht Van Lommel
Revision: 36510
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36510
Author:   blendix
Date: 2011-05-06 08:16:44 + (Fri, 06 May 2011)
Log Message:
---
Patch #27225: blenderplayer resource compilation error fix for cmake + mingw,
patch by Ryakiotakis Antonis.

Modified Paths:
--
trunk/blender/source/blenderplayer/CMakeLists.txt

Modified: trunk/blender/source/blenderplayer/CMakeLists.txt
===
--- trunk/blender/source/blenderplayer/CMakeLists.txt   2011-05-06 03:29:55 UTC 
(rev 36509)
+++ trunk/blender/source/blenderplayer/CMakeLists.txt   2011-05-06 08:16:44 UTC 
(rev 36510)
@@ -43,13 +43,25 @@
string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1)
string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2)
string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3)
-   add_definitions(
-   -DBLEN_VER_RC_STR=${BLENDER_VERSION}
-   -DBLEN_VER_RC_1=${bver1}
-   -DBLEN_VER_RC_2=${bver2}
-   -DBLEN_VER_RC_3=${bver3}
-   -DBLEN_VER_RC_4=0
-   )
+   if(MINGW)
+   add_definitions(
+   -DWINDRES
+   -DBLEN_VER_RC_STR_M=${BLENDER_VERSION}
+   -DBLEN_VER_RC_1=${bver1}
+   -DBLEN_VER_RC_2=${bver2}
+   -DBLEN_VER_RC_3=${bver3}
+   -DBLEN_VER_RC_4=0
+   )
+   else()
+   add_definitions(
+   -DBLEN_VER_RC_STR=${BLENDER_VERSION}
+   -DBLEN_VER_RC_1=${bver1}
+   -DBLEN_VER_RC_2=${bver2}
+   -DBLEN_VER_RC_3=${bver3}
+   -DBLEN_VER_RC_4=0
+   )
+   endif()
+
add_executable(blenderplayer ${EXETYPE} 
${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
 else()
add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36511] branches/cycles/source/blender/ makesrna/intern/rna_space.c: Cycles: fix missing #include.

2011-05-06 Thread Brecht Van Lommel
Revision: 36511
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36511
Author:   blendix
Date: 2011-05-06 09:19:29 + (Fri, 06 May 2011)
Log Message:
---
Cycles: fix missing #include.

Modified Paths:
--
branches/cycles/source/blender/makesrna/intern/rna_space.c

Modified: branches/cycles/source/blender/makesrna/intern/rna_space.c
===
--- branches/cycles/source/blender/makesrna/intern/rna_space.c  2011-05-06 
08:16:44 UTC (rev 36510)
+++ branches/cycles/source/blender/makesrna/intern/rna_space.c  2011-05-06 
09:19:29 UTC (rev 36511)
@@ -48,6 +48,7 @@
 #include WM_api.h
 #include WM_types.h
 
+#include RE_engine.h
 #include RE_pipeline.h
 
 EnumPropertyItem space_type_items[] = {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36519] trunk/blender/source/blender: Code cleanup: PIL_dynlib, renamed to BLI_dynlib, and other tweaks.

2011-05-06 Thread Brecht Van Lommel
Revision: 36519
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36519
Author:   blendix
Date: 2011-05-06 15:17:42 + (Fri, 06 May 2011)
Log Message:
---
Code cleanup: PIL_dynlib, renamed to BLI_dynlib, and other tweaks.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/seqeffects.c
trunk/blender/source/blender/blenkernel/intern/texture.c
trunk/blender/source/blender/blenlib/CMakeLists.txt
trunk/blender/source/blender/blenlib/intern/dynlib.c

Added Paths:
---
trunk/blender/source/blender/blenlib/BLI_dynlib.h

Removed Paths:
-
trunk/blender/source/blender/blenlib/PIL_dynlib.h

Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2011-05-06 
14:59:10 UTC (rev 36518)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2011-05-06 
15:17:42 UTC (rev 36519)
@@ -37,7 +37,7 @@
 #include stdlib.h
 
 #include MEM_guardedalloc.h
-#include PIL_dynlib.h
+#include BLI_dynlib.h
 
 #include BLI_math.h /* windows needs for M_PI */
 #include BLI_utildefines.h
@@ -138,18 +138,18 @@
pis-instance_private_data = NULL;
 
/* clear the error list */
-   PIL_dynlib_get_error_as_string(NULL);
+   BLI_dynlib_get_error_as_string(NULL);
 
-   /* if(pis-handle) PIL_dynlib_close(pis-handle); */
+   /* if(pis-handle) BLI_dynlib_close(pis-handle); */
/* pis-handle= 0; */
 
/* open the needed object */
-   pis-handle= PIL_dynlib_open(pis-name);
+   pis-handle= BLI_dynlib_open(pis-name);
if(test_dlerr(pis-name, pis-name)) return;
 
if (pis-handle != NULL) {
/* find the address of the version function */
-   version= (int (*)(void))PIL_dynlib_find_symbol(pis-handle, 
plugin_seq_getversion);
+   version= (int (*)(void))BLI_dynlib_find_symbol(pis-handle, 
plugin_seq_getversion);
if (test_dlerr(pis-name, plugin_seq_getversion)) return;
 
if (version != NULL) {
@@ -158,7 +158,7 @@
int (*info_func)(PluginInfo *);
PluginInfo *info= (PluginInfo*) 
MEM_mallocN(sizeof(PluginInfo), plugin_info);
 
-   info_func= (int (*)(PluginInfo 
*))PIL_dynlib_find_symbol(pis-handle, plugin_getinfo);
+   info_func= (int (*)(PluginInfo 
*))BLI_dynlib_find_symbol(pis-handle, plugin_getinfo);
 
if(info_func == NULL) error(No info func);
else {
@@ -176,21 +176,21 @@
}
MEM_freeN(info);
 
-   cp= PIL_dynlib_find_symbol(pis-handle, 
seqname);
+   cp= BLI_dynlib_find_symbol(pis-handle, 
seqname);
if(cp) strncpy(cp, seqname, 21);
} else {
printf (Plugin returned unrecognized version 
number\n);
return;
}
}
-   alloc_private = (void* (*)(void))PIL_dynlib_find_symbol(
+   alloc_private = (void* (*)(void))BLI_dynlib_find_symbol(
pis-handle, plugin_seq_alloc_private_data);
if (alloc_private) {
pis-instance_private_data = alloc_private();
}

pis-current_private_data = (void**) 
-   PIL_dynlib_find_symbol(
+   BLI_dynlib_find_symbol(
pis-handle, plugin_private_data);
}
 }
@@ -229,12 +229,12 @@
 {
if(pis==NULL) return;
 
-   /* no PIL_dynlib_close: same plugin can be opened multiple times with 1 
handle */
+   /* no BLI_dynlib_close: same plugin can be opened multiple times with 1 
handle */
 
if (pis-instance_private_data) {
void (*free_private)(void *);
 
-   free_private = (void (*)(void *))PIL_dynlib_find_symbol(
+   free_private = (void (*)(void *))BLI_dynlib_find_symbol(
pis-handle, plugin_seq_free_private_data);
if (free_private) {
free_private(pis-instance_private_data);
@@ -301,7 +301,7 @@
if(seq-plugin-cfra) 
*(seq-plugin-cfra)= cfra;

-   cp = PIL_dynlib_find_symbol(
+   cp = BLI_dynlib_find_symbol(
seq-plugin-handle, seqname);
 
if(cp) strncpy(cp, seq-name+2, 22);

Modified: trunk/blender/source/blender/blenkernel/intern/texture.c
===
--- 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36520] trunk/blender/intern/tools: Code cleanup: remove some unused scripts.

2011-05-06 Thread Brecht Van Lommel
Revision: 36520
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36520
Author:   blendix
Date: 2011-05-06 15:31:45 + (Fri, 06 May 2011)
Log Message:
---
Code cleanup: remove some unused scripts.

Removed Paths:
-
trunk/blender/intern/tools/cpifdiff.sh
trunk/blender/intern/tools/cvs-tools/
trunk/blender/intern/tools/tinderbox/
trunk/blender/intern/tools/update-cvs/

Deleted: trunk/blender/intern/tools/cpifdiff.sh
===
--- trunk/blender/intern/tools/cpifdiff.sh  2011-05-06 15:17:42 UTC (rev 
36519)
+++ trunk/blender/intern/tools/cpifdiff.sh  2011-05-06 15:31:45 UTC (rev 
36520)
@@ -1,83 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-# * BEGIN GPL LICENSE BLOCK *
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2002 by Hans Lambermont
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# * END GPL LICENSE BLOCK *
-#
-# cp-if-diff copies src(s) to dst only if they are different, so trying
-# not to unneccesarily break compiler dependencies
-
-numargs=$#
-
-if [ $numargs -lt 2 ]; then
-   echo Usage: cpifdiff source [source] target
-   exit 1
-fi
-
-cpargs=`expr $numargs - 1`
-i=1
-while [ $i -le $cpargs ]; do
-args=$args $1
-   #echo arg $i = $args
-i=`expr $i + 1`
-shift
-done
-dst=$1
-
-for src in $args; do
-   #echo $src to $dst
-   if [ ! -f $src ]; then
-   echo ERROR $src is not a file
-   exit 1
-   fi
-   if [ -d $dst ]; then
-   src2=`echo $src | sed 's/.*\///'`
-   if [ -f $dst/$src2 ]; then
-   diff $src $dst 21 /dev/null
-   if [ $? -eq 0 ]; then
-   echo $src2 already installed
-   else
-   echo install $src
-   cp -f $src $dst
-   fi
-   else
-   echo Install $src
-   cp $src $dst
-   fi
-   elif [ -f $dst ]; then
-   diff $src $dst 21 /dev/null
-   if [ $? -eq 0 ]; then
-   echo $src already installed
-   else
-   echo install $src
-   cp -f $src $dst
-   fi
-   else
-   echo ERROR $dst is not a directory or a file
-   exit 1
-   fi
-done
-

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36523] trunk/blender: Code cleanup: remove source/kernel module, this wasn't really the kernel of

2011-05-06 Thread Brecht Van Lommel
Revision: 36523
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36523
Author:   blendix
Date: 2011-05-06 20:18:42 + (Fri, 06 May 2011)
Log Message:
---
Code cleanup: remove source/kernel module, this wasn't really the kernel of
anything, only contained a hash map and functions to pass command line args
to the game engine. Moved those to container and BlenderRoutines modules.

Modified Paths:
--
trunk/blender/SConstruct
trunk/blender/build_files/scons/config/darwin-config.py
trunk/blender/doc/doxygen/doxygen.source
trunk/blender/intern/container/CMakeLists.txt
trunk/blender/intern/container/CTR_Map.h
trunk/blender/intern/container/SConscript
trunk/blender/source/CMakeLists.txt
trunk/blender/source/SConscript
trunk/blender/source/blender/editors/space_view3d/CMakeLists.txt
trunk/blender/source/blender/editors/space_view3d/SConscript
trunk/blender/source/blender/editors/space_view3d/view3d_view.c
trunk/blender/source/blender/readblenfile/CMakeLists.txt
trunk/blender/source/blender/readblenfile/SConscript
trunk/blender/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
trunk/blender/source/blender/render/CMakeLists.txt
trunk/blender/source/blender/windowmanager/CMakeLists.txt
trunk/blender/source/blender/windowmanager/SConscript
trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
trunk/blender/source/blenderplayer/CMakeLists.txt
trunk/blender/source/creator/CMakeLists.txt
trunk/blender/source/creator/SConscript
trunk/blender/source/creator/creator.c
trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
trunk/blender/source/gameengine/BlenderRoutines/CMakeLists.txt
trunk/blender/source/gameengine/BlenderRoutines/SConscript
trunk/blender/source/gameengine/Converter/BL_ActionActuator.h
trunk/blender/source/gameengine/Converter/BL_ArmatureActuator.cpp
trunk/blender/source/gameengine/Converter/BL_ArmatureActuator.h
trunk/blender/source/gameengine/Converter/BL_ArmatureChannel.h
trunk/blender/source/gameengine/Converter/BL_ArmatureConstraint.cpp
trunk/blender/source/gameengine/Converter/BL_ArmatureConstraint.h
trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h
trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.h
trunk/blender/source/gameengine/Converter/BL_DeformableGameObject.h
trunk/blender/source/gameengine/Converter/BL_MeshDeformer.cpp
trunk/blender/source/gameengine/Converter/BL_MeshDeformer.h
trunk/blender/source/gameengine/Converter/BL_ModifierDeformer.cpp
trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.h
trunk/blender/source/gameengine/Converter/BL_ShapeDeformer.cpp
trunk/blender/source/gameengine/Converter/BL_SkinDeformer.cpp
trunk/blender/source/gameengine/Converter/BL_SkinDeformer.h
trunk/blender/source/gameengine/Converter/CMakeLists.txt
trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.h
trunk/blender/source/gameengine/Converter/KX_SoftBodyDeformer.cpp
trunk/blender/source/gameengine/Converter/KX_SoftBodyDeformer.h
trunk/blender/source/gameengine/Converter/SConscript
trunk/blender/source/gameengine/Expressions/CMakeLists.txt
trunk/blender/source/gameengine/Expressions/SConscript
trunk/blender/source/gameengine/GameLogic/CMakeLists.txt
trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.h
trunk/blender/source/gameengine/GameLogic/SCA_LogicManager.h
trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.h
trunk/blender/source/gameengine/GameLogic/SConscript
trunk/blender/source/gameengine/GamePlayer/common/CMakeLists.txt
trunk/blender/source/gameengine/GamePlayer/common/GPC_Engine.cpp
trunk/blender/source/gameengine/GamePlayer/common/SConscript
trunk/blender/source/gameengine/GamePlayer/ghost/CMakeLists.txt
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
trunk/blender/source/gameengine/GamePlayer/ghost/SConscript
trunk/blender/source/gameengine/Ketsji/CMakeLists.txt
trunk/blender/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
trunk/blender/source/gameengine/Ketsji/KXNetwork/SConscript
trunk/blender/source/gameengine/Ketsji/KX_CameraActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_CameraActuator.h
trunk/blender/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36524] trunk/blender/build_files/scons/ config/darwin-config.py: Forgot to mention that for scons, I' ve disabled install of the texture and

2011-05-06 Thread Brecht Van Lommel
Revision: 36524
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36524
Author:   blendix
Date: 2011-05-06 20:21:20 + (Fri, 06 May 2011)
Log Message:
---
Forgot to mention that for scons, I've disabled install of the texture and
sequence plugins, as was already done for cmake, they don't work in 2.5.

This is a fix for last commit, this file shouldn't have been included.

Modified Paths:
--
trunk/blender/build_files/scons/config/darwin-config.py

Modified: trunk/blender/build_files/scons/config/darwin-config.py
===
--- trunk/blender/build_files/scons/config/darwin-config.py 2011-05-06 
20:18:42 UTC (rev 36523)
+++ trunk/blender/build_files/scons/config/darwin-config.py 2011-05-06 
20:21:20 UTC (rev 36524)
@@ -14,7 +14,7 @@
 ### Cocoa  architecture settings  ##
 #
 WITH_GHOST_COCOA=True
-MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
+MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
 
 
 cmd = 'uname -p'

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36563] trunk/blender/source/blender: Code cleanup: warning fixes.

2011-05-09 Thread Brecht Van Lommel
Revision: 36563
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36563
Author:   blendix
Date: 2011-05-09 08:01:48 + (Mon, 09 May 2011)
Log Message:
---
Code cleanup: warning fixes.

Modified Paths:
--
trunk/blender/source/blender/editors/space_image/image_buttons.c
trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
trunk/blender/source/blender/windowmanager/intern/wm_draw.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c
===
--- trunk/blender/source/blender/editors/space_image/image_buttons.c
2011-05-09 07:54:21 UTC (rev 36562)
+++ trunk/blender/source/blender/editors/space_image/image_buttons.c
2011-05-09 08:01:48 UTC (rev 36563)
@@ -98,19 +98,6 @@
 
 /* proto */
 
-static void do_image_panel_events(bContext *C, void *UNUSED(arg), int event)
-{
-   SpaceImage *sima= CTX_wm_space_image(C);
-   
-   switch(event) {
-   case B_REDR:
-   break;
-   }
-
-   /* all events now */
-   WM_event_add_notifier(C, NC_IMAGE, sima-image);
-}
-
 static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf 
*ibuf, char *str)
 {
int ofs= 0;

Modified: trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
===
--- trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 
2011-05-09 07:54:21 UTC (rev 36562)
+++ trunk/blender/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 
2011-05-09 08:01:48 UTC (rev 36563)
@@ -980,7 +980,7 @@
 {
if (header.hasDX10Header())
{
-#pragma NV_MESSAGE(TODO: Update hasAlpha to handle all DX10 formats.)
+   /* TODO: Update hasAlpha to handle all DX10 formats. */
return 
header.header10.dxgiFormat == DXGI_FORMAT_BC1_UNORM ||
header.header10.dxgiFormat == DXGI_FORMAT_BC2_UNORM ||

Modified: trunk/blender/source/blender/windowmanager/intern/wm_draw.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_draw.c 2011-05-09 
07:54:21 UTC (rev 36562)
+++ trunk/blender/source/blender/windowmanager/intern/wm_draw.c 2011-05-09 
08:01:48 UTC (rev 36563)
@@ -816,11 +816,3 @@
win-screen-do_draw= 1;
 }
 
-static void wm_draw_region_modified(wmWindow *win, ARegion *ar)
-{
-   int drawmethod= wm_automatic_draw_method(win);
-
-   if(ELEM(drawmethod, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP))
-   ED_region_tag_redraw(ar);
-}
-

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2011-05-09 07:54:21 UTC (rev 36562)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2011-05-09 08:01:48 UTC (rev 36563)
@@ -2035,6 +2035,8 @@
 
 /* *** */
 
+#if defined(WIN32)
+
 static int wm_console_toggle_op(bContext *UNUSED(C), wmOperator *UNUSED(op))
 {
GHOST_toggleConsole(2);
@@ -2051,6 +2053,8 @@
ot-poll= WM_operator_winactive;
 }
 
+#endif
+
 /*  default paint cursors, draw always around cursor *** */
 /*
  - returns handler to free 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36566] branches/cycles/intern/cycles: Cycles: fix color difference between render / 3d view with color management disabled.

2011-05-09 Thread Brecht Van Lommel
Revision: 36566
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36566
Author:   blendix
Date: 2011-05-09 09:03:08 + (Mon, 09 May 2011)
Log Message:
---
Cycles: fix color difference between render / 3d view with color management 
disabled.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_session.cpp
branches/cycles/intern/cycles/util/util_color.h

Modified: branches/cycles/intern/cycles/blender/blender_session.cpp
===
--- branches/cycles/intern/cycles/blender/blender_session.cpp   2011-05-09 
08:20:39 UTC (rev 36565)
+++ branches/cycles/intern/cycles/blender/blender_session.cpp   2011-05-09 
09:03:08 UTC (rev 36566)
@@ -130,14 +130,17 @@
 
vectorfloat4 buffer(width*height);
float fac = 1.0f/255.0f;
+   bool color_management = b_scene.render().use_color_management();
 
/* normalize */
for(int i = width*height - 1; i = 0; i--) {
uchar4 f = rgba[i];
-   float r = color_srgb_to_scene_linear(f.x*fac);
-   float g = color_srgb_to_scene_linear(f.y*fac);
-   float b = color_srgb_to_scene_linear(f.z*fac);
-   buffer[i] = make_float4(r, g, b, 1.0f);
+   float3 rgb = make_float3(f.x, f.y, f.z)*fac;
+
+   if(color_management)
+   rgb = color_srgb_to_scene_linear(rgb);
+
+   buffer[i] = make_float4(rgb.x, rgb.y, rgb.z, 1.0f);
}
 
struct RenderResult *rrp = 
RE_engine_begin_result((RenderEngine*)b_engine.ptr.data, 0, 0, width, height);

Modified: branches/cycles/intern/cycles/util/util_color.h
===
--- branches/cycles/intern/cycles/util/util_color.h 2011-05-09 08:20:39 UTC 
(rev 36565)
+++ branches/cycles/intern/cycles/util/util_color.h 2011-05-09 09:03:08 UTC 
(rev 36566)
@@ -40,6 +40,22 @@
return 1.055f * pow(c, 1.0f/2.4f) - 0.055f;
 }
 
+__device float3 color_srgb_to_scene_linear(float3 c)
+{
+   return make_float3(
+   color_srgb_to_scene_linear(c.x),
+   color_srgb_to_scene_linear(c.y),
+   color_srgb_to_scene_linear(c.z));
+}
+
+__device float3 color_scene_linear_to_srgb(float3 c)
+{
+   return make_float3(
+   color_scene_linear_to_srgb(c.x),
+   color_scene_linear_to_srgb(c.y),
+   color_scene_linear_to_srgb(c.z));
+}
+
 CCL_NAMESPACE_END
 
 #endif /* __UTIL_COLOR_H__ */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36570] branches/cycles/source/blender/ editors/interface/interface_node.c: Cycles: fix crash when drawing properties UI while editing node links.

2011-05-09 Thread Brecht Van Lommel
Revision: 36570
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36570
Author:   blendix
Date: 2011-05-09 10:40:53 + (Mon, 09 May 2011)
Log Message:
---
Cycles: fix crash when drawing properties UI while editing node links.

Modified Paths:
--
branches/cycles/source/blender/editors/interface/interface_node.c

Modified: branches/cycles/source/blender/editors/interface/interface_node.c
===
--- branches/cycles/source/blender/editors/interface/interface_node.c   
2011-05-09 10:03:06 UTC (rev 36569)
+++ branches/cycles/source/blender/editors/interface/interface_node.c   
2011-05-09 10:40:53 UTC (rev 36570)
@@ -74,7 +74,7 @@
 {
bNodeSocket *input;
 
-   if(node-flag  NODE_TEST)
+   if(!node || (node-flag  NODE_TEST))
return; /* in case of cycles */

node-flag |= NODE_TEST;
@@ -88,7 +88,7 @@
 {
bNodeSocket *input;
 
-   if(!(node-flag  NODE_TEST))
+   if(!node || !(node-flag  NODE_TEST))
return; /* in case of cycles */

node-flag = ~NODE_TEST;
@@ -115,6 +115,9 @@
bNode *node, *next;
bNodeSocket *sock;
 
+   if(!node)
+   return;
+
/* tag linked nodes to be removed */
for(node=ntree-nodes.first; node; node=node-next)
node-flag = ~NODE_TEST;
@@ -144,7 +147,7 @@
 
 static void ui_node_sock_name(bNodeSocket *sock, char name[UI_MAX_NAME_STR])
 {
-   if(sock-link) {
+   if(sock-link  sock-link-fromnode) {
bNode *node = sock-link-fromnode;
 
if(node-type == NODE_GROUP)
@@ -229,7 +232,7 @@
if(strcmp(sock_prev-name, 
sock_from-name) == 0  sock_prev-type == sock_from-type) {
bNodeLink *link = 
sock_prev-link;
 
-   if(link) {
+   if(link  link-fromnode) {
nodeAddLink(ntree, 
link-fromnode, link-fromsock, node_from, sock_from);
nodeRemLink(ntree, 
link);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36571] branches/cycles: Cycles: different fix for animation render, in render API instead of python script .

2011-05-09 Thread Brecht Van Lommel
Revision: 36571
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36571
Author:   blendix
Date: 2011-05-09 10:43:09 + (Mon, 09 May 2011)
Log Message:
---
Cycles: different fix for animation render, in render API instead of python 
script.

Modified Paths:
--
branches/cycles/intern/cycles/blender/addon/__init__.py
branches/cycles/source/blender/render/intern/pipeline/engine.c

Modified: branches/cycles/intern/cycles/blender/addon/__init__.py
===
--- branches/cycles/intern/cycles/blender/addon/__init__.py 2011-05-09 
10:40:53 UTC (rev 36570)
+++ branches/cycles/intern/cycles/blender/addon/__init__.py 2011-05-09 
10:43:09 UTC (rev 36571)
@@ -48,7 +48,6 @@
engine.free(self)
 
def render(self, scene):
-   scene.frame_set(scene.frame_current) # should this be done 
already?
engine.create(self, scene, True)
engine.render(self, scene)
 

Modified: branches/cycles/source/blender/render/intern/pipeline/engine.c
===
--- branches/cycles/source/blender/render/intern/pipeline/engine.c  
2011-05-09 10:40:53 UTC (rev 36570)
+++ branches/cycles/source/blender/render/intern/pipeline/engine.c  
2011-05-09 10:43:09 UTC (rev 36571)
@@ -41,6 +41,7 @@
 #include BLI_utildefines.h
 
 #include BKE_report.h
+#include BKE_scene.h
 
 #include IMB_imbuf.h
 #include IMB_imbuf_types.h
@@ -194,6 +195,9 @@
engine = RE_engine_create(type);
engine-re= re;
 
+   if((re-r.scemode  (R_NO_FRAME_UPDATE|R_PREVIEWBUTS))==0)
+   scene_update_for_newframe(re-main, re-scene, re-lay);
+
type-render(engine, re-scene);
 
free_render_result(engine-fullresult, engine-fullresult.first);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36572] branches/cycles/source/blender/ nodes/intern/SHD_nodes: Cycles: fix node outputs not connect to more than one input.

2011-05-09 Thread Brecht Van Lommel
Revision: 36572
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36572
Author:   blendix
Date: 2011-05-09 11:02:04 + (Mon, 09 May 2011)
Log Message:
---
Cycles: fix node outputs not connect to more than one input.

Modified Paths:
--
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_attribute.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_background.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_emission.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_geometry.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_light_path.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_mix_closure.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_blend.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_clouds.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_coord.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_distnoise.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_magic.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_marble.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_musgrave.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_noise.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_sky.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_stucci.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_voronoi.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_wood.c

Modified: 
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c
===
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c 
2011-05-09 10:43:09 UTC (rev 36571)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c 
2011-05-09 11:02:04 UTC (rev 36572)
@@ -38,7 +38,7 @@
 };
 
 static bNodeSocketType sh_node_add_closure_out[]= {
-   {   SOCK_CLOSURE, 1, Closure, 0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
+   {   SOCK_CLOSURE, 0, Closure, 0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
{   -1, 0,}
 };
 

Modified: branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_attribute.c
===
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_attribute.c   
2011-05-09 10:43:09 UTC (rev 36571)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_attribute.c   
2011-05-09 11:02:04 UTC (rev 36572)
@@ -32,7 +32,7 @@
 /*  OUTPUT  */
 
 static bNodeSocketType sh_node_attribute_out[]= {
-   {   SOCK_VECTOR, 1, Vector,   0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
+   {   SOCK_VECTOR, 0, Vector,   0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
{   -1, 0,}
 };
 

Modified: branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_background.c
===
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_background.c  
2011-05-09 10:43:09 UTC (rev 36571)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_background.c  
2011-05-09 11:02:04 UTC (rev 36572)
@@ -38,7 +38,7 @@
 };
 
 static bNodeSocketType sh_node_background_out[]= {
-   {   SOCK_CLOSURE, 1, Background,  0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
+   {   SOCK_CLOSURE, 0, Background,  0.0f, 0.0f, 0.0f, 0.0f, 
0.0f, 1.0f},
{   -1, 0,}
 };
 

Modified: 
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
===
--- 
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
2011-05-09 10:43:09 UTC (rev 36571)
+++ 
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
2011-05-09 11:02:04 UTC (rev 36572)
@@ -39,7 +39,7 @@
 };
 
 static bNodeSocketType 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36619] trunk/blender/source/tools/darwin/ : Code cleanup: remove unused script.

2011-05-11 Thread Brecht Van Lommel
Revision: 36619
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36619
Author:   blendix
Date: 2011-05-11 19:20:26 + (Wed, 11 May 2011)
Log Message:
---
Code cleanup: remove unused script.

Removed Paths:
-
trunk/blender/source/tools/darwin/

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36637] trunk/blender/intern/iksolver/ intern/IK_QSegment.cpp: Fix #27279: IK bone rotation limits set to 0 disabled the limit, this was

2011-05-12 Thread Brecht Van Lommel
Revision: 36637
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36637
Author:   blendix
Date: 2011-05-12 08:34:31 + (Thu, 12 May 2011)
Log Message:
---
Fix #27279: IK bone rotation limits set to 0 disabled the limit, this was
unintentional, since there is already a toggle to enable/disable it.

Modified Paths:
--
trunk/blender/intern/iksolver/intern/IK_QSegment.cpp

Modified: trunk/blender/intern/iksolver/intern/IK_QSegment.cpp
===
--- trunk/blender/intern/iksolver/intern/IK_QSegment.cpp2011-05-12 
08:00:04 UTC (rev 36636)
+++ trunk/blender/intern/iksolver/intern/IK_QSegment.cpp2011-05-12 
08:34:31 UTC (rev 36637)
@@ -370,7 +370,7 @@
 
 void IK_QSphericalSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
 {
-   if (lmin = lmax)
+   if (lmin  lmax)
return;

if (axis == 1) {
@@ -613,7 +613,7 @@
 
 void IK_QRevoluteSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
 {
-   if (lmin = lmax || m_axis != axis)
+   if (lmin  lmax || m_axis != axis)
return;

// clamp and convert to axis angle parameters
@@ -752,7 +752,7 @@
 
 void IK_QSwingSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
 {
-   if (lmin = lmax)
+   if (lmin  lmax)
return;

// clamp and convert to axis angle parameters
@@ -898,7 +898,7 @@
 
 void IK_QElbowSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
 {
-   if (lmin = lmax)
+   if (lmin  lmax)
return;
 
// clamp and convert to axis angle parameters

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36641] branches/cycles/intern/cycles/util /util_transform.h: Cycles: fix mapping node rotation not working correct for Y/Z axes, patch by Sanne .

2011-05-12 Thread Brecht Van Lommel
Revision: 36641
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36641
Author:   blendix
Date: 2011-05-12 11:34:16 + (Thu, 12 May 2011)
Log Message:
---
Cycles: fix mapping node rotation not working correct for Y/Z axes, patch by 
Sanne.

Modified Paths:
--
branches/cycles/intern/cycles/util/util_transform.h

Modified: branches/cycles/intern/cycles/util/util_transform.h
===
--- branches/cycles/intern/cycles/util/util_transform.h 2011-05-12 11:16:32 UTC 
(rev 36640)
+++ branches/cycles/intern/cycles/util/util_transform.h 2011-05-12 11:34:16 UTC 
(rev 36641)
@@ -173,8 +173,8 @@
 {
return
transform_rotate(euler.x, make_float3(1.0f, 0.0f, 0.0f)) *
-   transform_rotate(euler.y, make_float3(1.0f, 0.0f, 0.0f)) *
-   transform_rotate(euler.z, make_float3(1.0f, 0.0f, 0.0f));
+   transform_rotate(euler.y, make_float3(0.0f, 1.0f, 0.0f)) *
+   transform_rotate(euler.z, make_float3(0.0f, 0.0f, 1.0f));
 }
 
 __device_inline Transform transform_orthographic(float znear, float zfar)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36665] branches/cycles/source/blender/ editors/interface/interface_node.c: Cycles: fix node link remove from menu not working.

2011-05-13 Thread Brecht Van Lommel
Revision: 36665
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36665
Author:   blendix
Date: 2011-05-13 12:10:03 + (Fri, 13 May 2011)
Log Message:
---
Cycles: fix node link remove from menu not working.

Modified Paths:
--
branches/cycles/source/blender/editors/interface/interface_node.c

Modified: branches/cycles/source/blender/editors/interface/interface_node.c
===
--- branches/cycles/source/blender/editors/interface/interface_node.c   
2011-05-13 12:08:34 UTC (rev 36664)
+++ branches/cycles/source/blender/editors/interface/interface_node.c   
2011-05-13 12:10:03 UTC (rev 36665)
@@ -115,7 +115,7 @@
bNode *node, *next;
bNodeSocket *sock;
 
-   if(!node)
+   if(!rem_node)
return;
 
/* tag linked nodes to be removed */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36666] branches/cycles/intern/cycles: Cycles: fix BSDF closure inputs ignoring links.

2011-05-13 Thread Brecht Van Lommel
Revision: 3
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=3
Author:   blendix
Date: 2011-05-13 12:11:08 + (Fri, 13 May 2011)
Log Message:
---
Cycles: fix BSDF closure inputs ignoring links.

Modified Paths:
--
branches/cycles/intern/cycles/kernel/svm/svm.h
branches/cycles/intern/cycles/kernel/svm/svm_closure.h
branches/cycles/intern/cycles/render/nodes.cpp

Modified: branches/cycles/intern/cycles/kernel/svm/svm.h
===
--- branches/cycles/intern/cycles/kernel/svm/svm.h  2011-05-13 12:10:03 UTC 
(rev 36665)
+++ branches/cycles/intern/cycles/kernel/svm/svm.h  2011-05-13 12:11:08 UTC 
(rev 3)
@@ -167,7 +167,7 @@
else return;
}
else if(node.x == NODE_CLOSURE_BSDF)
-   svm_node_closure_bsdf(sd, node.y, node.z, node.w, 
randb);
+   svm_node_closure_bsdf(sd, stack, node, randb);
else if(node.x == NODE_CLOSURE_EMISSION)
svm_node_closure_emission(sd);
else if(node.x == NODE_CLOSURE_BACKGROUND)

Modified: branches/cycles/intern/cycles/kernel/svm/svm_closure.h
===
--- branches/cycles/intern/cycles/kernel/svm/svm_closure.h  2011-05-13 
12:10:03 UTC (rev 36665)
+++ branches/cycles/intern/cycles/kernel/svm/svm_closure.h  2011-05-13 
12:11:08 UTC (rev 3)
@@ -20,11 +20,14 @@
 
 /* Closure Nodes */
 
-__device void svm_node_closure_bsdf(ShaderData *sd, uint type, int iparam1, 
int iparam2, float randb)
+__device void svm_node_closure_bsdf(ShaderData *sd, float *stack, uint4 node, 
float randb)
 {
-   float param1 = __int_as_float(iparam1);
-   float param2 = __int_as_float(iparam2);
+   uint type, param1_offset, param2_offset;
+   decode_node_uchar4(node.y, type, param1_offset, param2_offset, NULL);
 
+   float param1 = (stack_valid(param1_offset))? stack_load_float(stack, 
param1_offset): __int_as_float(node.z);
+   float param2 = (stack_valid(param2_offset))? stack_load_float(stack, 
param2_offset): __int_as_float(node.w);
+
switch(type) {
case CLOSURE_BSDF_DIFFUSE_ID:
bsdf_diffuse_setup(sd, sd-N);

Modified: branches/cycles/intern/cycles/render/nodes.cpp
===
--- branches/cycles/intern/cycles/render/nodes.cpp  2011-05-13 12:10:03 UTC 
(rev 36665)
+++ branches/cycles/intern/cycles/render/nodes.cpp  2011-05-13 12:11:08 UTC 
(rev 3)
@@ -987,9 +987,16 @@
}
else
compiler.add_node(NODE_CLOSURE_SET_WEIGHT, color_in-value);
+   
+   if(param1)
+   compiler.stack_assign(param1);
+   if(param2)
+   compiler.stack_assign(param2);
 
compiler.add_node(NODE_CLOSURE_BSDF,
-   closure,
+   compiler.encode_uchar4(closure,
+   (param1)? param1-stack_offset: SVM_STACK_INVALID,
+   (param2)? param2-stack_offset: SVM_STACK_INVALID),
__float_as_int((param1)? param1-value.x: 0.0f),
__float_as_int((param2)? param2-value.x: 0.0f));
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36670] branches/cycles/source/blender/ editors: Cycles: action zone drawing tweak.

2011-05-13 Thread Brecht Van Lommel
Revision: 36670
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36670
Author:   blendix
Date: 2011-05-13 14:29:07 + (Fri, 13 May 2011)
Log Message:
---
Cycles: action zone drawing tweak.

Modified Paths:
--
branches/cycles/source/blender/editors/interface/interface_panel.c
branches/cycles/source/blender/editors/screen/area.c

Modified: branches/cycles/source/blender/editors/interface/interface_panel.c
===
--- branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-05-13 14:27:12 UTC (rev 36669)
+++ branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-05-13 14:29:07 UTC (rev 36670)
@@ -509,7 +509,7 @@
if(!(panel-flag  PNL_CLOSEDX)) {
ui_draw_aligned_panel_header(style, block, headrect, 'h');
 
-   /* itemrect smaller */  
+   /* itemrect smaller */
itemrect.xmax= headrect.xmax - 5.0f/block-aspect;
itemrect.xmin= itemrect.xmax - (headrect.ymax-headrect.ymin);
itemrect.ymin= headrect.ymin;

Modified: branches/cycles/source/blender/editors/screen/area.c
===
--- branches/cycles/source/blender/editors/screen/area.c2011-05-13 
14:27:12 UTC (rev 36669)
+++ branches/cycles/source/blender/editors/screen/area.c2011-05-13 
14:29:07 UTC (rev 36670)
@@ -69,39 +69,6 @@
 
 /* general area and region code */
 
-static void region_draw_emboss(ARegion *ar, rcti *scirct)
-{
-   rcti rect;
-   
-   /* translate scissor rect to region space */
-   rect.xmin= scirct-xmin - ar-winrct.xmin;
-   rect.ymin= scirct-ymin - ar-winrct.ymin;
-   rect.xmax= scirct-xmax - ar-winrct.xmin;
-   rect.ymax= scirct-ymax - ar-winrct.ymin;
-   
-   /* set transp line */
-   glEnable( GL_BLEND );
-   glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
-   
-   /* right  */
-   glColor4ub(0,0,0, 50);
-   sdrawline(rect.xmax, rect.ymin, rect.xmax, rect.ymax);
-   
-   /* bottom  */
-   glColor4ub(0,0,0, 80);
-   sdrawline(rect.xmin, rect.ymin, rect.xmax, rect.ymin);
-   
-   /* top  */
-   glColor4ub(255,255,255, 60);
-   sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax);
-
-   /* left  */
-   glColor4ub(255,255,255, 50);
-   sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax);
-   
-   glDisable( GL_BLEND );
-}
-
 void ED_region_pixelspace(ARegion *ar)
 {
int width= ar-winrct.xmax-ar-winrct.xmin+1;
@@ -152,7 +119,6 @@
 /* only exported for WM */
 void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar)
 {
-#if 0
AZone *az;

for(az= sa-actionzones.first; az; az= az-next) {
@@ -166,30 +132,21 @@
az-do_draw= 1;
}
}
-#endif
 }
 
 static void area_draw_azone(short x1, short y1, short x2, short y2)
 {
-   int dx= floor(0.3f*(x2-x1));
-   int dy= floor(0.3f*(y2-y1));
-   
-   glColor4ub(255, 255, 255, 180);
-   fdrawline(x1, y2, x2, y1);
-   glColor4ub(255, 255, 255, 130);
-   fdrawline(x1, y2-dy, x2-dx, y1);
-   glColor4ub(255, 255, 255, 80);
-   fdrawline(x1, y2-2*dy, x2-2*dx, y1);
-   
-   glColor4ub(0, 0, 0, 210);
-   fdrawline(x1, y2+1, x2+1, y1);
-   glColor4ub(0, 0, 0, 180);
-   fdrawline(x1, y2-dy+1, x2-dx+1, y1);
-   glColor4ub(0, 0, 0, 150);
-   fdrawline(x1, y2-2*dy+1, x2-2*dx+1, y1);
+   int dx= floor(0.9f*(x2-x1));
+   int dy= floor(0.9f*(y2-y1));
+
+   glColor4f(0.0f, 0.0f, 0.0f, 0.25f);
+   glBegin(GL_TRIANGLES);
+   glVertex2f(x1, y1);
+   glVertex2f(x1+dx, y1);
+   glVertex2f(x1, y1+dy);
+   glEnd();
 }
 
-
 static void region_draw_azone(AZone *az)
 {
GLUquadricObj *qobj = NULL; 
@@ -233,7 +190,6 @@
 /* only exported for WM */
 void ED_area_overdraw(bContext *C)
 {
-#if 0
wmWindow *win= CTX_wm_window(C);
bScreen *screen= CTX_wm_screen(C);
ScrArea *sa;
@@ -259,7 +215,7 @@
}
}   
glDisable( GL_BLEND );
-#endif
+   
 }
 
 /* get scissor rect, checking overlapping regions */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36685] branches/cycles/intern/cycles/ kernel/osl: Cycles: OSL build fixes, based on patch from erwin94.

2011-05-14 Thread Brecht Van Lommel
Revision: 36685
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36685
Author:   blendix
Date: 2011-05-14 09:42:02 + (Sat, 14 May 2011)
Log Message:
---
Cycles: OSL build fixes, based on patch from erwin94.

Modified Paths:
--
branches/cycles/intern/cycles/kernel/osl/CMakeLists.txt
branches/cycles/intern/cycles/kernel/osl/nodes/node_environment_texture.osl
branches/cycles/intern/cycles/kernel/osl/nodes/node_image_texture.osl
branches/cycles/intern/cycles/kernel/osl/osl_shader.cpp

Added Paths:
---
branches/cycles/intern/cycles/kernel/osl/nodes/node_color.h

Modified: branches/cycles/intern/cycles/kernel/osl/CMakeLists.txt
===
--- branches/cycles/intern/cycles/kernel/osl/CMakeLists.txt 2011-05-14 
06:32:25 UTC (rev 36684)
+++ branches/cycles/intern/cycles/kernel/osl/CMakeLists.txt 2011-05-14 
09:42:02 UTC (rev 36685)
@@ -27,7 +27,7 @@
 
 SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS})
 
-ADD_LIBRARY(kernel_osl ${sources} ${headers})
+ADD_LIBRARY(cycles_kernel_osl ${sources} ${headers})
 
 ADD_SUBDIRECTORY(nodes)
 

Added: branches/cycles/intern/cycles/kernel/osl/nodes/node_color.h
===
--- branches/cycles/intern/cycles/kernel/osl/nodes/node_color.h 
(rev 0)
+++ branches/cycles/intern/cycles/kernel/osl/nodes/node_color.h 2011-05-14 
09:42:02 UTC (rev 36685)
@@ -0,0 +1,50 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/* Color Management */
+
+float color_srgb_to_scene_linear(float c)
+{
+   if(c  0.04045)
+   return (c  0.0)? 0.0: c * (1.0/12.92);
+   else
+   return pow((c + 0.055)*(1.0/1.055), 2.4);
+}
+
+float color_scene_linear_to_srgb(float c)
+{
+   if(c  0.0031308)
+   return (c  0.0)? 0.0: c * 12.92;
+else
+   return 1.055 * pow(c, 1.0/2.4) - 0.055;
+}
+
+color color_srgb_to_scene_linear(color c)
+{
+   return color(
+   color_srgb_to_scene_linear(c[0]),
+   color_srgb_to_scene_linear(c[1]),
+   color_srgb_to_scene_linear(c[2]));
+}
+
+color color_scene_linear_to_srgb(color c)
+{
+   return color(
+   color_scene_linear_to_srgb(c[0]),
+   color_scene_linear_to_srgb(c[1]),
+   color_scene_linear_to_srgb(c[2]));
+}
+

Modified: 
branches/cycles/intern/cycles/kernel/osl/nodes/node_environment_texture.osl
===
--- branches/cycles/intern/cycles/kernel/osl/nodes/node_environment_texture.osl 
2011-05-14 06:32:25 UTC (rev 36684)
+++ branches/cycles/intern/cycles/kernel/osl/nodes/node_environment_texture.osl 
2011-05-14 09:42:02 UTC (rev 36685)
@@ -17,6 +17,7 @@
  */
 
 #include stdosl.h
+#include node_color.h
 
 shader node_environment_texture(
vector Vector = P,

Modified: branches/cycles/intern/cycles/kernel/osl/nodes/node_image_texture.osl
===
--- branches/cycles/intern/cycles/kernel/osl/nodes/node_image_texture.osl   
2011-05-14 06:32:25 UTC (rev 36684)
+++ branches/cycles/intern/cycles/kernel/osl/nodes/node_image_texture.osl   
2011-05-14 09:42:02 UTC (rev 36685)
@@ -17,6 +17,7 @@
  */
 
 #include stdosl.h
+#include node_color.h
 
 shader node_image_texture(
point Vector = P,

Modified: branches/cycles/intern/cycles/kernel/osl/osl_shader.cpp
===
--- branches/cycles/intern/cycles/kernel/osl/osl_shader.cpp 2011-05-14 
06:32:25 UTC (rev 36684)
+++ branches/cycles/intern/cycles/kernel/osl/osl_shader.cpp 2011-05-14 
09:42:02 UTC (rev 36685)
@@ -31,7 +31,7 @@
 
 CCL_NAMESPACE_BEGIN
 
-tls_ptr(ThreadData, OSLGlobals::thread_data);
+tls_ptr(OSLGlobals::ThreadData, OSLGlobals::thread_data);
 
 /* Threads */
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36688] branches/cycles/intern/cycles/ kernel/svm/svm_closure.h: Cycles: fix chained mix/ add closures nodes not working.

2011-05-14 Thread Brecht Van Lommel
Revision: 36688
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36688
Author:   blendix
Date: 2011-05-14 13:23:15 + (Sat, 14 May 2011)
Log Message:
---
Cycles: fix chained mix/add closures nodes not working.

Modified Paths:
--
branches/cycles/intern/cycles/kernel/svm/svm_closure.h

Modified: branches/cycles/intern/cycles/kernel/svm/svm_closure.h
===
--- branches/cycles/intern/cycles/kernel/svm/svm_closure.h  2011-05-14 
12:32:15 UTC (rev 36687)
+++ branches/cycles/intern/cycles/kernel/svm/svm_closure.h  2011-05-14 
13:23:15 UTC (rev 36688)
@@ -183,10 +183,10 @@
   offset from the current node, so we jump */
if(*randb  weight) {
*offset += node_jump;
-   *randb = (*randb - weight)/(1.0f - weight);
+   *randb = *randb/weight;
}
else
-   *randb = *randb/weight;
+   *randb = (*randb - weight)/(1.0f - weight);
 }
 
 __device void svm_node_add_closure(ShaderData *sd, float *stack, uint unused,
@@ -199,10 +199,10 @@
   of the two closures being added */
if(*randb  weight) {
*offset += node_jump;
-   *randb = (*randb - weight)/(1.0f - weight);
+   *randb = *randb/weight;
}
else
-   *randb = *randb/weight;
+   *randb = (*randb - weight)/(1.0f - weight);

*closure_weight *= 2.0f;
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36715] trunk/blender: LCMS code removed, was an experiment but never finished.

2011-05-16 Thread Brecht Van Lommel
Revision: 36715
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36715
Author:   blendix
Date: 2011-05-16 13:34:42 + (Mon, 16 May 2011)
Log Message:
---
LCMS code removed, was an experiment but never finished.

Modified Paths:
--
trunk/blender/CMakeLists.txt
trunk/blender/build_files/cmake/macros.cmake
trunk/blender/build_files/scons/config/win32-vc-config.py
trunk/blender/build_files/scons/config/win64-vc-config.py
trunk/blender/build_files/scons/tools/Blender.py
trunk/blender/build_files/scons/tools/btools.py
trunk/blender/source/blender/blenkernel/BKE_colortools.h
trunk/blender/source/blender/blenkernel/CMakeLists.txt
trunk/blender/source/blender/blenkernel/SConscript
trunk/blender/source/blender/blenkernel/intern/colortools.c
trunk/blender/source/blender/editors/space_image/CMakeLists.txt
trunk/blender/source/blender/editors/space_image/SConscript
trunk/blender/source/blender/editors/space_image/image_draw.c
trunk/blender/source/blender/imbuf/CMakeLists.txt
trunk/blender/source/blender/imbuf/IMB_imbuf_types.h
trunk/blender/source/blender/imbuf/SConscript
trunk/blender/source/blender/imbuf/intern/allocimbuf.c
trunk/blender/source/blender/makesrna/SConscript
trunk/blender/source/blender/makesrna/intern/CMakeLists.txt
trunk/blender/source/blender/makesrna/intern/SConscript
trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/CMakeLists.txt
===
--- trunk/blender/CMakeLists.txt2011-05-16 11:46:16 UTC (rev 36714)
+++ trunk/blender/CMakeLists.txt2011-05-16 13:34:42 UTC (rev 36715)
@@ -202,9 +202,6 @@
option(WITH_LIBS10.5  Use 10.5 libs (needed for 64bit builds) OFF)
 endif()
 
-# only for developers who want to make this functional
-# option(WITH_LCMS  Enable color correction with lcms OFF)
-
 if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
message(FATAL_ERROR WITH_PLAYER requires WITH_GAMEENGINE)
 endif()
@@ -379,13 +376,6 @@
 
find_package(ZLIB REQUIRED)
 
-   if(WITH_LCMS)
-   set(LCMS /usr CACHE FILEPATH LCMS directory)
-   set(LCMS_INCLUDE_DIR ${LCMS}/include)
-   set(LCMS_LIBRARY lcms)
-   set(LCMS_LIBPATH ${LCMS}/lib)
-   endif()
-
if(WITH_CODEC_FFMPEG)
set(FFMPEG /usr CACHE FILEPATH FFMPEG Directory)
mark_as_advanced(FFMPEG)
@@ -640,14 +630,7 @@
set(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader 
OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver 
GeneratedSaxParser xml2 buffer ftoa UTF)
set(PCRE_LIB pcre)
endif()
-   
-   if(WITH_LCMS)
-   set(LCMS ${LIBDIR}/lcms)
-   set(LCMS_INCLUDE_DIR ${LCMS}/include)
-   set(LCMS_LIBPATH ${LCMS}/lib)
-   set(LCMS_LIB lcms)
-   endif()
-
+   
if(WITH_CODEC_FFMPEG)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
@@ -910,13 +893,6 @@
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
endif()
 
-   if(WITH_LCMS)
-   set(LCMS ${LIBDIR}/lcms)
-   set(LCMS_INCLUDE_DIR ${LCMS}/include)
-   set(LCMS_LIBRARY lcms)
-   set(LCMS_LIBPATH ${LCMS}/lib)
-   endif()
-
if(WITH_CODEC_FFMPEG)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INC ${FFMPEG}/include)

Modified: trunk/blender/build_files/cmake/macros.cmake
===
--- trunk/blender/build_files/cmake/macros.cmake2011-05-16 11:46:16 UTC 
(rev 36714)
+++ trunk/blender/build_files/cmake/macros.cmake2011-05-16 13:34:42 UTC 
(rev 36715)
@@ -88,9 +88,6 @@
if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
link_directories(${OPENJPEG_LIBPATH})
endif()
-   if(WITH_LCMS)
-   link_directories(${LCMS_LIBPATH})
-   endif()
if(WITH_CODEC_QUICKTIME)
link_directories(${QUICKTIME_LIBPATH})
endif()
@@ -193,9 +190,6 @@
if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
target_link_libraries(${target} ${OPENJPEG_LIB})
endif()
-   if(WITH_LCMS)
-   target_link_libraries(${target} ${LCMS_LIBRARY})
-   endif()
if(WITH_CODEC_FFMPEG)
target_link_libraries(${target} ${FFMPEG_LIB})
endif()
@@ -217,12 +211,6 @@
target_link_libraries(${target} ${EXPAT_LIB})
endif()
endif()
-   if(WITH_LCMS)
-   if(WIN32 AND NOT UNIX)
-   target_link_libraries(${target} debug 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36728] branches/cycles/source/blender/ editors/interface/interface_panel.c: Cycles: panel header drawing tweak.

2011-05-17 Thread Brecht Van Lommel
Revision: 36728
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36728
Author:   blendix
Date: 2011-05-17 14:18:02 + (Tue, 17 May 2011)
Log Message:
---
Cycles: panel header drawing tweak.

Modified Paths:
--
branches/cycles/source/blender/editors/interface/interface_panel.c

Modified: branches/cycles/source/blender/editors/interface/interface_panel.c
===
--- branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-05-17 09:13:14 UTC (rev 36727)
+++ branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-05-17 14:18:02 UTC (rev 36728)
@@ -494,13 +494,13 @@
headrect.ymax= headrect.ymin + floor(PNL_HEADER/block-aspect + 0.001f);

{
-   float minx= rect-xmin+5.0f/block-aspect;
-   float maxx= rect-xmax-5.0f/block-aspect;
+   float minx= rect-xmin/block-aspect;
+   float maxx= rect-xmax/block-aspect;
float y= headrect.ymax;

glEnable(GL_BLEND);
glColor4f(0.0f, 0.0f, 0.0f, 0.1f);
-   uiSetRoundBox(15);
+   uiSetRoundBox(0);
uiDrawBox(GL_POLYGON, minx, headrect.ymin, maxx, y+1, 4);
glDisable(GL_BLEND);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36729] branches/cycles: Render API: first step in updating RenderEngine to work according to:

2011-05-17 Thread Brecht Van Lommel
Revision: 36729
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36729
Author:   blendix
Date: 2011-05-17 14:26:45 + (Tue, 17 May 2011)
Log Message:
---
Render API: first step in updating RenderEngine to work according to:
http://wiki.blender.org/index.php/Dev:2.5/Source/Render/RenderEngineAPI

Modified Paths:
--
branches/cycles/intern/cycles/blender/addon/__init__.py
branches/cycles/intern/cycles/blender/addon/engine.py
branches/cycles/source/blender/blenkernel/BKE_depsgraph.h
branches/cycles/source/blender/blenkernel/BKE_scene.h
branches/cycles/source/blender/blenkernel/intern/depsgraph.c
branches/cycles/source/blender/blenkernel/intern/scene.c
branches/cycles/source/blender/editors/include/ED_render.h
branches/cycles/source/blender/editors/render/CMakeLists.txt
branches/cycles/source/blender/editors/render/render_shading.c
branches/cycles/source/blender/editors/space_view3d/space_view3d.c
branches/cycles/source/blender/editors/space_view3d/view3d_draw.c
branches/cycles/source/blender/makesrna/intern/rna_render.c
branches/cycles/source/blender/makesrna/intern/rna_scene_api.c
branches/cycles/source/blender/render/CMakeLists.txt
branches/cycles/source/blender/render/SConscript
branches/cycles/source/blender/render/extern/include/RE_engine.h
branches/cycles/source/blender/render/intern/pipeline/engine.c
branches/cycles/source/blender/windowmanager/intern/wm_event_system.c
branches/cycles/source/blenderplayer/bad_level_call_stubs/stubs.c

Added Paths:
---
branches/cycles/source/blender/editors/render/render_update.c

Modified: branches/cycles/intern/cycles/blender/addon/__init__.py
===
--- branches/cycles/intern/cycles/blender/addon/__init__.py 2011-05-17 
14:18:02 UTC (rev 36728)
+++ branches/cycles/intern/cycles/blender/addon/__init__.py 2011-05-17 
14:26:45 UTC (rev 36729)
@@ -47,17 +47,30 @@
def __del__(self):
engine.free(self)
 
-   def render(self, scene):
-   engine.create(self, scene, True)
-   engine.render(self, scene)
+   # final render
+   def update(self, data, scene):
+   engine.create(self, data, scene)
+   engine.update(self, data, scene)
 
-   def draw(self, scene):
+   def render(self):
+   engine.render(self)
+
+   # preview render
+   # def preview_update(self, context, id):
+   #   pass
+   #
+   # def preview_render(self):
+   #   pass
+   
+   # viewport render
+   def view_update(self, context):
if not self.session:
-   engine.create(self, scene, False)
-   engine.draw(self, scene)
+   engine.create(self, context.blend_data, context.scene,
+   context.region, context.space_data, 
context.region_data)
+   engine.update(self, context.blend_data, context.scene)
 
-   def update(self, scene):
-   engine.update(self, scene)
+   def view_draw(self, context):
+   engine.draw(self, context.region, context.space_data, 
context.region_data)
 
 def register():
properties.register()

Modified: branches/cycles/intern/cycles/blender/addon/engine.py
===
--- branches/cycles/intern/cycles/blender/addon/engine.py   2011-05-17 
14:18:02 UTC (rev 36728)
+++ branches/cycles/intern/cycles/blender/addon/engine.py   2011-05-17 
14:26:45 UTC (rev 36729)
@@ -23,20 +23,18 @@
import os.path
lib.init(os.path.dirname(__file__))
 
-def create(engine, scene, offline):
+def create(engine, data, scene, region = 0, v3d = 0, rv3d = 0):
from cycles import libcycles_blender as lib
-   data = bpy.data.as_pointer()
+
+   data = data.as_pointer()
scene = scene.as_pointer()
+   if region:
+   region = region.as_pointer()
+   if v3d:
+   v3d = v3d.as_pointer()
+   if rv3d:
+   rv3d = rv3d.as_pointer()
 
-   if not offline and bpy.context.area.type == 'VIEW_3D':
-   region = bpy.context.region.as_pointer()
-   v3d = bpy.context.space_data.as_pointer()
-   rv3d = bpy.context.region_data.as_pointer()
-   else:
-   region = 0
-   v3d = 0
-   rv3d = 0
-
engine.session = lib.create(engine.as_pointer(), data, scene, region, 
v3d, rv3d)
 
 def free(engine):
@@ -46,19 +44,18 @@
lib.free(engine.session)
del engine.session
 
-def render(engine, scene):
+def render(engine):
from cycles import libcycles_blender as lib
lib.render(engine.session)
 
-def update(engine, scene):
+def update(engine, data, scene):
from cycles 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36730] branches/cycles/source: Render API : add self.report() function for RenderEngine, for reporting warnings and errors.

2011-05-17 Thread Brecht Van Lommel
Revision: 36730
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36730
Author:   blendix
Date: 2011-05-17 15:20:12 + (Tue, 17 May 2011)
Log Message:
---
Render API: add self.report() function for RenderEngine, for reporting warnings 
and errors.

Modified Paths:
--
branches/cycles/source/blender/editors/render/render_internal.c
branches/cycles/source/blender/editors/render/render_update.c
branches/cycles/source/blender/makesrna/intern/rna_render.c
branches/cycles/source/blender/render/extern/include/RE_engine.h
branches/cycles/source/blender/render/extern/include/RE_pipeline.h
branches/cycles/source/blender/render/intern/include/render_types.h
branches/cycles/source/blender/render/intern/pipeline/engine.c
branches/cycles/source/blender/render/intern/source/pipeline.c
branches/cycles/source/creator/creator.c

Modified: branches/cycles/source/blender/editors/render/render_internal.c
===
--- branches/cycles/source/blender/editors/render/render_internal.c 
2011-05-17 14:26:45 UTC (rev 36729)
+++ branches/cycles/source/blender/editors/render/render_internal.c 
2011-05-17 15:20:12 UTC (rev 36730)
@@ -446,11 +446,15 @@
   since sequence rendering can call that recursively... (peter) */
seq_stripelem_cache_cleanup();
 
+   RE_SetReports(re, op-reports);
+
if(is_animation)
-   RE_BlenderAnim(re, mainp, scene, camera_override, lay, 
scene-r.sfra, scene-r.efra, scene-r.frame_step, op-reports);
+   RE_BlenderAnim(re, mainp, scene, camera_override, lay, 
scene-r.sfra, scene-r.efra, scene-r.frame_step);
else
RE_BlenderFrame(re, mainp, scene, NULL, camera_override, lay, 
scene-r.cfra, is_write_still);
 
+   RE_SetReports(re, NULL);
+
// no redraw needed, we leave state as we entered it
ED_update_for_newframe(mainp, scene, CTX_wm_screen(C), 1);
 
@@ -591,10 +595,14 @@
rj-do_update= do_update;
rj-progress= progress;
 
+   RE_SetReports(rj-re, rj-reports);
+
if(rj-anim)
-   RE_BlenderAnim(rj-re, rj-main, rj-scene, 
rj-camera_override, rj-lay, rj-scene-r.sfra, rj-scene-r.efra, 
rj-scene-r.frame_step, rj-reports);
+   RE_BlenderAnim(rj-re, rj-main, rj-scene, 
rj-camera_override, rj-lay, rj-scene-r.sfra, rj-scene-r.efra, 
rj-scene-r.frame_step);
else
RE_BlenderFrame(rj-re, rj-main, rj-scene, rj-srl, 
rj-camera_override, rj-lay, rj-scene-r.cfra, rj-write_still);
+
+   RE_SetReports(rj-re, NULL);
 }
 
 static void render_endjob(void *rjv)

Modified: branches/cycles/source/blender/editors/render/render_update.c
===
--- branches/cycles/source/blender/editors/render/render_update.c   
2011-05-17 14:26:45 UTC (rev 36729)
+++ branches/cycles/source/blender/editors/render/render_update.c   
2011-05-17 15:20:12 UTC (rev 36730)
@@ -43,6 +43,8 @@
 #include DNA_view3d_types.h
 #include DNA_world_types.h
 
+#include BLI_utildefines.h
+
 #include BKE_context.h
 #include BKE_depsgraph.h
 #include BKE_icons.h

Modified: branches/cycles/source/blender/makesrna/intern/rna_render.c
===
--- branches/cycles/source/blender/makesrna/intern/rna_render.c 2011-05-17 
14:26:45 UTC (rev 36729)
+++ branches/cycles/source/blender/makesrna/intern/rna_render.c 2011-05-17 
15:20:12 UTC (rev 36730)
@@ -32,6 +32,7 @@
 #include DNA_scene_types.h
 
 #include RNA_define.h
+#include RNA_enum_types.h
 
 #include rna_internal.h
 
@@ -373,6 +374,12 @@
prop= RNA_def_string(func, info, , 0, Info, );
RNA_def_property_flag(prop, PROP_REQUIRED);
 
+   func= RNA_def_function(srna, report, RE_engine_report);
+   prop= RNA_def_enum_flag(func, type, wm_report_items, 0, Type, );
+   RNA_def_property_flag(prop, PROP_REQUIRED);
+   prop= RNA_def_string(func, message, , 0, Report Message, );
+   RNA_def_property_flag(prop, PROP_REQUIRED);
+
/* registration */
RNA_define_verify_sdna(0);
 

Modified: branches/cycles/source/blender/render/extern/include/RE_engine.h
===
--- branches/cycles/source/blender/render/extern/include/RE_engine.h
2011-05-17 14:26:45 UTC (rev 36729)
+++ branches/cycles/source/blender/render/extern/include/RE_engine.h
2011-05-17 15:20:12 UTC (rev 36730)
@@ -99,6 +99,7 @@
 
 LIBEXPORT int RE_engine_test_break(RenderEngine *engine);
 LIBEXPORT void RE_engine_update_stats(RenderEngine *engine, const char *stats, 
const char *info);
+LIBEXPORT void RE_engine_report(RenderEngine *engine, int type, const char 
*msg);
 
 int RE_engine_render(struct Render *re, int do_all);
 

Modified: branches/cycles/source/blender/render/extern/include/RE_pipeline.h

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36731] branches/cycles/source/blender: Render API: RenderEngine. update_progress function to set progress percentage.

2011-05-17 Thread Brecht Van Lommel
Revision: 36731
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36731
Author:   blendix
Date: 2011-05-17 15:39:40 + (Tue, 17 May 2011)
Log Message:
---
Render API: RenderEngine.update_progress function to set progress percentage.

Modified Paths:
--
branches/cycles/source/blender/makesrna/intern/rna_render.c
branches/cycles/source/blender/render/extern/include/RE_engine.h
branches/cycles/source/blender/render/intern/pipeline/engine.c

Modified: branches/cycles/source/blender/makesrna/intern/rna_render.c
===
--- branches/cycles/source/blender/makesrna/intern/rna_render.c 2011-05-17 
15:20:12 UTC (rev 36730)
+++ branches/cycles/source/blender/makesrna/intern/rna_render.c 2011-05-17 
15:39:40 UTC (rev 36731)
@@ -374,6 +374,10 @@
prop= RNA_def_string(func, info, , 0, Info, );
RNA_def_property_flag(prop, PROP_REQUIRED);
 
+   func= RNA_def_function(srna, update_progress, 
RE_engine_update_progress);
+   prop= RNA_def_float(func, progress, 0, 0.0f, 1.0f, , Percentage of 
render that's done., 0.0f, 1.0f);
+   RNA_def_property_flag(prop, PROP_REQUIRED);
+
func= RNA_def_function(srna, report, RE_engine_report);
prop= RNA_def_enum_flag(func, type, wm_report_items, 0, Type, );
RNA_def_property_flag(prop, PROP_REQUIRED);

Modified: branches/cycles/source/blender/render/extern/include/RE_engine.h
===
--- branches/cycles/source/blender/render/extern/include/RE_engine.h
2011-05-17 15:20:12 UTC (rev 36730)
+++ branches/cycles/source/blender/render/extern/include/RE_engine.h
2011-05-17 15:39:40 UTC (rev 36731)
@@ -99,6 +99,7 @@
 
 LIBEXPORT int RE_engine_test_break(RenderEngine *engine);
 LIBEXPORT void RE_engine_update_stats(RenderEngine *engine, const char *stats, 
const char *info);
+LIBEXPORT void RE_engine_update_progress(RenderEngine *engine, float progress);
 LIBEXPORT void RE_engine_report(RenderEngine *engine, int type, const char 
*msg);
 
 int RE_engine_render(struct Render *re, int do_all);

Modified: branches/cycles/source/blender/render/intern/pipeline/engine.c
===
--- branches/cycles/source/blender/render/intern/pipeline/engine.c  
2011-05-17 15:20:12 UTC (rev 36730)
+++ branches/cycles/source/blender/render/intern/pipeline/engine.c  
2011-05-17 15:39:40 UTC (rev 36731)
@@ -209,6 +209,14 @@
re-i.statstr= NULL;
 }
 
+void RE_engine_update_progress(RenderEngine *engine, float progress)
+{
+   Render *re= engine-re;
+
+   CLAMP(progress, 0.0f, 1.0f);
+   re-progress(re-prh, progress);
+}
+
 void RE_engine_report(RenderEngine *engine, int type, const char *msg)
 {
BKE_report(engine-re-reports, type, msg);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36733] branches/cycles/source/blender: Render API: code cleanup.

2011-05-17 Thread Brecht Van Lommel
Revision: 36733
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36733
Author:   blendix
Date: 2011-05-17 16:21:06 + (Tue, 17 May 2011)
Log Message:
---
Render API: code cleanup.

Modified Paths:
--
branches/cycles/source/blender/editors/render/render_preview.c
branches/cycles/source/blender/editors/space_view3d/view3d_draw.c
branches/cycles/source/blender/render/extern/include/RE_engine.h
branches/cycles/source/blender/render/intern/pipeline/engine.c

Modified: branches/cycles/source/blender/editors/render/render_preview.c
===
--- branches/cycles/source/blender/editors/render/render_preview.c  
2011-05-17 16:20:07 UTC (rev 36732)
+++ branches/cycles/source/blender/editors/render/render_preview.c  
2011-05-17 16:21:06 UTC (rev 36733)
@@ -86,6 +86,7 @@
 
 #include PIL_time.h
 
+#include RE_engine.h
 #include RE_pipeline.h
 
 
@@ -99,15 +100,6 @@
 
 #include render_intern.h
 
-#define PR_XMIN10
-#define PR_YMIN5
-#define PR_XMAX200
-#define PR_YMAX195
-
-/* XXX */
-static int qtest(void) {return 0;}
-/* XXX */
-
 ImBuf* get_brush_icon(Brush *brush)
 {
static const int flags = IB_rect|IB_multilayer|IB_metadata;
@@ -174,123 +166,6 @@

 } ShaderPreview;
 
-
-
-/* unused now */
-void draw_tex_crop(Tex *tex)
-{
-   rcti rct;
-   int ret= 0;
-   
-   if(tex==NULL) return;
-   
-   if(tex-type==TEX_IMAGE) {
-   if(tex-cropxmin==0.0f) ret++;
-   if(tex-cropymin==0.0f) ret++;
-   if(tex-cropxmax==1.0f) ret++;
-   if(tex-cropymax==1.0f) ret++;
-   if(ret==4) return;
-   
-   rct.xmin= PR_XMIN+2+tex-cropxmin*(PR_XMAX-PR_XMIN-4);
-   rct.xmax= PR_XMIN+2+tex-cropxmax*(PR_XMAX-PR_XMIN-4);
-   rct.ymin= PR_YMIN+2+tex-cropymin*(PR_YMAX-PR_YMIN-4);
-   rct.ymax= PR_YMIN+2+tex-cropymax*(PR_YMAX-PR_YMIN-4);
-
-   glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); 
-
-   glColor3ub(0, 0, 0);
-   glRecti(rct.xmin+1,  rct.ymin-1,  rct.xmax+1,  rct.ymax-1); 
-
-   glColor3ub(255, 255, 255);
-   glRecti(rct.xmin,  rct.ymin,  rct.xmax,  rct.ymax);
-
-   glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);  
-   }
-   
-}
-
-/* temporal abuse; if id_code is -1 it only does texture solve! */
-void BIF_preview_changed(short UNUSED(id_code))
-{
-#if 0  
-   ScrArea *sa;
-   
-   for(sa= G.curscreen-areabase.first; sa; sa= sa-next) {
-   if(sa-spacetype==SPACE_BUTS) {
-   SpaceButs *sbuts= sa-spacedata.first;
-   if(sbuts-mainb==CONTEXT_SHADING) {
-   int tab= sbuts-tab[CONTEXT_SHADING];
-   if(tab==TAB_SHADING_MAT  (id_code==ID_MA || 
id_code==ID_TE)) {
-   if (sbuts-ri) sbuts-ri-curtile= 0;
-   addafterqueue(sa-win, RENDERPREVIEW, 
1);
-   }
-   else if(tab==TAB_SHADING_TEX  (id_code==ID_TE 
|| id_code==-1)) {
-   if (sbuts-ri) sbuts-ri-curtile= 0;
-   addafterqueue(sa-win, RENDERPREVIEW, 
1);
-   }
-   else if(tab==TAB_SHADING_LAMP  
(id_code==ID_LA || id_code==ID_TE)) {
-   if (sbuts-ri) sbuts-ri-curtile= 0;
-   addafterqueue(sa-win, RENDERPREVIEW, 
1);
-   }
-   else if(tab==TAB_SHADING_WORLD  
(id_code==ID_WO || id_code==ID_TE)) {
-   if (sbuts-ri) sbuts-ri-curtile= 0;
-   addafterqueue(sa-win, RENDERPREVIEW, 
1);
-   }
-   }
-   else if (sbuts-ri) 
-   sbuts-ri-curtile= 0;  /* ensure changes 
always result in re-render when context is restored */
-   }
-   else if(sa-spacetype==SPACE_NODE) {
-   SpaceNode *snode= sa-spacedata.first;
-   if(snode-treetype==NTREE_SHADER  (id_code==ID_MA || 
id_code==ID_TE)) {
-   snode_tag_dirty(snode);
-   }
-   }
-   else if(sa-spacetype==SPACE_VIEW3D) {
-   View3D *vd= sa-spacedata.first;
-   /* if is has a renderinfo, we consider that reason for 
signalling */
-   if (vd-ri) {
-   vd-ri-curtile= 0;
-   addafterqueue(sa-win, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36744] branches/cycles/source/blender: Render API: some code refactoring related to errors and render view.

2011-05-18 Thread Brecht Van Lommel
Revision: 36744
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36744
Author:   blendix
Date: 2011-05-18 10:01:41 + (Wed, 18 May 2011)
Log Message:
---
Render API: some code refactoring related to errors and render view.

Modified Paths:
--
branches/cycles/source/blender/editors/render/CMakeLists.txt
branches/cycles/source/blender/editors/render/render_intern.h
branches/cycles/source/blender/editors/render/render_internal.c
branches/cycles/source/blender/editors/render/render_opengl.c
branches/cycles/source/blender/render/extern/include/RE_pipeline.h
branches/cycles/source/blender/render/intern/include/render_types.h
branches/cycles/source/blender/render/intern/source/pipeline.c

Added Paths:
---
branches/cycles/source/blender/editors/render/render_view.c

Modified: branches/cycles/source/blender/editors/render/CMakeLists.txt
===
--- branches/cycles/source/blender/editors/render/CMakeLists.txt
2011-05-18 09:58:17 UTC (rev 36743)
+++ branches/cycles/source/blender/editors/render/CMakeLists.txt
2011-05-18 10:01:41 UTC (rev 36744)
@@ -42,6 +42,7 @@
render_preview.c
render_shading.c
render_update.c
+   render_view.c
 
render_intern.h
 )

Modified: branches/cycles/source/blender/editors/render/render_intern.h
===
--- branches/cycles/source/blender/editors/render/render_intern.h   
2011-05-18 09:58:17 UTC (rev 36743)
+++ branches/cycles/source/blender/editors/render/render_intern.h   
2011-05-18 10:01:41 UTC (rev 36744)
@@ -65,14 +65,17 @@
 void TEXTURE_OT_envmap_clear_all(struct wmOperatorType *ot);
 
 /* render_internal.c */
-void RENDER_OT_view_show(struct wmOperatorType *ot);
 void RENDER_OT_render(struct wmOperatorType *ot);
-void RENDER_OT_view_cancel(struct wmOperatorType *ot);
 
-/*render_opengl.c uses these */
+/* render_opengl.c uses this */
 void image_buffer_rect_update(struct Scene *scene, struct RenderResult *rr, 
struct ImBuf *ibuf, volatile struct rcti *renrect);
-void screen_set_image_output(struct bContext *C, int mx, int my);
 
+/* render_view.c */
+void render_view_open(struct bContext *C, int mx, int my);
+
+void RENDER_OT_view_show(struct wmOperatorType *ot);
+void RENDER_OT_view_cancel(struct wmOperatorType *ot);
+
 /* render_opengl.c */
 void RENDER_OT_opengl(struct wmOperatorType *ot);
 

Modified: branches/cycles/source/blender/editors/render/render_internal.c
===
--- branches/cycles/source/blender/editors/render/render_internal.c 
2011-05-18 09:58:17 UTC (rev 36743)
+++ branches/cycles/source/blender/editors/render/render_internal.c 
2011-05-18 10:01:41 UTC (rev 36744)
@@ -73,17 +73,14 @@
 
 #include render_intern.h
 
-static ScrArea *biggest_area(bContext *C);
-static ScrArea *biggest_non_image_area(bContext *C);
-static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win);
-static ScrArea *find_area_image_empty(bContext *C);
+/* Render Callbacks */
 
 /* called inside thread! */
 void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, 
volatile rcti *renrect)
 {
float x1, y1, *rectf= NULL;
int ymin, ymax, xmin, xmax;
-   int rymin, rxmin;
+   int rymin, rxmin, do_color_management;
char *rectc;
 
/* if renrect argument, we only refresh scanlines */
@@ -95,7 +92,8 @@
/* xmin here is first subrect x coord, xmax defines subrect 
width */
xmin = renrect-xmin + rr-crop;
xmax = renrect-xmax - xmin + rr-crop;
-   if (xmax2) return;
+   if(xmax2)
+   return;
 
ymin= renrect-ymin + rr-crop;
ymax= renrect-ymax - ymin + rr-crop;
@@ -141,275 +139,56 @@

rectf+= 4*(rr-rectx*ymin + xmin);
rectc= (char *)(ibuf-rect + ibuf-x*rymin + rxmin);
+
+   do_color_management = (scene  (scene-r.color_mgt_flag  
R_COLOR_MANAGEMENT));

/* XXX make nice consistent functions for this */
-   if (scene  (scene-r.color_mgt_flag  R_COLOR_MANAGEMENT)) {
-   for(y1= 0; y1ymax; y1++) {
-   float *rf= rectf;
-   float srgb[3];
-   char *rc= rectc;
-   const float dither = ibuf-dither / 255.0f;
+   for(y1= 0; y1ymax; y1++) {
+   float *rf= rectf;
+   float srgb[3];
+   char *rc= rectc;
+   const float dither = ibuf-dither / 255.0f;
 
-   /* XXX temp. because crop offset */
-   if( rectc = (char *)(ibuf-rect)) {
-   for(x1= 0; x1xmax; x1++, rf += 4, rc+=4) {
-   const float d = 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36745] trunk/blender/source/blender: RNA: pass Main rather than Context to register/unregister callbacks.

2011-05-18 Thread Brecht Van Lommel
Revision: 36745
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36745
Author:   blendix
Date: 2011-05-18 10:56:26 + (Wed, 18 May 2011)
Log Message:
---
RNA: pass Main rather than Context to register/unregister callbacks.

Modified Paths:
--
trunk/blender/source/blender/editors/animation/keyingsets.c
trunk/blender/source/blender/editors/include/ED_keyframing.h
trunk/blender/source/blender/editors/util/undo.c
trunk/blender/source/blender/makesrna/RNA_types.h
trunk/blender/source/blender/makesrna/intern/rna_ID.c
trunk/blender/source/blender/makesrna/intern/rna_animation.c
trunk/blender/source/blender/makesrna/intern/rna_internal.h
trunk/blender/source/blender/makesrna/intern/rna_render.c
trunk/blender/source/blender/makesrna/intern/rna_ui.c
trunk/blender/source/blender/makesrna/intern/rna_wm.c
trunk/blender/source/blender/python/intern/bpy_rna.c
trunk/blender/source/blender/windowmanager/WM_api.h
trunk/blender/source/blender/windowmanager/intern/wm.c

Modified: trunk/blender/source/blender/editors/animation/keyingsets.c
===
--- trunk/blender/source/blender/editors/animation/keyingsets.c 2011-05-18 
10:01:41 UTC (rev 36744)
+++ trunk/blender/source/blender/editors/animation/keyingsets.c 2011-05-18 
10:56:26 UTC (rev 36745)
@@ -578,9 +578,8 @@
 }
 
 /* Remove the given KeyingSetInfo from the list of type infos, and also remove 
the builtin set if appropriate */
-void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi)
+void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi)
 {
-   Main *bmain= CTX_data_main(C);
KeyingSet *ks, *ksn;

/* find relevant builtin KeyingSets which use this, and remove them */

Modified: trunk/blender/source/blender/editors/include/ED_keyframing.h
===
--- trunk/blender/source/blender/editors/include/ED_keyframing.h
2011-05-18 10:01:41 UTC (rev 36744)
+++ trunk/blender/source/blender/editors/include/ED_keyframing.h
2011-05-18 10:56:26 UTC (rev 36745)
@@ -36,6 +36,7 @@
 extern C {
 #endif
 
+struct Main;
 struct ListBase;
 struct ID;
 struct Scene;
@@ -190,7 +191,7 @@
 
 /* for RNA type registrations... */
 void ANIM_keyingset_info_register(KeyingSetInfo *ksi);
-void ANIM_keyingset_info_unregister(const struct bContext *C, KeyingSetInfo 
*ksi);
+void ANIM_keyingset_info_unregister(struct Main *bmain, KeyingSetInfo *ksi);
 
 /* cleanup on exit */
 void ANIM_keyingset_infos_exit(void);

Modified: trunk/blender/source/blender/editors/util/undo.c
===
--- trunk/blender/source/blender/editors/util/undo.c2011-05-18 10:01:41 UTC 
(rev 36744)
+++ trunk/blender/source/blender/editors/util/undo.c2011-05-18 10:56:26 UTC 
(rev 36745)
@@ -260,7 +260,7 @@
 static int ed_undo_exec(bContext *C, wmOperator *UNUSED(op))
 {
/* last operator should disappear, later we can tie ths with undo 
stack nicer */
-   WM_operator_stack_clear(C);
+   WM_operator_stack_clear(CTX_wm_manager(C));
return ed_undo_step(C, 1, NULL);
 }
 

Modified: trunk/blender/source/blender/makesrna/RNA_types.h
===
--- trunk/blender/source/blender/makesrna/RNA_types.h   2011-05-18 10:01:41 UTC 
(rev 36744)
+++ trunk/blender/source/blender/makesrna/RNA_types.h   2011-05-18 10:56:26 UTC 
(rev 36745)
@@ -43,6 +43,7 @@
 struct BlenderRNA;
 struct IDProperty;
 struct bContext;
+struct Main;
 struct ReportList;
 
 /** Pointer
@@ -329,9 +330,9 @@
 typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int 
*have_function);
 typedef int (*StructCallbackFunc)(struct bContext *C, struct PointerRNA *ptr, 
struct FunctionRNA *func, ParameterList *list);
 typedef void (*StructFreeFunc)(void *data);
-typedef struct StructRNA *(*StructRegisterFunc)(struct bContext *C, struct 
ReportList *reports, void *data,
+typedef struct StructRNA *(*StructRegisterFunc)(struct Main *bmain, struct 
ReportList *reports, void *data,
const char *identifier, StructValidateFunc validate, StructCallbackFunc 
call, StructFreeFunc free);
-typedef void (*StructUnregisterFunc)(const struct bContext *C, struct 
StructRNA *type);
+typedef void (*StructUnregisterFunc)(struct Main *bmain, struct StructRNA 
*type);
 
 typedef struct StructRNA StructRNA;
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_ID.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_ID.c   2011-05-18 
10:01:41 UTC (rev 36744)
+++ trunk/blender/source/blender/makesrna/intern/rna_ID.c   2011-05-18 
10:56:26 UTC (rev 36745)
@@ -210,12 +210,12 @@
return ptr-data;
 }
 
-void rna_PropertyGroup_unregister(const bContext 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36746] trunk/blender/source/blender: RNA: make mechanism used by operators to keep python instance alive more generic , to be used by render engine l

2011-05-18 Thread Brecht Van Lommel
Revision: 36746
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36746
Author:   blendix
Date: 2011-05-18 11:21:10 + (Wed, 18 May 2011)
Log Message:
---
RNA: make mechanism used by operators to keep python instance alive more 
generic, to be used by render engine later.

Modified Paths:
--
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/makesrna/RNA_define.h
trunk/blender/source/blender/makesrna/RNA_types.h
trunk/blender/source/blender/makesrna/intern/makesrna.c
trunk/blender/source/blender/makesrna/intern/rna_ID.c
trunk/blender/source/blender/makesrna/intern/rna_access.c
trunk/blender/source/blender/makesrna/intern/rna_animation.c
trunk/blender/source/blender/makesrna/intern/rna_define.c
trunk/blender/source/blender/makesrna/intern/rna_internal_types.h
trunk/blender/source/blender/makesrna/intern/rna_render.c
trunk/blender/source/blender/makesrna/intern/rna_ui.c
trunk/blender/source/blender/makesrna/intern/rna_wm.c
trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/makesrna/RNA_access.h
===
--- trunk/blender/source/blender/makesrna/RNA_access.h  2011-05-18 10:56:26 UTC 
(rev 36745)
+++ trunk/blender/source/blender/makesrna/RNA_access.h  2011-05-18 11:21:10 UTC 
(rev 36746)
@@ -31,7 +31,6 @@
 
 #include stdarg.h
 
-#include DNA_listBase.h
 #include RNA_types.h
 
 #ifdef __cplusplus
@@ -40,6 +39,7 @@
 
 struct bContext;
 struct ID;
+struct ListBase;
 struct Main;
 struct ReportList;
 struct Scene;
@@ -611,6 +611,7 @@
 
 StructRegisterFunc RNA_struct_register(StructRNA *type);
 StructUnregisterFunc RNA_struct_unregister(StructRNA *type);
+void **RNA_struct_instance(PointerRNA *ptr);
 
 void *RNA_struct_py_type_get(StructRNA *srna);
 void RNA_struct_py_type_set(StructRNA *srna, void *py_type);

Modified: trunk/blender/source/blender/makesrna/RNA_define.h
===
--- trunk/blender/source/blender/makesrna/RNA_define.h  2011-05-18 10:56:26 UTC 
(rev 36745)
+++ trunk/blender/source/blender/makesrna/RNA_define.h  2011-05-18 11:21:10 UTC 
(rev 36746)
@@ -60,7 +60,7 @@
 void RNA_def_struct_clear_flag(StructRNA *srna, int flag);
 void RNA_def_struct_refine_func(StructRNA *srna, const char *refine);
 void RNA_def_struct_idprops_func(StructRNA *srna, const char *refine);
-void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const 
char *unreg);
+void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const 
char *unreg, const char *instance);
 void RNA_def_struct_path_func(StructRNA *srna, const char *path);
 void RNA_def_struct_identifier(StructRNA *srna, const char *identifier);
 void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char 
*description);

Modified: trunk/blender/source/blender/makesrna/RNA_types.h
===
--- trunk/blender/source/blender/makesrna/RNA_types.h   2011-05-18 10:56:26 UTC 
(rev 36745)
+++ trunk/blender/source/blender/makesrna/RNA_types.h   2011-05-18 11:21:10 UTC 
(rev 36746)
@@ -333,6 +333,7 @@
 typedef struct StructRNA *(*StructRegisterFunc)(struct Main *bmain, struct 
ReportList *reports, void *data,
const char *identifier, StructValidateFunc validate, StructCallbackFunc 
call, StructFreeFunc free);
 typedef void (*StructUnregisterFunc)(struct Main *bmain, struct StructRNA 
*type);
+typedef void **(*StructInstanceFunc)(PointerRNA *ptr);
 
 typedef struct StructRNA StructRNA;
 

Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===
--- trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-05-18 
10:56:26 UTC (rev 36745)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-05-18 
11:21:10 UTC (rev 36746)
@@ -2337,6 +2337,7 @@
fprintf(f, \t%s,\n, rna_function_string(srna-path));
fprintf(f, \t%s,\n, rna_function_string(srna-reg));
fprintf(f, \t%s,\n, rna_function_string(srna-unreg));
+   fprintf(f, \t%s,\n, rna_function_string(srna-instance));
fprintf(f, \t%s,\n, rna_function_string(srna-idproperties));
 
if(srna-reg  !srna-refine) {

Modified: trunk/blender/source/blender/makesrna/intern/rna_ID.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_ID.c   2011-05-18 
10:56:26 UTC (rev 36745)
+++ trunk/blender/source/blender/makesrna/intern/rna_ID.c   2011-05-18 
11:21:10 UTC (rev 36746)
@@ -384,7 +384,7 @@
RNA_def_struct_sdna(srna, IDPropertyGroup);
RNA_def_struct_ui_text(srna, ID Property Group, Group of ID 
properties);
RNA_def_struct_idprops_func(srna, rna_PropertyGroup_idprops);
-   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36747] trunk/blender/source/blender/ makesrna/intern/makesrna.c: RNA: some compile fixes for C/C++ api.

2011-05-18 Thread Brecht Van Lommel
Revision: 36747
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36747
Author:   blendix
Date: 2011-05-18 12:56:58 + (Wed, 18 May 2011)
Log Message:
---
RNA: some compile fixes for C/C++ api.

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/makesrna.c

Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===
--- trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-05-18 
11:21:10 UTC (rev 36746)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-05-18 
12:56:58 UTC (rev 36747)
@@ -193,8 +193,18 @@
 #undef REN_IF_DIFF
 }
 
+/* Helper to solve keyword problems with C/C++ */
 
+static const char *rna_safe_id(const char *id)
+{
+   if(strcmp(id, default) == 0)
+   return default_value;
+   else if(strcmp(id, operator) == 0)
+   return operator_value;
 
+   return id;
+}
+
 /* Sorting */
 
 static int cmp_struct(const void *a, const void *b)
@@ -501,7 +511,7 @@
 
}
 
-   func= rna_alloc_function_name(srna-identifier, prop-identifier, 
get);
+   func= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), get);
 
switch(prop-type) {
case PROP_STRING: {
@@ -569,7 +579,7 @@
rna_print_data_get(f, dp);
 
if(prop-flag  PROP_DYNAMIC) {
-   char *lenfunc= 
rna_alloc_function_name(srna-identifier, prop-identifier, get_length);
+   char *lenfunc= 
rna_alloc_function_name(srna-identifier, rna_safe_id(prop-identifier), 
get_length);
fprintf(f, int i, 
arraylen[RNA_MAX_ARRAY_DIMENSION];\n);
fprintf(f, int len= 
%s(ptr, arraylen);\n\n, lenfunc);
fprintf(f, for(i=0; ilen; 
i++) {\n);
@@ -684,7 +694,7 @@
}
}
 
-   func= rna_alloc_function_name(srna-identifier, prop-identifier, 
set);
+   func= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), set);
 
switch(prop-type) {
case PROP_STRING: {
@@ -754,7 +764,7 @@
rna_print_data_get(f, dp);
 
if(prop-flag  PROP_DYNAMIC) {
-   char *lenfunc= 
rna_alloc_function_name(srna-identifier, prop-identifier, set_length);
+   char *lenfunc= 
rna_alloc_function_name(srna-identifier, rna_safe_id(prop-identifier), 
set_length);
fprintf(f, int i, 
arraylen[RNA_MAX_ARRAY_DIMENSION];\n);
fprintf(f, int len= 
%s(ptr, arraylen);\n\n, lenfunc);
fprintf(f, for(i=0; ilen; 
i++) {\n);
@@ -851,7 +861,7 @@
}
}
 
-   func= rna_alloc_function_name(srna-identifier, 
prop-identifier, length);
+   func= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), length);
 
fprintf(f, int %s(PointerRNA *ptr)\n, func);
fprintf(f, {\n);
@@ -873,7 +883,7 @@
}
}
 
-   func= rna_alloc_function_name(srna-identifier, 
prop-identifier, length);
+   func= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), length);
 
fprintf(f, int %s(PointerRNA *ptr)\n, func);
fprintf(f, {\n);
@@ -908,7 +918,7 @@
}
}
 
-   func= rna_alloc_function_name(srna-identifier, prop-identifier, 
begin);
+   func= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), begin);
 
fprintf(f, void %s(CollectionPropertyIterator *iter, PointerRNA 
*ptr)\n, func);
fprintf(f, {\n);
@@ -940,7 +950,7 @@
fprintf(f, \n  rna_iterator_listbase_begin(iter, 
data-%s, NULL);\n, dp-dnaname);
}
 
-   getfunc= rna_alloc_function_name(srna-identifier, prop-identifier, 
get);
+   getfunc= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), get);
 
fprintf(f, \n  if(iter-valid)\n);
fprintf(f, iter-ptr= %s(iter);\n, getfunc);
@@ -970,7 +980,7 @@
else return NULL;
}
 
-   func= rna_alloc_function_name(srna-identifier, prop-identifier, 
lookup_int);
+   func= rna_alloc_function_name(srna-identifier, 
rna_safe_id(prop-identifier), lookup_int);
 
fprintf(f, int %s(PointerRNA *ptr, int index, PointerRNA *r_ptr)\n, 
func);
fprintf(f, {\n);
@@ -984,7 +994,7 @@

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36748] branches/cycles: Cycles: svn merge -r36495:36747 https://svn.blender.org/svnroot/bf-blender/trunk/ blender/

2011-05-18 Thread Brecht Van Lommel
Revision: 36748
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36748
Author:   blendix
Date: 2011-05-18 13:56:20 + (Wed, 18 May 2011)
Log Message:
---
Cycles: svn merge -r36495:36747 
https://svn.blender.org/svnroot/bf-blender/trunk/blender/

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36495

Modified Paths:
--
branches/cycles/CMakeLists.txt
branches/cycles/SConstruct
branches/cycles/build_files/buildbot/config/user-config-i686.py
branches/cycles/build_files/buildbot/config/user-config-player-i686.py
branches/cycles/build_files/buildbot/config/user-config-player-x86_64.py
branches/cycles/build_files/buildbot/config/user-config-x86_64.py
branches/cycles/build_files/cmake/cmake_qtcreator_project.py
branches/cycles/build_files/cmake/macros.cmake
branches/cycles/build_files/cmake/packaging.cmake
branches/cycles/build_files/scons/config/linux2-config.py
branches/cycles/build_files/scons/config/win32-vc-config.py
branches/cycles/build_files/scons/config/win64-vc-config.py
branches/cycles/build_files/scons/tools/Blender.py
branches/cycles/build_files/scons/tools/btools.py
branches/cycles/doc/doxygen/doxygen.source
branches/cycles/doc/python_api/sphinx_doc_gen.py
branches/cycles/intern/container/CMakeLists.txt
branches/cycles/intern/container/CTR_Map.h
branches/cycles/intern/container/SConscript
branches/cycles/intern/cycles/blender/addon/xml.py
branches/cycles/intern/ghost/CMakeLists.txt
branches/cycles/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/cycles/intern/ghost/intern/GHOST_SystemWin32.h
branches/cycles/intern/ghost/intern/GHOST_SystemX11.cpp
branches/cycles/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/cycles/intern/iksolver/intern/IK_QSegment.cpp
branches/cycles/intern/smoke/intern/Makefile.FFT
branches/cycles/intern/smoke/intern/Makefile.cygwin
branches/cycles/intern/smoke/intern/Makefile.linux
branches/cycles/intern/smoke/intern/Makefile.mac
branches/cycles/release/environment-mswindows
branches/cycles/release/scripts/modules/bpy/path.py
branches/cycles/release/scripts/modules/bpy/utils.py
branches/cycles/release/scripts/startup/bl_operators/add_mesh_torus.py
branches/cycles/release/scripts/startup/bl_ui/__init__.py
branches/cycles/release/scripts/startup/bl_ui/properties_data_camera.py
branches/cycles/release/scripts/startup/bl_ui/properties_data_empty.py
branches/cycles/release/scripts/startup/bl_ui/properties_data_mesh.py
branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/cycles/release/scripts/startup/bl_ui/space_image.py
branches/cycles/release/scripts/startup/bl_ui/space_sequencer.py
branches/cycles/release/scripts/startup/bl_ui/space_text.py
branches/cycles/release/scripts/startup/bl_ui/space_view3d.py
branches/cycles/release/scripts/templates/operator_export.py
branches/cycles/release/scripts/templates/operator_mesh_add.py
branches/cycles/release/windows/installer/00.sconsblender.nsi
branches/cycles/scons/scons-local-1.2.0.d20090223/SCons/Tool/MSCommon/vs.py
branches/cycles/source/CMakeLists.txt
branches/cycles/source/SConscript
branches/cycles/source/blender/CMakeLists.txt
branches/cycles/source/blender/SConscript
branches/cycles/source/blender/blenfont/CMakeLists.txt
branches/cycles/source/blender/blenfont/intern/blf_dir.c
branches/cycles/source/blender/blenfont/intern/blf_internal.h
branches/cycles/source/blender/blenkernel/BKE_blender.h
branches/cycles/source/blender/blenkernel/BKE_brush.h
branches/cycles/source/blender/blenkernel/BKE_colortools.h
branches/cycles/source/blender/blenkernel/BKE_sequencer.h
branches/cycles/source/blender/blenkernel/BKE_sketch.h
branches/cycles/source/blender/blenkernel/BKE_text.h
branches/cycles/source/blender/blenkernel/CMakeLists.txt
branches/cycles/source/blender/blenkernel/SConscript
branches/cycles/source/blender/blenkernel/intern/action.c
branches/cycles/source/blender/blenkernel/intern/blender.c
branches/cycles/source/blender/blenkernel/intern/brush.c
branches/cycles/source/blender/blenkernel/intern/colortools.c
branches/cycles/source/blender/blenkernel/intern/displist.c
branches/cycles/source/blender/blenkernel/intern/icons.c
branches/cycles/source/blender/blenkernel/intern/object.c
branches/cycles/source/blender/blenkernel/intern/particle_system.c
branches/cycles/source/blender/blenkernel/intern/seqeffects.c
branches/cycles/source/blender/blenkernel/intern/sequencer.c
branches/cycles/source/blender/blenkernel/intern/sketch.c
branches/cycles/source/blender/blenkernel/intern/text.c
branches/cycles/source/blender/blenkernel/intern/texture.c

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36749] trunk/blender/source/blender/ editors/interface/interface_handlers.c: UI: fix access of freed memory in buttons handling code.

2011-05-18 Thread Brecht Van Lommel
Revision: 36749
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36749
Author:   blendix
Date: 2011-05-18 15:23:40 + (Wed, 18 May 2011)
Log Message:
---
UI: fix access of freed memory in buttons handling code.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-18 13:56:20 UTC (rev 36748)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-18 15:23:40 UTC (rev 36749)
@@ -298,7 +298,7 @@
after-func_arg3= but-func_arg3;
 
after-funcN= but-funcN;
-   after-func_argN= but-func_argN;
+   after-func_argN= MEM_dupallocN(but-func_argN);
 
after-rename_func= but-rename_func;
after-rename_arg1= but-rename_arg1;
@@ -402,6 +402,8 @@
after.func(C, after.func_arg1, after.func_arg2);
if(after.funcN)
after.funcN(C, after.func_argN, after.func_arg2);
+   if(after.func_argN)
+   MEM_freeN(after.func_argN);

if(after.handle_func)
after.handle_func(C, after.handle_func_arg, 
after.retval);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36755] branches/cycles: Cycles: 3d view tool properties entry in view menu.

2011-05-18 Thread Brecht Van Lommel
Revision: 36755
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36755
Author:   blendix
Date: 2011-05-18 19:30:28 + (Wed, 18 May 2011)
Log Message:
---
Cycles: 3d view tool properties entry in view menu.

Modified Paths:
--
branches/cycles/release/scripts/startup/bl_ui/space_view3d.py
branches/cycles/source/blender/editors/space_view3d/space_view3d.c
branches/cycles/source/blender/editors/space_view3d/view3d_intern.h
branches/cycles/source/blender/editors/space_view3d/view3d_ops.c
branches/cycles/source/blender/editors/space_view3d/view3d_toolbar.c

Modified: branches/cycles/release/scripts/startup/bl_ui/space_view3d.py
===
--- branches/cycles/release/scripts/startup/bl_ui/space_view3d.py   
2011-05-18 18:14:59 UTC (rev 36754)
+++ branches/cycles/release/scripts/startup/bl_ui/space_view3d.py   
2011-05-18 19:30:28 UTC (rev 36755)
@@ -279,6 +279,7 @@
 
 layout.operator(view3d.properties, icon='MENU_PANEL')
 layout.operator(view3d.toolshelf, icon='MENU_PANEL')
+layout.operator(view3d.tool_properties, icon='MENU_PANEL')
 
 layout.separator()
 

Modified: branches/cycles/source/blender/editors/space_view3d/space_view3d.c
===
--- branches/cycles/source/blender/editors/space_view3d/space_view3d.c  
2011-05-18 18:14:59 UTC (rev 36754)
+++ branches/cycles/source/blender/editors/space_view3d/space_view3d.c  
2011-05-18 19:30:28 UTC (rev 36755)
@@ -95,7 +95,7 @@
return arnew;
 }
 
-ARegion *view3d_has_tools_region(ScrArea *sa)
+void view3d_has_tools_region(ScrArea *sa, ARegion **r_artool, ARegion 
**r_arprops)
 {
ARegion *ar, *artool=NULL, *arprops=NULL, *arhead;

@@ -107,7 +107,11 @@
}

/* tool region hide/unhide also hides props */
-   if(arprops  artool) return artool;
+   if(arprops  artool) {
+   *r_artool= artool;
+   *r_arprops= arprops;
+   return;
+   }

if(artool==NULL) {
/* add subdiv level; after header */
@@ -116,7 +120,11 @@
break;

/* is error! */
-   if(arhead==NULL) return NULL;
+   if(arhead==NULL) {
+   *r_artool= NULL;
+   *r_arprops= NULL;
+   return;
+   }

artool= MEM_callocN(sizeof(ARegion), tools for view3d);

@@ -134,8 +142,9 @@
arprops-regiontype= RGN_TYPE_TOOL_PROPS;
arprops-alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
}
-   
-   return artool;
+
+   *r_artool= artool;
+   *r_arprops= arprops;
 }
 
 /* ** */

Modified: branches/cycles/source/blender/editors/space_view3d/view3d_intern.h
===
--- branches/cycles/source/blender/editors/space_view3d/view3d_intern.h 
2011-05-18 18:14:59 UTC (rev 36754)
+++ branches/cycles/source/blender/editors/space_view3d/view3d_intern.h 
2011-05-18 19:30:28 UTC (rev 36755)
@@ -174,6 +174,7 @@
 
 /* view3d_toolbar.c */
 void VIEW3D_OT_toolshelf(struct wmOperatorType *ot);
+void VIEW3D_OT_tool_properties(struct wmOperatorType *ot);
 void view3d_toolshelf_register(struct ARegionType *art);
 void view3d_tool_props_register(struct ARegionType *art);
 
@@ -189,7 +190,7 @@
 
 /* space_view3d.c */
 ARegion *view3d_has_buttons_region(ScrArea *sa);
-ARegion *view3d_has_tools_region(ScrArea *sa);
+void view3d_has_tools_region(ScrArea *sa, ARegion **artool, ARegion **arprops);
 
 extern const char *view3d_context_dir[]; /* doc access */
 

Modified: branches/cycles/source/blender/editors/space_view3d/view3d_ops.c
===
--- branches/cycles/source/blender/editors/space_view3d/view3d_ops.c
2011-05-18 18:14:59 UTC (rev 36754)
+++ branches/cycles/source/blender/editors/space_view3d/view3d_ops.c
2011-05-18 19:30:28 UTC (rev 36755)
@@ -94,6 +94,7 @@

WM_operatortype_append(VIEW3D_OT_properties);
WM_operatortype_append(VIEW3D_OT_toolshelf);
+   WM_operatortype_append(VIEW3D_OT_tool_properties);

WM_operatortype_append(VIEW3D_OT_snap_selected_to_grid);
WM_operatortype_append(VIEW3D_OT_snap_selected_to_cursor);

Modified: branches/cycles/source/blender/editors/space_view3d/view3d_toolbar.c
===
--- branches/cycles/source/blender/editors/space_view3d/view3d_toolbar.c
2011-05-18 18:14:59 UTC (rev 36754)
+++ branches/cycles/source/blender/editors/space_view3d/view3d_toolbar.c
2011-05-18 19:30:28 UTC (rev 36755)
@@ -257,10 +257,12 @@
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36756] branches/cycles/source/blender/ editors/screen/area.c: Cycles: get rid of (+) icon for region open, all regions already accesible

2011-05-18 Thread Brecht Van Lommel
Revision: 36756
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36756
Author:   blendix
Date: 2011-05-18 19:34:17 + (Wed, 18 May 2011)
Log Message:
---
Cycles: get rid of (+) icon for region open, all regions already accesible
through shortcut key or view menu.

Modified Paths:
--
branches/cycles/source/blender/editors/screen/area.c

Modified: branches/cycles/source/blender/editors/screen/area.c
===
--- branches/cycles/source/blender/editors/screen/area.c2011-05-18 
19:30:28 UTC (rev 36755)
+++ branches/cycles/source/blender/editors/screen/area.c2011-05-18 
19:34:17 UTC (rev 36756)
@@ -479,84 +479,21 @@
BLI_init_rcti(az-rect, az-x1, az-x2, az-y1, az-y2);
 }
 
-static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
-{
-   AZone *azt;
-   int tot=0;
-   
-   /* count how many actionzones with along same edge are available.
-  This allows for adding more action zones in the future without
-  having to worry about correct offset */
-   for(azt= sa-actionzones.first; azt; azt= azt-next) {
-   if(azt-edge == az-edge) tot++;
-   }
-   
-   switch(az-edge) {
-   case AE_TOP_TO_BOTTOMRIGHT:
-   az-x1= ar-winrct.xmax - tot*2*AZONEPAD_ICON;
-   az-y1= ar-winrct.ymax + AZONEPAD_ICON;
-   az-x2= ar-winrct.xmax - tot*AZONEPAD_ICON;
-   az-y2= ar-winrct.ymax + 2*AZONEPAD_ICON;
-   break;
-   case AE_BOTTOM_TO_TOPLEFT:
-   az-x1= ar-winrct.xmin + AZONEPAD_ICON;
-   az-y1= ar-winrct.ymin - 2*AZONEPAD_ICON;
-   az-x2= ar-winrct.xmin + 2*AZONEPAD_ICON;
-   az-y2= ar-winrct.ymin - AZONEPAD_ICON;
-   break;
-   case AE_LEFT_TO_TOPRIGHT:
-   az-x1= ar-winrct.xmin - 2*AZONEPAD_ICON;
-   az-y1= ar-winrct.ymax - tot*2*AZONEPAD_ICON;
-   az-x2= ar-winrct.xmin - AZONEPAD_ICON;
-   az-y2= ar-winrct.ymax - tot*AZONEPAD_ICON;
-   break;
-   case AE_RIGHT_TO_TOPLEFT:
-   az-x1= ar-winrct.xmax + AZONEPAD_ICON;
-   az-y1= ar-winrct.ymax - tot*2*AZONEPAD_ICON;
-   az-x2= ar-winrct.xmax + 2*AZONEPAD_ICON;
-   az-y2= ar-winrct.ymax - tot*AZONEPAD_ICON;
-   break;
-   }
-
-   BLI_init_rcti(az-rect, az-x1, az-x2, az-y1, az-y2);
-   
-   /* if more azones on 1 spot, set offset */
-   for(azt= sa-actionzones.first; azt; azt= azt-next) {
-   if(az!=azt) {
-   if( ABS(az-x1-azt-x1)  2  ABS(az-y1-azt-y1)  2) 
{
-   if(az-edge==AE_TOP_TO_BOTTOMRIGHT || 
az-edge==AE_BOTTOM_TO_TOPLEFT) {
-   az-x1+= AZONESPOT;
-   az-x2+= AZONESPOT;
-   }
-   else{
-   az-y1-= AZONESPOT;
-   az-y2-= AZONESPOT;
-   }
-   BLI_init_rcti(az-rect, az-x1, az-x2, 
az-y1, az-y2);
-   }
-   }
-   }
-}
-
 static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge) 
 {
-   AZone *az;
-   
-   az= (AZone *)MEM_callocN(sizeof(AZone), actionzone);
-   BLI_addtail((sa-actionzones), az);
-   az-type= AZONE_REGION;
-   az-ar= ar;
-   az-edge= edge;
-   
-   if (ar-flag  RGN_FLAG_HIDDEN) {
-   region_azone_icon(sa, az, ar);
-   } else {
+   if(!(ar-flag  RGN_FLAG_HIDDEN)) {
+   AZone *az;
+   
+   az= (AZone *)MEM_callocN(sizeof(AZone), actionzone);
+   BLI_addtail((sa-actionzones), az);
+   az-type= AZONE_REGION;
+   az-ar= ar;
+   az-edge= edge;
+   
region_azone_edge(az, ar);
}
-   
 }
 
-
 /* *** */
 
 static void region_azone_add(ScrArea *sa, ARegion *ar, int alignment)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36769] trunk/blender/source/blender/ editors/interface/interface_handlers.c: UI: fix menus getting closed too quick when moving mouse not exactly tow

2011-05-19 Thread Brecht Van Lommel
Revision: 36769
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36769
Author:   blendix
Date: 2011-05-19 11:05:34 + (Thu, 19 May 2011)
Log Message:
---
UI: fix menus getting closed too quick when moving mouse not exactly towards
them, noticeable for the vertex groups or material slot utility menus.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-19 09:52:11 UTC (rev 36768)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-19 11:05:34 UTC (rev 36769)
@@ -5534,10 +5534,6 @@
int closer;
 
if(!menu-dotowards) return 0;
-   if((block-direction  UI_TOP) || (block-direction  UI_DOWN)) {
-   menu-dotowards= 0;
-   return menu-dotowards;
-   }
 
/* verify that we are moving towards one of the edges of the
 * menu block, in other words, in the triangle formed by the

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36771] trunk/blender/source/blender/ editors/interface/interface_layout.c: UI: fix direction properties not showing the right direction editing widge

2011-05-19 Thread Brecht Van Lommel
Revision: 36771
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36771
Author:   blendix
Date: 2011-05-19 11:18:09 + (Thu, 19 May 2011)
Log Message:
---
UI: fix direction properties not showing the right direction editing widget,
code was there but in the wrong location. This makes the opengl lights in
the user preferences show that widget again as in 2.4.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_layout.c

Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===
--- trunk/blender/source/blender/editors/interface/interface_layout.c   
2011-05-19 11:13:35 UTC (rev 36770)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c   
2011-05-19 11:18:09 UTC (rev 36771)
@@ -418,6 +418,9 @@
but-type= NUMSLI;
}
}
+   else if(subtype == PROP_DIRECTION) {
+   uiDefButR(block, BUT_NORMAL, 0, name, x, y, UI_UNIT_X*3, 
UI_UNIT_Y*3, ptr, RNA_property_identifier(prop), 0, 0, 0, -1, -1, NULL);
+   }
else {
if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)  !expand)
uiDefAutoButR(block, ptr, prop, -1, , ICON_NONE, 0, 
0, w, UI_UNIT_Y);
@@ -533,9 +536,6 @@
/* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */
but= uiDefIconButO(block, BUT, BUTTONS_OT_file_browse, 
WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL);
}
-   else if(subtype == PROP_DIRECTION) {
-   uiDefButR(block, BUT_NORMAL, 0, name, x, y, 100, 100, ptr, 
RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL);
-   }
else if(flag  UI_ITEM_R_EVENT) {
uiDefButR(block, KEYEVT, 0, name, x, y, w, h, ptr, 
RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36772] trunk/blender/source/blender/ blenkernel: Add localize_lamp and localize_world functions as already existed for materials

2011-05-19 Thread Brecht Van Lommel
Revision: 36772
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36772
Author:   blendix
Date: 2011-05-19 11:21:37 + (Thu, 19 May 2011)
Log Message:
---
Add localize_lamp and localize_world functions as already existed for materials
and textures, unused still.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_object.h
trunk/blender/source/blender/blenkernel/BKE_world.h
trunk/blender/source/blender/blenkernel/intern/material.c
trunk/blender/source/blender/blenkernel/intern/object.c
trunk/blender/source/blender/blenkernel/intern/world.c

Modified: trunk/blender/source/blender/blenkernel/BKE_object.h
===
--- trunk/blender/source/blender/blenkernel/BKE_object.h2011-05-19 
11:18:09 UTC (rev 36771)
+++ trunk/blender/source/blender/blenkernel/BKE_object.h2011-05-19 
11:21:37 UTC (rev 36772)
@@ -83,6 +83,7 @@

 void *add_lamp(const char *name);
 struct Lamp *copy_lamp(struct Lamp *la);
+struct Lamp *localize_lamp(struct Lamp *la);
 void make_local_lamp(struct Lamp *la);
 void free_camera(struct Camera *ca);
 void free_lamp(struct Lamp *la);

Modified: trunk/blender/source/blender/blenkernel/BKE_world.h
===
--- trunk/blender/source/blender/blenkernel/BKE_world.h 2011-05-19 11:18:09 UTC 
(rev 36771)
+++ trunk/blender/source/blender/blenkernel/BKE_world.h 2011-05-19 11:21:37 UTC 
(rev 36772)
@@ -40,6 +40,7 @@
 void free_world(struct World *sc); 
 struct World *add_world(const char *name);
 struct World *copy_world(struct World *wrld);
+struct World *localize_world(struct World *wrld);
 void make_local_world(struct World *wrld);
 
 #endif

Modified: trunk/blender/source/blender/blenkernel/intern/material.c
===
--- trunk/blender/source/blender/blenkernel/intern/material.c   2011-05-19 
11:18:09 UTC (rev 36771)
+++ trunk/blender/source/blender/blenkernel/intern/material.c   2011-05-19 
11:21:37 UTC (rev 36772)
@@ -258,9 +258,8 @@

man-preview = NULL;

-   if(ma-nodetree) {
+   if(ma-nodetree)
man-nodetree= ntreeLocalize(ma-nodetree);
-   }

man-gpumaterial.first= man-gpumaterial.last= NULL;


Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===
--- trunk/blender/source/blender/blenkernel/intern/object.c 2011-05-19 
11:18:09 UTC (rev 36771)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2011-05-19 
11:21:37 UTC (rev 36772)
@@ -867,12 +867,33 @@

lan-curfalloff = curvemapping_copy(la-curfalloff);

-#if 0 // XXX old animation system
-   id_us_plus((ID *)lan-ipo);
-#endif // XXX old animation system
+   if(la-preview)
+   lan-preview = BKE_previewimg_copy(la-preview);
+   
+   return lan;
+}
 
-   if (la-preview) lan-preview = BKE_previewimg_copy(la-preview);
+Lamp *localize_lamp(Lamp *la)
+{
+   Lamp *lan;
+   int a;

+   lan= copy_libblock(la);
+   BLI_remlink(G.main-lamp, lan);
+
+   for(a=0; aMAX_MTEX; a++) {
+   if(lan-mtex[a]) {
+   lan-mtex[a]= MEM_mallocN(sizeof(MTex), 
localize_lamp);
+   memcpy(lan-mtex[a], la-mtex[a], sizeof(MTex));
+   /* free lamp decrements */
+   id_us_plus((ID *)lan-mtex[a]-tex);
+   }
+   }
+   
+   lan-curfalloff = curvemapping_copy(la-curfalloff);
+
+   lan-preview= NULL;
+   
return lan;
 }
 

Modified: trunk/blender/source/blender/blenkernel/intern/world.c
===
--- trunk/blender/source/blender/blenkernel/intern/world.c  2011-05-19 
11:18:09 UTC (rev 36771)
+++ trunk/blender/source/blender/blenkernel/intern/world.c  2011-05-19 
11:21:37 UTC (rev 36772)
@@ -117,18 +117,37 @@

for(a=0; aMAX_MTEX; a++) {
if(wrld-mtex[a]) {
-   wrldn-mtex[a]= MEM_mallocN(sizeof(MTex), 
copymaterial);
+   wrldn-mtex[a]= MEM_mallocN(sizeof(MTex), copy_world);
memcpy(wrldn-mtex[a], wrld-mtex[a], sizeof(MTex));
id_us_plus((ID *)wrldn-mtex[a]-tex);
}
}

-   if (wrld-preview) wrldn-preview = BKE_previewimg_copy(wrld-preview);
+   if(wrld-preview)
+   wrldn-preview = BKE_previewimg_copy(wrld-preview);
 
-#if 0 // XXX old animation system
-   id_us_plus((ID *)wrldn-ipo);
-#endif // XXX old animation system
+   return wrldn;
+}
+
+World *localize_world(World *wrld)
+{
+   World *wrldn;
+   int a;

+   wrldn= copy_libblock(wrld);
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36773] trunk/blender/source/blender: Fix crash when accessing mesh from python while a mesh with a subsurf modifier

2011-05-19 Thread Brecht Van Lommel
Revision: 36773
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36773
Author:   blendix
Date: 2011-05-19 11:24:56 + (Thu, 19 May 2011)
Log Message:
---
Fix crash when accessing mesh from python while a mesh with a subsurf modifier
is in editmode.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_subsurf.h
trunk/blender/source/blender/blenkernel/intern/multires.c
trunk/blender/source/blender/blenkernel/intern/shrinkwrap.c
trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
trunk/blender/source/blender/modifiers/intern/MOD_subsurf.c

Modified: trunk/blender/source/blender/blenkernel/BKE_subsurf.h
===
--- trunk/blender/source/blender/blenkernel/BKE_subsurf.h   2011-05-19 
11:21:37 UTC (rev 36772)
+++ trunk/blender/source/blender/blenkernel/BKE_subsurf.h   2011-05-19 
11:24:56 UTC (rev 36773)
@@ -54,7 +54,7 @@
struct DerivedMesh *dm,
struct SubsurfModifierData *smd,
int useRenderParams, float 
(*vertCos)[3],
-   int isFinalCalc, int editMode);
+   int isFinalCalc, int 
forEditMode, int inEditMode);
 
 void subsurf_calculate_limit_positions(struct Mesh *me, float 
(*positions_r)[3]);
 

Modified: trunk/blender/source/blender/blenkernel/intern/multires.c
===
--- trunk/blender/source/blender/blenkernel/intern/multires.c   2011-05-19 
11:21:37 UTC (rev 36772)
+++ trunk/blender/source/blender/blenkernel/intern/multires.c   2011-05-19 
11:24:56 UTC (rev 36773)
@@ -465,7 +465,7 @@
return multires_dm_create_from_derived(mmd, 1, dm, ob, 0, 0);
 }
 
-static DerivedMesh *subsurf_dm_create_local(Object *UNUSED(ob), DerivedMesh 
*dm, int lvl, int simple, int optimal)
+static DerivedMesh *subsurf_dm_create_local(Object *ob, DerivedMesh *dm, int 
lvl, int simple, int optimal)
 {
SubsurfModifierData smd= {{NULL}};
 
@@ -476,7 +476,7 @@
if(optimal)
smd.flags |= eSubsurfModifierFlag_ControlEdges;
 
-   return subsurf_make_derived_from_derived(dm, smd, 0, NULL, 0, 0);
+   return subsurf_make_derived_from_derived(dm, smd, 0, NULL, 0, 0, 
(ob-mode  OB_MODE_EDIT));
 }
 
 

Modified: trunk/blender/source/blender/blenkernel/intern/shrinkwrap.c
===
--- trunk/blender/source/blender/blenkernel/intern/shrinkwrap.c 2011-05-19 
11:21:37 UTC (rev 36772)
+++ trunk/blender/source/blender/blenkernel/intern/shrinkwrap.c 2011-05-19 
11:24:56 UTC (rev 36773)
@@ -562,7 +562,7 @@
ssmd.subdivType = ME_CC_SUBSURF;
//catmull clark
ssmd.levels = smd-subsurfLevels;   //levels
 
-   ss_mesh = subsurf_make_derived_from_derived(dm, ssmd, 
FALSE, NULL, 0, 0);
+   ss_mesh = subsurf_make_derived_from_derived(dm, ssmd, 
FALSE, NULL, 0, 0, (ob-mode  OB_MODE_EDIT));
 
if(ss_mesh)
{

Modified: trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
===
--- trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
2011-05-19 11:21:37 UTC (rev 36772)
+++ trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
2011-05-19 11:24:56 UTC (rev 36773)
@@ -2617,7 +2617,7 @@
struct DerivedMesh *dm,
struct SubsurfModifierData *smd,
int useRenderParams, float 
(*vertCos)[3],
-   int isFinalCalc, int editMode)
+   int isFinalCalc, int 
forEditMode, int inEditMode)
 {
int useSimple = smd-subdivType == ME_SIMPLE_SUBSURF;
int useAging = smd-flags  eSubsurfModifierFlag_DebugIncr;
@@ -2625,7 +2625,7 @@
int drawInteriorEdges = !(smd-flags  
eSubsurfModifierFlag_ControlEdges);
CCGDerivedMesh *result;
 
-   if(editMode) {
+   if(forEditMode) {
int levels= (smd-modifier.scene)? 
get_render_subsurf_level(smd-modifier.scene-r, smd-levels): smd-levels;
 
smd-emCache = _getSubSurf(smd-emCache, levels, useAging, 0,
@@ -2656,7 +2656,7 @@
int useAging = smd-flags  eSubsurfModifierFlag_DebugIncr;
int levels= (smd-modifier.scene)? 
get_render_subsurf_level(smd-modifier.scene-r, smd-levels): smd-levels;
CCGSubSurf *ss;
-   
+
/* It is quite possible there is a much better place to do 
this. 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36775] trunk/blender/source/blender/ editors/render/render_preview.c: Fix for preview render, lamp and world now also get localized like material and

2011-05-19 Thread Brecht Van Lommel
Revision: 36775
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36775
Author:   blendix
Date: 2011-05-19 11:37:08 + (Thu, 19 May 2011)
Log Message:
---
Fix for preview render, lamp and world now also get localized like material and 
texture.

Modified Paths:
--
trunk/blender/source/blender/editors/render/render_preview.c

Modified: trunk/blender/source/blender/editors/render/render_preview.c
===
--- trunk/blender/source/blender/editors/render/render_preview.c
2011-05-19 11:34:11 UTC (rev 36774)
+++ trunk/blender/source/blender/editors/render/render_preview.c
2011-05-19 11:37:08 UTC (rev 36775)
@@ -74,7 +74,9 @@
 #include BKE_main.h
 #include BKE_material.h
 #include BKE_node.h
+#include BKE_object.h
 #include BKE_texture.h
+#include BKE_world.h
 
 #include IMB_imbuf.h
 #include IMB_imbuf_types.h
@@ -149,9 +151,11 @@
ID *parent;
MTex *slot;

-   /* node materials/texture need full copy during preview render, glsl 
uses it too */
+   /* datablocks with nodes need full copy during preview render, glsl 
uses it too */
Material *matcopy;
Tex *texcopy;
+   Lamp *lampcopy;
+   World *worldcopy;

float col[4];   /* active object color */

@@ -259,7 +263,7 @@
if(id_type==ID_MA) {
Material *mat= NULL, *origmat= (Material *)id;

-   if(id) {
+   if(origmat) {
/* work on a copy */
mat= localize_material(origmat);
sp-matcopy= mat;
@@ -389,7 +393,14 @@
}
}
else if(id_type==ID_LA) {
-   Lamp *la= (Lamp *)id;
+   Lamp *la= NULL, *origla= (Lamp *)id;
+
+   /* work on a copy */
+   if(origla) {
+   la= localize_lamp(origla);
+   sp-lampcopy= la;
+   BLI_addtail(pr_main-lamp, la);
+   }

if(la  la-type==LA_SUN  (la-sun_effect_type  
LA_SUN_EFFECT_SKY)) {
sce-lay= 1MA_ATMOS;
@@ -411,8 +422,16 @@
}
}
else if(id_type==ID_WO) {
+   World *wrld= NULL, *origwrld= (World *)id;
+
+   if(origwrld) {
+   wrld= localize_world(origwrld);
+   sp-worldcopy= wrld;
+   BLI_addtail(pr_main-world, wrld);
+   }
+
sce-lay= 1MA_SKY;
-   sce-world= (World *)id;
+   sce-world= wrld;
}

return sce;
@@ -707,6 +726,38 @@
}
MEM_freeN(sp-texcopy);
}
+   if(sp-worldcopy) {
+   struct IDProperty *properties;
+   /* node previews */
+   shader_preview_updatejob(sp);
+   
+   /* get rid of copied world */
+   BLI_remlink(pr_main-world, sp-worldcopy);
+   free_world(sp-worldcopy);
+   
+   properties= IDP_GetProperties((ID *)sp-worldcopy, FALSE);
+   if (properties) {
+   IDP_FreeProperty(properties);
+   MEM_freeN(properties);
+   }
+   MEM_freeN(sp-worldcopy);
+   }
+   if(sp-lampcopy) {
+   struct IDProperty *properties;
+   /* node previews */
+   shader_preview_updatejob(sp);
+   
+   /* get rid of copied lamp */
+   BLI_remlink(pr_main-lamp, sp-lampcopy);
+   free_lamp(sp-lampcopy);
+   
+   properties= IDP_GetProperties((ID *)sp-lampcopy, FALSE);
+   if (properties) {
+   IDP_FreeProperty(properties);
+   MEM_freeN(properties);
+   }
+   MEM_freeN(sp-lampcopy);
+   }

MEM_freeN(sp);
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36776] trunk/blender/source/blender/ editors/space_buttons: UI tweak: properties editor header now has same size as other headers again.

2011-05-19 Thread Brecht Van Lommel
Revision: 36776
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36776
Author:   blendix
Date: 2011-05-19 11:45:06 + (Thu, 19 May 2011)
Log Message:
---
UI tweak: properties editor header now has same size as other headers again.

Modified Paths:
--
trunk/blender/source/blender/editors/space_buttons/buttons_header.c
trunk/blender/source/blender/editors/space_buttons/buttons_intern.h
trunk/blender/source/blender/editors/space_buttons/space_buttons.c

Modified: trunk/blender/source/blender/editors/space_buttons/buttons_header.c
===
--- trunk/blender/source/blender/editors/space_buttons/buttons_header.c 
2011-05-19 11:37:08 UTC (rev 36775)
+++ trunk/blender/source/blender/editors/space_buttons/buttons_header.c 
2011-05-19 11:45:06 UTC (rev 36776)
@@ -98,11 +98,13 @@
sbuts-mainbuser= sbuts-mainb;
 }
 
+#define BUT_UNIT_X (UI_UNIT_X+2)
+
 void buttons_header_buttons(const bContext *C, ARegion *ar)
 {
SpaceButs *sbuts= CTX_wm_space_buts(C);
uiBlock *block;
-   int xco, yco= 3;
+   int xco, yco= 1;
 
buttons_context_compute(C, sbuts);

@@ -118,32 +120,32 @@
// Default panels
uiBlockBeginAlign(block);
if(sbuts-pathflag  (1BCONTEXT_RENDER))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, 
xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, 
(sbuts-mainb), 0.0, (float)BCONTEXT_RENDER, 0, 0, Render);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, 
xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, (sbuts-mainb), 
0.0, (float)BCONTEXT_RENDER, 0, 0, Render);
if(sbuts-pathflag  (1BCONTEXT_SCENE))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
ICON_SCENE_DATA,xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, 
BUTS_UI_UNIT, (sbuts-mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, Scene);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
ICON_SCENE_DATA,xco+=BUT_UNIT_X, yco, BUT_UNIT_X, 
UI_UNIT_Y, (sbuts-mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, Scene);
if(sbuts-pathflag  (1BCONTEXT_WORLD))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, 
xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, (sbuts-mainb), 
0.0, (float)BCONTEXT_WORLD, 0, 0, World);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, 
xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, (sbuts-mainb), 0.0, 
(float)BCONTEXT_WORLD, 0, 0, World);
if(sbuts-pathflag  (1BCONTEXT_OBJECT))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
ICON_OBJECT_DATA,   xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, 
(sbuts-mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, Object);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
ICON_OBJECT_DATA,   xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, 
(sbuts-mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, Object);
if(sbuts-pathflag  (1BCONTEXT_CONSTRAINT))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
ICON_CONSTRAINT,xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, 
(sbuts-mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, Object Constraints);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
ICON_CONSTRAINT,xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, 
(sbuts-mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, Object Constraints);
if(sbuts-pathflag  (1BCONTEXT_MODIFIER))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER,  
xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, (sbuts-mainb), 0.0, 
(float)BCONTEXT_MODIFIER, 0, 0, Modifiers);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER,  
xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, (sbuts-mainb), 0.0, 
(float)BCONTEXT_MODIFIER, 0, 0, Modifiers);
if(sbuts-pathflag  (1BCONTEXT_DATA))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
sbuts-dataicon,xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, 
(sbuts-mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, Object Data);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, 
sbuts-dataicon,xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, 
(sbuts-mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, Object Data);
if(sbuts-pathflag  (1BCONTEXT_BONE))
-   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, 
xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, (sbuts-mainb), 0.0, 
(float)BCONTEXT_BONE, 0, 0, Bone);
+   uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, 
xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, (sbuts-mainb), 0.0, 
(float)BCONTEXT_BONE, 0, 0, Bone);
if(sbuts-pathflag  (1BCONTEXT_BONE_CONSTRAINT))
-   uiDefIconButS(block, ROW, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36777] trunk/blender/source/blender: Fix some compile warnings.

2011-05-19 Thread Brecht Van Lommel
Revision: 36777
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36777
Author:   blendix
Date: 2011-05-19 11:54:03 + (Thu, 19 May 2011)
Log Message:
---
Fix some compile warnings.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/world.c
trunk/blender/source/blender/imbuf/intern/png.c
trunk/blender/source/blender/modifiers/intern/MOD_subsurf.c

Modified: trunk/blender/source/blender/blenkernel/intern/world.c
===
--- trunk/blender/source/blender/blenkernel/intern/world.c  2011-05-19 
11:45:06 UTC (rev 36776)
+++ trunk/blender/source/blender/blenkernel/intern/world.c  2011-05-19 
11:54:03 UTC (rev 36777)
@@ -43,6 +43,7 @@
 #include DNA_scene_types.h
 #include DNA_texture_types.h
 
+#include BLI_listbase.h
 #include BLI_utildefines.h
 
 #include BKE_world.h

Modified: trunk/blender/source/blender/imbuf/intern/png.c
===
--- trunk/blender/source/blender/imbuf/intern/png.c 2011-05-19 11:45:06 UTC 
(rev 36776)
+++ trunk/blender/source/blender/imbuf/intern/png.c 2011-05-19 11:54:03 UTC 
(rev 36777)
@@ -391,7 +391,7 @@
 
if (png_get_valid (png_ptr, info_ptr, PNG_INFO_pHYs)) {
int unit_type;
-   unsigned int xres, yres;
+   png_uint_32 xres, yres;
 
if(png_get_pHYs(png_ptr, info_ptr, xres, yres, 
unit_type))
if(unit_type == PNG_RESOLUTION_METER) {

Modified: trunk/blender/source/blender/modifiers/intern/MOD_subsurf.c
===
--- trunk/blender/source/blender/modifiers/intern/MOD_subsurf.c 2011-05-19 
11:45:06 UTC (rev 36776)
+++ trunk/blender/source/blender/modifiers/intern/MOD_subsurf.c 2011-05-19 
11:54:03 UTC (rev 36777)
@@ -111,7 +111,7 @@
return result;
 }
 
-static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob),
struct EditMesh 
*UNUSED(editData),
DerivedMesh *derivedData)
 {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36778] branches/cycles: Cycles: svn merge -r36747:36777 https://svn.blender.org/svnroot/bf-blender/trunk/ blender/

2011-05-19 Thread Brecht Van Lommel
Revision: 36778
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36778
Author:   blendix
Date: 2011-05-19 12:37:26 + (Thu, 19 May 2011)
Log Message:
---
Cycles: svn merge -r36747:36777 
https://svn.blender.org/svnroot/bf-blender/trunk/blender/

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36747

Modified Paths:
--
branches/cycles/release/scripts/modules/bpy/path.py
branches/cycles/release/scripts/modules/bpy_extras/view3d_utils.py
branches/cycles/release/scripts/startup/bl_ui/space_userpref.py
branches/cycles/release/scripts/startup/bl_ui/space_userpref_keymap.py
branches/cycles/source/blender/blenkernel/BKE_icons.h
branches/cycles/source/blender/blenkernel/intern/icons.c
branches/cycles/source/blender/blenkernel/intern/object.c
branches/cycles/source/blender/blenkernel/intern/world.c
branches/cycles/source/blender/blenlib/BLI_math_geom.h
branches/cycles/source/blender/blenlib/intern/math_geom.c
branches/cycles/source/blender/blenloader/BLO_readfile.h
branches/cycles/source/blender/blenloader/intern/readblenentry.c
branches/cycles/source/blender/blenloader/intern/readfile.c
branches/cycles/source/blender/editors/armature/editarmature.c
branches/cycles/source/blender/editors/gpencil/gpencil_edit.c
branches/cycles/source/blender/editors/include/ED_view3d.h
branches/cycles/source/blender/editors/interface/interface_layout.c
branches/cycles/source/blender/editors/screen/screendump.c
branches/cycles/source/blender/editors/space_file/filelist.c
branches/cycles/source/blender/editors/space_view3d/drawmesh.c
branches/cycles/source/blender/editors/space_view3d/view3d_edit.c
branches/cycles/source/blender/editors/space_view3d/view3d_view.c
branches/cycles/source/blender/imbuf/intern/png.c
branches/cycles/source/blender/makesdna/DNA_view3d_types.h
branches/cycles/source/blender/makesrna/intern/rna_space.c
branches/cycles/source/blender/python/generic/mathutils_Matrix.c
branches/cycles/source/blender/python/generic/mathutils_geometry.c

Property Changed:

branches/cycles/
branches/cycles/source/blender/editors/datafiles/startup.blend.c
branches/cycles/source/blender/editors/render/render_shading.c
branches/cycles/source/blender/editors/render/render_update.c
branches/cycles/source/blender/editors/uvedit/uvedit_buttons.c


Property changes on: branches/cycles
___
Modified: svn:mergeinfo
   - /trunk/blender:36353-36747
   + /trunk/blender:36353-36777

Modified: branches/cycles/release/scripts/modules/bpy/path.py
===
--- branches/cycles/release/scripts/modules/bpy/path.py 2011-05-19 11:54:03 UTC 
(rev 36777)
+++ branches/cycles/release/scripts/modules/bpy/path.py 2011-05-19 12:37:26 UTC 
(rev 36778)
@@ -135,7 +135,7 @@
 filename = os.path.basename(path)  # filename may be a directory or a 
file
 dirpath = os.path.dirname(path)
 
-suffix = 
+suffix = path[:0]  #  but ensure byte/str match
 if not filename:  # dir ends with a slash?
 if len(dirpath)  len(path):
 suffix = path[:len(path) - len(dirpath)]

Modified: branches/cycles/release/scripts/modules/bpy_extras/view3d_utils.py
===
--- branches/cycles/release/scripts/modules/bpy_extras/view3d_utils.py  
2011-05-19 11:54:03 UTC (rev 36777)
+++ branches/cycles/release/scripts/modules/bpy_extras/view3d_utils.py  
2011-05-19 12:37:26 UTC (rev 36778)
@@ -36,14 +36,19 @@
 
 from mathutils import Vector
 
-dx = (2.0 * coord[0] / region.width) - 1.0
-dy = (2.0 * coord[1] / region.height) - 1.0
+viewvec = rv3d.view_matrix.inverted()[2].xyz.normalized()
 
-viewvec = rv3d.view_matrix.inverted()[2].to_3d().normalized()
-perspinv_x, perspinv_y = rv3d.perspective_matrix.inverted().to_3x3()[0:2]
-return ((perspinv_x * dx + perspinv_y * dy) - viewvec).normalized()
+if rv3d.is_perspective:
+dx = (2.0 * coord[0] / region.width) - 1.0
+dy = (2.0 * coord[1] / region.height) - 1.0
 
+persmat = rv3d.perspective_matrix.copy()
+perspinv_x, perspinv_y = persmat.inverted().to_3x3()[0:2]
+return ((perspinv_x * dx + perspinv_y * dy) - viewvec).normalized()
+else:
+return viewvec
 
+
 def region_2d_to_location_3d(region, rv3d, coord, depth_location):
 
 Return a 3d location from the region relative 2d coords, aligned with
@@ -62,12 +67,30 @@
 :return: normalized 3d vector.
 :rtype: :class:`Vector`
 
+from mathutils import Vector
 from mathutils.geometry import intersect_point_line
-origin_start = rv3d.view_matrix.inverted()[3].to_3d()
-origin_end = 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36795] branches/cycles/intern/cycles: Cycles: some steps to getting OpenCL backend to compile.

2011-05-20 Thread Brecht Van Lommel
Revision: 36795
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36795
Author:   blendix
Date: 2011-05-20 12:26:01 + (Fri, 20 May 2011)
Log Message:
---
Cycles: some steps to getting OpenCL backend to compile.

Modified Paths:
--
branches/cycles/intern/cycles/device/device_opencl.cpp
branches/cycles/intern/cycles/kernel/CMakeLists.txt
branches/cycles/intern/cycles/kernel/kernel.cl
branches/cycles/intern/cycles/kernel/kernel_compat_cuda.h
branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h
branches/cycles/intern/cycles/kernel/kernel_globals.h
branches/cycles/intern/cycles/kernel/kernel_light.h
branches/cycles/intern/cycles/kernel/kernel_triangle.h
branches/cycles/intern/cycles/kernel/kernel_types.h
branches/cycles/intern/cycles/kernel/svm/bsdf_ashikhmin_velvet.h
branches/cycles/intern/cycles/kernel/svm/bsdf_diffuse.h
branches/cycles/intern/cycles/kernel/svm/bsdf_microfacet.h
branches/cycles/intern/cycles/kernel/svm/bsdf_ward.h
branches/cycles/intern/cycles/kernel/svm/bsdf_westin.h
branches/cycles/intern/cycles/kernel/svm/svm_blend.h
branches/cycles/intern/cycles/kernel/svm/svm_displace.h
branches/cycles/intern/cycles/kernel/svm/svm_distorted_noise.h
branches/cycles/intern/cycles/kernel/svm/svm_image.h
branches/cycles/intern/cycles/kernel/svm/svm_mix.h
branches/cycles/intern/cycles/kernel/svm/svm_sky.h
branches/cycles/intern/cycles/kernel/svm/svm_texture.h
branches/cycles/intern/cycles/kernel/svm/svm_types.h
branches/cycles/intern/cycles/util/util_color.h
branches/cycles/intern/cycles/util/util_math.h

Added Paths:
---
branches/cycles/intern/cycles/kernel/kernel_textures.h

Modified: branches/cycles/intern/cycles/device/device_opencl.cpp
===
--- branches/cycles/intern/cycles/device/device_opencl.cpp  2011-05-20 
11:15:44 UTC (rev 36794)
+++ branches/cycles/intern/cycles/device/device_opencl.cpp  2011-05-20 
12:26:01 UTC (rev 36795)
@@ -55,6 +55,7 @@
cl_int ciErr;
mapstring, device_vectoruchar* const_mem_map;
mapstring, device_memory* mem_map;
+   device_ptr null_mem;
 
const char *opencl_error_string(cl_int err)
{
@@ -125,10 +126,10 @@
ciErr = clGetPlatformIDs(1, cpPlatform, NULL);
opencl_assert(ciErr);
 
-   ciErr = clGetDeviceIDs(cpPlatform, CL_DEVICE_TYPE_GPU, 1, 
cdDevice, NULL);
+   ciErr = clGetDeviceIDs(cpPlatform, CL_DEVICE_TYPE_CPU, 1, 
cdDevice, NULL);
opencl_assert(ciErr);
 
-   cxGPUContext = clCreateContext(0, 1, cdDevice, NULL 
/*clLogMessagesToStdoutAPPLE */, NULL, ciErr);
+   cxGPUContext = clCreateContext(0, 1, cdDevice, NULL, NULL, 
ciErr);
opencl_assert(ciErr);
 
cqCommandQueue = clCreateCommandQueue(cxGPUContext, cdDevice, 
0, ciErr);
@@ -137,11 +138,17 @@
/* compile kernel */
string source = string_printf(#include \kernel.cl\ // 
%lf\n, time_dt());
size_t source_len = source.size();
-   string build_options = -I ../kernel -I ../util -Werror 
-DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END=; // + path_get(kernel) +  
-Werror;
-   //printf(path %s\n, path_get(kernel).c_str());
 
-   //clUnloadCompiler();
+   string build_options = ;
 
+   //string csource = ../blender/intern/cycles;
+   //build_options += -I  + csource + /kernel -I  + csource + 
/util;
+
+   build_options +=  -I  + path_get(kernel); /* todo: escape 
path */
+
+   build_options +=  -Werror;
+   build_options +=  -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END=;
+
cpProgram = clCreateProgramWithSource(cxGPUContext, 1, (const 
char **)source, source_len, ciErr);
 
opencl_assert(ciErr);
@@ -170,10 +177,15 @@
opencl_assert(ciErr);
ckFilmConvertKernel = clCreateKernel(cpProgram, 
kernel_ocl_tonemap, ciErr);
opencl_assert(ciErr);
+
+   null_mem = (device_ptr)clCreateBuffer(cxGPUContext, 
CL_MEM_READ_ONLY, 1, NULL, ciErr);
}
 
~OpenCLDevice()
{
+
+   clReleaseMemObject(CL_MEM_PTR(null_mem));
+
mapstring, device_vectoruchar*::iterator mt;
for(mt = const_mem_map.begin(); mt != const_mem_map.end(); 
mt++) {
mem_free(*(mt-second));
@@ -261,6 +273,7 @@
void tex_alloc(const char *name, device_memory mem, bool 
interpolation, bool periodic)
{
mem_alloc(mem, MEM_READ_ONLY);
+   mem_copy_to(mem);
mem_map[name] = mem;
}
 
@@ -295,6 +308,11 @@
ciErr |= clSetKernelArg(ckPathTraceKernel, narg++, 
sizeof(d_data), 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36836] trunk/blender/source/blender/ blenlib/intern/rct.c: Fix print_rctf not printing y max correct.

2011-05-23 Thread Brecht Van Lommel
Revision: 36836
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36836
Author:   blendix
Date: 2011-05-23 14:51:31 + (Mon, 23 May 2011)
Log Message:
---
Fix print_rctf not printing y max correct.

Modified Paths:
--
trunk/blender/source/blender/blenlib/intern/rct.c

Modified: trunk/blender/source/blender/blenlib/intern/rct.c
===
--- trunk/blender/source/blender/blenlib/intern/rct.c   2011-05-23 13:37:18 UTC 
(rev 36835)
+++ trunk/blender/source/blender/blenlib/intern/rct.c   2011-05-23 14:51:31 UTC 
(rev 36836)
@@ -241,7 +241,7 @@
 
 void print_rctf(const char *str, rctf *rect)
 {
-   printf(%s: xmin %.3f, xmax %.3f, ymin %.3f, ymax %.3f (%.3fx%.3f)\n, 
str, rect-xmin, rect-xmax, rect-ymin, rect-xmax, rect-xmax - rect-xmin, 
rect-ymax - rect-ymin);
+   printf(%s: xmin %.3f, xmax %.3f, ymin %.3f, ymax %.3f (%.3fx%.3f)\n, 
str, rect-xmin, rect-xmax, rect-ymin, rect-ymax, rect-xmax - rect-xmin, 
rect-ymax - rect-ymin);
 }
 
 void print_rcti(const char *str, rcti *rect)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36840] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: Fix #26728: crash with load/save on Mac, on files that close open a window

2011-05-23 Thread Brecht Van Lommel
Revision: 36840
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36840
Author:   blendix
Date: 2011-05-23 15:56:26 + (Mon, 23 May 2011)
Log Message:
---
Fix #26728: crash with load/save on Mac, on files that close  open a window
when loading them. Custom cursor shown during load was not freed correctly
when closing the old window, which resulted in unpredictable crashes later on.

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2011-05-23 
15:46:09 UTC (rev 36839)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2011-05-23 
15:56:26 UTC (rev 36840)
@@ -461,9 +461,13 @@
 
 GHOST_WindowCocoa::~GHOST_WindowCocoa()
 {
-   if (m_customCursor) delete m_customCursor;
+NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
-NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+   if (m_customCursor) {
+   [m_customCursor release];
+   m_customCursor = nil;
+   }
+
[m_openGLView release];

if (m_window) {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36858] trunk/blender/intern: Attempt to fix mingw 64 bit compile error.

2011-05-24 Thread Brecht Van Lommel
Revision: 36858
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36858
Author:   blendix
Date: 2011-05-24 11:01:39 + (Tue, 24 May 2011)
Log Message:
---
Attempt to fix mingw 64 bit compile error.

Modified Paths:
--
trunk/blender/intern/bsp/CMakeLists.txt
trunk/blender/intern/bsp/SConscript
trunk/blender/intern/container/CTR_TaggedIndex.h
trunk/blender/intern/decimation/CMakeLists.txt
trunk/blender/intern/decimation/SConscript

Modified: trunk/blender/intern/bsp/CMakeLists.txt
===
--- trunk/blender/intern/bsp/CMakeLists.txt 2011-05-24 10:15:02 UTC (rev 
36857)
+++ trunk/blender/intern/bsp/CMakeLists.txt 2011-05-24 11:01:39 UTC (rev 
36858)
@@ -27,6 +27,7 @@
 set(INC
./intern
../container
+   ../guardedalloc
../moto/include
../memutil
 )

Modified: trunk/blender/intern/bsp/SConscript
===
--- trunk/blender/intern/bsp/SConscript 2011-05-24 10:15:02 UTC (rev 36857)
+++ trunk/blender/intern/bsp/SConscript 2011-05-24 11:01:39 UTC (rev 36858)
@@ -3,7 +3,7 @@
 
 sources = env.Glob('intern/*.cpp')
 
-incs = 'intern ../container ../moto/include ../memutil'
+incs = 'intern ../container ../moto/include ../memutil ../guardedalloc'
 
 env.BlenderLib ('bf_intern_bsp', sources, Split(incs), [], 
libtype=['core','player'], priority=[200,100] )
 

Modified: trunk/blender/intern/container/CTR_TaggedIndex.h
===
--- trunk/blender/intern/container/CTR_TaggedIndex.h2011-05-24 10:15:02 UTC 
(rev 36857)
+++ trunk/blender/intern/container/CTR_TaggedIndex.h2011-05-24 11:01:39 UTC 
(rev 36858)
@@ -52,6 +52,8 @@
 
 #include functional
 
+#include MEM_sys_types.h
+
 enum {
 
empty_tag = 0x0,
@@ -100,9 +102,9 @@
 
 #if defined(_WIN64)
CTR_TaggedIndex(
-   const unsigned __int64 val
+   const unsigned int64_t val
) :
-   m_val ( ((unsigned __int64)val  index_mask)
+   m_val ( ((unsigned int64_t)val  index_mask)
| ( (empty_tag  tag_shift)
 (~index_mask) ) ) {
}
@@ -140,8 +142,8 @@
}
 
 #if defined(_WIN64)
-   operator unsigned __int64 () const {
-   return (unsigned __int64)(m_val  index_mask);
+   operator unsigned int64_t () const {
+   return (unsigned int64_t)(m_val  index_mask);
}
 #endif
 

Modified: trunk/blender/intern/decimation/CMakeLists.txt
===
--- trunk/blender/intern/decimation/CMakeLists.txt  2011-05-24 10:15:02 UTC 
(rev 36857)
+++ trunk/blender/intern/decimation/CMakeLists.txt  2011-05-24 11:01:39 UTC 
(rev 36858)
@@ -27,6 +27,7 @@
 set(INC
.
../container
+   ../guardedalloc
../memutil
../moto/include
 )

Modified: trunk/blender/intern/decimation/SConscript
===
--- trunk/blender/intern/decimation/SConscript  2011-05-24 10:15:02 UTC (rev 
36857)
+++ trunk/blender/intern/decimation/SConscript  2011-05-24 11:01:39 UTC (rev 
36858)
@@ -3,6 +3,6 @@
 
 sources = env.Glob('intern/*.cpp')
 
-incs = '. ../moto/include ../container ../memutil'
+incs = '. ../moto/include ../container ../memutil ../guardedalloc'
 
 env.BlenderLib ('bf_intern_decimate', sources, Split(incs) , [], 
libtype=['core', 'player'], priority = [200, 100] )

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36860] trunk/blender/intern/container/ CTR_TaggedIndex.h: Fix for mingw 64bit fix.

2011-05-24 Thread Brecht Van Lommel
Revision: 36860
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36860
Author:   blendix
Date: 2011-05-24 11:19:11 + (Tue, 24 May 2011)
Log Message:
---
Fix for mingw 64bit fix.

Modified Paths:
--
trunk/blender/intern/container/CTR_TaggedIndex.h

Modified: trunk/blender/intern/container/CTR_TaggedIndex.h
===
--- trunk/blender/intern/container/CTR_TaggedIndex.h2011-05-24 11:15:21 UTC 
(rev 36859)
+++ trunk/blender/intern/container/CTR_TaggedIndex.h2011-05-24 11:19:11 UTC 
(rev 36860)
@@ -102,9 +102,9 @@
 
 #if defined(_WIN64)
CTR_TaggedIndex(
-   const unsigned int64_t val
+   const uint64_t val
) :
-   m_val ( ((unsigned int64_t)val  index_mask)
+   m_val ( ((uint64_t)val  index_mask)
| ( (empty_tag  tag_shift)
 (~index_mask) ) ) {
}
@@ -142,8 +142,8 @@
}
 
 #if defined(_WIN64)
-   operator unsigned int64_t () const {
-   return (unsigned int64_t)(m_val  index_mask);
+   operator uint64_t () const {
+   return (uint64_t)(m_val  index_mask);
}
 #endif
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36912] trunk/blender/source/blender: Fix #27445: various operators missing with some non-english system languages.

2011-05-26 Thread Brecht Van Lommel
Revision: 36912
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36912
Author:   blendix
Date: 2011-05-26 09:58:22 + (Thu, 26 May 2011)
Log Message:
---
Fix #27445: various operators missing with some non-english system languages.

In the case of this bug e.g. material.new became MATERiAL_OT_new, due to
different capitalization of i in Turkish. Fixed by not using the locale
dependent toupper/tolower functions.

Modified Paths:
--
trunk/blender/source/blender/blenlib/BLI_string.h
trunk/blender/source/blender/blenlib/intern/string.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/blenlib/BLI_string.h
===
--- trunk/blender/source/blender/blenlib/BLI_string.h   2011-05-26 09:46:51 UTC 
(rev 36911)
+++ trunk/blender/source/blender/blenlib/BLI_string.h   2011-05-26 09:58:22 UTC 
(rev 36912)
@@ -147,6 +147,9 @@
 int BLI_utf8_invalid_byte(const char *str, int length);
 int BLI_utf8_invalid_strip(char *str, int length);
 
+void BLI_ascii_strtolower(char *str, int len);
+void BLI_ascii_strtoupper(char *str, int len);
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/blender/source/blender/blenlib/intern/string.c
===
--- trunk/blender/source/blender/blenlib/intern/string.c2011-05-26 
09:46:51 UTC (rev 36911)
+++ trunk/blender/source/blender/blenlib/intern/string.c2011-05-26 
09:58:22 UTC (rev 36912)
@@ -469,3 +469,21 @@
return tot;
 }
 
+void BLI_ascii_strtolower(char *str, int len)
+{
+   int i;
+
+   for(i=0; ilen; i++)
+   if(str[i] = 'A'  str[i] = 'Z')
+   str[i] += 'a' - 'A';
+}
+
+void BLI_ascii_strtoupper(char *str, int len)
+{
+   int i;
+
+   for(i=0; ilen; i++)
+   if(str[i] = 'a'  str[i] = 'z')
+   str[i] -= 'a' - 'A';
+}
+

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2011-05-26 09:46:51 UTC (rev 36911)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2011-05-26 09:58:22 UTC (rev 36912)
@@ -56,6 +56,7 @@
 #include BLI_blenlib.h
 #include BLI_dynstr.h /*for WM_operator_pystring */
 #include BLI_math.h
+#include BLI_string.h
 #include BLI_utildefines.h
 
 #include BLO_readfile.h
@@ -441,11 +442,13 @@
 {
char *sep= strstr(from, _OT_);
if(sep) {
-   int i, ofs= (sep-from);
+   int ofs= (sep-from);
+   
+   /* note, we use ascii tolower instead of system tolower, 
because the
+  latter depends on the locale, and can lead to idname 
mistmatch */
+   memcpy(to, from, sizeof(char)*ofs);
+   BLI_ascii_strtolower(to, ofs);
 
-   for(i=0; iofs; i++)
-   to[i]= tolower(from[i]);
-
to[ofs] = '.';
BLI_strncpy(to+(ofs+1), sep+4, OP_MAX_TYPENAME);
}
@@ -462,10 +465,10 @@
char *sep= strchr(from, '.');
 
if(sep) {
-   int i, ofs= (sep-from);
+   int ofs= (sep-from);
 
-   for(i=0; iofs; i++)
-   to[i]= toupper(from[i]);
+   memcpy(to, from, sizeof(char)*ofs);
+   BLI_ascii_strtoupper(to, ofs);
 
BLI_strncpy(to+ofs, _OT_, OP_MAX_TYPENAME);
BLI_strncpy(to+(ofs+4), sep+1, OP_MAX_TYPENAME);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36913] trunk/blender/source/blender/ modifiers/intern/MOD_armature.c: Fix #27480: armature multimodifier was not working in edit mode.

2011-05-26 Thread Brecht Van Lommel
Revision: 36913
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36913
Author:   blendix
Date: 2011-05-26 10:21:09 + (Thu, 26 May 2011)
Log Message:
---
Fix #27480: armature multimodifier was not working in edit mode.

Modified Paths:
--
trunk/blender/source/blender/modifiers/intern/MOD_armature.c

Modified: trunk/blender/source/blender/modifiers/intern/MOD_armature.c
===
--- trunk/blender/source/blender/modifiers/intern/MOD_armature.c
2011-05-26 09:58:22 UTC (rev 36912)
+++ trunk/blender/source/blender/modifiers/intern/MOD_armature.c
2011-05-26 10:21:09 UTC (rev 36913)
@@ -127,8 +127,8 @@
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs 
original vertices */

armature_deform_verts(amd-object, ob, derivedData, vertexCos, NULL,
- numVerts, amd-deformflag, 
-(float(*)[3])amd-prevCos, amd-defgrp_name);
+   numVerts, amd-deformflag, (float(*)[3])amd-prevCos, 
amd-defgrp_name);
+
/* free cache */
if(amd-prevCos) {
MEM_freeN(amd-prevCos);
@@ -145,9 +145,17 @@
 
if(!derivedData) dm = CDDM_from_editmesh(editData, ob-data);
 
-   armature_deform_verts(amd-object, ob, dm, vertexCos, NULL, numVerts,
- amd-deformflag, NULL, amd-defgrp_name);
+   modifier_vgroup_cache(md, vertexCos); /* if next modifier needs 
original vertices */
 
+   armature_deform_verts(amd-object, ob, dm, vertexCos, NULL,
+   numVerts, amd-deformflag, (float(*)[3])amd-prevCos, 
amd-defgrp_name);
+
+   /* free cache */
+   if(amd-prevCos) {
+   MEM_freeN(amd-prevCos);
+   amd-prevCos= NULL;
+   }
+
if(!derivedData) dm-release(dm);
 }
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36914] trunk/blender/source/blender/ blenloader/intern/readfile.c: Fix #27465: used light groups did not get linked in with materials automatically.

2011-05-26 Thread Brecht Van Lommel
Revision: 36914
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36914
Author:   blendix
Date: 2011-05-26 10:25:51 + (Thu, 26 May 2011)
Log Message:
---
Fix #27465: used light groups did not get linked in with materials 
automatically.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2011-05-26 
10:21:09 UTC (rev 36913)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2011-05-26 
10:25:51 UTC (rev 36914)
@@ -12200,6 +12200,9 @@

if(ma-nodetree)
expand_nodetree(fd, mainvar, ma-nodetree);
+   
+   if(ma-group)
+   expand_doit(fd, mainvar, ma-group);
 }
 
 static void expand_lamp(FileData *fd, Main *mainvar, Lamp *la)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36946] branches/cycles/intern/cycles/ kernel/svm/svm_types.h: Cycles: some mix node blend modes not working correct:

2011-05-27 Thread Brecht Van Lommel
Revision: 36946
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36946
Author:   blendix
Date: 2011-05-27 09:38:49 + (Fri, 27 May 2011)
Log Message:
---
Cycles: some mix node blend modes not working correct:
subtract, screen, divide, difference, darken, lighten, overlay

patch by Sanne, thanks!

Modified Paths:
--
branches/cycles/intern/cycles/kernel/svm/svm_types.h

Modified: branches/cycles/intern/cycles/kernel/svm/svm_types.h
===
--- branches/cycles/intern/cycles/kernel/svm/svm_types.h2011-05-27 
08:45:48 UTC (rev 36945)
+++ branches/cycles/intern/cycles/kernel/svm/svm_types.h2011-05-27 
09:38:49 UTC (rev 36946)
@@ -119,13 +119,13 @@
NODE_MIX_BLEND = 0,
NODE_MIX_ADD,
NODE_MIX_MUL,
+   NODE_MIX_SUB,
NODE_MIX_SCREEN,
-   NODE_MIX_OVERLAY,
-   NODE_MIX_SUB,
NODE_MIX_DIV,
NODE_MIX_DIFF,
NODE_MIX_DARK,
NODE_MIX_LIGHT,
+   NODE_MIX_OVERLAY,
NODE_MIX_DODGE,
NODE_MIX_BURN,
NODE_MIX_HUE,

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36947] trunk/blender: Windows installer and Path changes, fixing various issues:

2011-05-27 Thread Brecht Van Lommel
Revision: 36947
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36947
Author:   blendix
Date: 2011-05-27 09:57:53 + (Fri, 27 May 2011)
Log Message:
---
Windows installer and Path changes, fixing various issues:

* Windows installer not working for non-admin users and multiple users
* Addon scripts not installing next to user configuration
* Portable install not being taken into account in all places

The main problem was the windows installer was installing system scripts in
AppData next to the user configuration directory, which is not shared between
users. Now these are installed in ProgramFiles, and only addon scripts added
by the users go to AppData.

On all platforms, addon scripts were sometimes getting installed between
system scripts, because the scripts folder in the executable directory was
given precedence over the user configuration folder, that is no longer done
now. So addons now behave like user configuration, they are preserved even
if you download a newer build of the same blender version.

If you have an installation of 2.57 on windows, the addon install location
will not change until we do the version bump to 2.58, to avoid conflicts with
the existing the installed 2.57 version.

The old behavior of giving precedence to the local folder was done to support
portable install, where all configuration is written to the local folder. This
is now implemented differently: if and only if a config folder exists in the
local folder, portable install will be assumed, and files will only be written
to that local folder.

Modified Paths:
--
trunk/blender/build_files/scons/tools/btools.py
trunk/blender/release/scripts/startup/bl_operators/wm.py
trunk/blender/release/windows/installer/00.sconsblender.nsi
trunk/blender/source/blender/blenlib/BLI_path_util.h
trunk/blender/source/blender/blenlib/intern/path_util.c
trunk/blender/source/blender/editors/space_file/space_file.c
trunk/blender/source/blender/python/intern/bpy.c
trunk/blender/source/blender/python/intern/bpy_interface.c
trunk/blender/source/blender/windowmanager/intern/wm_files.c
trunk/blender/source/creator/creator.c
trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp

Modified: trunk/blender/build_files/scons/tools/btools.py
===
--- trunk/blender/build_files/scons/tools/btools.py 2011-05-27 09:38:49 UTC 
(rev 36946)
+++ trunk/blender/build_files/scons/tools/btools.py 2011-05-27 09:57:53 UTC 
(rev 36947)
@@ -615,10 +615,7 @@
 else:
 if len(df)0:
 dp_tmp = dp[l:]
-if dp_tmp.find('python\\lib')  -1:
-datafiles += \n +r'SetOutPath $INSTDIR'+dp[l:]+\n\n
-else:
-datafiles += \n+r'SetOutPath $BLENDERHOME'+dp[l:]+\n\n
+datafiles += \n +r'SetOutPath $INSTDIR'+dp[l:]+\n\n
 
 for f in df:
 outfile = os.path.join(dp,f)

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===
--- trunk/blender/release/scripts/startup/bl_operators/wm.py2011-05-27 
09:38:49 UTC (rev 36946)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py2011-05-27 
09:57:53 UTC (rev 36947)
@@ -940,6 +940,14 @@
 self.report({'ERROR'}, Source path %r exists % path_src)
 else:
 shutil.copytree(path_src, path_dst)
+
+# in 2.57 and earlier windows installers, system scripts were 
copied
+# into the configuration directory, don't want to copy those
+system_script = os.path.join(path_dst, 
'scripts/modules/bpy_types.py')
+if os.path.isfile(system_script):
+shutil.rmtree(os.path.join(path_dst, 'scripts'))
+shutil.rmtree(os.path.join(path_dst, 'plugins'))
+
 # dont loose users work if they open the splash later.
 if bpy.data.is_saved is bpy.data.is_dirty is False:
 bpy.ops.wm.read_homefile()

Modified: trunk/blender/release/windows/installer/00.sconsblender.nsi
===
--- trunk/blender/release/windows/installer/00.sconsblender.nsi 2011-05-27 
09:38:49 UTC (rev 36946)
+++ trunk/blender/release/windows/installer/00.sconsblender.nsi 2011-05-27 
09:57:53 UTC (rev 36947)
@@ -33,11 +33,11 @@
 !insertmacro MUI_PAGE_COMPONENTS
 
 !insertmacro MUI_PAGE_DIRECTORY
-Page custom DataLocation DataLocationOnLeave
 !insertmacro MUI_PAGE_INSTFILES
 !insertmacro MUI_PAGE_FINISH
   
 !insertmacro MUI_UNPAGE_WELCOME
+UninstPage custom un.OptionalRemoveConfig un.OptionalRemoveConfigOnLeave
 !insertmacro MUI_UNPAGE_CONFIRM
 !insertmacro MUI_UNPAGE_INSTFILES
 !insertmacro MUI_UNPAGE_FINISH
@@ -62,7 +62,6 @@
   LangString DESC_StartMenu ${LANG_ENGLISH} Add shortcut items 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36949] branches/cycles/intern/cycles: Cycles: fix GLEW library build issue.

2011-05-27 Thread Brecht Van Lommel
Revision: 36949
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36949
Author:   blendix
Date: 2011-05-27 12:13:10 + (Fri, 27 May 2011)
Log Message:
---
Cycles: fix GLEW library build issue.

Modified Paths:
--
branches/cycles/intern/cycles/app/CMakeLists.txt
branches/cycles/intern/cycles/blender/CMakeLists.txt
branches/cycles/intern/cycles/cmake/external_libs.cmake

Modified: branches/cycles/intern/cycles/app/CMakeLists.txt
===
--- branches/cycles/intern/cycles/app/CMakeLists.txt2011-05-27 11:02:36 UTC 
(rev 36948)
+++ branches/cycles/intern/cycles/app/CMakeLists.txt2011-05-27 12:13:10 UTC 
(rev 36949)
@@ -18,7 +18,7 @@
cycles_util
${Boost_LIBRARIES}
${OPENGL_LIBRARIES}
-   ${GLEW_LIBRARY}
+   ${CYCLES_GLEW_LIBRARY}
${OPENIMAGEIO_LIBRARY})
 
 IF(WITH_CYCLES_TEST)

Modified: branches/cycles/intern/cycles/blender/CMakeLists.txt
===
--- branches/cycles/intern/cycles/blender/CMakeLists.txt2011-05-27 
11:02:36 UTC (rev 36948)
+++ branches/cycles/intern/cycles/blender/CMakeLists.txt2011-05-27 
12:13:10 UTC (rev 36949)
@@ -43,7 +43,7 @@
${OPENGL_LIBRARIES}
${OPENIMAGEIO_LIBRARY}
${GLUT_LIBRARIES}
-   ${GLEW_LIBRARIES}
+   ${CYCLES_GLEW_LIBRARY}
${BLENDER_LIBRARIES})
 
 IF(WITH_CYCLES_OSL)

Modified: branches/cycles/intern/cycles/cmake/external_libs.cmake
===
--- branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-05-27 
11:02:36 UTC (rev 36948)
+++ branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-05-27 
12:13:10 UTC (rev 36949)
@@ -62,6 +62,12 @@
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
 ENDIF()
 
+IF(WITH_BUILTIN_GLEW)
+   SET(CYCLES_GLEW_LIBRARY extern_glew)
+ELSE()
+   SET(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
+ENDIF()
+
 ###
 # OpenShadingLanguage
 
@@ -165,12 +171,12 @@
 
IF(WIN32)
SET(OPENCL_INCLUDES )
-   SET(OPENCL_LIRBARIES OpenCL)
+   SET(OPENCL_LIBRARIES OpenCL)
ENDIF()
 
IF(UNIX AND NOT APPLE)
SET(OPENCL_INCLUDES ${CYCLES_OPENCL})
-   SET(OPENCL_LIRBARIES OpenCL)
+   SET(OPENCL_LIBRARIES OpenCL)
ENDIF()
 
ADD_DEFINITIONS(-DWITH_OPENCL)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36952] trunk/blender/source/gameengine/ BlenderRoutines/BL_KetsjiEmbedStart.cpp: Attempted fix for #27482: game engine running slow due to revision 3

2011-05-27 Thread Brecht Van Lommel
Revision: 36952
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36952
Author:   blendix
Date: 2011-05-27 16:20:49 + (Fri, 27 May 2011)
Log Message:
---
Attempted fix for #27482: game engine running slow due to revision 36698 which
fixed frame colors for letterbox drawing (happens when in camera view).

Cause is unclear, seems some sort of strange graphics driver thing on 32 bit.
Changes are a fix for the incorrect usage of glViewport, and avoiding the extra
clear if it's not needed.

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36698

Modified Paths:
--
trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp

Modified: 
trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
===
--- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp 
2011-05-27 13:08:09 UTC (rev 36951)
+++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp 
2011-05-27 16:20:49 UTC (rev 36952)
@@ -250,10 +250,12 @@
 
// some blender stuff
float camzoom;
+   int draw_letterbox = 0;

if(rv3d-persp==RV3D_CAMOB) {
if(startscene-gm.framing.type == SCE_GAMEFRAMING_BARS) 
{ /* Letterbox */
camzoom = 1.0f;
+   draw_letterbox = 1;
}
else {
camzoom = 
BKE_screen_view3d_zoom_to_fac(rv3d-camzoom);
@@ -428,12 +430,15 @@
// first check if we want to exit
exitrequested = 
ketsjiengine-GetExitCode();
 
-   // Clear screen to border color
-   // We do this here since we set the 
canvas to be within the frames. This means the engine
-   // itself is unaware of the extra 
space, so we clear the whole region for it.
-   glClearColor(scene-gm.framing.col[0], 
scene-gm.framing.col[1], scene-gm.framing.col[2], 1.0f);
-   glViewport(ar-winrct.xmin, 
ar-winrct.ymin, ar-winrct.xmax, ar-winrct.ymax);
-   glClear(GL_COLOR_BUFFER_BIT);
+   if(draw_letterbox) {
+   // Clear screen to border color
+   // We do this here since we set 
the canvas to be within the frames. This means the engine
+   // itself is unaware of the 
extra space, so we clear the whole region for it.
+   
glClearColor(scene-gm.framing.col[0], scene-gm.framing.col[1], 
scene-gm.framing.col[2], 1.0f);
+   glViewport(ar-winrct.xmin, 
ar-winrct.ymin,
+   ar-winrct.xmax - 
ar-winrct.xmin, ar-winrct.ymax - ar-winrct.ymin);
+   glClear(GL_COLOR_BUFFER_BIT);
+   }

// kick the engine
bool render = ketsjiengine-NextFrame();

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37022] trunk/blender/source/blender/ windowmanager/intern/wm_window.c: Fix #27522: crash when closing new render window with render error message

2011-05-30 Thread Brecht Van Lommel
Revision: 37022
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37022
Author:   blendix
Date: 2011-05-30 11:44:28 + (Mon, 30 May 2011)
Log Message:
---
Fix #27522: crash when closing new render window with render error message
showing in the main window.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_window.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_window.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_window.c   
2011-05-30 11:03:16 UTC (rev 37021)
+++ trunk/blender/source/blender/windowmanager/intern/wm_window.c   
2011-05-30 11:44:28 UTC (rev 37022)
@@ -1009,6 +1009,8 @@
if(wt==timer)
break;
if(wt) {
+   if(wm-reports.reporttimer == wt)
+   wm-reports.reporttimer= NULL;

BLI_remlink(wm-timers, wt);
if(wt-customdata)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37028] trunk/blender/source/blender: startup.blend: default ffmpeg output audio bitrate changed to 192.

2011-05-30 Thread Brecht Van Lommel
Revision: 37028
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37028
Author:   blendix
Date: 2011-05-30 18:57:28 + (Mon, 30 May 2011)
Log Message:
---
startup.blend: default ffmpeg output audio bitrate changed to 192.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/scene.c
trunk/blender/source/blender/editors/datafiles/startup.blend.c

Modified: trunk/blender/source/blender/blenkernel/intern/scene.c
===
--- trunk/blender/source/blender/blenkernel/intern/scene.c  2011-05-30 
16:33:23 UTC (rev 37027)
+++ trunk/blender/source/blender/blenkernel/intern/scene.c  2011-05-30 
18:57:28 UTC (rev 37028)
@@ -468,6 +468,7 @@
 
sce-r.ffcodecdata.audio_mixrate = 44100;
sce-r.ffcodecdata.audio_volume = 1.0f;
+   sce-r.ffcodecdata.audio_bitrate = 192;
 
BLI_strncpy(sce-r.engine, BLENDER_RENDER, sizeof(sce-r.engine));
 

Modified: trunk/blender/source/blender/editors/datafiles/startup.blend.c
===
--- trunk/blender/source/blender/editors/datafiles/startup.blend.c  
2011-05-30 16:33:23 UTC (rev 37027)
+++ trunk/blender/source/blender/editors/datafiles/startup.blend.c  
2011-05-30 18:57:28 UTC (rev 37028)
@@ -1,12505 +1,10940 @@
 /* DataToC output of file startup_blend */
 
-int datatoc_startup_blend_size= 399988;
+int datatoc_startup_blend_size= 349868;
 char datatoc_startup_blend[]= {
-66, 76, 69, 78, 68, 69, 82, 45,118, 50, 53, 55, 82, 69, 78, 68, 32,  0,  
0,  0,
-32,137,231, 62,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  1,  0,  
0,  0,250,  0,  0,  0, 83, 99,101,110,101,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 71, 76, 
79, 66, 32,  1,  0,  0, 48,136,231, 62,255,127,  0,  0,
-   198,  0,  0,  0,  1,  0,  0,  0, 32, 32, 32, 49,  1,  0,  0,  0,250,  0,  
0,  0,  1,  0,  0,  1,248, 60,138,  3,  0,  0,  0,  0,
-24,188,140,  3,  0,  0,  0,  0,  0, 16,  0,  0,128, 32,  4,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0, 87, 77,  0,  0, 24,  1,  0,  0,  
8,113,137,  3,  0,  0,  0,  0,105,  1,  0,  0,  1,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-87, 77, 87,105,110, 77, 97,110,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,104,114,137,  3,  0,  0,  0,  
0,104,114,137,  3,  0,  0,  0,  0,104,114,137,  3,  0,  0,  0,  0,
-   104,114,137,  3,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,184,141,111,  4,  0,  0,  0,  0,184,141,111,  4,  0,  0,  0,  0,
-16,  0,  0,  0,  2,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0, 
88,117,132,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 0,  0,  0,  0,  0,  0,  0,  0, 88,  2,130,  3,  0,  0,  0,  0, 88,  
2,130,  3,  0,  0,  0,  0, 88,  2,130,  3,  0,  0,  0,  0,
-   232, 65,145,  3,  0,  0,  0,  0, 88,117,132,  3,  0,  0,  0,  0,232, 
65,145,  3,  0,  0,  0,  0, 68, 65, 84, 65,224,  0,  0,  0,
-   104,114,137,  3,  0,  0,  0,  0,106,  1,  0,  0,  1,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-48, 27,104,  2,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,248, 
60,138,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-   115, 99,114,101,101,110,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 4,  0,229,  0,120,  7, 16,  4,  0,  0,  0,  0,  1,  0,238,  3,  0,  0,  
0,  0,  1,  0,  0,  0, 40, 22,126,  2,  0,  0,  0,  0,
- 0, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37040] branches/cycles/intern/cycles/util /util_view.cpp: Cycles: fix compile error for cycles_test.

2011-05-31 Thread Brecht Van Lommel
Revision: 37040
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37040
Author:   blendix
Date: 2011-05-31 09:47:19 + (Tue, 31 May 2011)
Log Message:
---
Cycles: fix compile error for cycles_test.

Modified Paths:
--
branches/cycles/intern/cycles/util/util_view.cpp

Modified: branches/cycles/intern/cycles/util/util_view.cpp
===
--- branches/cycles/intern/cycles/util/util_view.cpp2011-05-31 09:35:15 UTC 
(rev 37039)
+++ branches/cycles/intern/cycles/util/util_view.cpp2011-05-31 09:47:19 UTC 
(rev 37040)
@@ -20,16 +20,16 @@
 #include stdlib.h
 #include string.h
 
+#include util_opengl.h
+#include util_time.h
+#include util_view.h
+
 #ifdef __APPLE__
 #include GLUT/glut.h
 #else
 #include GL/glut.h
 #endif
 
-#include util_opengl.h
-#include util_time.h
-#include util_view.h
-
 CCL_NAMESPACE_BEGIN
 
 /* structs */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37041] branches/cycles: Cycles: svn merge -r36777:37040 https://svn.blender.org/svnroot/bf-blender/trunk/ blender/

2011-05-31 Thread Brecht Van Lommel
Revision: 37041
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37041
Author:   blendix
Date: 2011-05-31 09:51:46 + (Tue, 31 May 2011)
Log Message:
---
Cycles: svn merge -r36777:37040 
https://svn.blender.org/svnroot/bf-blender/trunk/blender/

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36777

Modified Paths:
--
branches/cycles/CMakeLists.txt
branches/cycles/build_files/buildbot/config/user-config-i686.py
branches/cycles/build_files/buildbot/config/user-config-x86_64.py
branches/cycles/build_files/cmake/cmake_netbeans_project.py
branches/cycles/build_files/cmake/cmake_qtcreator_project.py
branches/cycles/build_files/cmake/macros.cmake
branches/cycles/build_files/cmake/project_info.py
branches/cycles/build_files/scons/tools/Blender.py
branches/cycles/build_files/scons/tools/btools.py
branches/cycles/doc/python_api/examples/bpy.types.BlendDataLibraries.load.py
branches/cycles/doc/python_api/sphinx_doc_gen.py
branches/cycles/extern/binreloc/CMakeLists.txt
branches/cycles/extern/bullet2/CMakeLists.txt

branches/cycles/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h

branches/cycles/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
branches/cycles/extern/eltopo/CMakeLists.txt
branches/cycles/extern/glew/CMakeLists.txt
branches/cycles/extern/libopenjpeg/CMakeLists.txt
branches/cycles/extern/libredcode/CMakeLists.txt
branches/cycles/extern/lzma/CMakeLists.txt
branches/cycles/extern/lzo/CMakeLists.txt
branches/cycles/intern/audaspace/CMakeLists.txt
branches/cycles/intern/audaspace/SConscript
branches/cycles/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
branches/cycles/intern/boolop/CMakeLists.txt
branches/cycles/intern/bsp/CMakeLists.txt
branches/cycles/intern/bsp/SConscript
branches/cycles/intern/container/CMakeLists.txt
branches/cycles/intern/container/CTR_TaggedIndex.h
branches/cycles/intern/decimation/CMakeLists.txt
branches/cycles/intern/decimation/SConscript
branches/cycles/intern/elbeem/CMakeLists.txt
branches/cycles/intern/ghost/CMakeLists.txt
branches/cycles/intern/ghost/intern/GHOST_SystemX11.cpp
branches/cycles/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/cycles/intern/ghost/intern/GHOST_WindowX11.cpp
branches/cycles/intern/ghost/intern/GHOST_WindowX11.h
branches/cycles/intern/guardedalloc/CMakeLists.txt
branches/cycles/intern/iksolver/CMakeLists.txt
branches/cycles/intern/itasc/CMakeLists.txt
branches/cycles/intern/memutil/CMakeLists.txt
branches/cycles/intern/mikktspace/CMakeLists.txt
branches/cycles/intern/moto/CMakeLists.txt
branches/cycles/intern/opennl/CMakeLists.txt
branches/cycles/intern/smoke/CMakeLists.txt
branches/cycles/intern/string/CMakeLists.txt
branches/cycles/release/scripts/modules/bpy/utils.py
branches/cycles/release/scripts/modules/bpy_extras/__init__.py
branches/cycles/release/scripts/modules/bpy_extras/image_utils.py
branches/cycles/release/scripts/modules/bpy_extras/io_utils.py
branches/cycles/release/scripts/modules/bpy_extras/mesh_utils.py
branches/cycles/release/scripts/modules/bpy_extras/object_utils.py
branches/cycles/release/scripts/modules/bpy_extras/view3d_utils.py
branches/cycles/release/scripts/modules/bpy_types.py
branches/cycles/release/scripts/startup/bl_operators/mesh.py
branches/cycles/release/scripts/startup/bl_operators/uvcalc_follow_active.py
branches/cycles/release/scripts/startup/bl_operators/wm.py
branches/cycles/release/scripts/startup/bl_ui/__init__.py
branches/cycles/release/scripts/startup/bl_ui/properties_data_empty.py

branches/cycles/release/scripts/startup/bl_ui/properties_object_constraint.py
branches/cycles/release/scripts/startup/bl_ui/properties_particle.py
branches/cycles/release/scripts/startup/bl_ui/space_image.py
branches/cycles/release/scripts/startup/bl_ui/space_userpref.py
branches/cycles/release/scripts/startup/bl_ui/space_view3d.py
branches/cycles/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/cycles/release/windows/installer/00.sconsblender.nsi
branches/cycles/source/blender/avi/CMakeLists.txt
branches/cycles/source/blender/blenfont/CMakeLists.txt
branches/cycles/source/blender/blenkernel/BKE_blender.h
branches/cycles/source/blender/blenkernel/BKE_screen.h
branches/cycles/source/blender/blenkernel/BKE_sequencer.h
branches/cycles/source/blender/blenkernel/BKE_text.h
branches/cycles/source/blender/blenkernel/CMakeLists.txt
branches/cycles/source/blender/blenkernel/SConscript
branches/cycles/source/blender/blenkernel/intern/anim.c
branches/cycles/source/blender/blenkernel/intern/anim_sys.c

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37043] trunk/blender/source/blender/ editors/interface: Button value reset:

2011-05-31 Thread Brecht Van Lommel
Revision: 37043
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37043
Author:   blendix
Date: 2011-05-31 09:56:38 + (Tue, 31 May 2011)
Log Message:
---
Button value reset:
* shortcut key changed from numpad 0 to delete.
* fix missing undo push, now it calls the operator.

Patch by Damir Prebeg, thanks!

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface.c
trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface.c
===
--- trunk/blender/source/blender/editors/interface/interface.c  2011-05-31 
09:55:50 UTC (rev 37042)
+++ trunk/blender/source/blender/editors/interface/interface.c  2011-05-31 
09:56:38 UTC (rev 37043)
@@ -1670,15 +1670,12 @@
 
 void ui_set_but_default(bContext *C, uiBut *but, short all)
 {
-   /* if there is a valid property that is editable... */
-   if (but-rnapoin.data  but-rnaprop  
RNA_property_editable(but-rnapoin, but-rnaprop)) {
-   int index = (all)? -1 : but-rnaindex;
-   
-   if(RNA_property_reset(but-rnapoin, but-rnaprop, index)) {
-   /* perform updates required for this property */
-   RNA_property_update(C, but-rnapoin, but-rnaprop);
-   }
-   }
+   PointerRNA ptr;
+
+   WM_operator_properties_create(ptr, UI_OT_reset_default_button);
+   RNA_boolean_set(ptr, all, all);
+   WM_operator_name_call(C, UI_OT_reset_default_button, 
WM_OP_EXEC_DEFAULT, ptr);
+   WM_operator_properties_free(ptr);
 }
 
 static double soft_range_round_up(double value, double max)

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-31 09:55:50 UTC (rev 37042)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-31 09:56:38 UTC (rev 37043)
@@ -4442,8 +4442,8 @@
}
/* reset to default */
/* XXX hardcoded keymap check */
-   else if(ELEM(event-type, ZEROKEY, PAD0)  event-val == 
KM_PRESS) {
-   /* ctrl-0 = for arrays, only the active one gets done 
(vs whole array for just 0) */
+   else if(ELEM(event-type, DELKEY, PADPERIOD)  event-val == 
KM_PRESS) {
+   /* del - reset active button; ctrl+del - reset a whole 
array*/
if (!(ELEM3(but-type, HSVCIRCLE, HSVCUBE, HISTOGRAM)))
ui_set_but_default(C, but, !event-ctrl);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37044] branches/cycles/intern/cycles/ blender: Cycles: fix sync issue with group instances.

2011-05-31 Thread Brecht Van Lommel
Revision: 37044
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37044
Author:   blendix
Date: 2011-05-31 10:41:01 + (Tue, 31 May 2011)
Log Message:
---
Cycles: fix sync issue with group instances.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_object.cpp
branches/cycles/intern/cycles/blender/blender_sync.h
branches/cycles/intern/cycles/blender/blender_util.h

Modified: branches/cycles/intern/cycles/blender/blender_object.cpp
===
--- branches/cycles/intern/cycles/blender/blender_object.cpp2011-05-31 
09:56:38 UTC (rev 37043)
+++ branches/cycles/intern/cycles/blender/blender_object.cpp2011-05-31 
10:41:01 UTC (rev 37044)
@@ -65,13 +65,13 @@
 
 /* Light */
 
-void BlenderSync::sync_light(BL::Object b_ob, Transform tfm)
+void BlenderSync::sync_light(BL::Object b_parent, int b_index, BL::Object 
b_ob, Transform tfm)
 {
/* test if we need to sync */
Light *light;
+   ObjectKey key(b_parent, b_index, b_ob);
 
-   /* todo: account for instancing */
-   if(!light_map.sync(light, b_ob))
+   if(!light_map.sync(light, b_ob, b_parent, key))
return;
 
/* location */
@@ -98,7 +98,7 @@
 {
/* light is handled separately */
if(object_is_light(b_ob)) {
-   sync_light(b_ob, tfm);
+   sync_light(b_parent, b_index, b_ob, tfm);
return;
}
 
@@ -112,7 +112,7 @@
bool object_updated = false;
 
/* object sync */
-   if(object_map.sync(object, b_ob, key)) {
+   if(object_map.sync(object, b_ob, b_parent, key)) {
object-name = b_ob.name();
object-tfm = tfm;
object-tag_update(scene);

Modified: branches/cycles/intern/cycles/blender/blender_sync.h
===
--- branches/cycles/intern/cycles/blender/blender_sync.h2011-05-31 
09:56:38 UTC (rev 37043)
+++ branches/cycles/intern/cycles/blender/blender_sync.h2011-05-31 
10:41:01 UTC (rev 37044)
@@ -76,7 +76,7 @@
void sync_nodes(Shader *shader, BL::ShaderNodeTree b_ntree);
Mesh *sync_mesh(BL::Object b_ob, bool object_updated);
void sync_object(BL::Object b_parent, int b_index, BL::Object b_object, 
Transform tfm);
-   void sync_light(BL::Object b_ob, Transform tfm);
+   void sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, 
Transform tfm);
 
/* util */
void find_shader(BL::ID id, vectoruint used_shaders);
@@ -91,7 +91,7 @@
id_mapvoid*, Shader shader_map;
id_mapObjectKey, Object object_map;
id_mapvoid*, Mesh mesh_map;
-   id_mapvoid*, Light light_map;
+   id_mapObjectKey, Light light_map;
void *world_map;
bool world_recalc;
 

Modified: branches/cycles/intern/cycles/blender/blender_util.h
===
--- branches/cycles/intern/cycles/blender/blender_util.h2011-05-31 
09:56:38 UTC (rev 37043)
+++ branches/cycles/intern/cycles/blender/blender_util.h2011-05-31 
10:41:01 UTC (rev 37044)
@@ -225,10 +225,10 @@
 
bool sync(T **r_data, BL::ID id)
{
-   return sync(r_data, id, id.ptr.id.data);
+   return sync(r_data, id, id, id.ptr.id.data);
}
 
-   bool sync(T **r_data, BL::ID id, const K key)
+   bool sync(T **r_data, BL::ID id, BL::ID parent, const K key)
{
T *data = find(key);
bool recalc;
@@ -240,8 +240,11 @@
b_map[key] = data;
recalc = true;
}
-   else
+   else {
recalc = (b_recalc.find(id.ptr.data) != b_recalc.end());
+   if(parent.ptr.data)
+   recalc = recalc || 
(b_recalc.find(parent.ptr.data) != b_recalc.end());
+   }
 
used(data);
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37045] branches/cycles/intern/cycles/ blender: Cycles: fix instanced mesh sync being a bit too slow.

2011-05-31 Thread Brecht Van Lommel
Revision: 37045
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37045
Author:   blendix
Date: 2011-05-31 10:57:43 + (Tue, 31 May 2011)
Log Message:
---
Cycles: fix instanced mesh sync being a bit too slow.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_mesh.cpp
branches/cycles/intern/cycles/blender/blender_object.cpp
branches/cycles/intern/cycles/blender/blender_sync.h

Modified: branches/cycles/intern/cycles/blender/blender_mesh.cpp
===
--- branches/cycles/intern/cycles/blender/blender_mesh.cpp  2011-05-31 
10:41:01 UTC (rev 37044)
+++ branches/cycles/intern/cycles/blender/blender_mesh.cpp  2011-05-31 
10:57:43 UTC (rev 37045)
@@ -252,6 +252,12 @@
}
}
 
+   /* ensure we only sync instanced meshes once */
+   if(mesh_synced.find(mesh) != mesh_synced.end())
+   return mesh;
+   
+   mesh_synced.insert(mesh);
+
/* create derived mesh */
BL::Mesh b_mesh = object_to_mesh(b_ob, b_scene, true, !preview);
/* todo: this will crash on non-mesh types! */

Modified: branches/cycles/intern/cycles/blender/blender_object.cpp
===
--- branches/cycles/intern/cycles/blender/blender_object.cpp2011-05-31 
10:41:01 UTC (rev 37044)
+++ branches/cycles/intern/cycles/blender/blender_object.cpp2011-05-31 
10:57:43 UTC (rev 37045)
@@ -139,6 +139,7 @@
light_map.pre_sync();
mesh_map.pre_sync();
object_map.pre_sync();
+   mesh_synced.clear();
 
/* object loop */
BL::Scene::objects_iterator b_ob;
@@ -177,6 +178,7 @@
scene-mesh_manager-tag_update(scene);
if(object_map.post_sync())
scene-object_manager-tag_update(scene);
+   mesh_synced.clear();
 }
 
 CCL_NAMESPACE_END

Modified: branches/cycles/intern/cycles/blender/blender_sync.h
===
--- branches/cycles/intern/cycles/blender/blender_sync.h2011-05-31 
10:41:01 UTC (rev 37044)
+++ branches/cycles/intern/cycles/blender/blender_sync.h2011-05-31 
10:57:43 UTC (rev 37045)
@@ -92,6 +92,7 @@
id_mapObjectKey, Object object_map;
id_mapvoid*, Mesh mesh_map;
id_mapObjectKey, Light light_map;
+   setMesh* mesh_synced;
void *world_map;
bool world_recalc;
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37046] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Fix comment for last commit, changed the patch to make ctrl reset the

2011-05-31 Thread Brecht Van Lommel
Revision: 37046
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37046
Author:   blendix
Date: 2011-05-31 11:02:01 + (Tue, 31 May 2011)
Log Message:
---
Fix comment for last commit, changed the patch to make ctrl reset the
individual array item but didn't update the comment.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-31 10:57:43 UTC (rev 37045)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-05-31 11:02:01 UTC (rev 37046)
@@ -4443,7 +4443,7 @@
/* reset to default */
/* XXX hardcoded keymap check */
else if(ELEM(event-type, DELKEY, PADPERIOD)  event-val == 
KM_PRESS) {
-   /* del - reset active button; ctrl+del - reset a whole 
array*/
+   /* ctrl+del - reset active button; del - reset a whole 
array*/
if (!(ELEM3(but-type, HSVCIRCLE, HSVCUBE, HISTOGRAM)))
ui_set_but_default(C, but, !event-ctrl);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37047] branches/cycles/intern/cycles/ blender/blender_mesh.cpp: Cycles: fix crash syncing curve/ text object with no verts/faces.

2011-05-31 Thread Brecht Van Lommel
Revision: 37047
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37047
Author:   blendix
Date: 2011-05-31 11:12:42 + (Tue, 31 May 2011)
Log Message:
---
Cycles: fix crash syncing curve/text object with no verts/faces.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_mesh.cpp

Modified: branches/cycles/intern/cycles/blender/blender_mesh.cpp
===
--- branches/cycles/intern/cycles/blender/blender_mesh.cpp  2011-05-31 
11:02:01 UTC (rev 37046)
+++ branches/cycles/intern/cycles/blender/blender_mesh.cpp  2011-05-31 
11:12:42 UTC (rev 37047)
@@ -260,7 +260,6 @@
 
/* create derived mesh */
BL::Mesh b_mesh = object_to_mesh(b_ob, b_scene, true, !preview);
-   /* todo: this will crash on non-mesh types! */
PointerRNA cmesh = RNA_pointer_get(b_ob_data.ptr, cycles);
 
vectorMesh::Triangle oldtriangle = mesh-triangles;
@@ -269,13 +268,15 @@
mesh-used_shaders = used_shaders;
mesh-name = ustring(b_ob_data.name());
 
-   if(cmesh.data  RNA_boolean_get(cmesh, use_subdivision))
-   create_subd_mesh(mesh, b_mesh, cmesh, used_shaders);
-   else
-   create_mesh(scene, mesh, b_mesh, used_shaders);
+   if(b_mesh) {
+   if(cmesh.data  RNA_boolean_get(cmesh, use_subdivision))
+   create_subd_mesh(mesh, b_mesh, cmesh, used_shaders);
+   else
+   create_mesh(scene, mesh, b_mesh, used_shaders);
 
-   /* free derived mesh */
-   object_remove_mesh(b_data, b_mesh);
+   /* free derived mesh */
+   object_remove_mesh(b_data, b_mesh);
+   }
 
/* displacement method */
if(cmesh.data) {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37048] branches/cycles/intern/cycles/ blender/blender_shader.cpp: Cycles: for material/world/lamps, if use_nodes is disabled, show some

2011-05-31 Thread Brecht Van Lommel
Revision: 37048
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37048
Author:   blendix
Date: 2011-05-31 11:28:04 + (Tue, 31 May 2011)
Log Message:
---
Cycles: for material/world/lamps, if use_nodes is disabled, show some
default shaders instead of black.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_shader.cpp

Modified: branches/cycles/intern/cycles/blender/blender_shader.cpp
===
--- branches/cycles/intern/cycles/blender/blender_shader.cpp2011-05-31 
11:12:42 UTC (rev 37047)
+++ branches/cycles/intern/cycles/blender/blender_shader.cpp2011-05-31 
11:28:04 UTC (rev 37048)
@@ -535,16 +535,25 @@
if(shader_map.sync(shader, *b_mat)) {
ShaderGraph *graph = new ShaderGraph();
 
+   shader-name = b_mat-name();
+
/* create nodes */
-   if(b_mat  b_mat-node_tree()) {
-   shader-name = b_mat-name();
-
+   if(b_mat-use_nodes()  b_mat-node_tree()) {
PtrSockMap sock_to_node;
BL::ShaderNodeTree b_ntree(b_mat-node_tree());
 
add_nodes(b_data, graph, b_ntree, NULL, 
sock_to_node);
}
+   else {
+   ShaderNode *closure, *out;
 
+   closure = graph-add(new DiffuseBsdfNode());
+   closure-input(Color)-value = 
get_float3(b_mat-diffuse_color());
+   out = graph-output();
+
+   graph-connect(closure-output(BSDF), 
out-input(Surface));
+   }
+
shader-set_graph(graph);
shader-tag_update(scene);
}
@@ -565,13 +574,22 @@
ShaderGraph *graph = new ShaderGraph();
 
/* create nodes */
-   if(b_world  b_world.node_tree()) {
+   if(b_world  b_world.use_nodes()  b_world.node_tree()) {
PtrSockMap sock_to_node;
BL::ShaderNodeTree b_ntree(b_world.node_tree());
 
add_nodes(b_data, graph, b_ntree, NULL, sock_to_node);
}
+   else if(b_world) {
+   ShaderNode *closure, *out;
 
+   closure = graph-add(new BackgroundNode());
+   closure-input(Color)-value = 
get_float3(b_world.horizon_color());
+   out = graph-output();
+
+   graph-connect(closure-output(Background), 
out-input(Surface));
+   }
+
shader-set_graph(graph);
shader-tag_update(scene);
}
@@ -600,7 +618,7 @@
ShaderGraph *graph = new ShaderGraph();
 
/* create nodes */
-   if(b_lamp  b_lamp-node_tree()) {
+   if(b_lamp-use_nodes()  b_lamp-node_tree()) {
shader-name = b_lamp-name();
 
PtrSockMap sock_to_node;
@@ -608,7 +626,17 @@
 
add_nodes(b_data, graph, b_ntree, NULL, 
sock_to_node);
}
+   else {
+   ShaderNode *closure, *out;
 
+   closure = graph-add(new EmissionNode());
+   closure-input(Color)-value = 
get_float3(b_lamp-color());
+   closure-input(Strength)-value.x = 
b_lamp-energy()*10.0f;
+   out = graph-output();
+
+   graph-connect(closure-output(Emission), 
out-input(Surface));
+   }
+
shader-set_graph(graph);
shader-tag_update(scene);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37049] branches/cycles/intern/cycles: Cycles: more opencl fixes.

2011-05-31 Thread Brecht Van Lommel
Revision: 37049
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37049
Author:   blendix
Date: 2011-05-31 11:31:00 + (Tue, 31 May 2011)
Log Message:
---
Cycles: more opencl fixes.

Modified Paths:
--
branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h
branches/cycles/intern/cycles/render/attribute.cpp
branches/cycles/intern/cycles/render/shader.cpp
branches/cycles/intern/cycles/util/util_math.h
branches/cycles/intern/cycles/util/util_transform.h

Modified: branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h
===
--- branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h 2011-05-31 
11:28:04 UTC (rev 37048)
+++ branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h 2011-05-31 
11:31:00 UTC (rev 37049)
@@ -22,10 +22,10 @@
 #define __KERNEL_GPU__
 #define __KERNEL_OPENCL__
 
-#include util_types.h
-
 CCL_NAMESPACE_BEGIN
 
+#pragma OPENCL EXTENSION cl_khr_byte_addressable_store: enable
+
 #define __device
 #define __device_inline
 
@@ -42,12 +42,26 @@
return (1.0f - t)*data[index] + t*data[nindex];
 }
 
-#define make_float3(x, y, z) ((float3)(x, y, z)) /* todo 1.1 */
+#define make_float2(x, y) ((float2)(x, y))
+#define make_float3(x, y, z) ((float3)(x, y, z, 0.0f))
+#define make_float4(x, y, z, w) ((float4)(x, y, z, w))
+#define make_int2(x, y) ((int2)(x, y))
+#define make_int3(x, y, z) ((int3)(x, y, z, 0))
+#define make_int4(x, y, z, w) ((int4)(x, y, z, w))
 
+typedef float4 float3;
+typedef int4 int3;
+
 #define __uint_as_float(x) as_float(x)
 #define __float_as_uint(x) as_uint(x)
 #define __int_as_float(x) as_float(x)
 #define __float_as_int(x) as_int(x)
+#define sqrtf(x) sqrt(((float)x))
+#define cosf(x) cos(((float)x))
+#define sinf(x) sin(((float)x))
+#define powf(x, y) pow(((float)x), ((float)y))
+#define fabsf(x) fabs(((float)x))
+#define copysignf(x, y) copysign(((float)x), ((float)y))
 
 #define kernel_data (*kg-data)
 #define kernel_tex_interp(t, x) \
@@ -57,6 +71,8 @@
 
 #define NULL 0
 
+#include util_types.h
+
 CCL_NAMESPACE_END
 
 #endif /* __KERNEL_COMPAT_OPENCL_H__ */

Modified: branches/cycles/intern/cycles/render/attribute.cpp
===
--- branches/cycles/intern/cycles/render/attribute.cpp  2011-05-31 11:28:04 UTC 
(rev 37048)
+++ branches/cycles/intern/cycles/render/attribute.cpp  2011-05-31 11:31:00 UTC 
(rev 37049)
@@ -46,7 +46,10 @@
 
 size_t Attribute::data_sizeof()
 {
-   return type.size();
+   if(type == TypeDesc::TypeFloat)
+   return sizeof(float);
+   else
+   return sizeof(float3);
 }
 
 size_t Attribute::element_size(int numverts, int numtris)

Modified: branches/cycles/intern/cycles/render/shader.cpp
===
--- branches/cycles/intern/cycles/render/shader.cpp 2011-05-31 11:28:04 UTC 
(rev 37048)
+++ branches/cycles/intern/cycles/render/shader.cpp 2011-05-31 11:31:00 UTC 
(rev 37049)
@@ -45,6 +45,7 @@
has_displacement = false;
 
need_update = true;
+   need_update_attributes = true;
 }
 
 Shader::~Shader()

Modified: branches/cycles/intern/cycles/util/util_math.h
===
--- branches/cycles/intern/cycles/util/util_math.h  2011-05-31 11:28:04 UTC 
(rev 37048)
+++ branches/cycles/intern/cycles/util/util_math.h  2011-05-31 11:31:00 UTC 
(rev 37049)
@@ -345,56 +345,56 @@
 
 __device_inline float3 operator-(const float3 a)
 {
-   float3 r = {-a.x, -a.y, -a.z};
+   float3 r = make_float3(-a.x, -a.y, -a.z);
return r;
 }
 
 __device_inline float3 operator*(const float3 a, const float3 b)
 {
-   float3 r = {a.x*b.x, a.y*b.y, a.z*b.z};
+   float3 r = make_float3(a.x*b.x, a.y*b.y, a.z*b.z);
return r;
 }
 
 __device_inline float3 operator*(const float3 a, float f)
 {
-   float3 r = {a.x*f, a.y*f, a.z*f};
+   float3 r = make_float3(a.x*f, a.y*f, a.z*f);
return r;
 }
 
 __device_inline float3 operator*(float f, const float3 a)
 {
-   float3 r = {a.x*f, a.y*f, a.z*f};
+   float3 r = make_float3(a.x*f, a.y*f, a.z*f);
return r;
 }
 
 __device_inline float3 operator/(float f, const float3 a)
 {
-   float3 r = {f/a.x, f/a.y, f/a.z};
+   float3 r = make_float3(f/a.x, f/a.y, f/a.z);
return r;
 }
 
 __device_inline float3 operator/(const float3 a, float f)
 {
float invf = 1.0f/f;
-   float3 r = {a.x*invf, a.y*invf, a.z*invf};
+   float3 r = make_float3(a.x*invf, a.y*invf, a.z*invf);
return r;
 }
 
 __device_inline float3 operator/(const float3 a, const float3 b)
 {
-   float3 r = {a.x/b.x, a.y/b.y, a.z/b.z};
+   float3 r = make_float3(a.x/b.x, a.y/b.y, a.z/b.z);
return r;
 }
 
 __device_inline float3 operator+(const float3 a, const float3 b)
 {
-   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37050] trunk/lib/darwin-9.x.universal: FFMPEG: update OSX/Cocoa 10.5 universal libs to version 0.6.3.

2011-05-31 Thread Brecht Van Lommel
Revision: 37050
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37050
Author:   blendix
Date: 2011-05-31 12:49:14 + (Tue, 31 May 2011)
Log Message:
---
FFMPEG: update OSX/Cocoa 10.5 universal libs to version 0.6.3. Fixes compile
error due to older version, and brings it in line with windows/linux builds.

Compiled by Jens Verwiebe, thanks!

Modified Paths:
--
trunk/lib/darwin-9.x.universal/README
trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavcodec.a
trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavdevice.a
trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavformat.a
trunk/lib/darwin-9.x.universal/ffmpeg/lib/libavutil.a
trunk/lib/darwin-9.x.universal/ffmpeg/lib/libswscale.a

Added Paths:
---
trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avfft.h
trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/dxva2.h
trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/vaapi.h
trunk/lib/darwin-9.x.universal/ffmpeg/include/libavutil/pixdesc.h

Removed Paths:
-
trunk/lib/darwin-9.x.universal/ffmpeg/include/libswscale/rgb2rgb.h

Modified: trunk/lib/darwin-9.x.universal/README
===
--- trunk/lib/darwin-9.x.universal/README   2011-05-31 11:31:00 UTC (rev 
37049)
+++ trunk/lib/darwin-9.x.universal/README   2011-05-31 12:49:14 UTC (rev 
37050)
@@ -18,7 +18,7 @@
 openexr (version 1.4.0a)
 samplerate (version 0.1.7)
 fftw3 (version 3.2.2)
-ffmpeg (version 0.6.1)
+ffmpeg (version 0.6.3)
 ogg (version 1.2.1)
 vorbis (version 1.3.2)
 theora (version 1.1.1)
@@ -205,4 +205,4 @@
 lipo -thin x86_64 termios.so -output termios.so
 lipo -thin x86_64 time.so -output time.so
 lipo -thin x86_64 unicodedata.so -output unicodedata.so
-lipo -thin x86_64 zlib.so -output zlib.so
\ No newline at end of file
+lipo -thin x86_64 zlib.so -output zlib.so

Added: trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avfft.h
===
--- trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avfft.h
(rev 0)
+++ trunk/lib/darwin-9.x.universal/ffmpeg/include/libavcodec/avfft.h
2011-05-31 12:49:14 UTC (rev 37050)
@@ -0,0 +1,99 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_AVFFT_H
+#define AVCODEC_AVFFT_H
+
+typedef float FFTSample;
+
+typedef struct FFTComplex {
+FFTSample re, im;
+} FFTComplex;
+
+typedef struct FFTContext FFTContext;
+
+/**
+ * Set up a complex FFT.
+ * @param nbits   log2 of the length of the input array
+ * @param inverse if 0 perform the forward transform, if 1 perform the 
inverse
+ */
+FFTContext *av_fft_init(int nbits, int inverse);
+
+/**
+ * Do the permutation needed BEFORE calling ff_fft_calc().
+ */
+void av_fft_permute(FFTContext *s, FFTComplex *z);
+
+/**
+ * Do a complex FFT with the parameters defined in av_fft_init(). The
+ * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
+ */
+void av_fft_calc(FFTContext *s, FFTComplex *z);
+
+void av_fft_end(FFTContext *s);
+
+FFTContext *av_mdct_init(int nbits, int inverse, double scale);
+void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
+void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
+void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
+void av_mdct_end(FFTContext *s);
+
+/* Real Discrete Fourier Transform */
+
+enum RDFTransformType {
+DFT_R2C,
+IDFT_C2R,
+IDFT_R2C,
+DFT_C2R,
+};
+
+typedef struct RDFTContext RDFTContext;
+
+/**
+ * Set up a real FFT.
+ * @param nbits   log2 of the length of the input array
+ * @param trans   the type of transform
+ */
+RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
+void av_rdft_calc(RDFTContext *s, FFTSample *data);
+void av_rdft_end(RDFTContext *s);
+
+/* Discrete Cosine Transform */
+
+typedef struct DCTContext DCTContext;
+
+enum DCTTransformType {
+DCT_II = 0,
+DCT_III,
+DCT_I,
+DST_I,
+};
+
+/**
+ * Sets up DCT.
+ * @param nbits   size of the input array:
+ *(1  nbits)

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37052] branches/cycles/intern/cycles/ blender/blender_python.cpp: Cycles: compile warning fixes.

2011-05-31 Thread Brecht Van Lommel
Revision: 37052
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37052
Author:   blendix
Date: 2011-05-31 16:19:02 + (Tue, 31 May 2011)
Log Message:
---
Cycles: compile warning fixes.

Modified Paths:
--
branches/cycles/intern/cycles/blender/blender_python.cpp

Modified: branches/cycles/intern/cycles/blender/blender_python.cpp
===
--- branches/cycles/intern/cycles/blender/blender_python.cpp2011-05-31 
14:06:29 UTC (rev 37051)
+++ branches/cycles/intern/cycles/blender/blender_python.cpp2011-05-31 
16:19:02 UTC (rev 37052)
@@ -210,7 +210,7 @@
{sync, sync_func, METH_VARARGS, },
{available_devices, available_devices_func, METH_NOARGS, },
{with_osl, with_osl_func, METH_NOARGS, },
-   {NULL, NULL},
+   {NULL, NULL, 0, NULL},
 };
 
 static struct PyModuleDef module = {
@@ -218,7 +218,8 @@
libcycles_blender,
Blender RNA to render exporter,
-1,
-   methods
+   methods,
+   NULL, NULL, NULL, NULL
 };
 
 CCL_NAMESPACE_END

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37053] branches/cycles/intern/cycles: Cycles: OSL build image manager fixes.

2011-05-31 Thread Brecht Van Lommel
Revision: 37053
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37053
Author:   blendix
Date: 2011-05-31 16:21:30 + (Tue, 31 May 2011)
Log Message:
---
Cycles: OSL build  image manager fixes.

Modified Paths:
--
branches/cycles/intern/cycles/CMakeLists.txt
branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h
branches/cycles/intern/cycles/kernel/kernel_globals.h
branches/cycles/intern/cycles/kernel/osl/osl_services.cpp
branches/cycles/intern/cycles/render/image.cpp
branches/cycles/intern/cycles/render/image.h
branches/cycles/intern/cycles/render/nodes.cpp
branches/cycles/intern/cycles/render/osl.cpp
branches/cycles/intern/cycles/util/util_types.h

Modified: branches/cycles/intern/cycles/CMakeLists.txt
===
--- branches/cycles/intern/cycles/CMakeLists.txt2011-05-31 16:19:02 UTC 
(rev 37052)
+++ branches/cycles/intern/cycles/CMakeLists.txt2011-05-31 16:21:30 UTC 
(rev 37053)
@@ -28,7 +28,7 @@
 SET(CYCLES_CUDA /usr/local/cuda CACHE PATH Path to CUDA installation)
 SET(CYCLES_OPENCL  CACHE PATH Path to OpenCL installation)
 SET(CYCLES_PARTIO  CACHE PATH Path to Partio installation)
-SET(CYCLES_GLEW  CACHE PATH Path to GLUT installation)
+SET(CYCLES_GLEW  CACHE PATH Path to GLEW installation)
 
 # Install, todo: deduplicate install path code
 

Modified: branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h
===
--- branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h 2011-05-31 
16:19:02 UTC (rev 37052)
+++ branches/cycles/intern/cycles/kernel/kernel_compat_opencl.h 2011-05-31 
16:21:30 UTC (rev 37053)
@@ -42,6 +42,25 @@
return (1.0f - t)*data[index] + t*data[nindex];
 }
 
+#ifdef make_float2
+#undef make_float2
+#endif
+#ifdef make_float3
+#undef make_float3
+#endif
+#ifdef make_float4
+#undef make_float4
+#endif
+#ifdef make_int2
+#undef make_int2
+#endif
+#ifdef make_int3
+#undef make_int3
+#endif
+#ifdef make_int4
+#undef make_int4
+#endif
+
 #define make_float2(x, y) ((float2)(x, y))
 #define make_float3(x, y, z) ((float3)(x, y, z, 0.0f))
 #define make_float4(x, y, z, w) ((float4)(x, y, z, w))
@@ -49,6 +68,13 @@
 #define make_int3(x, y, z) ((int3)(x, y, z, 0))
 #define make_int4(x, y, z, w) ((int4)(x, y, z, w))
 
+#ifdef float3
+#undef float3
+#endif
+#ifdef int3
+#undef int3
+#endif
+
 typedef float4 float3;
 typedef int4 int3;
 

Modified: branches/cycles/intern/cycles/kernel/kernel_globals.h
===
--- branches/cycles/intern/cycles/kernel/kernel_globals.h   2011-05-31 
16:19:02 UTC (rev 37052)
+++ branches/cycles/intern/cycles/kernel/kernel_globals.h   2011-05-31 
16:21:30 UTC (rev 37053)
@@ -18,6 +18,14 @@
 
 /* Constant Globals */
 
+#ifdef __KERNEL_CPU__
+
+#ifdef WITH_OSL
+#include osl_globals.h
+#endif
+
+#endif
+
 CCL_NAMESPACE_BEGIN
 
 /* On the CPU, we pass along the struct KernelGlobals to nearly everywhere in
@@ -27,10 +35,6 @@
 
 #ifdef __KERNEL_CPU__
 
-#ifdef WITH_OSL
-//#include osl_globals.h
-#endif
-
 typedef struct KernelGlobals {
 
 #define KERNEL_TEX(type, ttype, name) ttype name;
@@ -42,7 +46,7 @@
 #ifdef WITH_OSL
/* On the CPU, we also have the OSL globals here. Most data structures 
are shared
   with SVM, the difference is in the shaders and object/mesh 
attributes. */
-   //OSLGlobals osl;
+   OSLGlobals osl;
 #endif
 
 } KernelGLobals;

Modified: branches/cycles/intern/cycles/kernel/osl/osl_services.cpp
===
--- branches/cycles/intern/cycles/kernel/osl/osl_services.cpp   2011-05-31 
16:19:02 UTC (rev 37052)
+++ branches/cycles/intern/cycles/kernel/osl/osl_services.cpp   2011-05-31 
16:21:30 UTC (rev 37053)
@@ -176,6 +176,7 @@
(derivatives)? fval[1]: NULL, (derivatives)? fval[2]: 
NULL);
}
else {
+   /* todo: this won't work when float3 has w component */
float3 *fval = (float3*)val;
fval[0] = triangle_attribute_float3(kg, sd, attr.elem, 
attr.offset,
(derivatives)? fval[1]: NULL, (derivatives)? fval[2]: 
NULL);

Modified: branches/cycles/intern/cycles/render/image.cpp
===
--- branches/cycles/intern/cycles/render/image.cpp  2011-05-31 16:19:02 UTC 
(rev 37052)
+++ branches/cycles/intern/cycles/render/image.cpp  2011-05-31 16:21:30 UTC 
(rev 37053)
@@ -25,11 +25,16 @@
 #include util_path.h
 #include util_progress.h
 
+#ifdef WITH_OSL
+#include OSL/oslexec.h
+#endif
+
 CCL_NAMESPACE_BEGIN
 
 ImageManager::ImageManager()
 {
need_update = true;
+   osl_texture_system = NULL;
 }
 
 ImageManager::~ImageManager()
@@ -39,6 +44,11 @@
}
 }
 
+void 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37073] trunk/blender/source/blender/ blenloader/intern/readfile.c: Fix #27541: f-curve generator modifier file read missed endian switch,

2011-06-01 Thread Brecht Van Lommel
Revision: 37073
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37073
Author:   blendix
Date: 2011-06-01 13:10:37 + (Wed, 01 Jun 2011)
Log Message:
---
Fix #27541: f-curve generator modifier file read missed endian switch,
found by Guillaume Roguez.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2011-06-01 
11:55:28 UTC (rev 37072)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2011-06-01 
13:10:37 UTC (rev 37073)
@@ -1723,6 +1723,7 @@
 static void direct_link_fmodifiers(FileData *fd, ListBase *list)
 {
FModifier *fcm;
+   int a;

for (fcm= list-first; fcm; fcm= fcm-next) {
/* relink general data */
@@ -1736,6 +1737,11 @@
FMod_Generator *data= (FMod_Generator 
*)fcm-data;

data-coefficients= newdataadr(fd, 
data-coefficients);
+
+   if(fd-flags  FD_FLAGS_SWITCH_ENDIAN) {
+   for(a = 0; a  data-arraysize; a++)
+   
SWITCH_INT(data-coefficients[a]);
+   }
}
break;
case FMODIFIER_TYPE_ENVELOPE:

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37074] trunk/blender: Fix #27481: windows uninstaller could remove files unrelated to blender

2011-06-01 Thread Brecht Van Lommel
Revision: 37074
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37074
Author:   blendix
Date: 2011-06-01 13:13:55 + (Wed, 01 Jun 2011)
Log Message:
---
Fix #27481: windows uninstaller could remove files unrelated to blender
when installing to a folder that already existed. Now the uninstaller
will remove only the files it has installed, and leave any other files
in the installation directory intact.

Modified Paths:
--
trunk/blender/build_files/scons/tools/btools.py
trunk/blender/release/windows/installer/00.sconsblender.nsi

Modified: trunk/blender/build_files/scons/tools/btools.py
===
--- trunk/blender/build_files/scons/tools/btools.py 2011-06-01 13:10:37 UTC 
(rev 37073)
+++ trunk/blender/build_files/scons/tools/btools.py 2011-06-01 13:13:55 UTC 
(rev 37074)
@@ -605,9 +605,12 @@
 doneroot = False
 rootdirconts = []
 datafiles = ''
+deldatafiles = ''
+deldatadirs = ''
 l = len(bf_installdir)
 
 for dp,dn,df in os.walk(bf_installdir):
+# install
 if not doneroot:
 for f in df:
 rootdirconts.append(os.path.join(dp,f))
@@ -621,6 +624,16 @@
 outfile = os.path.join(dp,f)
 datafiles += '  File '+outfile + \n
 
+# uninstall
+deldir = dp[l+1:]
+
+if len(deldir)0:
+deldatadirs = RMDir $INSTDIR\\ + deldir + \n + deldatadirs
+deldatadirs = RMDir /r $INSTDIR\\ + deldir + \\__pycache__\n + 
deldatadirs
+
+for f in df:
+deldatafiles += 'Delete \$INSTDIR\\' + os.path.join(deldir, 
f) + \\n
+
  change to suit install dir 
 inst_dir = install_base_dir + env['BF_INSTALLDIR']
 
@@ -657,6 +670,8 @@
 ns_cnt = string.replace(ns_cnt, [DELROOTDIRCONTS], delrootstring)
 
 ns_cnt = string.replace(ns_cnt, [DODATAFILES], datafiles)
+ns_cnt = string.replace(ns_cnt, [DELDATAFILES], deldatafiles)
+ns_cnt = string.replace(ns_cnt, [DELDATADIRS], deldatadirs)
 
 tmpnsi = 
os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+00.blender_tmp.nsi)
 new_nsis = open(tmpnsi, 'w')

Modified: trunk/blender/release/windows/installer/00.sconsblender.nsi
===
--- trunk/blender/release/windows/installer/00.sconsblender.nsi 2011-06-01 
13:10:37 UTC (rev 37073)
+++ trunk/blender/release/windows/installer/00.sconsblender.nsi 2011-06-01 
13:13:55 UTC (rev 37074)
@@ -205,6 +205,8 @@
  
   ; Remove files
   [DELROOTDIRCONTS]
+  [DELDATAFILES]
+  [DELDATADIRS]
 
   Delete $INSTDIR\uninstall.exe
 
@@ -212,13 +214,14 @@
 RMDir /r $BLENDERCONFIG\$SHORTVERSION
   ${Endif}
 
+  ; Remove install directory if it's empty
+  RMDir $INSTDIR
   ; Remove shortcuts
   Delete $SMPROGRAMS\Blender Foundation\Blender\*.*
   Delete $DESKTOP\Blender.lnk
   ; Remove all link related directories and files
-  RMDir /r $SMPROGRAMS\Blender Foundation
-  ; Clear out installation dir
-  RMDir /r $INSTDIR
+  RMDir $SMPROGRAMS\Blender Foundation\Blender
+  RMDir $SMPROGRAMS\Blender Foundation
   
   System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x0800, 0, 0, 
0)' ; Refresh icons
 SectionEnd

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37075] trunk/blender/release/scripts/ startup/bl_ui/space_userpref_keymap.py: Fix #27490: export key configuration gave error when trying to export

2011-06-01 Thread Brecht Van Lommel
Revision: 37075
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37075
Author:   blendix
Date: 2011-06-01 14:35:14 + (Wed, 01 Jun 2011)
Log Message:
---
Fix #27490: export key configuration gave error when trying to export
properties from an unknown (e.g. removed) operator.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py
2011-06-01 13:13:55 UTC (rev 37074)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py
2011-06-01 14:35:14 UTC (rev 37075)
@@ -411,8 +411,8 @@
 if lines is None:
 lines = []
 
-for pname in properties.keys():
-if not properties.is_property_hidden(pname):
+for pname in properties.bl_rna.properties.keys():
+if pname != rna_type and not properties.is_property_hidden(pname):
 value = getattr(properties, pname)
 if isinstance(value, bpy.types.OperatorProperties):
 export_properties(prefix + . + pname, value, lines)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37077] trunk/blender/source/blender/ editors/interface/interface_templates.c: UI: template_ID now takes into account if the property is editable.

2011-06-01 Thread Brecht Van Lommel
Revision: 37077
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37077
Author:   blendix
Date: 2011-06-01 16:13:48 + (Wed, 01 Jun 2011)
Log Message:
---
UI: template_ID now takes into account if the property is editable.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_templates.c

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===
--- trunk/blender/source/blender/editors/interface/interface_templates.c
2011-06-01 15:45:09 UTC (rev 37076)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c
2011-06-01 16:13:48 UTC (rev 37077)
@@ -332,6 +332,7 @@
PointerRNA idptr;
// ListBase *lb; // UNUSED
ID *id, *idfrom;
+   int editable= RNA_property_editable(template-ptr, template-prop);
 
idptr= RNA_property_pointer_get(template-ptr, template-prop);
id= idptr.data;
@@ -352,14 +353,12 @@
if (id) but-icon = ui_id_icon_get(C, id, 1);
uiButSetFlag(but, UI_HAS_ICON|UI_ICON_PREVIEW);
}
-   if((idfrom  idfrom-lib))
+   if((idfrom  idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);

-   
uiLayoutRow(layout, 1);
-   } else 
-   
-   if(flag  UI_ID_BROWSE) {
+   }
+   else if(flag  UI_ID_BROWSE) {
but= uiDefBlockButN(block, id_search_menu, 
MEM_dupallocN(template), , 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, 
template_id_browse_tip(type));
if(type) {
but-icon= RNA_struct_ui_icon(type);
@@ -368,7 +367,7 @@
uiButSetFlag(but, UI_HAS_ICON|UI_ICON_LEFT);
}
 
-   if((idfrom  idfrom-lib))
+   if((idfrom  idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
 
@@ -410,7 +409,7 @@
but= uiDefBut(block, BUT, 0, str, 
0,0,UI_UNIT_X+10,UI_UNIT_Y, NULL, 0, 0, 0, 0, Displays number of users of this 
data. Click to make a single-user copy.);
 
uiButSetNFunc(but, template_id_cb, 
MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
-   if(!id_copy(id, NULL, 1 /* test only */) || (idfrom  
idfrom-lib))
+   if(!id_copy(id, NULL, 1 /* test only */) || (idfrom  
idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}

@@ -433,7 +432,7 @@
uiButSetNFunc(but, template_id_cb, 
MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
}
 
-   if((idfrom  idfrom-lib))
+   if((idfrom  idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
 
@@ -449,7 +448,7 @@
uiButSetNFunc(but, template_id_cb, 
MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
}
 
-   if((idfrom  idfrom-lib))
+   if((idfrom  idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}

@@ -468,7 +467,7 @@
uiButSetFlag(but, UI_BUT_DISABLED);
}
 
-   if((idfrom  idfrom-lib))
+   if((idfrom  idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37078] trunk/blender/source/blender: Fix #27550: texture node editor header was still showing texture datablock

2011-06-01 Thread Brecht Van Lommel
Revision: 37078
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37078
Author:   blendix
Date: 2011-06-01 16:17:38 + (Wed, 01 Jun 2011)
Log Message:
---
Fix #27550: texture node editor header was still showing texture datablock
selector even if there is no active texture slot or node, now it's disabled
in that case.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_texture.h
trunk/blender/source/blender/blenkernel/intern/texture.c
trunk/blender/source/blender/editors/space_node/space_node.c
trunk/blender/source/blender/makesrna/intern/rna_internal.h
trunk/blender/source/blender/makesrna/intern/rna_lamp.c
trunk/blender/source/blender/makesrna/intern/rna_material.c
trunk/blender/source/blender/makesrna/intern/rna_particle.c
trunk/blender/source/blender/makesrna/intern/rna_world.c

Modified: trunk/blender/source/blender/blenkernel/BKE_texture.h
===
--- trunk/blender/source/blender/blenkernel/BKE_texture.h   2011-06-01 
16:13:48 UTC (rev 37077)
+++ trunk/blender/source/blender/blenkernel/BKE_texture.h   2011-06-01 
16:17:38 UTC (rev 37078)
@@ -103,6 +103,8 @@
 void set_current_lamp_texture(struct Lamp *la, struct Tex *tex);
 void set_current_particle_texture(struct ParticleSettings *part, struct Tex 
*tex);
 
+int has_current_material_texture(struct Material *ma);
+
 struct TexMapping *add_mapping(void);
 void init_mapping(struct TexMapping *texmap);
 

Modified: trunk/blender/source/blender/blenkernel/intern/texture.c
===
--- trunk/blender/source/blender/blenkernel/intern/texture.c2011-06-01 
16:13:48 UTC (rev 37077)
+++ trunk/blender/source/blender/blenkernel/intern/texture.c2011-06-01 
16:17:38 UTC (rev 37078)
@@ -1191,6 +1191,28 @@
}
 }
 
+int has_current_material_texture(Material *ma)
+{
+   bNode *node;
+
+   if(ma  ma-use_nodes  ma-nodetree) {
+   node= nodeGetActiveID(ma-nodetree, ID_TE);
+
+   if(node) {
+   return 1;
+   }
+   else {
+   node= nodeGetActiveID(ma-nodetree, ID_MA);
+   if(node)
+   ma= (Material*)node-id;
+   else
+   ma= NULL;
+   }
+   }
+
+   return (ma != NULL);
+}
+
 Tex *give_current_world_texture(World *world)
 {
MTex *mtex= NULL;

Modified: trunk/blender/source/blender/editors/space_node/space_node.c
===
--- trunk/blender/source/blender/editors/space_node/space_node.c
2011-06-01 16:13:48 UTC (rev 37077)
+++ trunk/blender/source/blender/editors/space_node/space_node.c
2011-06-01 16:17:38 UTC (rev 37078)
@@ -222,6 +222,8 @@
case NC_NODE:
if (wmn-action == NA_EDITED)
ED_area_tag_refresh(sa);
+   else if (wmn-action == NA_SELECTED)
+   ED_area_tag_redraw(sa);
break;
 
case NC_IMAGE:

Modified: trunk/blender/source/blender/makesrna/intern/rna_internal.h
===
--- trunk/blender/source/blender/makesrna/intern/rna_internal.h 2011-06-01 
16:13:48 UTC (rev 37077)
+++ trunk/blender/source/blender/makesrna/intern/rna_internal.h 2011-06-01 
16:17:38 UTC (rev 37078)
@@ -187,7 +187,7 @@
 void rna_def_motionpath_common(struct StructRNA *srna);
 
 void rna_def_texmat_common(struct StructRNA *srna, const char 
*texspace_editable);
-void rna_def_mtex_common(struct BlenderRNA *brna, struct StructRNA *srna, 
const char *begin, const char *activeget, const char *activeset, const char 
*structname, const char *structname_slots, const char *update);
+void rna_def_mtex_common(struct BlenderRNA *brna, struct StructRNA *srna, 
const char *begin, const char *activeget, const char *activeset, const char 
*activeeditable, const char *structname, const char *structname_slots, const 
char *update);
 void rna_def_render_layer_common(struct StructRNA *srna, int scene);
 
 void rna_ID_name_get(struct PointerRNA *ptr, char *value);

Modified: trunk/blender/source/blender/makesrna/intern/rna_lamp.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_lamp.c 2011-06-01 
16:13:48 UTC (rev 37077)
+++ trunk/blender/source/blender/makesrna/intern/rna_lamp.c 2011-06-01 
16:17:38 UTC (rev 37078)
@@ -374,7 +374,7 @@

/* textures */
rna_def_mtex_common(brna, srna, rna_Lamp_mtex_begin, 
rna_Lamp_active_texture_get,
-   rna_Lamp_active_texture_set, LampTextureSlot, 
LampTextureSlots, rna_Lamp_update);
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37101] trunk/blender/source/blender/ editors/interface: UI: fix two issues with expanded enum property buttons:

2011-06-02 Thread Brecht Van Lommel
Revision: 37101
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37101
Author:   blendix
Date: 2011-06-02 14:18:51 + (Thu, 02 Jun 2011)
Log Message:
---
UI: fix two issues with expanded enum property buttons:
* they were too slow for dynamic python enums, calling the callback
  to list the items for each button, to get a tooltip
* enum tooltips sometimes were showing the same description twice

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface.c
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/editors/interface/interface_intern.h
trunk/blender/source/blender/editors/interface/interface_regions.c

Modified: trunk/blender/source/blender/editors/interface/interface.c
===
--- trunk/blender/source/blender/editors/interface/interface.c  2011-06-02 
14:15:07 UTC (rev 37100)
+++ trunk/blender/source/blender/editors/interface/interface.c  2011-06-02 
14:18:51 UTC (rev 37101)
@@ -1668,7 +1668,7 @@
return 0;
 }
 
-void ui_set_but_default(bContext *C, uiBut *UNUSED(but), short all)
+void ui_set_but_default(bContext *C, short all)
 {
PointerRNA ptr;
 
@@ -2481,28 +2481,8 @@
icon= RNA_property_ui_icon(prop);
}
}
-
-   if(!tip) {
-   if(type == ROW  proptype == PROP_ENUM) {
-   EnumPropertyItem *item;
-   int i, totitem, free;
-
-   RNA_property_enum_items(block-evil_C, ptr, 
prop, item, totitem, free);
-
-   for(i=0; itotitem; i++) {
-   if(item[i].identifier[0]  
item[i].value == (int)max) {
-   if(item[i].description[0])
-   tip= 
item[i].description;
-   break;
-   }
-   }
-
-   if(free)
-   MEM_freeN(item);
-   }
-   }

-   if(!tip)
+   if(!tip  proptype != PROP_ENUM)
tip= RNA_property_ui_description(prop);
 
if(min == max || a1 == -1 || a2 == -1) {

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-06-02 14:15:07 UTC (rev 37100)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-06-02 14:18:51 UTC (rev 37101)
@@ -4445,7 +4445,7 @@
else if(ELEM(event-type, DELKEY, PADPERIOD)  event-val == 
KM_PRESS) {
/* ctrl+del - reset active button; del - reset a whole 
array*/
if (!(ELEM3(but-type, HSVCIRCLE, HSVCUBE, HISTOGRAM)))
-   ui_set_but_default(C, but, !event-ctrl);
+   ui_set_but_default(C, !event-ctrl);
}
/* handle menu */
else if(event-type == RIGHTMOUSE  event-val == KM_PRESS) {

Modified: trunk/blender/source/blender/editors/interface/interface_intern.h
===
--- trunk/blender/source/blender/editors/interface/interface_intern.h   
2011-06-02 14:15:07 UTC (rev 37100)
+++ trunk/blender/source/blender/editors/interface/interface_intern.h   
2011-06-02 14:18:51 UTC (rev 37101)
@@ -369,7 +369,7 @@
 extern int ui_set_but_string(struct bContext *C, uiBut *but, const char *str);
 extern int ui_get_but_string_max_length(uiBut *but);
 
-extern void ui_set_but_default(struct bContext *C, uiBut *but, short all);
+extern void ui_set_but_default(struct bContext *C, short all);
 
 extern void ui_set_but_soft_range(uiBut *but, double value);
 

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===
--- trunk/blender/source/blender/editors/interface/interface_regions.c  
2011-06-02 14:15:07 UTC (rev 37100)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c  
2011-06-02 14:18:51 UTC (rev 37101)
@@ -370,6 +370,27 @@
data-color[data-totline]= 0xFF;
data-totline++;
}
+
+   if(but-type == ROW) {
+   EnumPropertyItem *item;
+   int i, totitem, free;
+
+   RNA_property_enum_items(C, but-rnapoin, but-rnaprop, 
item, totitem, free);
+
+   for(i=0; itotitem; i++) {
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37103] trunk/blender/source/blender/ render/intern/source/pointdensity.c: Fix #27241: crash with point density texture when using particle age/veloci

2011-06-02 Thread Brecht Van Lommel
Revision: 37103
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37103
Author:   blendix
Date: 2011-06-02 16:59:12 + (Thu, 02 Jun 2011)
Log Message:
---
Fix #27241: crash with point density texture when using particle age/velocity
fallof for object vertices.

Modified Paths:
--
trunk/blender/source/blender/render/intern/source/pointdensity.c

Modified: trunk/blender/source/blender/render/intern/source/pointdensity.c
===
--- trunk/blender/source/blender/render/intern/source/pointdensity.c
2011-06-02 15:21:47 UTC (rev 37102)
+++ trunk/blender/source/blender/render/intern/source/pointdensity.c
2011-06-02 16:59:12 UTC (rev 37103)
@@ -362,10 +362,18 @@
density = pdr-squared_radius;
else if (pdr-falloff_type == TEX_PD_FALLOFF_ROOT)
density = sqrt(dist);
-   else if (pdr-falloff_type == TEX_PD_FALLOFF_PARTICLE_AGE)
-   density = dist*MIN2(pdr-point_data[pdr-offset + index], 1.0f);
-   else if (pdr-falloff_type == TEX_PD_FALLOFF_PARTICLE_VEL)
-   density = dist*len_v3(pdr-point_data + index*3)*pdr-velscale;
+   else if (pdr-falloff_type == TEX_PD_FALLOFF_PARTICLE_AGE) {
+   if (pdr-point_data_used  POINT_DATA_LIFE)
+   density = dist*MIN2(pdr-point_data[pdr-offset + 
index], 1.0f);
+   else
+   density = dist;
+   }
+   else if (pdr-falloff_type == TEX_PD_FALLOFF_PARTICLE_VEL) {
+   if (pdr-point_data_used  POINT_DATA_VEL)
+   density = dist*len_v3(pdr-point_data + 
index*3)*pdr-velscale;
+   else
+   density = dist;
+   }

if (pdr-density_curve  dist != 0.0f) {
density = curvemapping_evaluateF(pdr-density_curve, 0, 
density/dist)*dist;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37106] trunk/blender/source/blender: Fix related to #27309: group nodes with a linked datablock that was missing would crash.

2011-06-02 Thread Brecht Van Lommel
Revision: 37106
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37106
Author:   blendix
Date: 2011-06-02 17:34:01 + (Thu, 02 Jun 2011)
Log Message:
---
Fix related to #27309: group nodes with a linked datablock that was missing 
would crash.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/node.c
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenkernel/intern/node.c
===
--- trunk/blender/source/blender/blenkernel/intern/node.c   2011-06-02 
17:28:04 UTC (rev 37105)
+++ trunk/blender/source/blender/blenkernel/intern/node.c   2011-06-02 
17:34:01 UTC (rev 37106)
@@ -350,7 +350,7 @@
 /* groups display their internal tree name as label */
 static const char *group_label(bNode *node)
 {
-   return node-id-name+2;
+   return (node-id)? node-id-name+2: Missing Datablock;
 }
 
 void register_node_type_group(ListBase *lb)
@@ -2072,11 +2072,12 @@
bNodeTree *ngroup= (bNodeTree*)node-id;
bNodeSocket *sock;

-   if((ngroup-init  NTREE_TYPE_INIT)==0)
+   if(ngroup  (ngroup-init  NTREE_TYPE_INIT)==0)
ntreeInitTypes(ngroup);

node-stack_index = index;
-   index += ntree_begin_exec_tree(ngroup);
+   if(ngroup)
+   index += ntree_begin_exec_tree(ngroup);

for (sock=node-inputs.first; sock; sock=sock-next) {
if (sock-link  sock-link-fromsock) {
@@ -2199,7 +2200,7 @@
if(node-type==CMP_NODE_CURVE_RGB)
curvemapping_premultiply(node-storage, 0);
}
-   if(node-type==NODE_GROUP)
+   if(node-type==NODE_GROUP  node-id)
composit_begin_exec((bNodeTree *)node-id, stack + 
node-stack_index);
 
}
@@ -2225,7 +2226,7 @@
if(node-type==CMP_NODE_CURVE_RGB)
curvemapping_premultiply(node-storage, 1);

-   if(node-type==NODE_GROUP)
+   if(node-type==NODE_GROUP  node-id)
composit_end_exec((bNodeTree *)node-id, stack + 
node-stack_index);
 
node-need_exec= 0;

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2011-06-02 
17:28:04 UTC (rev 37105)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2011-06-02 
17:34:01 UTC (rev 37106)
@@ -2093,7 +2093,7 @@
for (node=ntree-nodes.first; node; node=node-next) {
if (node-type==NODE_GROUP) {
bNodeTree *ngroup= (bNodeTree*)node-id;
-   if (ngroup-flag  NTREE_DO_VERSIONS)
+   if (ngroup  (ngroup-flag  NTREE_DO_VERSIONS))
lib_node_do_versions_group(node);
}
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37144] trunk/blender/build_files: BuildBot: various changes to support building branches.

2011-06-03 Thread Brecht Van Lommel
Revision: 37144
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37144
Author:   blendix
Date: 2011-06-03 20:44:23 + (Fri, 03 Jun 2011)
Log Message:
---
BuildBot: various changes to support building branches.

Modified Paths:
--
trunk/blender/build_files/buildbot/master.cfg
trunk/blender/build_files/buildbot/master_unpack.py
trunk/blender/build_files/buildbot/slave_compile.py
trunk/blender/build_files/buildbot/slave_pack.py
trunk/blender/build_files/scons/tools/btools.py

Modified: trunk/blender/build_files/buildbot/master.cfg
===
--- trunk/blender/build_files/buildbot/master.cfg   2011-06-03 19:33:15 UTC 
(rev 37143)
+++ trunk/blender/build_files/buildbot/master.cfg   2011-06-03 20:44:23 UTC 
(rev 37144)
@@ -53,7 +53,7 @@
 buildernames = []
 
 
-def add_builder(c, name, libdir, factory):
+def add_builder(c, name, libdir, factory, branch=''):
 slavenames = []
 
 for slave in master_private.slaves:
@@ -61,24 +61,26 @@
 slavenames.append(slave['name'])
 
 if len(slavenames)  0:
-f = factory(name, libdir)
+f = factory(name, libdir, branch)
 c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, 
factory=f, category='blender'))
 buildernames.append(name)
 
 # common steps
 
 
-def svn_step():
-return 
SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', 
mode='update', defaultBranch='trunk', workdir='blender')
+def svn_step(branch=''):
+if branch:
+return 
SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/branches/%%BRANCH%%', 
mode='update', defaultBranch=branch, workdir='blender')
+else:
+return 
SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', 
mode='update', defaultBranch='trunk', workdir='blender')
 
-
 def lib_svn_step(dir):
 return SVN(name='lib svn', 
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, 
mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
 # generic builder
 
 
-def generic_builder(id, libdir=):
+def generic_builder(id, libdir='', branch=''):
 filename = 'buildbot_upload_' + id + '.zip'
 compile_script = '../blender/build_files/buildbot/slave_compile.py'
 test_script = '../blender/build_files/buildbot/slave_test.py'
@@ -86,13 +88,13 @@
 unpack_script = 'master_unpack.py'
 
 f = BuildFactory()
-f.addStep(svn_step())
+f.addStep(svn_step(branch))
 if libdir != '':
 f.addStep(lib_svn_step(libdir))
 
 f.addStep(Compile(command=['python', compile_script, id]))
 f.addStep(Test(command=['python', test_script, id]))
-f.addStep(ShellCommand(name='package', command=['python', pack_script, 
id], description='packaging', descriptionDone='packaged'))
+f.addStep(ShellCommand(name='package', command=['python', pack_script, id, 
branch], description='packaging', descriptionDone='packaged'))
 if id.find('cmake') != -1:
 f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', 
masterdest=filename, maxsize=100 * 1024 * 1024))
 else:
@@ -102,12 +104,19 @@
 
 # builders
 
-add_builder(c, 'mac_x86_64_cmake', 'darwin-9.x.universal', generic_builder)
-add_builder(c, 'mac_i386_cmake', 'darwin-9.x.universal', generic_builder)
-add_builder(c, 'mac_ppc_cmake', 'darwin-9.x.universal', generic_builder)
-add_builder(c, 'linux_x86_64_cmake', '', generic_builder)
+add_builder(c, 'mac_x86_64_scons', 'darwin-9.x.universal', generic_builder)
+add_builder(c, 'salad_mac_x86_64_scons', 'darwin-9.x.universal', 
generic_builder, 'soc-2011-salad')
+add_builder(c, 'mac_i386_scons', 'darwin-9.x.universal', generic_builder)
+add_builder(c, 'mac_ppc_scons', 'darwin-9.x.universal', generic_builder)
+#add_builder(c, 'linux_x86_64_cmake', '', generic_builder)
+add_builder(c, 'linux_i386_scons', '', generic_builder)
+add_builder(c, 'salad_linux_i386_scons', '', generic_builder, 'soc-2011-salad')
 add_builder(c, 'linux_x86_64_scons', '', generic_builder)
+add_builder(c, 'salad_linux_x86_64_scons', '', generic_builder, 
'soc-2011-salad')
 add_builder(c, 'win32_scons', 'windows', generic_builder)
+add_builder(c, 'salad_win32_scons', 'windows', generic_builder, 
'soc-2011-salad')
+#add_builder(c, 'freebsd_i386_cmake', '', generic_builder)
+#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder)
 
 # SCHEDULERS
 #
@@ -149,7 +158,7 @@
 pingBuilder=False,
 stopBuild=False,
 stopAllBuilds=False,
-cancelPendingBuild=False,
+cancelPendingBuild=True,
 )
 
 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))

Modified: trunk/blender/build_files/buildbot/master_unpack.py
===
--- trunk/blender/build_files/buildbot/master_unpack.py 2011-06-03 19:33:15 UTC 
(rev 37143)
+++ 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37213] branches/soc-2011-salad/source/ blender/makesrna/intern/rna_fcurve.c: Salad Branch: fix compile error, looks like mistake in merge confict res

2011-06-05 Thread Brecht Van Lommel
Revision: 37213
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37213
Author:   blendix
Date: 2011-06-05 15:25:43 + (Sun, 05 Jun 2011)
Log Message:
---
Salad Branch: fix compile error, looks like mistake in merge confict resolution.

Modified Paths:
--
branches/soc-2011-salad/source/blender/makesrna/intern/rna_fcurve.c

Modified: branches/soc-2011-salad/source/blender/makesrna/intern/rna_fcurve.c
===
--- branches/soc-2011-salad/source/blender/makesrna/intern/rna_fcurve.c 
2011-06-05 14:49:11 UTC (rev 37212)
+++ branches/soc-2011-salad/source/blender/makesrna/intern/rna_fcurve.c 
2011-06-05 15:25:43 UTC (rev 37213)
@@ -454,7 +454,7 @@
fm-flag |= FMODIFIER_FLAG_ACTIVE;
 }
 
-static void rna_FModifier_active_update(Main *UNUSED(bmain), Scene 
*UNUSED(scene), PointerRNA *ptr)
+static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float 
*max)
 {
FModifier *fcm= (FModifier*)ptr-data;


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37249] trunk/blender/source/blender/ makesrna/intern/rna_wm.c: Keymaps: fix keymap items created in python being added with the python

2011-06-06 Thread Brecht Van Lommel
Revision: 37249
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37249
Author:   blendix
Date: 2011-06-06 13:35:43 + (Mon, 06 Jun 2011)
Log Message:
---
Keymaps: fix keymap items created in python being added with the python
operator names instead of the internal names. This wasn't really noticeable,
expect that it broke automatically looking up shortcuts for display in menus.

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_wm.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c   2011-06-06 
12:52:26 UTC (rev 37248)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c   2011-06-06 
13:35:43 UTC (rev 37249)
@@ -1048,6 +1048,7 @@
 static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, 
const char *idname, int type, int value, int any, int shift, int ctrl, int alt, 
int oskey, int keymodifier)
 {
 // wmWindowManager *wm = CTX_wm_manager(C);
+   char idname_bl[OP_MAX_TYPENAME];
int modifier= 0;
 
/* only on non-modal maps */
@@ -1056,6 +1057,8 @@
return NULL;
}
 
+   WM_operator_bl_idname(idname_bl, idname);
+
if(shift) modifier |= KM_SHIFT;
if(ctrl) modifier |= KM_CTRL;
if(alt) modifier |= KM_ALT;
@@ -1063,7 +1066,7 @@
 
if(any) modifier = KM_ANY;
 
-   return WM_keymap_add_item(km, idname, type, value, modifier, 
keymodifier);
+   return WM_keymap_add_item(km, idname_bl, type, value, modifier, 
keymodifier);
 }
 
 static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km, bContext *C, 
ReportList *reports, const char *propvalue_str, int type, int value, int any, 
int shift, int ctrl, int alt, int oskey, int keymodifier)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37269] trunk/blender/release/scripts/ startup/bl_ui/properties_data_mesh.py: UI: rename mesh Settings panel to Texture Space, since it only contains

2011-06-06 Thread Brecht Van Lommel
Revision: 37269
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37269
Author:   blendix
Date: 2011-06-06 19:44:28 + (Mon, 06 Jun 2011)
Log Message:
---
UI: rename mesh Settings panel to Texture Space, since it only contains
settings related to that. Also close by default.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
===
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py 
2011-06-06 19:36:37 UTC (rev 37268)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py 
2011-06-06 19:44:28 UTC (rev 37269)
@@ -99,8 +99,9 @@
 split.prop(mesh, show_double_sided)
 
 
-class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel):
-bl_label = Settings
+class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
+bl_label = Texture Space
+bl_options = {'DEFAULT_CLOSED'}
 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 def draw(self, context):
@@ -109,11 +110,13 @@
 mesh = context.mesh
 
 layout.prop(mesh, texture_mesh)
+
+layout.separator()
+
 layout.prop(mesh, use_auto_texspace)
-
 row = layout.row()
-row.column().prop(mesh, texspace_location)
-row.column().prop(mesh, texspace_size)
+row.column().prop(mesh, texspace_location, text=Location)
+row.column().prop(mesh, texspace_size, text=Size)
 
 class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
 bl_label = Vertex Groups

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37272] trunk/blender/release/scripts/ startup/bl_ui/properties_render.py: UI: fix render properties panel order, it didn't match order in startup.ble

2011-06-06 Thread Brecht Van Lommel
Revision: 37272
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37272
Author:   blendix
Date: 2011-06-06 20:04:58 + (Mon, 06 Jun 2011)
Log Message:
---
UI: fix render properties panel order, it didn't match order in startup.blend,
so was different when opening a new property editor.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/properties_render.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_render.py
===
--- trunk/blender/release/scripts/startup/bl_ui/properties_render.py
2011-06-06 20:04:20 UTC (rev 37271)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_render.py
2011-06-06 20:04:58 UTC (rev 37272)
@@ -172,8 +172,130 @@
 row.prop(rl, exclude_refraction, text=)
 
 
+class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
+bl_label = Dimensions
+COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+def draw(self, context):
+layout = self.layout
+
+scene = context.scene
+rd = scene.render
+
+row = layout.row(align=True)
+row.menu(RENDER_MT_presets, 
text=bpy.types.RENDER_MT_presets.bl_label)
+row.operator(render.preset_add, text=, icon=ZOOMIN)
+row.operator(render.preset_add, text=, 
icon=ZOOMOUT).remove_active = True
+
+split = layout.split()
+
+col = split.column()
+sub = col.column(align=True)
+sub.label(text=Resolution:)
+sub.prop(rd, resolution_x, text=X)
+sub.prop(rd, resolution_y, text=Y)
+sub.prop(rd, resolution_percentage, text=)
+
+sub.label(text=Aspect Ratio:)
+sub.prop(rd, pixel_aspect_x, text=X)
+sub.prop(rd, pixel_aspect_y, text=Y)
+
+row = col.row()
+row.prop(rd, use_border, text=Border)
+sub = row.row()
+sub.active = rd.use_border
+sub.prop(rd, use_crop_to_border, text=Crop)
+
+col = split.column()
+sub = col.column(align=True)
+sub.label(text=Frame Range:)
+sub.prop(scene, frame_start, text=Start)
+sub.prop(scene, frame_end, text=End)
+sub.prop(scene, frame_step, text=Step)
+
+sub.label(text=Frame Rate:)
+if rd.fps_base == 1:
+fps_rate = round(rd.fps / rd.fps_base)
+else:
+fps_rate = round(rd.fps / rd.fps_base, 2)
+
+# TODO: Change the following to iterate over existing presets
+custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 
59.94, 60})
+
+if custom_framerate == True:
+fps_label_text = Custom ( + str(fps_rate) +  fps)
+else:
+fps_label_text = str(fps_rate) +  fps
+
+sub.menu(RENDER_MT_framerate_presets, text=fps_label_text)
+
+if custom_framerate or (bpy.types.RENDER_MT_framerate_presets.bl_label 
== Custom):
+sub.prop(rd, fps)
+sub.prop(rd, fps_base, text=/)
+subrow = sub.row(align=True)
+subrow.label(text=Time Remapping:)
+subrow = sub.row(align=True)
+subrow.prop(rd, frame_map_old, text=Old)
+subrow.prop(rd, frame_map_new, text=New)
+
+
+class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
+bl_label = Anti-Aliasing
+COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+def draw_header(self, context):
+rd = context.scene.render
+
+self.layout.prop(rd, use_antialiasing, text=)
+
+def draw(self, context):
+layout = self.layout
+
+rd = context.scene.render
+layout.active = rd.use_antialiasing
+
+split = layout.split()
+
+col = split.column()
+col.row().prop(rd, antialiasing_samples, expand=True)
+sub = col.row()
+sub.enabled = not rd.use_border
+sub.prop(rd, use_full_sample)
+
+col = split.column()
+col.prop(rd, pixel_filter_type, text=)
+col.prop(rd, filter_size, text=Size)
+
+
+class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
+bl_label = Sampled Motion Blur
+bl_options = {'DEFAULT_CLOSED'}
+COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+@classmethod
+def poll(cls, context):
+rd = context.scene.render
+return not rd.use_full_sample and (rd.engine in cls.COMPAT_ENGINES)
+
+def draw_header(self, context):
+rd = context.scene.render
+
+self.layout.prop(rd, use_motion_blur, text=)
+
+def draw(self, context):
+layout = self.layout
+
+rd = context.scene.render
+layout.active = rd.use_motion_blur
+
+row = layout.row()
+row.prop(rd, motion_blur_samples)
+row.prop(rd, motion_blur_shutter)
+
+
 class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
 bl_label = Shading
+bl_options = {'DEFAULT_CLOSED'}
 COMPAT_ENGINES = {'BLENDER_RENDER'}
 
 def draw(self, context):
@@ -276,6 +398,51 @@
 sub.prop(rd, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37273] branches/cycles/source/blender/ editors: Cycles: UI tweak some quick code to auto hide scrollbars.

2011-06-06 Thread Brecht Van Lommel
Revision: 37273
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37273
Author:   blendix
Date: 2011-06-06 20:07:08 + (Mon, 06 Jun 2011)
Log Message:
---
Cycles: UI tweak some quick code to auto hide scrollbars. Not happy with this
yet because it runs python draw functions twice when scrollers are showing.

Modified Paths:
--
branches/cycles/source/blender/editors/include/UI_interface.h
branches/cycles/source/blender/editors/interface/interface_panel.c
branches/cycles/source/blender/editors/interface/interface_style.c
branches/cycles/source/blender/editors/interface/view2d.c
branches/cycles/source/blender/editors/screen/area.c

Modified: branches/cycles/source/blender/editors/include/UI_interface.h
===
--- branches/cycles/source/blender/editors/include/UI_interface.h   
2011-06-06 20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/include/UI_interface.h   
2011-06-06 20:07:08 UTC (rev 37273)
@@ -583,6 +583,7 @@
 
 void uiBeginPanels(const struct bContext *C, struct ARegion *ar);
 void uiEndPanels(const struct bContext *C, struct ARegion *ar);
+void uiDrawPanels(const struct bContext *C, struct ARegion *ar);
 
 struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock 
*block, struct PanelType *pt, int *open);
 void uiEndPanel(uiBlock *block, int width, int height);

Modified: branches/cycles/source/blender/editors/interface/interface_panel.c
===
--- branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-06-06 20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-06-06 20:07:08 UTC (rev 37273)
@@ -846,7 +846,12 @@

if(firstpa)
firstpa-runtime_flag |= PNL_FIRST;
+}
 
+void uiDrawPanels(const bContext *C, ARegion *ar)
+{
+   uiBlock *block;
+
UI_ThemeClearColor(TH_BACK);

/* draw panels, selected on top */

Modified: branches/cycles/source/blender/editors/interface/interface_style.c
===
--- branches/cycles/source/blender/editors/interface/interface_style.c  
2011-06-06 20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/interface/interface_style.c  
2011-06-06 20:07:08 UTC (rev 37273)
@@ -122,7 +122,7 @@
style-buttonspacex= 8;
style-buttonspacey= 2;
style-panelspace= 8;
-   style-panelouter= 4;
+   style-panelouter= 3;

return style;
 }

Modified: branches/cycles/source/blender/editors/interface/view2d.c
===
--- branches/cycles/source/blender/editors/interface/view2d.c   2011-06-06 
20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/interface/view2d.c   2011-06-06 
20:07:08 UTC (rev 37273)
@@ -278,10 +278,9 @@
v2d-align= 
(V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
v2d-keeptot= V2D_KEEPTOT_BOUNDS;

-   /*v2d-scroll |= 
(V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+   v2d-scroll |= 
(V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
v2d-scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
-   v2d-scroll = ~V2D_SCROLL_VERTICAL_HIDE;*/
-   v2d-scroll= 0;
+   v2d-scroll = ~V2D_SCROLL_VERTICAL_HIDE;
 
v2d-tot.xmin= 0.0f;
v2d-tot.xmax= winx;
@@ -291,7 +290,7 @@

v2d-cur.xmin= 0.0f;
/* bad workaround for keeping zoom level with 
scrollers */
-   v2d-cur.xmax= (winx/* - 
V2D_SCROLL_WIDTH*/)*panelzoom;
+   v2d-cur.xmax= (winx - 
V2D_SCROLL_WIDTH)*panelzoom;

v2d-cur.ymax= 0.0f;
v2d-cur.ymin= (-winy)*panelzoom;

Modified: branches/cycles/source/blender/editors/screen/area.c
===
--- branches/cycles/source/blender/editors/screen/area.c2011-06-06 
20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/screen/area.c2011-06-06 
20:07:08 UTC (rev 37273)
@@ -1145,38 +1145,22 @@
 
 / standard UI regions /
 
-void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char 
*context, int contextnr)
+static void region_panels_layout(const bContext *C, ARegion *ar, int vertical, 
const char *context, int w, int em, int *r_x, int *r_y)
 {
ScrArea *sa= 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37324] branches/cycles: Cycles: texture tab in properties editor now shows dropdown for selecting

2011-06-08 Thread Brecht Van Lommel
Revision: 37324
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37324
Author:   blendix
Date: 2011-06-08 23:36:06 + (Wed, 08 Jun 2011)
Log Message:
---
Cycles: texture tab in properties editor now shows dropdown for selecting
texture users in the context. It's only useful for modifiers and brushes
at the moment, not for shading nodes as using texture datablocks there is
not yet supported.

Modified Paths:
--
branches/cycles/intern/cycles/blender/addon/ui.py
branches/cycles/source/blender/blenkernel/BKE_modifier.h
branches/cycles/source/blender/blenkernel/intern/modifier.c
branches/cycles/source/blender/blenloader/intern/readfile.c
branches/cycles/source/blender/editors/include/UI_interface.h
branches/cycles/source/blender/editors/space_buttons/CMakeLists.txt
branches/cycles/source/blender/editors/space_buttons/buttons_context.c
branches/cycles/source/blender/editors/space_buttons/buttons_intern.h
branches/cycles/source/blender/editors/space_buttons/space_buttons.c
branches/cycles/source/blender/makesdna/DNA_space_types.h
branches/cycles/source/blender/makesrna/intern/rna_ui_api.c
branches/cycles/source/blender/modifiers/intern/MOD_armature.c
branches/cycles/source/blender/modifiers/intern/MOD_array.c
branches/cycles/source/blender/modifiers/intern/MOD_bevel.c
branches/cycles/source/blender/modifiers/intern/MOD_boolean.c
branches/cycles/source/blender/modifiers/intern/MOD_build.c
branches/cycles/source/blender/modifiers/intern/MOD_cast.c
branches/cycles/source/blender/modifiers/intern/MOD_cloth.c
branches/cycles/source/blender/modifiers/intern/MOD_collision.c
branches/cycles/source/blender/modifiers/intern/MOD_curve.c
branches/cycles/source/blender/modifiers/intern/MOD_decimate.c
branches/cycles/source/blender/modifiers/intern/MOD_displace.c
branches/cycles/source/blender/modifiers/intern/MOD_edgesplit.c
branches/cycles/source/blender/modifiers/intern/MOD_explode.c
branches/cycles/source/blender/modifiers/intern/MOD_fluidsim.c
branches/cycles/source/blender/modifiers/intern/MOD_hook.c
branches/cycles/source/blender/modifiers/intern/MOD_lattice.c
branches/cycles/source/blender/modifiers/intern/MOD_mask.c
branches/cycles/source/blender/modifiers/intern/MOD_meshdeform.c
branches/cycles/source/blender/modifiers/intern/MOD_mirror.c
branches/cycles/source/blender/modifiers/intern/MOD_multires.c
branches/cycles/source/blender/modifiers/intern/MOD_none.c
branches/cycles/source/blender/modifiers/intern/MOD_particleinstance.c
branches/cycles/source/blender/modifiers/intern/MOD_particlesystem.c
branches/cycles/source/blender/modifiers/intern/MOD_screw.c
branches/cycles/source/blender/modifiers/intern/MOD_shapekey.c
branches/cycles/source/blender/modifiers/intern/MOD_shrinkwrap.c
branches/cycles/source/blender/modifiers/intern/MOD_simpledeform.c
branches/cycles/source/blender/modifiers/intern/MOD_smoke.c
branches/cycles/source/blender/modifiers/intern/MOD_smooth.c
branches/cycles/source/blender/modifiers/intern/MOD_softbody.c
branches/cycles/source/blender/modifiers/intern/MOD_solidify.c
branches/cycles/source/blender/modifiers/intern/MOD_subsurf.c
branches/cycles/source/blender/modifiers/intern/MOD_surface.c
branches/cycles/source/blender/modifiers/intern/MOD_uvproject.c
branches/cycles/source/blender/modifiers/intern/MOD_warp.c
branches/cycles/source/blender/modifiers/intern/MOD_wave.c
branches/cycles/source/blender/nodes/SHD_node.h

Added Paths:
---
branches/cycles/source/blender/editors/space_buttons/buttons_texture.c

Modified: branches/cycles/intern/cycles/blender/addon/ui.py
===
--- branches/cycles/intern/cycles/blender/addon/ui.py   2011-06-08 21:18:03 UTC 
(rev 37323)
+++ branches/cycles/intern/cycles/blender/addon/ui.py   2011-06-08 23:36:06 UTC 
(rev 37324)
@@ -97,22 +97,22 @@
col.prop(cycles, debug_text_timeout)
 
 class Cycles_PT_post_processing(CyclesButtonsPanel, bpy.types.Panel):
-bl_label = Post Processing
-bl_options = {'DEFAULT_CLOSED'}
+   bl_label = Post Processing
+   bl_options = {'DEFAULT_CLOSED'}
 
-def draw(self, context):
-layout = self.layout
+   def draw(self, context):
+   layout = self.layout
 
-rd = context.scene.render
+   rd = context.scene.render
 
-split = layout.split()
+   split = layout.split()
 
-col = split.column()
-col.prop(rd, use_compositing)
-col.prop(rd, use_sequencer)
+   col = split.column()
+   col.prop(rd, use_compositing)
+   col.prop(rd, use_sequencer)
 
-col = split.column()
-col.prop(rd, dither_intensity, text=Dither, slider=True)
+   col = 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37325] branches/cycles/source/blender/ editors/interface/interface_widgets.c: Cycles UI: bring default theme colors in line with startup.blend.

2011-06-08 Thread Brecht Van Lommel
Revision: 37325
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37325
Author:   blendix
Date: 2011-06-08 23:36:56 + (Wed, 08 Jun 2011)
Log Message:
---
Cycles UI: bring default theme colors in line with startup.blend.

Modified Paths:
--
branches/cycles/source/blender/editors/interface/interface_widgets.c

Modified: branches/cycles/source/blender/editors/interface/interface_widgets.c
===
--- branches/cycles/source/blender/editors/interface/interface_widgets.c
2011-06-08 23:36:06 UTC (rev 37324)
+++ branches/cycles/source/blender/editors/interface/interface_widgets.c
2011-06-08 23:36:56 UTC (rev 37325)
@@ -1210,7 +1210,7 @@
 
 static struct uiWidgetColors wcol_num= {
{25, 25, 25, 255},
-   {180, 180, 180, 255},
+   {160, 160, 160, 255},
{153, 153, 153, 255},
{90, 90, 90, 255},

@@ -1218,12 +1218,12 @@
{255, 255, 255, 255},

1,
-   -20, 0
+   -5, 0
 };
 
 static struct uiWidgetColors wcol_numslider= {
{25, 25, 25, 255},
-   {180, 180, 180, 255},
+   {160, 160, 160, 255},
{153, 153, 153, 255},
{128, 128, 128, 255},

@@ -1231,7 +1231,7 @@
{255, 255, 255, 255},

1,
-   -20, 0
+   -5, 0
 };
 
 static struct uiWidgetColors wcol_text= {
@@ -1244,20 +1244,20 @@
{255, 255, 255, 255},

1,
-   0, 25
+   0, 5
 };
 
 static struct uiWidgetColors wcol_option= {
{0, 0, 0, 255},
-   {70, 70, 70, 255},
-   {70, 70, 70, 255},
+   {60, 60, 60, 255},
+   {60, 60, 60, 255},
{255, 255, 255, 255},

{0, 0, 0, 255},
{255, 255, 255, 255},

1,
-   15, -15
+   5, -5
 };
 
 /* button that shows popup */
@@ -1265,13 +1265,13 @@
{0, 0, 0, 255},
{70, 70, 70, 255},
{70, 70, 70, 255},
-   {255, 255, 255, 255},
+   {45, 45, 45, 255},

{255, 255, 255, 255},
{204, 204, 204, 255},

1,
-   15, -15
+   5, -5
 };
 
 /* button that starts pulldown */
@@ -1298,7 +1298,7 @@
{255, 255, 255, 255},
{0, 0, 0, 255},

-   1,
+   0,
38, 0
 };
 
@@ -1323,11 +1323,11 @@
{86, 128, 194, 255},
{255, 255, 255, 255},

-   {255, 255, 255, 255},
+   {230, 230, 230, 255},
{0, 0, 0, 255},

1,
-   15, -15
+   5, -5
 };
 
 static struct uiWidgetColors wcol_regular= {
@@ -1353,7 +1353,7 @@
{255, 255, 255, 255},

1,
-   15, -15
+   5, -5
 };
 
 static struct uiWidgetColors wcol_box= {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37366] branches/cycles/source/blender/ editors/space_buttons/space_buttons.c: Cycles: fix crash splitting/ joining properties editor.

2011-06-10 Thread Brecht Van Lommel
Revision: 37366
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37366
Author:   blendix
Date: 2011-06-10 12:45:11 + (Fri, 10 Jun 2011)
Log Message:
---
Cycles: fix crash splitting/joining properties editor.

Modified Paths:
--
branches/cycles/source/blender/editors/space_buttons/space_buttons.c

Modified: branches/cycles/source/blender/editors/space_buttons/space_buttons.c
===
--- branches/cycles/source/blender/editors/space_buttons/space_buttons.c
2011-06-10 12:43:06 UTC (rev 37365)
+++ branches/cycles/source/blender/editors/space_buttons/space_buttons.c
2011-06-10 12:45:11 UTC (rev 37366)
@@ -135,6 +135,7 @@
/* clear or remove stuff from old */
sbutsn-ri= NULL;
sbutsn-path= NULL;
+   sbutsn-texuser= NULL;

return (SpaceLink *)sbutsn;
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37369] branches/cycles/source/blender: Cycles: quick GLSL stubs for new material nodes, so they show something.

2011-06-10 Thread Brecht Van Lommel
Revision: 37369
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37369
Author:   blendix
Date: 2011-06-10 13:22:55 + (Fri, 10 Jun 2011)
Log Message:
---
Cycles: quick GLSL stubs for new material nodes, so they show something.

BSDFs and procedural textures show mostly as diffuse and white, geometry
and texture coordinates are incomplete.

Modified Paths:
--
branches/cycles/source/blender/blenkernel/intern/node.c
branches/cycles/source/blender/gpu/intern/gpu_draw.c
branches/cycles/source/blender/gpu/intern/gpu_shader_material.glsl
branches/cycles/source/blender/gpu/intern/gpu_shader_material.glsl.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_add_closure.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_anisotropic.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_diffuse.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glass.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_glossy.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_translucent.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_transparent.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_bsdf_velvet.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_emission.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_fresnel.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_geometry.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_light_path.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_mix_closure.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_output_material.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_blend.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_clouds.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_coord.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_distnoise.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_magic.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_marble.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_musgrave.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_noise.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_sky.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_stucci.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_voronoi.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_wood.c

Modified: branches/cycles/source/blender/blenkernel/intern/node.c
===
--- branches/cycles/source/blender/blenkernel/intern/node.c 2011-06-10 
13:06:51 UTC (rev 37368)
+++ branches/cycles/source/blender/blenkernel/intern/node.c 2011-06-10 
13:22:55 UTC (rev 37369)
@@ -3114,6 +3114,8 @@
gs[i].type= GPU_VEC3;
else if (sock-type == SOCK_RGBA)
gs[i].type= GPU_VEC4;
+   else if (sock-type == SOCK_CLOSURE)
+   gs[i].type= GPU_VEC4;
else
gs[i].type= GPU_NONE;
 

Modified: branches/cycles/source/blender/gpu/intern/gpu_draw.c
===
--- branches/cycles/source/blender/gpu/intern/gpu_draw.c2011-06-10 
13:06:51 UTC (rev 37368)
+++ branches/cycles/source/blender/gpu/intern/gpu_draw.c2011-06-10 
13:22:55 UTC (rev 37369)
@@ -1189,6 +1189,7 @@
 
 int GPU_default_lights(void)
 {
+   float zero[3] = {0.0f, 0.0f, 0.0f};
int a, count = 0;

/* initialize */
@@ -1214,27 +1215,25 @@
 
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE);
 
-   glLightfv(GL_LIGHT0, GL_POSITION, U.light[0].vec); 
-   glLightfv(GL_LIGHT0, GL_DIFFUSE, U.light[0].col); 
-   glLightfv(GL_LIGHT0, GL_SPECULAR, U.light[0].spec); 
-
-   glLightfv(GL_LIGHT1, GL_POSITION, U.light[1].vec); 
-   glLightfv(GL_LIGHT1, GL_DIFFUSE, U.light[1].col); 
-   glLightfv(GL_LIGHT1, GL_SPECULAR, U.light[1].spec); 
-
-   glLightfv(GL_LIGHT2, GL_POSITION, U.light[2].vec); 
-   glLightfv(GL_LIGHT2, GL_DIFFUSE, U.light[2].col); 
-   glLightfv(GL_LIGHT2, GL_SPECULAR, U.light[2].spec); 
-
for(a=0; a8; a++) {
if(a3) {
if(U.light[a].flag) {
glEnable(GL_LIGHT0+a);
+   
+   glLightfv(GL_LIGHT0+a, GL_POSITION, 
U.light[a].vec); 
+   glLightfv(GL_LIGHT0+a, GL_DIFFUSE, 
U.light[a].col); 
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37371] branches/cycles/source/blender/ nodes/intern/SHD_nodes: Cycles: GLSL error fix for image and environment nodes with no datablock assigned.

2011-06-10 Thread Brecht Van Lommel
Revision: 37371
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37371
Author:   blendix
Date: 2011-06-10 16:41:31 + (Fri, 10 Jun 2011)
Log Message:
---
Cycles: GLSL error fix for image and environment nodes with no datablock 
assigned.

Modified Paths:
--
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c

Modified: 
branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c
===
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c 
2011-06-10 14:03:51 UTC (rev 37370)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c 
2011-06-10 16:41:31 UTC (rev 37371)
@@ -58,6 +58,9 @@
Image *ima= (Image*)node-id;
ImageUser *iuser= NULL;
 
+   if(!ima)
+   return 0;
+
return GPU_stack_link(mat, node_tex_environment, in, out, 
GPU_image(ima, iuser));
 }
 

Modified: branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c
===
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c   
2011-06-10 14:03:51 UTC (rev 37370)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c   
2011-06-10 16:41:31 UTC (rev 37371)
@@ -58,6 +58,9 @@
Image *ima= (Image*)node-id;
ImageUser *iuser= NULL;
 
+   if(!ima)
+   return 0;
+
return GPU_stack_link(mat, node_tex_image, in, out, GPU_image(ima, 
iuser));
 }
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37376] branches/cycles: Cycles: button to switch to texture tab from e.g.

2011-06-10 Thread Brecht Van Lommel
Revision: 37376
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37376
Author:   blendix
Date: 2011-06-10 18:17:34 + (Fri, 10 Jun 2011)
Log Message:
---
Cycles: button to switch to texture tab from e.g. modifiers and field, with the
relevant texture selected, and some cosmetic tweaks to the menu.

Modified Paths:
--
branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/cycles/release/scripts/startup/bl_ui/properties_physics_field.py
branches/cycles/source/blender/editors/include/UI_interface.h
branches/cycles/source/blender/editors/interface/interface_templates.c
branches/cycles/source/blender/editors/space_buttons/buttons_texture.c

Modified: 
branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py
===
--- branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py   
2011-06-10 17:17:25 UTC (rev 37375)
+++ branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py   
2011-06-10 18:17:34 UTC (rev 37376)
@@ -666,7 +666,7 @@
 split = layout.split()
 col = split.column()
 col.label(text=Texture:)
-col.prop(md, texture, text=)
+col.template_ID(md, texture, new=texture.new)
 
 col = split.column()
 col.label(text=Texture Coordinates:)

Modified: 
branches/cycles/release/scripts/startup/bl_ui/properties_physics_field.py
===
--- branches/cycles/release/scripts/startup/bl_ui/properties_physics_field.py   
2011-06-10 17:17:25 UTC (rev 37375)
+++ branches/cycles/release/scripts/startup/bl_ui/properties_physics_field.py   
2011-06-10 18:17:34 UTC (rev 37376)
@@ -61,6 +61,10 @@
 split = layout.split(percentage=0.2)
 split.label(text=Shape:)
 split.prop(field, shape, text=)
+elif field.type == 'TEXTURE':
+split = layout.split(percentage=0.2)
+split.label(text=Texture:)
+split.row().template_ID(field, texture, new=texture.new)
 
 split = layout.split()
 
@@ -103,7 +107,6 @@
 elif field.type == 'TEXTURE':
 col = split.column()
 col.prop(field, strength)
-col.prop(field, texture, text=)
 col.prop(field, texture_mode, text=)
 col.prop(field, texture_nabla)
 

Modified: branches/cycles/source/blender/editors/include/UI_interface.h
===
--- branches/cycles/source/blender/editors/include/UI_interface.h   
2011-06-10 17:17:25 UTC (rev 37375)
+++ branches/cycles/source/blender/editors/include/UI_interface.h   
2011-06-10 18:17:34 UTC (rev 37376)
@@ -730,6 +730,7 @@
 void uiTemplateNodeLink(uiLayout *layout, struct ID *id, struct bNodeTree 
*ntree, struct bNode *node, struct bNodeSocket *input);
 void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct ID *id, 
struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
 void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
+void uiTemplateTextureShow(uiLayout *layout, struct bContext *C, struct 
PointerRNA *ptr, struct PropertyRNA *prop);
 
 /* items */
 void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);

Modified: branches/cycles/source/blender/editors/interface/interface_templates.c
===
--- branches/cycles/source/blender/editors/interface/interface_templates.c  
2011-06-10 17:17:25 UTC (rev 37375)
+++ branches/cycles/source/blender/editors/interface/interface_templates.c  
2011-06-10 18:17:34 UTC (rev 37376)
@@ -325,7 +325,7 @@
return Browse ID data to be linked;
 }
 
-static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, 
StructRNA *type, int flag, const char *newop, const char *openop, const char 
*unlinkop)
+static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, 
StructRNA *type, short idcode, int flag, const char *newop, const char *openop, 
const char *unlinkop)
 {
uiBut *but;
uiBlock *block;
@@ -470,6 +470,9 @@
if((idfrom  idfrom-lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
+
+   if(idcode == ID_TE)
+   uiTemplateTextureShow(layout, C, template-ptr, 
template-prop);

uiBlockEndAlign(block);
 }
@@ -479,6 +482,7 @@
TemplateID *template;
PropertyRNA *prop;
StructRNA *type;
+   short idcode;
 
prop= RNA_struct_find_property(ptr, propname);
 
@@ -499,14 +503,15 @@
flag |= UI_ID_OPEN;
 
type= RNA_property_pointer_type(ptr, prop);
-   template-idlb= which_libbase(CTX_data_main(C), 
RNA_type_to_ID_code(type));
+   idcode= RNA_type_to_ID_code(type);
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37446] trunk/blender/source/gameengine/ GameLogic: Fix #27635: GLSL filter uniform variable not set for group instance.

2011-06-13 Thread Brecht Van Lommel
Revision: 37446
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37446
Author:   blendix
Date: 2011-06-13 11:36:25 + (Mon, 13 Jun 2011)
Log Message:
---
Fix #27635: GLSL filter uniform variable not set for group instance.

The problem was that SCA_2DFilterActuator was defining and using a
variable called m_gameObj, when it should be using m_gameobj as
defined by SCA_ILogicBrick. The way it was, reparenting did only half
the work required to duplicate the actuator.

Patch by Alex Fraser, thanks!

Modified Paths:
--
trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.h

Modified: trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
===
--- trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp  
2011-06-13 09:33:27 UTC (rev 37445)
+++ trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp  
2011-06-13 11:36:25 UTC (rev 37446)
@@ -55,10 +55,10 @@
 m_rasterizer(rasterizer),
 m_scene(scene)
 {
-   m_gameObj = NULL;
+   m_gameobj = NULL;
if(gameobj){
m_propNames = gameobj-GetPropertyNames();
-   m_gameObj = gameobj;
+   m_gameobj = gameobj;
}
 }
 
@@ -91,7 +91,7 @@
}
else if(m_type  RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS)
{
-   m_scene-Update2DFilter(m_propNames, m_gameObj, m_type, 
m_int_arg, m_shaderText);
+   m_scene-Update2DFilter(m_propNames, m_gameobj, m_type, 
m_int_arg, m_shaderText);
}
// once the filter is in place, no need to update it again = disable 
the actuator
 return false;

Modified: trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.h
===
--- trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.h
2011-06-13 09:33:27 UTC (rev 37445)
+++ trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.h
2011-06-13 11:36:25 UTC (rev 37446)
@@ -42,7 +42,6 @@
 
 private:
vectorSTR_String m_propNames;
-   void * m_gameObj;
RAS_2DFilterManager::RAS_2DFILTER_MODE m_type;
short m_disableMotionBlur;
float m_float_arg;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37448] trunk/blender/source/blender: Fix #27594: non-active object in weight paint mode doesn't free memory.

2011-06-13 Thread Brecht Van Lommel
Revision: 37448
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37448
Author:   blendix
Date: 2011-06-13 12:03:13 + (Mon, 13 Jun 2011)
Log Message:
---
Fix #27594: non-active object in weight paint mode doesn't free memory.
Also removed some commented out 2.4x code that is already replaced.

Modified Paths:
--
trunk/blender/source/blender/editors/util/ed_util.c
trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c

Modified: trunk/blender/source/blender/editors/util/ed_util.c
===
--- trunk/blender/source/blender/editors/util/ed_util.c 2011-06-13 12:03:05 UTC 
(rev 37447)
+++ trunk/blender/source/blender/editors/util/ed_util.c 2011-06-13 12:03:13 UTC 
(rev 37448)
@@ -106,10 +106,6 @@
if(sce-obedit) {
Object *ob= sce-obedit;

-   /* global in meshtools... */
-   mesh_octree_table(NULL, NULL, NULL, 'e');
-   mesh_mirrtopo_table(NULL, 'e');
-   
if(ob) {
if(ob-type==OB_MESH) {
Mesh *me= ob-data;
@@ -122,26 +118,13 @@
else if(ob-type==OB_ARMATURE) {
ED_armature_edit_free(ob);
}
-   else if(ob-type==OB_FONT) {
-   //  free_editText();
-   }
-   //  else if(ob-type==OB_MBALL) 
-   //  
BLI_freelistN(editelems);
-   //  free_editLatt();
-   //  free_posebuf(); // XXX this is 
still a global...
}
}
-   else if(sce-basact  sce-basact-object) {
-   Object *ob= sce-basact-object;
-   
-   /* if weight-painting is on, free mesh octree data */
-   if(ob-mode  OB_MODE_WEIGHT_PAINT) {
-   mesh_octree_table(NULL, NULL, NULL, 'e');
-   mesh_mirrtopo_table(NULL, 'e');
-   }
-   }
}
-   
+
+   /* global in meshtools... */
+   mesh_octree_table(NULL, NULL, NULL, 'e');
+   mesh_mirrtopo_table(NULL, 'e');
 }
 
 

Modified: trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
2011-06-13 12:03:05 UTC (rev 37447)
+++ trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
2011-06-13 12:03:13 UTC (rev 37448)
@@ -328,7 +328,6 @@
 
 /* bad stuff*/
 
-extern ListBase editelems;
 extern wchar_t *copybuf;
 extern wchar_t *copybufinfo;
 
@@ -394,10 +393,6 @@
free_anim_drivers_copybuf();
free_fmodifiers_copybuf();
free_posebuf();
-// free_vertexpaint();
-// free_imagepaint();
-   
-// fsmenu_free();
 
BLF_exit();

@@ -420,10 +415,6 @@
BPY_python_end();
 #endif
 
-   if (!G.background) {
-// XXX UI_filelist_free_icons();
-   }
-   
GPU_buffer_pool_free(NULL);
GPU_free_unused_buffers();
GPU_extensions_exit();

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37451] trunk/blender/source/blender/ editors/object/object_modifier.c: Fix #27570: apply button for modifiers required the modifier to be enabled, we

2011-06-13 Thread Brecht Van Lommel
Revision: 37451
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37451
Author:   blendix
Date: 2011-06-13 14:11:29 + (Mon, 13 Jun 2011)
Log Message:
---
Fix #27570: apply button for modifiers required the modifier to be enabled, we
now just enable the modifier before apply.

Patch Bastien Montagne (with some tweaks), thanks!

Modified Paths:
--
trunk/blender/source/blender/editors/object/object_modifier.c

Modified: trunk/blender/source/blender/editors/object/object_modifier.c
===
--- trunk/blender/source/blender/editors/object/object_modifier.c   
2011-06-13 13:54:21 UTC (rev 37450)
+++ trunk/blender/source/blender/editors/object/object_modifier.c   
2011-06-13 14:11:29 UTC (rev 37451)
@@ -399,6 +399,13 @@
 
 static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, 
ModifierData *md)
 {
+   ModifierTypeInfo *mti= modifierType_getInfo(md-type);
+
+   if (mti-isDisabled  mti-isDisabled(md, 0)) {
+   BKE_report(reports, RPT_ERROR, Modifier is disabled, skipping 
apply);
+   return 0;
+   }
+
if (ob-type==OB_MESH) {
DerivedMesh *dm;
Mesh *me= ob-data;
@@ -442,7 +449,7 @@
 {
ModifierTypeInfo *mti= modifierType_getInfo(md-type);
 
-   if (!(md-modeeModifierMode_Realtime) || (mti-isDisabled  
mti-isDisabled(md, 0))) {
+   if (mti-isDisabled  mti-isDisabled(md, 0)) {
BKE_report(reports, RPT_ERROR, Modifier is disabled, skipping 
apply);
return 0;
}
@@ -484,7 +491,7 @@
CustomData_free_layer_active(me-fdata, 
CD_MDISPS, me-totface);
}
}
-   } 
+   }
else if (ELEM(ob-type, OB_CURVE, OB_SURF)) {
Curve *cu;
int numVerts;
@@ -530,6 +537,8 @@
 
 int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, 
ModifierData *md, int mode)
 {
+   int prev_mode;
+
if (scene-obedit) {
BKE_report(reports, RPT_ERROR, Modifiers cannot be applied in 
editmode);
return 0;
@@ -541,12 +550,20 @@
if (md!=ob-modifiers.first)
BKE_report(reports, RPT_INFO, Applied modifier was not first, 
result may not be as expected.);
 
+   /* allow apply of a not-realtime modifier, by first re-enabling 
realtime. */
+   prev_mode= md-mode;
+   md-mode |= eModifierMode_Realtime;
+
if (mode == MODIFIER_APPLY_SHAPE) {
-   if (!modifier_apply_shape(reports, scene, ob, md))
+   if (!modifier_apply_shape(reports, scene, ob, md)) {
+   md-mode= prev_mode;
return 0;
+   }
} else {
-   if (!modifier_apply_obdata(reports, scene, ob, md))
+   if (!modifier_apply_obdata(reports, scene, ob, md)) {
+   md-mode= prev_mode;
return 0;
+   }
}
 
BLI_remlink(ob-modifiers, md);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37453] trunk/blender/source/blender/ render/intern/source: Fix #27540: bug with bump mapping + reflection texture coordinates + nodes.

2011-06-13 Thread Brecht Van Lommel
Revision: 37453
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37453
Author:   blendix
Date: 2011-06-13 14:56:47 + (Mon, 13 Jun 2011)
Log Message:
---
Fix #27540: bug with bump mapping + reflection texture coordinates + nodes.

Modified Paths:
--
trunk/blender/source/blender/render/intern/source/render_texture.c
trunk/blender/source/blender/render/intern/source/shadeinput.c

Modified: trunk/blender/source/blender/render/intern/source/render_texture.c
===
--- trunk/blender/source/blender/render/intern/source/render_texture.c  
2011-06-13 14:55:39 UTC (rev 37452)
+++ trunk/blender/source/blender/render/intern/source/render_texture.c  
2011-06-13 14:56:47 UTC (rev 37453)
@@ -2192,6 +2192,7 @@
}
}
else if(mtex-texco==TEXCO_REFL) {
+   calc_R_ref(shi);
co= shi-ref; dx= shi-dxref; dy= shi-dyref;
}
else if(mtex-texco==TEXCO_NORM) {
@@ -2509,9 +2510,6 @@
shi-orn[0]= -shi-vn[0];
shi-orn[1]= -shi-vn[1];
shi-orn[2]= -shi-vn[2];
-   
-   /* reflection vector */
-   calc_R_ref(shi);
}
}
 

Modified: trunk/blender/source/blender/render/intern/source/shadeinput.c
===
--- trunk/blender/source/blender/render/intern/source/shadeinput.c  
2011-06-13 14:55:39 UTC (rev 37452)
+++ trunk/blender/source/blender/render/intern/source/shadeinput.c  
2011-06-13 14:56:47 UTC (rev 37453)
@@ -543,11 +543,6 @@
shi-orn[2]= -shi-vn[2];
}
 
-   if(texco  TEXCO_REFL) {
-   /* mirror reflection color textures (and envmap) */
-   calc_R_ref(shi);/* wrong location for normal maps! 
XX */
-   }
-
if(texco  TEXCO_STRESS) {
/* not supported */
}
@@ -1205,11 +1200,6 @@
shi-orn[2]= -shi-vn[2];
}

-   if(texco  TEXCO_REFL) {
-   /* mirror reflection color textures (and envmap) */
-   calc_R_ref(shi);/* wrong location for normal 
maps! XX */
-   }
-   
if(texco  TEXCO_STRESS) {
float *s1, *s2, *s3;


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


<    4   5   6   7   8   9   10   11   12   13   >