[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39998] branches/soc-2011-tomato: Merging r39984 through r39997 from trunk into soc-2011-tomato

Sergey Sharybin g.ulairi at gmail.com
Wed Sep 7 10:09:08 CEST 2011


Revision: 39998
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39998
Author:   nazgul
Date:     2011-09-07 08:09:06 +0000 (Wed, 07 Sep 2011)
Log Message:
-----------
Merging r39984 through r39997 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/doc/python_api/rst/info_tips_and_tricks.rst
    branches/soc-2011-tomato/release/datafiles/blenderbuttons
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_modifier.py
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-tomato/source/blender/collada/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/collada/DocumentExporter.cpp
    branches/soc-2011-tomato/source/blender/editors/datafiles/blenderbuttons.c
    branches/soc-2011-tomato/source/blender/editors/include/UI_icons.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_modifier_types.h
    branches/soc-2011-tomato/source/blender/makesrna/RNA_access.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2011-tomato/source/blender/modifiers/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/modifiers/MOD_modifiertypes.h
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_util.c
    branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_value.c
    branches/soc-2011-tomato/source/blender/nodes/shader/nodes/node_shader_value.c
    branches/soc-2011-tomato/source/blender/python/generic/bpy_internal_import.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_geometry.c
    branches/soc-2011-tomato/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/soc-2011-tomato/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/soc-2011-tomato/source/gameengine/Expressions/ListValue.cpp
    branches/soc-2011-tomato/source/gameengine/Expressions/Value.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_SoundActuator.cpp

Added Paths:
-----------
    branches/soc-2011-tomato/source/blender/collada/SceneExporter.cpp
    branches/soc-2011-tomato/source/blender/collada/SceneExporter.h
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvg_util.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvg_util.h
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvgedit.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvgmix.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvgproximity.c

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
   - /trunk/blender:36831-39983
   + /branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-39997

Modified: branches/soc-2011-tomato/doc/python_api/rst/info_tips_and_tricks.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/info_tips_and_tricks.rst	2011-09-07 07:49:46 UTC (rev 39997)
+++ branches/soc-2011-tomato/doc/python_api/rst/info_tips_and_tricks.rst	2011-09-07 08:09:06 UTC (rev 39998)
@@ -100,7 +100,23 @@
 Don't Use Blender!
 ==================
 
+While developing your own scripts blenders interface can get in the way, manually reloading, running the scripts, opening file import etc is just overhead.
 
+For scripts that are not interactive it can end up being easier not to use blender at all and run blender from a terminal, without opening a window and execute the script on the command line.
+
+.. code-block::
+
+   blender --backgruond --python myscript.py
+
+
+You might want to run this with a blend file too.
+
+.. code-block::
+
+   blender myscene.blend --backgruond --python myscript.py
+
+
+
 Use External Tools
 ==================
 

Modified: branches/soc-2011-tomato/release/datafiles/blenderbuttons
===================================================================
(Binary files differ)

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_modifier.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_modifier.py	2011-09-07 07:49:46 UTC (rev 39997)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_modifier.py	2011-09-07 08:09:06 UTC (rev 39998)
@@ -737,5 +737,120 @@
         col.prop(md, "width", slider=True)
         col.prop(md, "narrowness", slider=True)
 
+    @staticmethod
+    def weight_vg_mask(layout, ob, md):
+        layout.label(text="Influence/Mask Options:")
+        split = layout.split()
+        col1 = split.column()
+        col2 = split.column()
+
+        col1.label(text="Global Influence:")
+        col2.prop(md, "mask_constant", text="")
+
+        if not md.mask_texture:
+            col1.label(text="Vertex Group Mask:")
+            col2.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="")
+
+        if not md.mask_vertex_group:
+            col1.label(text="Texture Mask:")
+            col2.template_ID(md, "mask_texture", new="texture.new")
+            if md.mask_texture:
+                split = layout.split()
+                col = split.column()
+                col.label(text="Texture Coordinates:")
+                col.prop(md, "mask_tex_mapping", text="")
+                col = split.column()
+                col.label(text="Use Channel:")
+                col.prop(md, "mask_tex_use_channel", text="")
+
+                if md.mask_tex_mapping == 'OBJECT':
+                    layout.prop(md, "mask_tex_map_object", text="Object")
+                elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH':
+                    layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures")
+
+    def VERTEX_WEIGHT_EDIT(self, layout, ob, md):
+        if ob.type == 'MESH':
+            split = layout.split()
+            col = split.column()
+            col.label(text="Vertex Group:")
+            col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
+            col = split.column()
+            col.label(text="Default Weight:")
+            col.prop(md, "default_weight", text="")
+
+            layout.prop(md, "falloff_type")
+            if md.falloff_type == 'CURVE':
+                col = layout.column()
+                col.template_curve_mapping(md, "map_curve")
+
+            split = layout.split(percentage=0.4)
+            split.prop(md, "use_add")
+            row = split.row()
+            row.active = md.use_add
+            row.prop(md, "add_threshold")
+
+            split = layout.split(percentage=0.4)
+            split.prop(md, "use_remove")
+            row = split.row()
+            row.active = md.use_remove
+            row.prop(md, "remove_threshold")
+
+            # Common mask options…
+            layout.separator()
+            self.weight_vg_mask(layout, ob, md)
+
+    def VERTEX_WEIGHT_MIX(self, layout, ob, md):
+        if ob.type == 'MESH':
+            split = layout.split()
+            col = split.column()
+            col.label(text="Vertex Group A:")
+            col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="")
+            col.label(text="Default Weight A:")
+            col.prop(md, "default_weight_a", text="")
+
+            col.label(text="Mix Mode:")
+            col.prop(md, "mix_mode", text="")
+
+            col = split.column()
+            col.label(text="Vertex Group B:")
+            col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="")
+            col.label(text="Default Weight B:")
+            col.prop(md, "default_weight_b", text="")
+
+            col.label(text="Mix Set:")
+            col.prop(md, "mix_set", text="")
+
+            # Common mask options…
+            layout.separator()
+            self.weight_vg_mask(layout, ob, md)
+
+    def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md):
+        if ob.type == 'MESH':
+            split = layout.split()
+            col = split.column()
+            col.label(text="Vertex Group:")
+            col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
+            col = split.column()
+            col.label(text="Target Object:")
+            col.prop(md, "target", text="")
+
+            row = layout.row()
+            row.prop(md, "proximity_mode", expand=True)
+            if md.proximity_mode == 'GEOMETRY':
+                row = layout.row()
+                row.prop(md, "proximity_geometry", expand=True)
+
+            row = layout.split()
+            row.prop(md, "min_dist")
+            row.prop(md, "max_dist")
+
+            layout.prop(md, "falloff_type")
+
+            # Common mask options…
+            layout.separator()
+            self.weight_vg_mask(layout, ob, md)
+
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2011-09-07 07:49:46 UTC (rev 39997)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2011-09-07 08:09:06 UTC (rev 39998)
@@ -4228,6 +4228,13 @@
 			if(tmd->curfalloff)
 				direct_link_curvemapping(fd, tmd->curfalloff);
 		}
+		else if (md->type==eModifierType_WeightVGEdit) {
+			WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+
+			wmd->cmap_curve = newdataadr(fd, wmd->cmap_curve);
+			if(wmd->cmap_curve)
+				direct_link_curvemapping(fd, wmd->cmap_curve);
+		}
 	}
 }
 

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c	2011-09-07 07:49:46 UTC (rev 39997)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c	2011-09-07 08:09:06 UTC (rev 39998)
@@ -1353,6 +1353,12 @@
 				write_curvemapping(wd, tmd->curfalloff);
 			}
 		}
+		else if (md->type==eModifierType_WeightVGEdit) {
+			WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+
+			if (wmd->cmap_curve)
+				write_curvemapping(wd, wmd->cmap_curve);
+		}
 	}
 }
 

Modified: branches/soc-2011-tomato/source/blender/collada/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/CMakeLists.txt	2011-09-07 07:49:46 UTC (rev 39997)
+++ branches/soc-2011-tomato/source/blender/collada/CMakeLists.txt	2011-09-07 08:09:06 UTC (rev 39998)
@@ -61,6 +61,7 @@
 	MaterialExporter.cpp
 	MeshImporter.cpp
 	SkinInfo.cpp
+	SceneExporter.cpp
 	TransformReader.cpp
 	TransformWriter.cpp
 	collada.cpp
@@ -85,6 +86,7 @@
 	MaterialExporter.h
 	MeshImporter.h
 	SkinInfo.h
+	SceneExporter.h
 	TransformReader.h
 	TransformWriter.h
 	collada.h

Modified: branches/soc-2011-tomato/source/blender/collada/DocumentExporter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/collada/DocumentExporter.cpp	2011-09-07 07:49:46 UTC (rev 39997)
+++ branches/soc-2011-tomato/source/blender/collada/DocumentExporter.cpp	2011-09-07 08:09:06 UTC (rev 39998)
@@ -34,6 +34,7 @@
 {
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
+#include "DNA_group_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_image_types.h"
@@ -104,6 +105,7 @@
 #include "COLLADASWConstants.h"
 #include "COLLADASWLibraryControllers.h"
 #include "COLLADASWInstanceController.h"
+#include "COLLADASWInstanceNode.h"
 #include "COLLADASWBaseInputElement.h"
 
 #include "collada_internal.h"
@@ -113,6 +115,7 @@
 #include "InstanceWriter.h"
 #include "TransformWriter.h"
 
+#include "SceneExporter.h"
 #include "ArmatureExporter.h"
 #include "AnimationExporter.h"
 #include "CameraExporter.h"
@@ -142,165 +145,6 @@
 	return data->layers[layer_index].name;
 }
 
-
-/*
-  Utilities to avoid code duplication.
-  Definition can take some time to understand, but they should be useful.
-*/
-
-
-template<class Functor>
-void forEachObjectInScene(Scene *sce, Functor &f)
-{
-	Base *base= (Base*) sce->base.first;
-	while(base) {
-		Object *ob = base->object;
-			
-		f(ob);
-
-		base= base->next;
-	}
-}
-
-
-
-class SceneExporter: COLLADASW::LibraryVisualScenes, protected TransformWriter, protected InstanceWriter
-{
-	ArmatureExporter *arm_exporter;
-public:
-	SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm) : COLLADASW::LibraryVisualScenes(sw),
-																		arm_exporter(arm) {}
-	
-	void exportScene(Scene *sce, bool export_selected) {
- 		// <library_visual_scenes> <visual_scene>
-		std::string id_naming = id_name(sce);
-		openVisualScene(translate_id(id_naming), id_naming);
-
-		// write <node>s
-		//forEachMeshObjectInScene(sce, *this);
-		//forEachCameraObjectInScene(sce, *this);
-		//forEachLampObjectInScene(sce, *this);
-		exportHierarchy(sce, export_selected);
-

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list