Revision: 42533
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42533
Author:   nazgul
Date:     2011-12-09 10:02:01 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
Merging r42482 through r42532 from trunk into soc-2011-tomato

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42482
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42532

Modified Paths:
--------------
    branches/soc-2011-tomato/SConstruct
    branches/soc-2011-tomato/build_files/scons/tools/Blender.py
    branches/soc-2011-tomato/intern/cycles/blender/blender_mesh.cpp
    branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp
    branches/soc-2011-tomato/intern/cycles/blender/blender_shader.cpp
    branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp
    branches/soc-2011-tomato/intern/cycles/blender/blender_sync.h
    branches/soc-2011-tomato/intern/cycles/kernel/SConscript
    branches/soc-2011-tomato/intern/cycles/render/mesh.cpp
    branches/soc-2011-tomato/intern/cycles/render/sobol.cpp
    branches/soc-2011-tomato/intern/cycles/render/sobol.h
    
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/default.py
    
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/fast_motion.py
    
branches/soc-2011-tomato/release/scripts/startup/bl_operators/object_randomize_transform.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_deform.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_mesh.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/armature.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/deform.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mesh_validate.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/unit.c
    branches/soc-2011-tomato/source/blender/editors/animation/anim_ipo_utils.c
    branches/soc-2011-tomato/source/blender/editors/animation/keyframing.c
    branches/soc-2011-tomato/source/blender/editors/armature/editarmature.c
    branches/soc-2011-tomato/source/blender/editors/armature/poseobject.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/resources.c
    branches/soc-2011-tomato/source/blender/editors/object/object_select.c
    branches/soc-2011-tomato/source/blender/editors/object/object_vgroup.c
    branches/soc-2011-tomato/source/blender/editors/render/render_internal.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_vertex.c
    
branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_tree.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_snap.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_view.c
    branches/soc-2011-tomato/source/blender/gpu/GPU_draw.h
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_draw.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_hook.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_mask.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvg_util.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_gesture.c
    branches/soc-2011-tomato/source/gameengine/Converter/BL_SkinDeformer.cpp

Added Paths:
-----------
    
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/blurry_footage.py

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-42481
   + /branches/soc-2011-cucumber:37517
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-42532

Modified: branches/soc-2011-tomato/SConstruct
===================================================================
--- branches/soc-2011-tomato/SConstruct 2011-12-09 09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/SConstruct 2011-12-09 10:02:01 UTC (rev 42533)
@@ -119,6 +119,12 @@
 if tempbitness in (32, 64): # only set if 32 or 64 has been given
     bitness = int(tempbitness)
 
+if bitness:
+    B.bitness = bitness
+else: 
+    B.bitness = tempbitness
+    
+
 # first check cmdline for toolset and we create env to work on
 quickie = B.arguments.get('BF_QUICK', None)
 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)

Modified: branches/soc-2011-tomato/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/tools/Blender.py 2011-12-09 
09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/build_files/scons/tools/Blender.py 2011-12-09 
10:02:01 UTC (rev 42533)
@@ -50,6 +50,7 @@
 arguments = None
 targets = None
 resources = []
+bitness = 0
 
 #some internals
 blenderdeps = [] # don't manipulate this one outside this module!

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_mesh.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_mesh.cpp     
2011-12-09 09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_mesh.cpp     
2011-12-09 10:02:01 UTC (rev 42533)
@@ -233,9 +233,9 @@
        BL::Object::material_slots_iterator slot;
        for(b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); 
++slot) {
                if(render_layer.material_override)
-                       find_shader(render_layer.material_override, 
used_shaders);
+                       find_shader(render_layer.material_override, 
used_shaders, scene->default_surface);
                else
-                       find_shader(slot->material(), used_shaders);
+                       find_shader(slot->material(), used_shaders, 
scene->default_surface);
        }
 
        if(used_shaders.size() == 0)

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp   
2011-12-09 09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp   
2011-12-09 10:02:01 UTC (rev 42533)
@@ -137,7 +137,7 @@
        /* shader */
        vector<uint> used_shaders;
 
-       find_shader(b_lamp, used_shaders);
+       find_shader(b_lamp, used_shaders, scene->default_light);
 
        if(used_shaders.size() == 0)
                used_shaders.push_back(scene->default_light);

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_shader.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_shader.cpp   
2011-12-09 09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_shader.cpp   
2011-12-09 10:02:01 UTC (rev 42533)
@@ -36,9 +36,9 @@
 
 /* Find */
 
-void BlenderSync::find_shader(BL::ID id, vector<uint>& used_shaders)
+void BlenderSync::find_shader(BL::ID id, vector<uint>& used_shaders, int 
default_shader)
 {
-       Shader *shader = shader_map.find(id);
+       Shader *shader = (id)? shader_map.find(id): 
scene->shaders[default_shader];
 
        for(size_t i = 0; i < scene->shaders.size(); i++) {
                if(scene->shaders[i] == shader) {

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp     
2011-12-09 09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp     
2011-12-09 10:02:01 UTC (rev 42533)
@@ -269,7 +269,7 @@
                if(!experimental || RNA_enum_get(&cscene, "gpu_type") == 0)
                        dtype = DEVICE_CUDA;
                else
-                       dtype = DEVICE_CUDA;
+                       dtype = DEVICE_OPENCL;
 
                if(device_type_available(types, dtype))
                        params.device_type = dtype;

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_sync.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_sync.h       
2011-12-09 09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_sync.h       
2011-12-09 10:02:01 UTC (rev 42533)
@@ -81,7 +81,7 @@
        void sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, 
Transform& tfm);
 
        /* util */
-       void find_shader(BL::ID id, vector<uint>& used_shaders);
+       void find_shader(BL::ID id, vector<uint>& used_shaders, int 
default_shader);
        bool object_is_modified(BL::Object b_ob);
        bool object_is_mesh(BL::Object b_ob);
        bool object_is_light(BL::Object b_ob);

Modified: branches/soc-2011-tomato/intern/cycles/kernel/SConscript
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/SConscript    2011-12-09 
09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/kernel/SConscript    2011-12-09 
10:02:01 UTC (rev 42533)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 import sys
 import os
+import Blender as B
 
 def normpath(path):
     return os.path.abspath(os.path.normpath(path))
@@ -9,6 +10,12 @@
 
 kernel_binaries = []
 
+#Bitness
+if B.bitness == 32:
+    bits = 32
+else:
+    bits = 64
+
 if env['WITH_BF_CYCLES_CUDA_BINARIES']:
     kernel = env.Clone()
 
@@ -27,7 +34,8 @@
     svm_dir = os.path.join(source_dir, "../svm")
 
     # nvcc flags
-    nvcc_flags = "--cubin -use_fast_math --ptxas-options=\"-v\" 
--maxrregcount=24"
+    nvcc_flags = "-m%s" % (bits)
+    nvcc_flags += " --cubin -use_fast_math --ptxas-options=\"-v\" 
--maxrregcount=24"
     nvcc_flags += " --opencc-options -OPT:Olimit=0"
     nvcc_flags += " -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC"
     nvcc_flags += " -I \"%s\" -I \"%s\"" % (util_dir, svm_dir)

Modified: branches/soc-2011-tomato/intern/cycles/render/mesh.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/mesh.cpp      2011-12-09 
09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/render/mesh.cpp      2011-12-09 
10:02:01 UTC (rev 42533)
@@ -270,15 +270,19 @@
 void Mesh::tag_update(Scene *scene, bool rebuild)
 {
        need_update = true;
-       if(rebuild)
+
+       if(rebuild) {
                need_update_rebuild = true;
+               scene->light_manager->need_update = true;
+       }
+       else {
+               foreach(uint sindex, used_shaders)
+                       if(scene->shaders[sindex]->has_surface_emission)
+                               scene->light_manager->need_update = true;
+       }
 
        scene->mesh_manager->need_update = true;
        scene->object_manager->need_update = true;
-
-       foreach(uint sindex, used_shaders)
-               if(scene->shaders[sindex]->has_surface_emission)
-                       scene->light_manager->need_update = true;
 }
 
 /* Mesh Manager */
@@ -685,9 +689,9 @@
                        if(!mesh->transform_applied) {
                                string msg = "Updating Mesh BVH ";
                                if(mesh->name == "")
-                                       msg += string_printf("%lu/%lu", 
(unsigned long)(i+1), (unsigned long)num_instance_bvh);
+                                       msg += string_printf("%u/%u", 
(uint)(i+1), (uint)num_instance_bvh);
                                else
-                                       msg += string_printf("%s %lu/%lu", 
mesh->name.c_str(), (unsigned long)(i+1), (unsigned long)num_instance_bvh);
+                                       msg += string_printf("%s %u/%u", 
mesh->name.c_str(), (uint)(i+1), (uint)num_instance_bvh);
                                progress.set_status(msg, "Building BVH");
 
                                mesh->compute_bvh(&scene->params, progress);

Modified: branches/soc-2011-tomato/intern/cycles/render/sobol.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/sobol.cpp     2011-12-09 
09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/render/sobol.cpp     2011-12-09 
10:02:01 UTC (rev 42533)
@@ -47,6 +47,7 @@
  */
 
 #include "util_debug.h"
+#include "util_types.h"
 
 #include "sobol.h"
 
@@ -55,8 +56,8 @@
 #define SOBOL_MAX_NUMBER 32
 
 typedef struct SobolDirectionNumbers {
-       unsigned int d, s, a;
-       unsigned int m[SOBOL_MAX_NUMBER];
+       uint d, s, a;
+       uint m[SOBOL_MAX_NUMBER];
 } SobolDirectionNumbers;
 
 static SobolDirectionNumbers SOBOL_NUMBERS[SOBOL_MAX_DIMENSIONS-1] = {
@@ -21262,38 +21263,38 @@
 {21201, 18, 131059, {1, 1, 7, 11, 15, 7, 37, 239, 337, 245, 1557, 3681, 7357, 
9639, 27367, 26869, 114603, 86317}}
 };
 
-void sobol_generate_direction_vectors(unsigned int vectors[][SOBOL_BITS], int 
dimensions)
+void sobol_generate_direction_vectors(uint vectors[][SOBOL_BITS], int 
dimensions)
 {
        assert(dimensions <= SOBOL_MAX_DIMENSIONS);
 
-       const unsigned int L = SOBOL_BITS;
+       const uint L = SOBOL_BITS;
 
        /* first dimension is exception */
-       unsigned int *v = vectors[0];
+       uint *v = vectors[0];
 
-       for(unsigned int i = 0; i < L; i++)
+       for(uint i = 0; i < L; i++)
                v[i] = 1 << (31-i); // all m's = 1
 
        for(int dim = 1; dim < dimensions; dim++) {
                SobolDirectionNumbers *numbers = &SOBOL_NUMBERS[dim-1];
-               unsigned int s = numbers->s;
-               unsigned int a = numbers->a;
-               unsigned int *m = numbers->m;
+               uint s = numbers->s;
+               uint a = numbers->a;
+               uint *m = numbers->m;
 
                v = vectors[dim];
 
                if(L <= s) {
-                       for(unsigned int i = 0; i < L; i++)
+                       for(uint i = 0; i < L; i++)
                                v[i] = m[i] << (31-i); 
                }
                else {
-                       for(unsigned int i = 0; i < s; i++)
+                       for(uint i = 0; i < s; i++)
                                v[i] = m[i] << (31-i); 
 
-                       for(unsigned int i = s; i < L; i++) {
+                       for(uint i = s; i < L; i++) {
                                v[i] = v[i-s] ^ (v[i-s] >> s); 
 
-                               for(unsigned int k = 1; k < s; k++) 
+                               for(uint k = 1; k < s; k++) 
                                        v[i] ^= (((a >> (s-1-k)) & 1) * 
v[i-k]); 
                        }
                }

Modified: branches/soc-2011-tomato/intern/cycles/render/sobol.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/sobol.h       2011-12-09 
09:39:50 UTC (rev 42532)
+++ branches/soc-2011-tomato/intern/cycles/render/sobol.h       2011-12-09 
10:02:01 UTC (rev 42533)
@@ -19,12 +19,14 @@
 #ifndef __SOBOL_H__
 #define __SOBOL_H__
 
+#include "util_types.h"
+
 CCL_NAMESPACE_BEGIN
 
 #define SOBOL_BITS 32
 #define SOBOL_MAX_DIMENSIONS 21201
 
-void sobol_generate_direction_vectors(unsigned int vectors[][SOBOL_BITS], int 
dimensions);

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to