[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49930] branches/soc-2011-tomato: Merging r49920 through r49929 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Thu Aug 16 10:36:27 CEST 2012
Revision: 49930
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49930
Author: nazgul
Date: 2012-08-16 08:36:26 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
Merging r49920 through r49929 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49920
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49929
Modified Paths:
--------------
branches/soc-2011-tomato/GNUmakefile
branches/soc-2011-tomato/source/blender/collada/EffectExporter.cpp
branches/soc-2011-tomato/source/blender/collada/GeometryExporter.cpp
branches/soc-2011-tomato/source/blender/collada/ImageExporter.cpp
branches/soc-2011-tomato/source/blender/collada/InstanceWriter.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.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-49919
+ /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-49929
Modified: branches/soc-2011-tomato/GNUmakefile
===================================================================
--- branches/soc-2011-tomato/GNUmakefile 2012-08-16 03:14:28 UTC (rev 49929)
+++ branches/soc-2011-tomato/GNUmakefile 2012-08-16 08:36:26 UTC (rev 49930)
@@ -19,9 +19,9 @@
#
# ##### END GPL LICENSE BLOCK #####
-# This Makefile does an out-of-source CMake build in ../build/`OS`_`CPU`
+# This Makefile does an out-of-source CMake build in ../build_`OS`_`CPU`
# eg:
-# ../build/Linux_i386
+# ../build_linux_i386
# This is for users who like to configure & build blender with a single command.
@@ -40,7 +40,7 @@
endif
ifndef BUILD_DIR
- BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE)
+ BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build_$(OS_NCASE)
endif
Modified: branches/soc-2011-tomato/source/blender/collada/EffectExporter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/EffectExporter.cpp 2012-08-16 03:14:28 UTC (rev 49929)
+++ branches/soc-2011-tomato/source/blender/collada/EffectExporter.cpp 2012-08-16 08:36:26 UTC (rev 49930)
@@ -313,42 +313,48 @@
std::set<Image *> uv_textures;
if (ob->type == OB_MESH && ob->totcol && this->export_settings->include_uv_textures) {
+ bool active_uv_only = this->export_settings->active_uv_only;
Mesh *me = (Mesh *) ob->data;
+ int active_uv_layer = CustomData_get_active_layer_index(&me->pdata, CD_MTEXPOLY);
+
BKE_mesh_tessface_ensure(me);
for (int i = 0; i < me->pdata.totlayer; i++) {
- if (me->pdata.layers[i].type == CD_MTEXPOLY) {
- MTexPoly *txface = (MTexPoly *)me->pdata.layers[i].data;
- MFace *mface = me->mface;
- for (int j = 0; j < me->totpoly; j++, mface++, txface++) {
+ if (!active_uv_only || active_uv_layer == i)
+ {
+ if (me->pdata.layers[i].type == CD_MTEXPOLY) {
+ MTexPoly *txface = (MTexPoly *)me->pdata.layers[i].data;
+ MFace *mface = me->mface;
+ for (int j = 0; j < me->totpoly; j++, mface++, txface++) {
- Material *mat = give_current_material(ob, mface->mat_nr + 1);
- if (mat != ma)
- continue;
+ Material *mat = give_current_material(ob, mface->mat_nr + 1);
+ if (mat != ma)
+ continue;
- Image *ima = txface->tpage;
- if (ima == NULL)
- continue;
+ Image *ima = txface->tpage;
+ if (ima == NULL)
+ continue;
- bool not_in_list = uv_textures.find(ima)==uv_textures.end();
- if (not_in_list) {
- std::string name = id_name(ima);
- std::string key(name);
- key = translate_id(key);
+ bool not_in_list = uv_textures.find(ima)==uv_textures.end();
+ if (not_in_list) {
+ std::string name = id_name(ima);
+ std::string key(name);
+ key = translate_id(key);
- // create only one <sampler>/<surface> pair for each unique image
- if (im_samp_map.find(key) == im_samp_map.end()) {
- //<newparam> <sampler> <source>
- COLLADASW::Sampler sampler(COLLADASW::Sampler::SAMPLER_TYPE_2D,
- key + COLLADASW::Sampler::SAMPLER_SID_SUFFIX,
- key + COLLADASW::Sampler::SURFACE_SID_SUFFIX);
- sampler.setImageId(key);
- samplers[a] = sampler;
- samp_surf[b][0] = &samplers[a];
- im_samp_map[key] = b;
- b++;
- a++;
- uv_textures.insert(ima);
+ // create only one <sampler>/<surface> pair for each unique image
+ if (im_samp_map.find(key) == im_samp_map.end()) {
+ //<newparam> <sampler> <source>
+ COLLADASW::Sampler sampler(COLLADASW::Sampler::SAMPLER_TYPE_2D,
+ key + COLLADASW::Sampler::SAMPLER_SID_SUFFIX,
+ key + COLLADASW::Sampler::SURFACE_SID_SUFFIX);
+ sampler.setImageId(key);
+ samplers[a] = sampler;
+ samp_surf[b][0] = &samplers[a];
+ im_samp_map[key] = b;
+ b++;
+ a++;
+ uv_textures.insert(ima);
+ }
}
}
}
Modified: branches/soc-2011-tomato/source/blender/collada/GeometryExporter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/GeometryExporter.cpp 2012-08-16 03:14:28 UTC (rev 49929)
+++ branches/soc-2011-tomato/source/blender/collada/GeometryExporter.cpp 2012-08-16 08:36:26 UTC (rev 49930)
@@ -279,15 +279,18 @@
// if mesh has uv coords writes <input> for TEXCOORD
int num_layers = CustomData_number_of_layers(&me->fdata, CD_MTFACE);
+ int active_uv_index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE)-1;
+ for (i = 0; i < num_layers; i++) {
+ if (!this->export_settings->active_uv_only || i == active_uv_index) {
- for (i = 0; i < num_layers; i++) {
- // char *name = CustomData_get_layer_name(&me->fdata, CD_MTFACE, i);
- COLLADASW::Input input3(COLLADASW::InputSemantic::TEXCOORD,
- makeUrl(makeTexcoordSourceId(geom_id, i)),
- 2, // offset always 2, this is only until we have optimized UV sets
- i // set number equals UV map index
- );
- til.push_back(input3);
+ // char *name = CustomData_get_layer_name(&me->fdata, CD_MTFACE, i);
+ COLLADASW::Input input3(COLLADASW::InputSemantic::TEXCOORD,
+ makeUrl(makeTexcoordSourceId(geom_id, i)),
+ 2, // offset always 2, this is only until we have optimized UV sets
+ i // set number equals UV map index
+ );
+ til.push_back(input3);
+ }
}
if (has_color) {
Modified: branches/soc-2011-tomato/source/blender/collada/ImageExporter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/ImageExporter.cpp 2012-08-16 03:14:28 UTC (rev 49929)
+++ branches/soc-2011-tomato/source/blender/collada/ImageExporter.cpp 2012-08-16 08:36:26 UTC (rev 49930)
@@ -151,25 +151,31 @@
{
std::set<Image *> uv_textures;
LinkNode *node;
- bool use_copies = this->export_settings->use_texture_copies;
+ bool use_texture_copies = this->export_settings->use_texture_copies;
+ bool active_uv_only = this->export_settings->active_uv_only;
+
for (node = this->export_settings->export_set; node; node = node->next) {
Object *ob = (Object *)node->link;
if (ob->type == OB_MESH && ob->totcol) {
Mesh *me = (Mesh *) ob->data;
BKE_mesh_tessface_ensure(me);
+ int active_uv_layer = CustomData_get_active_layer_index(&me->pdata, CD_MTEXPOLY);
for (int i = 0; i < me->pdata.totlayer; i++) {
if (me->pdata.layers[i].type == CD_MTEXPOLY) {
- MTexPoly *txface = (MTexPoly *)me->pdata.layers[i].data;
- for (int j = 0; j < me->totpoly; j++, txface++) {
+ if (!active_uv_only || active_uv_layer == i)
+ {
+ MTexPoly *txface = (MTexPoly *)me->pdata.layers[i].data;
+ for (int j = 0; j < me->totpoly; j++, txface++) {
- Image *ima = txface->tpage;
- if (ima == NULL)
- continue;
+ Image *ima = txface->tpage;
+ if (ima == NULL)
+ continue;
- bool not_in_list = uv_textures.find(ima) == uv_textures.end();
- if (not_in_list) {
- uv_textures.insert(ima);
- export_UV_Image(ima, use_copies);
+ bool not_in_list = uv_textures.find(ima) == uv_textures.end();
+ if (not_in_list) {
+ uv_textures.insert(ima);
+ export_UV_Image(ima, use_texture_copies);
+ }
}
}
}
Modified: branches/soc-2011-tomato/source/blender/collada/InstanceWriter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/InstanceWriter.cpp 2012-08-16 03:14:28 UTC (rev 49929)
+++ branches/soc-2011-tomato/source/blender/collada/InstanceWriter.cpp 2012-08-16 08:36:26 UTC (rev 49930)
@@ -63,7 +63,7 @@
int active_uv_index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE) -1;
for (int b = 0; b < totlayer; b++) {
if (!active_uv_only || b == active_uv_index) {
- char *name = bc_CustomData_get_layer_name(&me->fdata, CD_MTFACE, map_index);
+ char *name = bc_CustomData_get_layer_name(&me->fdata, CD_MTFACE, b);
im.push_back(COLLADASW::BindVertexInput(name, "TEXCOORD", map_index++));
}
}
Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp 2012-08-16 03:14:28 UTC (rev 49929)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp 2012-08-16 08:36:26 UTC (rev 49930)
@@ -80,12 +80,20 @@
newInput.xmax = input->xmax + this->m_kr2 + 2;
}
else {
+ rcti dispInput;
+ BLI_rcti_init(&dispInput, 0,5,0,5);
+ if (this->getInputOperation(1)->determineDependingAreaOfInterest(&dispInput, readOperation, output)) {
+ return true;
+ }
newInput.xmin = input->xmin - 7; /* (0.25f * 20 * 1) + 2 == worse case dispersion */
newInput.ymin = input->ymin;
newInput.ymax = input->ymax;
newInput.xmax = input->xmax + 7; /* (0.25f * 20 * 1) + 2 == worse case dispersion */
}
- return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
+ if (this->getInputOperation(0)->determineDependingAreaOfInterest(&newInput, readOperation, output)) {
+ return true;
+ }
+ return false;
}
void ProjectorLensDistortionOperation::updateDispersion()
@@ -94,7 +102,7 @@
this->lockMutex();
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list