svn merge -r 12856:12937 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / src / buttons_object.c
index fcb05c8f00e4f556762acaf33f0fc7d822a48d5a..d23b12803c4b1568f185aeb442edba28ef7429ce 100644 (file)
@@ -940,29 +940,29 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
                                else {
                                        strcpy (data->subtarget, "");
                                }
-
+                               
                                uiBlockEndAlign(block);
-
+                               
                                /* Settings */
                                uiBlockBeginAlign(block);
                                uiDefButBitS(block, TOG, CONSTRAINT_IK_TIP, B_CONSTRAINT_TEST, "Use Tail", *xco, *yco-92, 137, 19, &data->flag, 0, 0, 0, 0, "Include Bone's tail als last element in Chain");
-                               uiDefButI(block, NUM, B_CONSTRAINT_TEST, "ChainLen:", *xco, *yco-112,137,19, &data->rootbone, 0, 255, 0, 0, "If not zero, the amount of bones in this chain");
-
+                               uiDefButS(block, NUM, B_CONSTRAINT_TEST, "ChainLen:", *xco, *yco-112,137,19, &data->rootbone, 0, 255, 0, 0, "If not zero, the amount of bones in this chain");
+                               
                                uiBlockBeginAlign(block);
                                uiDefButF(block, NUMSLI, B_CONSTRAINT_TEST, "PosW ", *xco+147, *yco-92, 137, 19, &data->weight, 0.01, 1.0, 2, 2, "For Tree-IK: weight of position control for this target");
                                uiDefButBitS(block, TOG, CONSTRAINT_IK_ROT, B_CONSTRAINT_TEST, "Rot", *xco+147, *yco-112, 40,19, &data->flag, 0, 0, 0, 0, "Chain follows rotation of target");
                                uiDefButF(block, NUMSLI, B_CONSTRAINT_TEST, "W ", *xco+187, *yco-112, 97, 19, &data->orientweight, 0.01, 1.0, 2, 2, "For Tree-IK: Weight of orientation control for this target");
-
+                               
                                uiBlockBeginAlign(block);
-
+                               
                                uiDefButBitS(block, TOG, CONSTRAINT_IK_STRETCH, B_CONSTRAINT_TEST, "Stretch", *xco, *yco-137,137,19, &data->flag, 0, 0, 0, 0, "Enable IK stretching");
                                uiBlockBeginAlign(block);
                                uiDefButS(block, NUM, B_CONSTRAINT_TEST, "Iterations:", *xco+147, *yco-137, 137, 19, &data->iterations, 1, 10000, 0, 0, "Maximum number of solving iterations"); 
                                uiBlockEndAlign(block);
-
+                               
                                /* Pole Vector */
                                uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "Pole Target:", *xco+147, *yco-24, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); 
-
+                               
                                uiBlockBeginAlign(block);
                                uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_CONSTRAINT_CHANGETARGET, "OB:", *xco+147, *yco-44, 137, 19, &data->poletar, "Pole Target Object"); 
                                if (is_armature_target(data->poletar)) {
@@ -2858,15 +2858,6 @@ void do_effects_panels(unsigned short event)
                break;
        case B_PART_ENABLE:
                if(psys) {
-                       ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
-                       if(psys->flag & PSYS_ENABLED) {
-                               psmd->modifier.mode |= eModifierMode_Realtime;
-                       }
-                       else {
-                               psmd->modifier.mode &= ~eModifierMode_Realtime;
-                               PE_free_particle_edit(psys);
-                       }
-
                        DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                        allqueue(REDRAWBUTSOBJECT, 0);
@@ -3488,7 +3479,7 @@ static void sb_clear_cache(void *ob_v, void *actsoft_v)
 static void object_softbodies(Object *ob)
 {
        SoftBody *sb=ob->soft;
-       ParticleSystem *psys;
+       ParticleSystem *psys=NULL;
        uiBlock *block;
        uiBut *but;
        static int val;
@@ -3521,7 +3512,7 @@ static void object_softbodies(Object *ob)
                MEM_freeN(menustr);
        }
 
-       if(psys_cur){
+       if(psys_cur && psys){
                if(*softflag & OB_SB_ENABLE)
                        val=1;
                else