svn merge ^/trunk/blender -r43887:43918
authorCampbell Barton <ideasman42@gmail.com>
Sun, 5 Feb 2012 22:13:10 +0000 (22:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 5 Feb 2012 22:13:10 +0000 (22:13 +0000)
27 files changed:
extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
intern/ghost/intern/GHOST_SystemWin32.cpp
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_info.py
release/text/readme.html
source/blender/blenkernel/BKE_blender.h
source/blender/collada/AnimationExporter.cpp
source/blender/collada/AnimationExporter.h
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/DocumentExporter.cpp
source/blender/collada/ExportSettings.h
source/blender/collada/TransformWriter.cpp
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/editors/curve/editcurve.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/metaball/mball_ops.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_space.c
source/blender/quicktime/apple/quicktime_import.c
source/blender/windowmanager/intern/wm_operators.c
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp

index a90acb99f04def6d1549bfd8de8f97f2ac89716b..0d19fd193e735393347cfe4b0a562c0399af8c80 100644 (file)
@@ -2780,21 +2780,23 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
        {
                const RContact&         c = psb->m_rcontacts[i];
                const sCti&                     cti = c.m_cti;  
-               btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj);
-
-               const btVector3         va = tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0);
-               const btVector3         vb = c.m_node->m_x-c.m_node->m_q;       
-               const btVector3         vr = vb-va;
-               const btScalar          dn = btDot(vr, cti.m_normal);           
-               if(dn<=SIMD_EPSILON)
-               {
-                       const btScalar          dp = btMin( (btDot(c.m_node->m_x, cti.m_normal) + cti.m_offset), mrg );
-                       const btVector3         fv = vr - (cti.m_normal * dn);
-                       // c0 is the impulse matrix, c3 is 1 - the friction coefficient or 0, c4 is the contact hardness coefficient
-                       const btVector3         impulse = c.m_c0 * ( (vr - (fv * c.m_c3) + (cti.m_normal * (dp * c.m_c4))) * kst );
-                       c.m_node->m_x -= impulse * c.m_c2;
-                       if (tmpRigid)
-                               tmpRigid->applyImpulse(impulse,c.m_c1);
+
+               if (cti.m_colObj->hasContactResponse()) {
+                       btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj);
+                       const btVector3         va = tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0);
+                       const btVector3         vb = c.m_node->m_x-c.m_node->m_q;       
+                       const btVector3         vr = vb-va;
+                       const btScalar          dn = btDot(vr, cti.m_normal);           
+                       if(dn<=SIMD_EPSILON)
+                       {
+                               const btScalar          dp = btMin( (btDot(c.m_node->m_x, cti.m_normal) + cti.m_offset), mrg );
+                               const btVector3         fv = vr - (cti.m_normal * dn);
+                               // c0 is the impulse matrix, c3 is 1 - the friction coefficient or 0, c4 is the contact hardness coefficient
+                               const btVector3         impulse = c.m_c0 * ( (vr - (fv * c.m_c3) + (cti.m_normal * (dp * c.m_c4))) * kst );
+                               c.m_node->m_x -= impulse * c.m_c2;
+                               if (tmpRigid)
+                                       tmpRigid->applyImpulse(impulse,c.m_c1);
+                       }
                }
        }
 }
index 9cae2c27e65f17be4c6be82f3c2bef3016c8af19..98c4785797db171a0f8c7db2328aa5f0d3f700cf 100644 (file)
@@ -717,10 +717,11 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
 
        if (key != GHOST_kKeyUnknown) {
                char utf8_char[6] = {0} ;
+               char ascii = 0;
 
                wchar_t utf16[2]={0};
-               BYTE state[256];
-               GetKeyboardState((PBYTE)state);  
+               BYTE state[256] ={0};
+               GetKeyboardState(state);  
 
                if(ToUnicodeEx(vk, 0, state, utf16, 2, 0, system->m_keylayout))
                        WideCharToMultiByte(CP_UTF8, 0, 
@@ -728,9 +729,14 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
                                                                        (LPSTR) utf8_char, 5,
                                                                        NULL,NULL); else *utf8_char = 0;
 
-               if(!keyDown) utf8_char[0] = '\0';
                
-               event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, (*utf8_char & 0x80)?'?':*utf8_char, utf8_char);
+
+               if(!keyDown) {utf8_char[0] = '\0'; ascii='\0';}
+                       else ascii = utf8_char[0]& 0x80?'?':utf8_char[0];
+
+               if(0x80&state[VK_MENU]) utf8_char[0]='\0';
+
+               event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, ascii, utf8_char);
                
 #ifdef GHOST_DEBUG
                std::cout << ascii << std::endl;
index 8ebc1c450b4b1dcbb52951f903ad3de6d2a1af25..eb97e5463795e395e80f1d025df5e216a8ea76cf 100644 (file)
@@ -547,23 +547,15 @@ class CLIP_PT_display(Panel):
 
         col = layout.column(align=True)
 
-        col.prop(sc, "show_marker_pattern", text="Pattern")
-        col.prop(sc, "show_marker_search", text="Search")
-        col.prop(sc, "show_pyramid_levels", text="Pyramid")
-
-        col.prop(sc, "show_track_path", text="Path")
-        row = col.row()
-        row.active = sc.show_track_path
-        row.prop(sc, "path_length", text="Length")
-
         col.prop(sc, "show_disabled", "Disabled Tracks")
+        col.prop(sc, "show_names", text="Names and Status")
         col.prop(sc, "show_bundles", text="3D Markers")
 
-        col.prop(sc, "show_names", text="Names and Status")
-        col.prop(sc, "show_tiny_markers", text="Compact Markers")
+        col.prop(sc, "use_mute_footage", text="Mute Footage")
+        col.prop(sc, "lock_selection")
 
-        col.prop(sc, "show_grease_pencil", text="Grease Pencil")
-        col.prop(sc, "use_mute_footage", text="Mute")
+        if sc.view == 'GRAPH':
+            col.prop(sc, "lock_time_cursor")
 
         if sc.mode == 'DISTORTION':
             col.prop(sc, "show_grid", text="Grid")
@@ -571,15 +563,34 @@ class CLIP_PT_display(Panel):
         elif sc.mode == 'RECONSTRUCTION':
             col.prop(sc, "show_stable", text="Stable")
 
-        col.prop(sc, "lock_selection")
-
-        if sc.view == 'GRAPH':
-            col.prop(sc, "lock_time_cursor")
-
         clip = sc.clip
         if clip:
             col.label(text="Display Aspect Ratio:")
-            col.prop(clip, "display_aspect", text="")
+            row = col.row()
+            row.prop(clip, "display_aspect", text="")
+
+
+class CLIP_PT_marker_display(Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'UI'
+    bl_label = "Marker Display"
+
+    def draw(self, context):
+        layout = self.layout
+        sc = context.space_data
+
+        col = layout.column(align=True)
+
+        row = col.row()
+        row.prop(sc, "show_marker_pattern", text="Pattern")
+        row.prop(sc, "show_marker_search", text="Search")
+
+        col.prop(sc, "show_tiny_markers", text="Thin Markers")
+        col.prop(sc, "show_track_path", text="Path")
+
+        row = col.row()
+        row.active = sc.show_track_path
+        row.prop(sc, "path_length", text="Length")
 
 
 class CLIP_PT_track_settings(Panel):
index fab422dfb4308594881b79d089f6a6c2356f11cc..f7636c87bd568001f6d291dd808bf3dab06512a7 100644 (file)
@@ -364,7 +364,7 @@ class INFO_MT_help(Menu):
         layout = self.layout
 
         layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
-        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-261/'
+        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-262/'
 
         layout.separator()
 
index 0627624d2e70e01a2afd8cc04aea595fb0fe0629..a9f5e705b3d4d0468bc411913327a59ace966fc4 100644 (file)
   </style>
 </head>
 <body>
-<p class="title"><b>Blender 2.61</b></p>
+<p class="title"><b>Blender 2.62</b></p>
 <p><br></p>
 <p class="header"><b>About</b></p>
 <p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and FreeBSD and has a large world-wide community.</p>
 <p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
 <p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
 <p><br></p>
-<p class="header"><b>2.61</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.61. This release is the second official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features again.<a href="http://www.blender.org/development/release-logs/blender-261/">More information about this release</a>.</p>
+<p class="header"><b>2.62</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.62. This release is the third official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features again.<a href="http://www.blender.org/development/release-logs/blender-262/">More information about this release</a>.</p>
 <p><br></p>
 <p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.61 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
+<p class="body">Although Blender 2.62 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
 <p><br></p>
 <p class="header"><b>Package Contents</b></p>
 <p class="body">The downloaded Blender package includes:</p>
@@ -47,7 +47,7 @@
 <p class="header"><b>Links</b></p>
 <p class="body">Users:</p>
 <p class="body">       General information             <a href="http://www.blender.org">www.blender.org</a> <br>
-       Full release log                        <a href="http://www.blender.org/development/release-logs/blender-261/">www.blender.org/development/release-logs/blender-261/</a><br>
+       Full release log                        <a href="http://www.blender.org/development/release-logs/blender-262/">www.blender.org/development/release-logs/blender-262/</a><br>
        Tutorials                       <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a>    <br>
        Manual                  <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
        User Forum                      <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
index 48f1df2bd73b6c9727e36f3a3218bee5499a4588..66b2c74d7588b26c9715789ce1dc298adc8bf44e 100644 (file)
@@ -51,7 +51,7 @@ extern "C" {
                /* can be left blank, otherwise a,b,c... etc with no quotes */
 #define BLENDER_VERSION_CHAR   
                /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE  beta
+#define BLENDER_VERSION_CYCLE  rc
 
 extern char versionstr[]; /* from blender.c */
 
index 7b57ed243a17167350572b20e270153e1cc3ce57..c2d8c356aae19663e28c270ec23428809a670c4c 100644 (file)
@@ -773,6 +773,27 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames , Ob
                        copy_m4_m4(mat, pchan->pose_mat);
                UnitConverter converter;
 
+               // SECOND_LIFE_COMPATIBILITY
+               // AFAIK animation to second life is via BVH, but no
+               // reason to not have the collada-animation be correct
+               if(export_settings->second_life)
+               {
+                       float temp[4][4];
+                       copy_m4_m4(temp, bone->arm_mat);
+                       temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
+                       invert_m4(temp);
+
+                       mult_m4_m4m4(mat, mat, temp);
+
+                       if(bone->parent)
+                       {
+                               copy_m4_m4(temp, bone->parent->arm_mat);
+                               temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
+
+                               mult_m4_m4m4(mat, temp, mat);
+                       }
+               }
+
                float outmat[4][4];
                converter.mat4_to_dae(outmat,mat);
 
index c3a5c7a5383d1515331124d282df7c5a599554dc..ba7ec6859cc92f2e35f16fbb2197e07d0af4fa14 100644 (file)
@@ -83,7 +83,9 @@ private:
 
 public:
 
-       AnimationExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryAnimations(sw) { this->sw = sw; }
+       AnimationExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings):
+                       COLLADASW::LibraryAnimations(sw), export_settings(export_settings)
+                       { this->sw = sw; }
        
 
        void exportAnimations(Scene *sce);
@@ -92,6 +94,7 @@ public:
        void operator() (Object *ob); 
        
 protected:
+       const ExportSettings *export_settings;
 
        void dae_animation(Object* ob, FCurve *fcu, char* transformName , bool is_param, Material *ma = NULL);
 
index fcfc197ce804a3de2b51296cda96bb07733896b1..0e89f2db74bed49f21b836fa5c4856692f7bf6c3 100644 (file)
@@ -221,8 +221,31 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
                mult_m4_m4m4(mat, invpar, pchan->pose_mat);
        }
        else {
-               // get world-space from armature-space
-               mult_m4_m4m4(mat, ob_arm->obmat, pchan->pose_mat);
+               copy_m4_m4(mat, pchan->pose_mat);
+               // Why? Joint's localspace is still it's parent node
+               //get world-space from armature-space
+               //mult_m4_m4m4(mat, ob_arm->obmat, pchan->pose_mat);
+       }
+
+       // SECOND_LIFE_COMPATIBILITY
+       if(export_settings->second_life)
+       {
+               // Remove rotations vs armature from transform
+               // parent_rest_rot * mat * irest_rot
+               float temp[4][4];
+               copy_m4_m4(temp, bone->arm_mat);
+               temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
+               invert_m4(temp);
+
+               mult_m4_m4m4(mat, mat, temp);
+
+               if(bone->parent)
+               {
+                       copy_m4_m4(temp, bone->parent->arm_mat);
+                       temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
+
+                       mult_m4_m4m4(mat, temp, mat);
+               }
        }
 
        TransformWriter::add_node_transform(node, mat,NULL );
@@ -341,10 +364,16 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
 {
        std::string source_id = controller_id + BIND_POSES_SOURCE_ID_SUFFIX;
 
+       int totjoint = 0;
+       for (bDeformGroup *def = (bDeformGroup*)defbase->first; def; def = def->next) {
+               if (is_bone_defgroup(ob_arm, def))
+                       totjoint++;
+       }
+
        COLLADASW::FloatSourceF source(mSW);
        source.setId(source_id);
        source.setArrayId(source_id + ARRAY_ID_SUFFIX);
-       source.setAccessorCount(BLI_countlist(defbase));
+       source.setAccessorCount(totjoint); //BLI_countlist(defbase));
        source.setAccessorStride(16);
        
        source.setParameterTypeName(&COLLADASW::CSWC::CSW_VALUE_TYPE_FLOAT4x4);
@@ -366,16 +395,27 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase
 
        for (bDeformGroup *def = (bDeformGroup*)defbase->first; def; def = def->next) {
                if (is_bone_defgroup(ob_arm, def)) {
-
                        bPoseChannel *pchan = get_pose_channel(pose, def->name);
 
                        float mat[4][4];
                        float world[4][4];
                        float inv_bind_mat[4][4];
 
-                       // make world-space matrix, arm_mat is armature-space
-                       mult_m4_m4m4(world, ob_arm->obmat, pchan->bone->arm_mat);
-                       
+                       // SECOND_LIFE_COMPATIBILITY
+                       if(export_settings->second_life)
+                       {
+                               // Only translations, no rotation vs armature
+                               float temp[4][4];
+                               unit_m4(temp);
+                               copy_v3_v3(temp[3], pchan->bone->arm_mat[3]);
+                               mult_m4_m4m4(world, ob_arm->obmat, temp);
+                       }
+                       else
+                       {
+                               // make world-space matrix, arm_mat is armature-space
+                               mult_m4_m4m4(world, ob_arm->obmat, pchan->bone->arm_mat);
+                       }
+
                        invert_m4_m4(mat, world);
                        converter.mat4_to_dae(inv_bind_mat, mat);
 
index 6e8abc083580a27c44c5250c0eaa009e5682f439..6e04a1773bb6118e715fb3ce22e9390272bafb9e 100644 (file)
@@ -257,7 +257,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce)
        }
 
        // <library_animations>
-       AnimationExporter ae(&sw);
+       AnimationExporter ae(&sw, this->export_settings);
        ae.exportAnimations(sce);
 
        // <library_controllers>
index 1ad7c8c370e7b52e470f314aad5a2ae8781abe0d..80e20acbe4895635c82cbdcba8d0751089bb9793 100644 (file)
@@ -31,6 +31,7 @@ struct ExportSettings
 {
  public:
  bool selected;
+ bool second_life;
  char *filepath;
 };
 
index 379a0619040a9ff13dd716eab1255378d3f7e3c0..a2bca6733e1d4670d78055173fd09792947c36f2 100644 (file)
@@ -59,6 +59,7 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[][4],
 
 void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
 {
+       /*
        float rot[3], loc[3], scale[3];
 
        if (ob->parent) {
@@ -91,6 +92,27 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
        }
 
        add_transform(node, loc, rot, scale);
+       */
+
+       /* Using parentinv should allow use of existing curves */
+       // If parentinv is identity don't add it.
+       bool add_parinv = false;
+       for(int i = 0; i < 16; ++i)
+       {
+               float f = (i%4 == i/4) ? 1.0f : 0.0f ;
+               if(ob->parentinv[i%4][i/4] != f) add_parinv = true;
+       }
+
+       // Eat this 3ds Max et friends
+       if(add_parinv)
+       {
+               double dmat[4][4];
+               UnitConverter converter;
+               converter.mat4_to_dae_double(dmat, ob->parentinv);
+               node.addMatrix("parentinverse", dmat);
+       }
+
+       add_transform(node, ob->loc, ob->rot, ob->size);
 }
 
 void TransformWriter::add_node_transform_identity(COLLADASW::Node& node)
index 0731faceeedc412169a52db8858ca0690ca1b9d9..39114f6543b725fbca4299dbab555b3aa2778c88 100644 (file)
@@ -49,11 +49,12 @@ extern "C"
                return 0;
        }
 
-       int collada_export(Scene *sce, const char *filepath, int selected)
+       int collada_export(Scene *sce, const char *filepath, int selected, int second_life)
        {
                ExportSettings export_settings;
                
                export_settings.selected = selected != 0;
+               export_settings.second_life = second_life != 0;
                export_settings.filepath = (char *)filepath;
 
                /* annoying, collada crashes if file cant be created! [#27162] */
index b86f37b7af62a9ae407a265ec994eb851100635d..161977368db8204fc71c7f8ab8689823cfd42456 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
         * both return 1 on success, 0 on error
         */
        int collada_import(bContext *C, const char *filepath);
-       int collada_export(Scene *sce, const char *filepath, int selected);
+       int collada_export(Scene *sce, const char *filepath, int selected, int second_life);
 #ifdef __cplusplus
 }
 #endif
index 4565806702f9e70e93543b07b6430c4a724f5afa..495c8a8f842efa314afd2a77bb660fb48a25a01f 100644 (file)
@@ -3389,8 +3389,12 @@ static int convertspline(short type, Nurb *nu)
                        nu->orderu= 4;
                        nu->orderv= 1;
                        nu->type = type;
+
+#if 0          /* UNUSED */
                        if(nu->flagu & CU_NURB_CYCLIC) c= nu->orderu-1; 
                        else c= 0;
+#endif
+
                        if(type== CU_NURBS) {
                                nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
                                nu->flagu |= CU_NURB_BEZIER;
index 6c93727bf55394d19c43d70b2ab4460fa9397239..99572345c96539be706ccbf88883691eb18186aa 100644 (file)
@@ -1117,14 +1117,6 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
                        p->custom_color[1]= 0.0f;
                        p->custom_color[2]= 0.5f;
                        p->custom_color[3]= 0.9f;
-
-                       /* check that gpencil data is allowed to be drawn */
-                       if ((sc->flag & SC_SHOW_GPENCIL)==0) {
-                               p->status= GP_STATUS_ERROR;
-                               if (G.f & G_DEBUG)
-                                       printf("Error: In active view, Grease Pencil not shown \n");
-                               return 0;
-                       }
                }
                        break;
 
index c7635bcf2cca51f4bc7e7d37d1b2d266879b1ef1..f689fb049fea7f4e0625ea5ca4d8a7b842aa6c77 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "ED_mball.h"
 #include "ED_screen.h"
+#include "ED_object.h"
 
 #include "BLI_utildefines.h"
 
@@ -77,5 +78,7 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
                RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
        kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
                RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
+
+       ED_object_generic_keymap(keyconf, keymap, 3);
 }
 
index a331703690b199a76bf2ead160dc9079118c6d3b..de43b30d4f416a537237ce6f63597716c0aea239 100644 (file)
@@ -586,7 +586,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
        }
 
        /* pyramid */
-       if(sel && TRACK_SELECTED(track) && (sc->flag&SC_SHOW_PYRAMID_LEVELS) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) {
+       if(sel && TRACK_SELECTED(track) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) {
                if(track->flag&TRACK_LOCKED) {
                        if(act) UI_ThemeColor(TH_ACT_MARKER);
                        else if(track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
@@ -1307,7 +1307,7 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
        MovieClip *clip= ED_space_clip(sc);
        ImBuf *ibuf;
 
-       if((sc->flag&SC_SHOW_GPENCIL)==0 || !clip)
+       if(!clip)
                return;
 
        if(onlyv2d) {
index 0d34cc2cfbf8d4600962277a67fa2f1ab11b0eab..5abdafbfffc7fd39f4f467124f39aa20f469b76c 100644 (file)
@@ -157,7 +157,7 @@ static SpaceLink *clip_new(const bContext *C)
 
        sc= MEM_callocN(sizeof(SpaceClip), "initclip");
        sc->spacetype= SPACE_CLIP;
-       sc->flag= SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_SHOW_GPENCIL|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES;
+       sc->flag= SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES;
        sc->zoom= 1.0f;
        sc->path_length= 20;
        sc->scopes.track_preview_height= 120;
@@ -530,6 +530,12 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.lock_selection");
 
+       kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", DKEY, KM_PRESS, KM_ALT, 0);
+       RNA_string_set(kmi->ptr, "data_path", "space_data.show_disabled");
+
+       kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_ALT, 0);
+       RNA_string_set(kmi->ptr, "data_path", "space_data.show_marker_search");
+
        kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.use_mute_footage");
 
index a595fc1f02be1f51504f200b9f7ea5dda938d355..55481d6aa7243a4c70af7153275fee098f9b3e86 100644 (file)
@@ -1284,7 +1284,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
        }
 
        /* default for now */
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, ob);
+       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d);
 }
 
 static void view3d_panel_object(const bContext *C, Panel *pa)
index 06138bc075720e79ac6079cbcb8902d57a8f279b..64d858bbcee8d314b444639fa335d79029665864 100644 (file)
@@ -896,11 +896,11 @@ enum {
 #define SC_SHOW_GRID                   (1<<9)
 #define SC_SHOW_STABLE                 (1<<10)
 #define SC_MANUAL_CALIBRATION  (1<<11)
-#define SC_SHOW_GPENCIL                        (1<<12)
+/*#define SC_SHOW_GPENCIL                      (1<<12)*/       /* UNUSED */
 #define SC_SHOW_FILTERS                        (1<<13)
 #define SC_SHOW_GRAPH_FRAMES   (1<<14)
 #define SC_SHOW_GRAPH_TRACKS   (1<<15)
-#define SC_SHOW_PYRAMID_LEVELS (1<<16)
+/*#define SC_SHOW_PYRAMID_LEVELS       (1<<16) */      /* UNUSED */
 #define SC_LOCK_TIMECURSOR             (1<<17)
 
 /* SpaceClip->mode */
index 320a7e95ef6a1a7f626619b960a4a0796d498df5..bab9ed60f165c8f7ba960ca56bd0d52372ed6f63 100644 (file)
@@ -2620,14 +2620,13 @@ static void rna_def_mesh(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_PAINT_MASK);
        RNA_def_property_ui_text(prop, "Paint Mask", "Face selection masking for painting");
        RNA_def_property_ui_icon(prop, ICON_FACESEL_HLT, 0);
-       RNA_def_property_update(prop, 0, "rna_Mesh_update_facemask");
-
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Mesh_update_facemask");
        
        prop= RNA_def_property(srna, "use_paint_mask_vertex", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_VERT_SEL);
        RNA_def_property_ui_text(prop, "Vertex Selection", "Vertex selection masking for painting (weight paint only)");
        RNA_def_property_ui_icon(prop, ICON_VERTEXSEL, 0);
-       RNA_def_property_update(prop, 0, "rna_Mesh_update_vertmask");
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Mesh_update_vertmask");
 
        /* readonly editmesh info - use for extrude menu */
        prop= RNA_def_property(srna, "total_vert_sel", PROP_INT, PROP_UNSIGNED);
index 153317fb687b2507badc073b3f64da9fda92f671..6d588632c95f6f20fadb092332831c662d1e74de 100644 (file)
@@ -84,9 +84,9 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name
 /* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
 #include "../../collada/collada.h"
 
-static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected)
+static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int second_life)
 {
-       collada_export(scene, filepath, selected);
+       collada_export(scene, filepath, selected, second_life);
 }
 
 #endif
@@ -110,10 +110,11 @@ void RNA_api_scene(StructRNA *srna)
 #ifdef WITH_COLLADA
        /* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
        func= RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
-       RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
-       parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
+       parm= RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
        RNA_def_property_flag(parm, PROP_REQUIRED);
        RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
+       parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
+       parm= RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
        RNA_def_function_ui_description(func, "Export to collada file");
 #endif
 }
index 799366a5234b4c16858dc83cf78887cb025c61fc..8499e2fa111b5fc6ff58e6017fafa7801c746a58 100644 (file)
@@ -2888,12 +2888,6 @@ static void rna_def_space_clip(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_SEARCH);
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 
-       /* show pyramid */
-       prop= RNA_def_property(srna, "show_pyramid_levels", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_ui_text(prop, "Show Pyramid ", "Show patterns for each pyramid level for markers (KLT only)");
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_PYRAMID_LEVELS);
-       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
-
        /* lock to selection */
        prop= RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_ui_text(prop, "Lock to Selection", "Lock viewport to selected markers during playback");
@@ -2973,12 +2967,6 @@ static void rna_def_space_clip(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 
-       /* show stable */
-       prop= RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GPENCIL);
-       RNA_def_property_ui_text(prop, "Show Grease Pencil", "Show grease pencil strokes over the footage");
-       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
-
        /* show filters */
        prop= RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_FILTERS);
index b58b4a646e2ad71a9192063a7f0494bfb9282c67..a7d09682a1467379a90b21dd70a4ba97361a73df 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLO_sys_types.h"
 #include "BKE_global.h"
 #include "BLI_dynstr.h"
+#include "BLI_path_util.h"
 
 #ifdef __APPLE__
 #include <QuickTime/Movies.h>
index 4052c2219356688bbe4c1e38e61daa06c27a4b6b..19c45164b5307e66eb017719db9e76f19c871a0b 100644 (file)
@@ -1324,7 +1324,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
        uiItemL(col, "Links", ICON_NONE);
        uiItemStringO(col, IFACE_("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
        uiItemStringO(col, IFACE_("Credits"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
-       uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-261");
+       uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-262");
        uiItemStringO(col, IFACE_("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
        uiItemStringO(col, IFACE_("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
        uiItemStringO(col, IFACE_("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
@@ -2135,7 +2135,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
 static int wm_collada_export_exec(bContext *C, wmOperator *op)
 {
        char filename[FILE_MAX];
-       int selected;
+       int selected, second_life;
        
        if(!RNA_struct_property_is_set(op->ptr, "filepath")) {
                BKE_report(op->reports, RPT_ERROR, "No filename given");
@@ -2144,7 +2144,8 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
 
        RNA_string_get(op->ptr, "filepath", filename);
        selected = RNA_boolean_get(op->ptr, "selected");
-       if(collada_export(CTX_data_scene(C), filename, selected)) {
+       second_life = RNA_boolean_get(op->ptr, "second_life");
+       if(collada_export(CTX_data_scene(C), filename, selected, second_life)) {
                return OPERATOR_FINISHED;
        }
        else {
@@ -2164,6 +2165,8 @@ static void WM_OT_collada_export(wmOperatorType *ot)
        WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
        RNA_def_boolean(ot->srna, "selected", 0, "Export only selected",
                "Export only selected elements");
+       RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life",
+               "Compatibility mode for Second Life");
 }
 
 /* function used for WM_OT_save_mainfile too */
index d1e80226cd4da1c361feaa2273d23573be620874..a22122a245e5f430e192cac08c8e9a147e302d92 100644 (file)
@@ -231,6 +231,8 @@ bool CcdPhysicsController::CreateSoftbody()
                        if (trimeshshape->getMeshInterface()->getNumSubParts()==1)
                        {
                                unsigned char* vertexBase;
+                               btScalar* scaledVertexBase;
+                               btVector3 localScaling;
                                PHY_ScalarType vertexType;
                                int numverts;
                                int vertexstride;
@@ -238,8 +240,16 @@ bool CcdPhysicsController::CreateSoftbody()
                                int indexstride;
                                PHY_ScalarType indexType;
                                trimeshshape->getMeshInterface()->getLockedVertexIndexBase(&vertexBase,numverts,vertexType,vertexstride,&indexbase,indexstride,numtris,indexType);
-                               
-                               psb = btSoftBodyHelpers::CreateFromTriMesh(worldInfo,(const btScalar*)vertexBase,(const int*)indexbase,numtris,false);
+                               localScaling = scaledtrimeshshape->getLocalScaling();
+                               scaledVertexBase = new btScalar[numverts*3];
+                               for (int i=0; i<numverts*3; i+=3)
+                               {
+                                       scaledVertexBase[i] = ((const btScalar*)vertexBase)[i] * localScaling.getX();
+                                       scaledVertexBase[i+1] = ((const btScalar*)vertexBase)[i+1] * localScaling.getY();
+                                       scaledVertexBase[i+2] = ((const btScalar*)vertexBase)[i+2] * localScaling.getZ();
+                               }
+                               psb = btSoftBodyHelpers::CreateFromTriMesh(worldInfo,scaledVertexBase,(const int*)indexbase,numtris,false);
+                               delete [] scaledVertexBase;
                        }
                } else
                {