[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47327] branches/soc-2011-tomato: Merging r47307 through r47325 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Fri Jun 1 16:08:19 CEST 2012
Revision: 47327
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47327
Author: nazgul
Date: 2012-06-01 14:08:18 +0000 (Fri, 01 Jun 2012)
Log Message:
-----------
Merging r47307 through r47325 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47307
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47325
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/blenkernel/BKE_action.h
branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/action.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
branches/soc-2011-tomato/source/blender/compositor/intern/COM_CPUDevice.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryBuffer.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryProxy.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryProxy.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeOperation.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_OpenCLDevice.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BlurNode.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
branches/soc-2011-tomato/source/blender/editors/animation/anim_channels_defines.c
branches/soc-2011-tomato/source/blender/editors/animation/keyframes_general.c
branches/soc-2011-tomato/source/blender/editors/animation/keyframing.c
branches/soc-2011-tomato/source/blender/editors/include/ED_keyframing.h
branches/soc-2011-tomato/source/blender/editors/object/object_relations.c
branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_draw.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_intern.h
branches/soc-2011-tomato/source/blender/editors/space_node/node_ops.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_select.c
branches/soc-2011-tomato/source/blender/editors/util/undo.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_action.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_pose.c
branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_tree.c
branches/soc-2011-tomato/source/blender/nodes/intern/node_common.c
branches/soc-2011-tomato/source/blender/nodes/intern/node_exec.c
branches/soc-2011-tomato/source/blender/nodes/shader/node_shader_tree.c
branches/soc-2011-tomato/source/blender/nodes/texture/node_texture_tree.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c
Removed Paths:
-------------
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManager.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManager.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManagerState.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManagerState.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeProgram.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeProgram.h
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-47306
+ /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-47325
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_action.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_action.h 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_action.h 2012-06-01 14:08:18 UTC (rev 47327)
@@ -112,6 +112,9 @@
/* Make the given Action Group the active one */
void set_active_action_group(struct bAction *act, struct bActionGroup *agrp, short select);
+/* Sync colors used for action/bone group with theme settings */
+void action_group_colors_sync(struct bActionGroup *grp);
+
/* Add a new action group with the given name to the action */
struct bActionGroup *action_groups_add_new(struct bAction *act, const char name[]);
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h 2012-06-01 14:08:18 UTC (rev 47327)
@@ -156,6 +156,10 @@
const char *(*labelfunc)(struct bNode *);
/// Optional custom resize handle polling.
int (*resize_area_func)(struct bNode *node, int x, int y);
+ /// Optional selection area polling.
+ int (*select_area_func)(struct bNode *node, int x, int y);
+ /// Optional tweak area polling (for grabbing).
+ int (*tweak_area_func)(struct bNode *node, int x, int y);
/// Called when the node is updated in the editor.
void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node);
@@ -434,6 +438,7 @@
#define NODE_FORLOOP 3
#define NODE_WHILELOOP 4
#define NODE_FRAME 5
+#define NODE_REROUTE 6
/* look up a socket on a group node by the internal group socket */
struct bNodeSocket *node_group_find_input(struct bNode *gnode, struct bNodeSocket *gsock);
@@ -449,6 +454,7 @@
/* in node_common.c */
void register_node_type_frame(struct bNodeTreeType *ttype);
+void register_node_type_reroute(struct bNodeTreeType *ttype);
/* ************** SHADER NODES *************** */
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/action.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/action.c 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/action.c 2012-06-01 14:08:18 UTC (rev 47327)
@@ -252,6 +252,31 @@
}
}
+/* Sync colors used for action/bone group with theme settings */
+void action_group_colors_sync(bActionGroup *grp)
+{
+ /* only do color copying if using a custom color (i.e. not default color) */
+ if (grp->customCol) {
+ if (grp->customCol > 0) {
+ /* copy theme colors on-to group's custom color in case user tries to edit color */
+ bTheme *btheme = U.themes.first;
+ ThemeWireColor *col_set = &btheme->tarm[(grp->customCol - 1)];
+
+ memcpy(&grp->cs, col_set, sizeof(ThemeWireColor));
+ }
+ else {
+ /* init custom colors with a generic multi-color rgb set, if not initialized already
+ * (for custom color set) */
+ if (grp->cs.solid[0] == 0) {
+ /* define for setting colors in theme below */
+ rgba_char_args_set(grp->cs.solid, 0xff, 0x00, 0x00, 255);
+ rgba_char_args_set(grp->cs.select, 0x81, 0xe6, 0x14, 255);
+ rgba_char_args_set(grp->cs.active, 0x18, 0xb6, 0xe0, 255);
+ }
+ }
+ }
+}
+
/* Add a new action group with the given name to the action */
bActionGroup *action_groups_add_new(bAction *act, const char name[])
{
@@ -409,10 +434,9 @@
/* *************** Pose channels *************** */
-/* usually used within a loop, so we got a N^2 slowdown */
bPoseChannel *BKE_pose_channel_find_name(const bPose *pose, const char *name)
{
- if (ELEM(NULL, pose, name) || (name[0] == 0))
+ if (ELEM(NULL, pose, name) || (name[0] == '\0'))
return NULL;
if (pose->chanhash)
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c 2012-06-01 14:08:18 UTC (rev 47327)
@@ -1822,6 +1822,7 @@
static void registerCompositNodes(bNodeTreeType *ttype)
{
register_node_type_frame(ttype);
+ register_node_type_reroute(ttype);
register_node_type_cmp_group(ttype);
// register_node_type_cmp_forloop(ttype);
@@ -1918,6 +1919,7 @@
static void registerShaderNodes(bNodeTreeType *ttype)
{
register_node_type_frame(ttype);
+ register_node_type_reroute(ttype);
register_node_type_sh_group(ttype);
//register_node_type_sh_forloop(ttype);
@@ -1990,6 +1992,7 @@
static void registerTextureNodes(bNodeTreeType *ttype)
{
register_node_type_frame(ttype);
+ register_node_type_reroute(ttype);
register_node_type_tex_group(ttype);
// register_node_type_tex_forloop(ttype);
Modified: branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt 2012-06-01 14:08:18 UTC (rev 47327)
@@ -65,7 +65,6 @@
intern/COM_NodeBase.h
intern/COM_NodeOperation.cpp
intern/COM_NodeOperation.h
- intern/COM_NodeProgram.h
intern/COM_Socket.cpp
intern/COM_Socket.h
intern/COM_SocketReader.cpp
@@ -80,10 +79,6 @@
intern/COM_MemoryProxy.h
intern/COM_MemoryBuffer.cpp
intern/COM_MemoryBuffer.h
- intern/COM_MemoryManager.cpp
- intern/COM_MemoryManager.h
- intern/COM_MemoryManagerState.cpp
- intern/COM_MemoryManagerState.h
intern/COM_WorkScheduler.cpp
intern/COM_WorkScheduler.h
intern/COM_WorkPackage.cpp
Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_CPUDevice.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_CPUDevice.cpp 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_CPUDevice.cpp 2012-06-01 14:08:18 UTC (rev 47327)
@@ -29,14 +29,10 @@
rcti rect;
executionGroup->determineChunkRect(&rect, chunkNumber);
- MemoryBuffer ** inputBuffers = executionGroup->getInputBuffers(chunkNumber);
- MemoryBuffer * outputBuffer = executionGroup->allocateOutputBuffer(chunkNumber, &rect);
+ MemoryBuffer ** inputBuffers = executionGroup->getInputBuffersCPU();
executionGroup->getOutputNodeOperation()->executeRegion(&rect, chunkNumber, inputBuffers);
executionGroup->finalizeChunkExecution(chunkNumber, inputBuffers);
- if (outputBuffer != NULL) {
- outputBuffer->setCreatedState();
- }
}
Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp 2012-06-01 14:08:14 UTC (rev 47326)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp 2012-06-01 14:08:18 UTC (rev 47327)
@@ -34,7 +34,6 @@
#include "COM_ViewerOperation.h"
#include <stdlib.h>
#include "BLI_math.h"
-#include "COM_MemoryManager.h"
#include "PIL_time.h"
#include "COM_ChunkOrder.h"
#include <algorithm>
@@ -362,8 +361,25 @@
delete[] chunkOrder;
}
-MemoryBuffer** ExecutionGroup::getInputBuffers(int chunkNumber)
+MemoryBuffer** ExecutionGroup::getInputBuffersCPU()
{
+ vector<MemoryProxy*> memoryproxies;
+ unsigned int index;
+
+ this->determineDependingMemoryProxies(&memoryproxies);
+ MemoryBuffer **memoryBuffers = new MemoryBuffer*[this->cachedMaxReadBufferOffset];
+ for (index = 0 ; index < this->cachedMaxReadBufferOffset ; index ++) {
+ memoryBuffers[index] = NULL;
+ }
+ for (index = 0 ; index < this->cachedReadOperations.size(); index ++) {
+ ReadBufferOperation *readOperation = (ReadBufferOperation*)this->cachedReadOperations[index];
+ memoryBuffers[readOperation->getOffset()] = readOperation->getMemoryProxy()->getBuffer();
+ }
+ return memoryBuffers;
+}
+
+MemoryBuffer** ExecutionGroup::getInputBuffersOpenCL(int chunkNumber)
+{
rcti rect;
vector<MemoryProxy*> memoryproxies;
unsigned int index;
@@ -385,6 +401,8 @@
return memoryBuffers;
}
+// @todo: for opencl the memory buffers size needs to be same as the needed size
+// currently this method is not called, but will be when opencl nodes are created
MemoryBuffer *ExecutionGroup::constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *rect)
{
// find all chunks inside the rect
@@ -399,8 +417,7 @@
const int maxychunk = ceil((rect->ymax-1)/chunkSizef);
if (maxxchunk== minxchunk+1 && maxychunk == minychunk+1) {
- const int chunkNumber = minxchunk+minychunk*numberOfXChunks;
- MemoryBuffer *result = MemoryManager::getMemoryBuffer(memoryProxy, chunkNumber);
+ MemoryBuffer *result =memoryProxy->getBuffer();
return result;
}
@@ -420,7 +437,7 @@
for (indexx = max(minxchunk, 0); indexx<min((int)this->numberOfXChunks, maxxchunk) ; indexx++) {
for (indexy = max(minychunk, 0); indexy<min((int)this->numberOfYChunks, maxychunk) ; indexy++) {
int chunkNumber = indexx+indexy*this->numberOfXChunks;
- MemoryBuffer *chunkBuffer = MemoryManager::getMemoryBuffer(memoryProxy, chunkNumber);
+ MemoryBuffer *chunkBuffer = memoryProxy->getBuffer();
result->copyContentFrom(chunkBuffer);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list