Index: ode.h
===================================================================
--- ode.h	(revision 439)
+++ ode.h	(revision 440)
@@ -1246,6 +1246,16 @@
 /**
 same as above, but using motor's name.
 **/
+
+__rayapi dReal raydium_ode_motor_angle_get(int m, int axe);
+/**
+Will return current motor angle on ##axe## axe. Avaible only for angular motor.
+**/
+
+__rayapi dReal raydium_ode_motor_angle_get_name(char *name, int axe);
+/** 
+same as above, but using motor's name.
+**/
 
 __rayapi void raydium_ode_motor_rocket_set (int m, int element, dReal x, dReal y, dReal z);
 /**
 i;
 dMass m;
-char name[RAYDIUM_MAX_NAME_LEN];
 
-if(iname==NULL)
-    raydium_ode_name_auto("Sphere",name);
-else if (iname[0]==0)
-    raydium_ode_name_auto("Sphere",name);
-else
-    strcpy(name,iname);
-
 if(raydium_ode_element_find(name)>=0)
     {
     raydium_log("ODE: Error: Cannot add element \"%s\": name already exists",name);
@@ -1310,13 +1303,12 @@
      strcpy(raydium_ode_element[i].name,name);
      raydium_ode_element[i].object=group;
      raydium_ode_element[i].user_tag=tag;
-     if(mesh!=NULL)
-         if(strlen(mesh))
-          {
-          raydium_ode_element[i].mesh=raydium_object_find_load(mesh);
-          if(radius<0) // AUTODETECT
-             radius=raydium_object_find_dist_max(raydium_ode_element[i].mesh)*-radius;
-          }
+     if(strlen(mesh))
+      {
+      raydium_ode_element[i].mesh=raydium_object_find_load(mesh);
+      if(radius<0) // AUTODETECT
+         radius=raydium_object_find_dist_max(raydium_ode_element[i].mesh)*-radius;
+      }
 
      if(type==RAYDIUM_ODE_STANDARD)
         {
@@ -1352,20 +1344,12 @@
 
 }
 
-int raydium_ode_object_box_add(char *iname, int group, dReal mass, dReal tx, dReal ty, dReal tz, signed char type, int tag, char *mesh)
+int raydium_ode_object_box_add(char *name, int group, dReal mass, dReal tx, dReal ty, dReal tz, signed char type, int tag, char *mesh)
 {
 int i;
 dMass m;
 dReal sizes[3];
-char name[RAYDIUM_MAX_NAME_LEN];
 
-if(iname==NULL)
-    raydium_ode_name_auto("Box",name);
-else if (iname[0]==0)
-    raydium_ode_name_auto("Box",name);
-else
-    strcpy(name,iname);
-
 if(raydium_ode_element_find(name)>=0)
     {
     raydium_log("ODE: Cannot add element \"%s\": name already exists",name);
@@ -1391,19 +1375,18 @@
      strcpy(raydium_ode_element[i].name,name);
      raydium_ode_element[i].object=group;
      raydium_ode_element[i].user_tag=tag;
-     if(mesh!=NULL)
-         if(strlen(mesh))
+     if(strlen(mesh))
+     {
+      raydium_ode_element[i].mesh=raydium_object_find_load(mesh);
+      if(tx<0) // AUTODETECT
          {
-          raydium_ode_element[i].mesh=raydium_object_find_load(mesh);
-          if(tx<0) // AUTODETECT
-             {
-             dReal ratio=tx;
-             raydium_object_find_axes_max(raydium_ode_element[i].mesh,&tx,&ty,&tz);
-             tx*=(-ratio);
-             ty*=(-ratio);
-             tz*=(-ratio);
-             }
+         dReal ratio=tx;
+         raydium_object_find_axes_max(raydium_ode_element[i].mesh,&tx,&ty,&tz);
+         tx*=(-ratio);
+         ty*=(-ratio);
+         tz*=(-ratio);
          }
+     }
 
      if(type==RAYDIUM_ODE_STANDARD)
      {
@@ -1442,20 +1425,12 @@
 
 }
 
-int raydium_ode_object_capsule_add(char *iname, int group, dReal mass, dReal radius, dReal length, signed char type, int tag, char *mesh)
+int raydium_ode_object_capsule_add(char *name, int group, dReal mass, dReal radius, dReal length, signed char type, int tag, char *mesh)
 {
 int i;
 dMass m;
 dReal sizes[3];
-char name[RAYDIUM_MAX_NAME_LEN];
 
-if(iname==NULL)
-    raydium_ode_name_auto("Capsule",name);
-else if (iname[0]==0)
-    raydium_ode_name_auto("Capsule",name);
-else
-    strcpy(name,iname);
-
 if(raydium_ode_element_find(name)>=0)
     {
     raydium_log("ODE: Cannot add element \"%s\": name already exists",name);
@@ -1481,32 +1456,31 @@
         strcpy(raydium_ode_element[i].name,name);
         raydium_ode_element[i].object=group;
         raydium_ode_element[i].user_tag=tag;
-        if(mesh!=NULL)
-            if(strlen(mesh))
+        if(strlen(mesh))
+        {
+            raydium_ode_element[i].mesh=raydium_object_find_load(mesh);
+            if(radius<0) // AUTODETECT
             {
-                raydium_ode_element[i].mesh=raydium_object_find_load(mesh);
-                if(radius<0) // AUTODETECT
-                {
-                    dReal ratio=radius;
-                    GLfloat tx,ty,tz;
-                    raydium_object_find_axes_max(raydium_ode_element[i].mesh,&tx,&ty,&tz);
-                    if(tz<tx || tz<ty)
-                        {
-                        raydium_log("ODE: Error: cannot create capsule: autodetect failed: longest side of the mesh should be Z !");
-                        return -1;
-                        }
-                    radius=(raydium_math_max(tx,ty)*(-ratio))/2.f;
-                    length=tz*(-ratio);
-                }
-            // ODE: "cylinder's length is not counting the caps (half-spheres)"
-            length-=(radius*2.f);
+                dReal ratio=radius;
+                GLfloat tx,ty,tz;
+                raydium_object_find_axes_max(raydium_ode_element[i].mesh,&tx,&ty,&tz);
+                if(tz<tx || tz<ty)
+                    {
+                    raydium_log("ODE: Error: cannot create capsule: autodetect failed: longest side of the mesh should be Z !");
+                    return -1;
+                    }
+                radius=(raydium_math_max(tx,ty)*(-ratio))/2.f;
+                length=tz*(-ratio);
+            }
+        // ODE: "cylinder's length is not counting the caps (half-spheres)"
+        length-=(radius*2.f);
 
-            if(radius<=0 || length<=0)
-                {
-                raydium_log("ODE: Error: cannot create capsule: invalid size: The full lenght has to be at least twice the radius (Z aligned)");
-                return -1;
-                }
+        if(radius<=0 || length<=0)
+            {
+            raydium_log("ODE: Error: cannot create capsule: invalid size: The full lenght has to be at least twice the radius (Z aligned)");
+            return -1;
             }
+        }
 
     if(type==RAYDIUM_ODE_STANDARD)
     {