[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49708] branches/soc-2011-tomato: Merging r49681 through r49707 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Wed Aug 8 18:48:05 CEST 2012
Revision: 49708
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49708
Author: nazgul
Date: 2012-08-08 16:48:05 +0000 (Wed, 08 Aug 2012)
Log Message:
-----------
Merging r49681 through r49707 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49681
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49707
Modified Paths:
--------------
branches/soc-2011-tomato/build_files/cmake/macros.cmake
branches/soc-2011-tomato/release/scripts/startup/bl_operators/__init__.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/seqcache.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/seqeffects.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/sound.c
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
branches/soc-2011-tomato/source/blender/blenloader/intern/versioning_250.c
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_DefocusNode.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
branches/soc-2011-tomato/source/blender/editors/animation/anim_channels_edit.c
branches/soc-2011-tomato/source/blender/editors/animation/anim_deps.c
branches/soc-2011-tomato/source/blender/editors/animation/anim_filter.c
branches/soc-2011-tomato/source/blender/editors/interface/interface_anim.c
branches/soc-2011-tomato/source/blender/editors/render/render_internal.c
branches/soc-2011-tomato/source/blender/editors/render/render_opengl.c
branches/soc-2011-tomato/source/blender/editors/space_action/action_select.c
branches/soc-2011-tomato/source/blender/editors/space_file/filelist.c
branches/soc-2011-tomato/source/blender/editors/space_file/space_file.c
branches/soc-2011-tomato/source/blender/editors/space_graph/graph_select.c
branches/soc-2011-tomato/source/blender/editors/space_nla/nla_channels.c
branches/soc-2011-tomato/source/blender/editors/space_nla/nla_select.c
branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_header.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_add.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_select.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-tomato/source/blender/imbuf/IMB_moviecache.h
branches/soc-2011-tomato/source/blender/imbuf/intern/filter.c
branches/soc-2011-tomato/source/blender/imbuf/intern/moviecache.c
branches/soc-2011-tomato/source/blender/imbuf/intern/scaling.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_screen.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer_api.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_defocus.c
branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_init_exit.c
branches/soc-2011-tomato/source/blenderplayer/bad_level_call_stubs/stubs.c
Added Paths:
-----------
branches/soc-2011-tomato/release/scripts/startup/bl_operators/node.py
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-49680
+ /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-49707
Modified: branches/soc-2011-tomato/build_files/cmake/macros.cmake
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/macros.cmake 2012-08-08 16:46:47 UTC (rev 49707)
+++ branches/soc-2011-tomato/build_files/cmake/macros.cmake 2012-08-08 16:48:05 UTC (rev 49708)
@@ -731,3 +731,31 @@
set(${lvar} ${LIBDIR}/${lproj})
endif()
endmacro()
+
+
+# not highly optimal, may replace with generated C program like makesdna
+function(data_to_c
+ file_from file_to var_name)
+
+ file(READ ${file_from} file_from_string HEX)
+ string(LENGTH ${file_from_string} _max_index)
+ math(EXPR size_on_disk ${_max_index}/2)
+
+ file(REMOVE ${file_to})
+
+ file(APPEND ${file_to} "int ${var_name}_size = ${size_on_disk};\n")
+ file(APPEND ${file_to} "char ${var_name}[] = {")
+
+ set(_index 0)
+
+ while(NOT _index EQUAL _max_index)
+ string(SUBSTRING "${file_from_string}" ${_index} 2 _pair)
+ file(APPEND ${file_to} "0x${_pair},")
+ math(EXPR _index ${_index}+2)
+ endwhile()
+ file(APPEND ${file_to} "};\n")
+endfunction()
+
+# eg
+# data_to_c("/home/guest/test.txt" "/home/guest/test.txt.h" "this_is_data")
+
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_operators/__init__.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/__init__.py 2012-08-08 16:46:47 UTC (rev 49707)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/__init__.py 2012-08-08 16:48:05 UTC (rev 49708)
@@ -29,6 +29,7 @@
"console",
"image",
"mesh",
+ "node",
"object_align",
"object",
"object_randomize_transform",
Copied: branches/soc-2011-tomato/release/scripts/startup/bl_operators/node.py (from rev 49707, trunk/blender/release/scripts/startup/bl_operators/node.py)
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/node.py (rev 0)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/node.py 2012-08-08 16:48:05 UTC (rev 49708)
@@ -0,0 +1,100 @@
+# ##### 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.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8-80 compliant>
+
+import bpy
+from bpy.types import Operator
+from bpy.props import (EnumProperty,
+ FloatVectorProperty,
+ StringProperty,
+ CollectionProperty
+ )
+
+# XXX These node item lists should actually be generated by a callback at operator execution time (see node_type_items below),
+# using the active node tree from the context. Due to a difficult bug in bpy this is not possible (item list memory gets freed too early),
+# so for now just copy the static item lists to these global variables.
+#
+# In the custom_nodes branch, the static per-tree-type node items are replaced by a single independent type list anyway (with a poll function
+# to limit node types to the respective trees). So this workaround is only temporary.
+
+node_type_items_dict = {}
+node_type_items_dict['SHADER'] = [(item.identifier, item.name, item.description, item.value) for item in bpy.types.ShaderNode.bl_rna.properties['type'].enum_items]
+node_type_items_dict['COMPOSITING'] = [(item.identifier, item.name, item.description, item.value) for item in bpy.types.CompositorNode.bl_rna.properties['type'].enum_items]
+node_type_items_dict['TEXTURE'] = [(item.identifier, item.name, item.description, item.value) for item in bpy.types.TextureNode.bl_rna.properties['type'].enum_items]
+
+# Returns the enum item list for the edited tree in the context
+def node_type_items(self, context):
+ snode = context.space_data
+ if not snode:
+ return []
+ tree = snode.edit_tree
+ if not tree:
+ return []
+
+ # XXX Does not work correctly, see comment above
+ #return [(item.identifier, item.name, item.description, item.value) for item in tree.nodes.bl_rna.functions['new'].parameters['type'].enum_items]
+
+ if tree.type in node_type_items_dict:
+ return node_type_items_dict[tree.type]
+ else:
+ return []
+
+class NODE_OT_add_search(bpy.types.Operator):
+ '''Add a node to the active tree'''
+ bl_idname = "node.add_search"
+ bl_label = "Search and Add Node"
+ bl_options = {'REGISTER', 'UNDO'}
+
+ # XXX this should be called 'node_type' but the operator search property is hardcoded to 'type' by a hack in bpy_operator_wrap.c ...
+ type = EnumProperty(items=node_type_items, name="Node Type", description="Node type")
+
+ def create_node(self, context):
+ space = context.space_data
+ tree = space.edit_tree
+
+ node = tree.nodes.new(type=self.type)
+ for n in tree.nodes:
+ if n==node:
+ node.select = True
+ tree.nodes.active = node
+ else:
+ node.select = False
+ node.location = space.cursor_location
+ return node
+
+ @classmethod
+ def poll(cls, context):
+ space = context.space_data
+ # needs active node editor and a tree to add nodes to
+ return space.type == 'NODE_EDITOR' and space.edit_tree
+
+ def execute(self, context):
+ self.create_node(context)
+ return {'FINISHED'}
+
+ def invoke(self, context, event):
+ space = context.space_data
+ v2d = context.region.view2d
+
+ # convert mouse position to the View2D for later node placement
+ space.cursor_location = v2d.region_to_view(event.mouse_region_x, event.mouse_region_y)
+
+ context.window_manager.invoke_search_popup(self)
+ return {'CANCELLED'}
+
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h 2012-08-08 16:46:47 UTC (rev 49707)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h 2012-08-08 16:48:05 UTC (rev 49708)
@@ -61,26 +61,29 @@
int valid;
} SeqIterator;
-void seq_begin(struct Editing *ed, SeqIterator *iter, int use_pointer);
-void seq_next(SeqIterator *iter);
-void seq_end(SeqIterator *iter);
-void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int use_pointer);
+void BKE_seqence_iterator_begin(struct Editing *ed, SeqIterator *iter, int use_pointer);
+void BKE_seqence_iterator_next(SeqIterator *iter);
+void BKE_seqence_iterator_end(SeqIterator *iter);
#define SEQP_BEGIN(ed, _seq) \
{ \
SeqIterator iter; \
- for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) { \
+ for (BKE_seqence_iterator_begin(ed, &iter, 1); \
+ iter.valid; \
+ BKE_seqence_iterator_next(&iter)) { \
_seq = iter.seq;
#define SEQ_BEGIN(ed, _seq) \
{ \
SeqIterator iter; \
- for (seq_begin(ed, &iter, 0); iter.valid; seq_next(&iter)) { \
+ for (BKE_seqence_iterator_begin(ed, &iter, 0); \
+ iter.valid; \
+ BKE_seqence_iterator_next(&iter)) { \
_seq = iter.seq;
#define SEQ_END \
} \
- seq_end(&iter); \
+ BKE_seqence_iterator_end(&iter); \
}
typedef struct SeqRenderData {
@@ -93,13 +96,9 @@
float motion_blur_shutter;
} SeqRenderData;
-SeqRenderData seq_new_render_data(
- struct Main *bmain, struct Scene *scene,
- int rectx, int recty, int preview_render_size);
+SeqRenderData BKE_sequencer_new_render_data(struct Main *bmain, struct Scene *scene, int rectx, int recty,
+ int preview_render_size);
-int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b);
-unsigned int seq_hash_render_data(const SeqRenderData *a);
-
/* Wipe effect */
enum {
DO_SINGLE_WIPE,
@@ -110,8 +109,9 @@
DO_CLOCK_WIPE
};
-
struct SeqEffectHandle {
+ int multithreaded;
+
/* constructors & destructor */
/* init is _only_ called on first creation */
void (*init)(struct Sequence *seq);
@@ -147,28 +147,30 @@
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list