[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49251] branches/soc-2011-tomato: svn merge ^/trunk/blender -r49244:49250
Campbell Barton
ideasman42 at gmail.com
Thu Jul 26 15:30:38 CEST 2012
Revision: 49251
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49251
Author: campbellbarton
Date: 2012-07-26 13:30:37 +0000 (Thu, 26 Jul 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r49244:49250
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49244
Modified Paths:
--------------
branches/soc-2011-tomato/SConstruct
branches/soc-2011-tomato/build_files/scons/config/darwin-config.py
branches/soc-2011-tomato/intern/cycles/blender/blender_particles.cpp
branches/soc-2011-tomato/intern/cycles/kernel/kernel_object.h
branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_geometry.h
branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_types.h
branches/soc-2011-tomato/intern/cycles/render/nodes.cpp
branches/soc-2011-tomato/intern/cycles/render/object.cpp
branches/soc-2011-tomato/intern/cycles/render/object.h
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.h
branches/soc-2011-tomato/source/blender/editors/include/ED_clip.h
branches/soc-2011-tomato/source/blender/editors/include/ED_image.h
branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
branches/soc-2011-tomato/source/blender/editors/space_image/image_edit.c
branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_ops.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_node_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
branches/soc-2011-tomato/source/blender/nodes/shader/nodes/node_shader_particle_info.c
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49244
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49250
Modified: branches/soc-2011-tomato/SConstruct
===================================================================
--- branches/soc-2011-tomato/SConstruct 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/SConstruct 2012-07-26 13:30:37 UTC (rev 49251)
@@ -280,8 +280,10 @@
if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
print "Available " + env['MACOSX_SDK_CHECK']
- if not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
- print B.bc.OKGREEN + "MacOSX10.5.sdk not available:" + B.bc.ENDC + " using MacOSX10.6.sdk"
+ if not 'Mac OS X 10.6' in env['MACOSX_SDK_CHECK']:
+ print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.7.sdk"
+ elif not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
+ print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.6.sdk"
else:
print B.bc.OKGREEN + "Found recommended sdk :" + B.bc.ENDC + " using MacOSX10.5.sdk"
Modified: branches/soc-2011-tomato/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/darwin-config.py 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/build_files/scons/config/darwin-config.py 2012-07-26 13:30:37 UTC (rev 49251)
@@ -32,6 +32,8 @@
MAC_CUR_VER='10.6'
elif cmd_res[:2]=='11':
MAC_CUR_VER='10.7'
+elif cmd_res[:2]=='12':
+ MAC_CUR_VER='10.8'
cmd = 'xcodebuild -version'
cmd_xcode=commands.getoutput(cmd)
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
@@ -75,7 +77,7 @@
LCGDIR = '#../lib/darwin-9.x.universal'
CC = 'gcc-4.2'
CXX = 'g++-4.2'
- else:
+ elif 'Mac OS X 10.6' in MACOSX_SDK_CHECK:
# OSX 10.6/7 with Xcode 4.x
MAC_MIN_VERS = '10.6'
MACOSX_DEPLOYMENT_TARGET = '10.6'
@@ -83,6 +85,14 @@
LCGDIR = '#../lib/darwin-9.x.universal'
CC = 'gcc-4.2'
CXX = 'g++-4.2'
+ else:
+ # OSX 10.8 with Xcode 4.4 and higher (no 10.6sdk! )
+ MAC_MIN_VERS = '10.6'
+ MACOSX_DEPLOYMENT_TARGET = '10.6'
+ MACOSX_SDK='/Developer/SDKs/MacOSX10.7.sdk'
+ LCGDIR = '#../lib/darwin-9.x.universal'
+ CC = 'gcc'
+ CXX = 'g++'
LIBDIR = '${LCGDIR}'
@@ -339,8 +349,8 @@
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
-#for 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
-if MACOSX_DEPLOYMENT_TARGET == '10.7':
+#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
+if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk"):
LLIBS = ['stdc++']
else:
LLIBS = ['stdc++', 'SystemStubs']
Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_particles.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_particles.cpp 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_particles.cpp 2012-07-26 13:30:37 UTC (rev 49251)
@@ -144,16 +144,20 @@
BL::Object::particle_systems_iterator b_psys;
for(b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
if (use_particle_system(*b_psys)) {
+ int pa_index = 0;
BL::ParticleSystem::particles_iterator b_pa;
for(b_psys->particles.begin(b_pa), index = 0; b_pa != b_psys->particles.end(); ++b_pa, ++index) {
if(use_particle(*b_pa)) {
Particle pa;
+ pa.index = pa_index;
pa.age = b_scene.frame_current() - b_pa->birth_time();
pa.lifetime = b_pa->lifetime();
ob->particles.push_back(pa);
}
+
+ ++pa_index;
}
}
}
Modified: branches/soc-2011-tomato/intern/cycles/kernel/kernel_object.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/kernel_object.h 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/kernel/kernel_object.h 2012-07-26 13:30:37 UTC (rev 49251)
@@ -169,20 +169,27 @@
return kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2 + 1);
}
-__device float particle_age(KernelGlobals *kg, int particle)
+__device_inline float particle_index(KernelGlobals *kg, int particle)
{
int offset = particle*PARTICLE_SIZE;
float4 f = kernel_tex_fetch(__particles, offset);
return f.x;
}
-__device float particle_lifetime(KernelGlobals *kg, int particle)
+__device float particle_age(KernelGlobals *kg, int particle)
{
int offset = particle*PARTICLE_SIZE;
float4 f = kernel_tex_fetch(__particles, offset);
return f.y;
}
+__device float particle_lifetime(KernelGlobals *kg, int particle)
+{
+ int offset = particle*PARTICLE_SIZE;
+ float4 f = kernel_tex_fetch(__particles, offset);
+ return f.z;
+}
+
CCL_NAMESPACE_END
Modified: branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_geometry.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_geometry.h 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_geometry.h 2012-07-26 13:30:37 UTC (rev 49251)
@@ -101,6 +101,12 @@
float data;
switch(type) {
+ case NODE_INFO_PAR_INDEX: {
+ uint particle_id = object_particle_id(kg, sd->object);
+ data = particle_index(kg, particle_id);
+ stack_store_float(stack, out_offset, data);
+ break;
+ }
case NODE_INFO_PAR_AGE: {
uint particle_id = object_particle_id(kg, sd->object);
data = particle_age(kg, particle_id);
Modified: branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_types.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_types.h 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_types.h 2012-07-26 13:30:37 UTC (rev 49251)
@@ -115,6 +115,7 @@
} NodeObjectInfo;
typedef enum NodeParticleInfo {
+ NODE_INFO_PAR_INDEX,
NODE_INFO_PAR_AGE,
NODE_INFO_PAR_LIFETIME
} NodeParticleInfo;
Modified: branches/soc-2011-tomato/intern/cycles/render/nodes.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/nodes.cpp 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/render/nodes.cpp 2012-07-26 13:30:37 UTC (rev 49251)
@@ -1823,12 +1823,15 @@
ParticleInfoNode::ParticleInfoNode()
: ShaderNode("particle_info")
{
+ add_output("Index", SHADER_SOCKET_FLOAT);
add_output("Age", SHADER_SOCKET_FLOAT);
add_output("Lifetime", SHADER_SOCKET_FLOAT);
}
void ParticleInfoNode::attributes(AttributeRequestSet *attributes)
{
+ if(!output("Index")->links.empty())
+ attributes->add(ATTR_STD_PARTICLE);
if(!output("Age")->links.empty())
attributes->add(ATTR_STD_PARTICLE);
if(!output("Lifetime")->links.empty())
@@ -1841,6 +1844,12 @@
{
ShaderOutput *out;
+ out = output("Index");
+ if(!out->links.empty()) {
+ compiler.stack_assign(out);
+ compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_INDEX, out->stack_offset);
+ }
+
out = output("Age");
if(!out->links.empty()) {
compiler.stack_assign(out);
Modified: branches/soc-2011-tomato/intern/cycles/render/object.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/object.cpp 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/render/object.cpp 2012-07-26 13:30:37 UTC (rev 49251)
@@ -269,7 +269,7 @@
/* pack in texture */
int offset = i*PARTICLE_SIZE;
- particles[offset] = make_float4(pa.age, pa.lifetime, 0.0f, 0.0f);
+ particles[offset] = make_float4(pa.index, pa.age, pa.lifetime, 0.0f);
i++;
Modified: branches/soc-2011-tomato/intern/cycles/render/object.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/object.h 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/intern/cycles/render/object.h 2012-07-26 13:30:37 UTC (rev 49251)
@@ -36,6 +36,7 @@
/* Object */
struct Particle {
+ int index;
float age;
float lifetime;
};
Modified: branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.cpp 2012-07-26 13:29:38 UTC (rev 49250)
+++ branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.cpp 2012-07-26 13:30:37 UTC (rev 49251)
@@ -46,9 +46,20 @@
// always connect the output image
MaskOperation *operation = new MaskOperation();
operation->setbNode(editorNode);
- operation->setMaskWidth(data->xsch * data->size / 100.0f);
- operation->setMaskHeight(data->ysch * data->size / 100.0f);
+ if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED) {
+ operation->setMaskWidth(editorNode->custom3);
+ operation->setMaskHeight(editorNode->custom4);
+ }
+ else if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED_SCENE) {
+ operation->setMaskWidth(editorNode->custom3 * (data->size / 100.0f));
+ operation->setMaskHeight(editorNode->custom4 * (data->size / 100.0f));
+ }
+ else {
+ operation->setMaskWidth(data->xsch * data->size / 100.0f);
+ operation->setMaskHeight(data->ysch * data->size / 100.0f);
+ }
+
if (outputMask->isConnected()) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list