Nathan's huge ipo patch.
- now more than 31 channels possible for ipos - added lotsa new channels all over - Texture block has ipo now too - recoded getname_ei functions (Will ask nathan to give release log info when he's back!)
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* This is a new part of Blender.
|
||||
*
|
||||
* Contributor(s): Jacques Guignot
|
||||
* Contributor(s): Jacques Guignot, Nathan Letwory
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <BKE_global.h>
|
||||
#include <BKE_object.h>
|
||||
#include <BKE_library.h>
|
||||
#include <BSE_editipo.h>
|
||||
#include <BLI_blenlib.h>
|
||||
|
||||
#include "constant.h"
|
||||
@@ -43,11 +44,7 @@
|
||||
|
||||
|
||||
/* forward declarations */
|
||||
void GetIpoCurveName (IpoCurve * icu, char *s);
|
||||
void getname_mat_ei (int nr, char *str);
|
||||
void getname_world_ei (int nr, char *str);
|
||||
void getname_cam_ei (int nr, char *str);
|
||||
void getname_ob_ei (int nr, char *str);
|
||||
char *GetIpoCurveName (IpoCurve * icu);
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Python API function prototypes for the Ipo module. */
|
||||
@@ -206,6 +203,18 @@ M_Ipo_New (PyObject * self, PyObject * args)
|
||||
idcode = ID_WO;
|
||||
if (!strcmp (code, "Material"))
|
||||
idcode = ID_MA;
|
||||
if (!strcmp (code, "Texture"))
|
||||
idcode = ID_TE;
|
||||
if (!strcmp (code, "Lamp"))
|
||||
idcode = ID_LA;
|
||||
/* if (!strcmp (code, "Constraint"))
|
||||
idcode = IPO_CO;
|
||||
if (!strcmp (code, "Sequence"))
|
||||
idcode = ID_SEQ;*/
|
||||
if (!strcmp (code, "Curve"))
|
||||
idcode = ID_CU;
|
||||
if (!strcmp (code, "Key"))
|
||||
idcode = ID_KE;
|
||||
|
||||
if (idcode == -1)
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "Bad code"));
|
||||
@@ -444,6 +453,832 @@ Ipo_getNcurves (BPy_Ipo * self)
|
||||
return (PyInt_FromLong (i));
|
||||
}
|
||||
|
||||
int Ipo_laIcuName(char * s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "Energy"))
|
||||
{
|
||||
*param = LA_ENERGY;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "R"))
|
||||
{
|
||||
*param = LA_COL_R;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "G"))
|
||||
{
|
||||
*param = LA_COL_G;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "B"))
|
||||
{
|
||||
*param = LA_COL_B;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Dist"))
|
||||
{
|
||||
*param = LA_DIST;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SpoSi"))
|
||||
{
|
||||
*param = LA_SPOTSI;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SpoBl"))
|
||||
{
|
||||
*param = LA_SPOTBL;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Quad1"))
|
||||
{
|
||||
*param = LA_QUAD1;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Quad2"))
|
||||
{
|
||||
*param = LA_QUAD2;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "HaInt"))
|
||||
{
|
||||
*param = LA_HALOINT;
|
||||
ok = 1;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_woIcuName(char * s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "HorR"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "HorG"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "HorB"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ZenR"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ZenG"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ZenB"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Expos"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Misi"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MisDi"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MisHi"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "StarR"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "StarB"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "StarG"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ClSta"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "StarDi"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "StarSi"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_maIcuName(char * s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "R"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "G"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "B"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SpecR"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SpecG"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SpecB"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MirR"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MirG"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MirB"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Ref"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Alpha"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Emit"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Amb"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Spec"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Hard"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SpTra"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Ior"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Mode"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "HaSize"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Translu"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RayMir"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "FresMir"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "FresMirI"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "FresTra"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "FresTraI"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "TraGlow"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_keIcuName(char *s, int * param)
|
||||
{
|
||||
char key[10];
|
||||
int ok = 0;
|
||||
int nr = 0;
|
||||
if (!strcmp (s, "Speed"))
|
||||
{
|
||||
*param = KEY_SPEED;
|
||||
ok = 1;
|
||||
}
|
||||
for(nr = 1; nr<32; nr++) {
|
||||
sprintf(key, "Key %d", nr);
|
||||
if (!strcmp (s, key)) {
|
||||
*param = nr;
|
||||
ok = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_seqIcuName(char *s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "Fac"))
|
||||
{
|
||||
*param = SEQ_FAC1;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_cuIcuName(char *s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "Speed"))
|
||||
{
|
||||
*param = CU_SPEED;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_coIcuName(char *s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "Inf"))
|
||||
{
|
||||
*param = CO_ENFORCE;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_acIcuName(char *s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "LocX"))
|
||||
{
|
||||
*param = AC_LOC_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "LocY"))
|
||||
{
|
||||
*param = AC_LOC_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "LocZ"))
|
||||
{
|
||||
*param = AC_LOC_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeX"))
|
||||
{
|
||||
*param = AC_SIZE_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeY"))
|
||||
{
|
||||
*param = AC_SIZE_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeZ"))
|
||||
{
|
||||
*param = AC_SIZE_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "QuatX"))
|
||||
{
|
||||
*param = AC_QUAT_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "QuatY"))
|
||||
{
|
||||
*param = AC_QUAT_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "QuatZ"))
|
||||
{
|
||||
*param = AC_QUAT_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "QuatW"))
|
||||
{
|
||||
*param = AC_QUAT_W;
|
||||
ok = 1;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_caIcuName(char * s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "Lens"))
|
||||
{
|
||||
*param = CAM_LENS;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ClSta"))
|
||||
{
|
||||
*param = CAM_STA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ClEnd"))
|
||||
{
|
||||
*param = CAM_END;
|
||||
ok = 1;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_texIcuName(char * s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "NSize"))
|
||||
{
|
||||
*param = TE_NSIZE;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "NDepth"))
|
||||
{
|
||||
*param = TE_NDEPTH;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "NType"))
|
||||
{
|
||||
*param = TE_NTYPE;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Turb"))
|
||||
{
|
||||
*param = TE_TURB;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Vnw1"))
|
||||
{
|
||||
*param = TE_VNW1;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Vnw2"))
|
||||
{
|
||||
*param = TE_VNW2;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Vnw3"))
|
||||
{
|
||||
*param = TE_VNW3;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Vnw4"))
|
||||
{
|
||||
*param = TE_VNW4;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MinkMExp"))
|
||||
{
|
||||
*param = TE_VNMEXP;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "DistM"))
|
||||
{
|
||||
*param = TE_VN_DISTM;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColT"))
|
||||
{
|
||||
*param = TE_VN_COLT;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "iScale"))
|
||||
{
|
||||
*param = TE_ISCA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "DistA"))
|
||||
{
|
||||
*param = TE_DISTA;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MgType"))
|
||||
{
|
||||
*param = TE_MG_TYP;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MgH"))
|
||||
{
|
||||
*param = TE_MGH;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Lacu"))
|
||||
{
|
||||
*param = TE_MG_LAC;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Oct"))
|
||||
{
|
||||
*param = TE_MG_OCT;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MgOff"))
|
||||
{
|
||||
*param = TE_MG_OFF;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "MgGain"))
|
||||
{
|
||||
*param = TE_MG_GAIN;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "NBase1"))
|
||||
{
|
||||
*param = TE_N_BAS1;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "NBase2"))
|
||||
{
|
||||
*param = TE_N_BAS2;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
int Ipo_obIcuName(char * s, int * param)
|
||||
{
|
||||
int ok = 0;
|
||||
if (!strcmp (s, "LocX"))
|
||||
{
|
||||
*param = OB_LOC_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "LocY"))
|
||||
{
|
||||
*param = OB_LOC_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "LocZ"))
|
||||
{
|
||||
*param = OB_LOC_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RotX"))
|
||||
{
|
||||
*param = OB_ROT_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RotY"))
|
||||
{
|
||||
*param = OB_ROT_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RotZ"))
|
||||
{
|
||||
*param = OB_ROT_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeX"))
|
||||
{
|
||||
*param = OB_SIZE_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeY"))
|
||||
{
|
||||
*param = OB_SIZE_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeZ"))
|
||||
{
|
||||
*param = OB_SIZE_Z;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (s, "dLocX"))
|
||||
{
|
||||
*param = OB_DLOC_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dLocY"))
|
||||
{
|
||||
*param = OB_DLOC_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dLocZ"))
|
||||
{
|
||||
*param = OB_DLOC_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dRotX"))
|
||||
{
|
||||
*param = OB_DROT_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dRotY"))
|
||||
{
|
||||
*param = OB_DROT_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dRotZ"))
|
||||
{
|
||||
*param = OB_DROT_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dSizeX"))
|
||||
{
|
||||
*param = OB_DSIZE_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dSizeY"))
|
||||
{
|
||||
*param = OB_DSIZE_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dSizeZ"))
|
||||
{
|
||||
*param = OB_DSIZE_Z;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (s, "Layer"))
|
||||
{
|
||||
*param = OB_LAY;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Time"))
|
||||
{
|
||||
*param = OB_TIME;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (s, "ColR"))
|
||||
{
|
||||
*param = OB_COL_R;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColG"))
|
||||
{
|
||||
*param = OB_COL_G;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColB"))
|
||||
{
|
||||
*param = OB_COL_B;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColA"))
|
||||
{
|
||||
*param = OB_COL_A;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "FStreng"))
|
||||
{
|
||||
*param = OB_PD_FSTR;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "FFall"))
|
||||
{
|
||||
*param = OB_PD_FFALL;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Damping"))
|
||||
{
|
||||
*param = OB_PD_SDAMP;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RDamp"))
|
||||
{
|
||||
*param = OB_PD_RDAMP;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Perm"))
|
||||
{
|
||||
*param = OB_PD_PERM;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
struct Lamp * Ipo_getIdLa(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->lamp.first;
|
||||
struct Lamp *la = 0;
|
||||
while(link)
|
||||
{
|
||||
la = (struct Lamp *)link;
|
||||
if(la->ipo == ipo) return la;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct Camera * Ipo_getIdCam(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->camera.first;
|
||||
struct Camera *cam = 0;
|
||||
while(link)
|
||||
{
|
||||
cam = (struct Camera *)link;
|
||||
if(cam->ipo == ipo) return cam;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct Tex * Ipo_getIdTex(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->tex.first;
|
||||
struct Tex *tex = 0;
|
||||
while(link)
|
||||
{
|
||||
tex = (struct Tex *)link;
|
||||
if(tex->ipo == ipo) return tex;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct Material * Ipo_getIdMat(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->mat.first;
|
||||
struct Material *mat = 0;
|
||||
while(link)
|
||||
{
|
||||
mat = (struct Material *)link;
|
||||
if(mat->ipo == ipo) return mat;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct World * Ipo_getIdWorld(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->world.first;
|
||||
struct World *wo = 0;
|
||||
while(link)
|
||||
{
|
||||
wo = (struct World *)link;
|
||||
if(wo->ipo == ipo) return wo;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* code unfinished, is c&p! */
|
||||
/*struct Object * Ipo_getIdCo(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->action.first;
|
||||
struct bAction *ac = 0;
|
||||
while(link)
|
||||
{
|
||||
ac = (struct bAction *)link;
|
||||
if(ac->ipo == ipo) return ac;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
struct bAction * Ipo_getIdAc(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->action.first;
|
||||
struct bAction *ac = 0;
|
||||
while(link)
|
||||
{
|
||||
ac = (struct bAction *)link;
|
||||
if(ac->ipo == ipo) return ac;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
struct Key * Ipo_getIdKe(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->key.first;
|
||||
struct Key *ke = 0;
|
||||
while(link)
|
||||
{
|
||||
ke = (struct Key *)link;
|
||||
if(ke->ipo == ipo) return ke;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct Curve * Ipo_getIdCu(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->curve.first;
|
||||
struct Curve *cu = 0;
|
||||
while(link)
|
||||
{
|
||||
cu = (struct Curve *)link;
|
||||
if(cu->ipo == ipo) return cu;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*struct Sequence * Ipo_getIdSeq(Ipo * ipo)
|
||||
{
|
||||
struct Editing *ed = 0;
|
||||
struct Sequence *seq = 0;
|
||||
|
||||
ed = G.scene->ed;
|
||||
if(ed==0) return 0;
|
||||
seq= ed->seqbasep->first;
|
||||
|
||||
while(seq)
|
||||
{
|
||||
if(seq->ipo == ipo) return seq;
|
||||
seq = seq->next;
|
||||
}
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
struct Object * Ipo_getIdObj(Ipo * ipo)
|
||||
{
|
||||
Link * link = G.main->object.first;
|
||||
struct Object *ob = 0;
|
||||
while(link)
|
||||
{
|
||||
ob = (struct Object *)link;
|
||||
if(ob->ipo == ipo) return ob;
|
||||
link = link->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
Ipo_addCurve (BPy_Ipo * self, PyObject * args)
|
||||
@@ -451,165 +1286,126 @@ Ipo_addCurve (BPy_Ipo * self, PyObject * args)
|
||||
IpoCurve *get_ipocurve (ID * from, short type, int adrcode, Ipo * useipo);
|
||||
void allspace (unsigned short event, short val);
|
||||
void allqueue (unsigned short event, short val);
|
||||
int param = 0, ok = 0;
|
||||
int param = 0, ok = 0, ipofound = 0;
|
||||
char *s = 0;
|
||||
IpoCurve *icu;
|
||||
ID id;
|
||||
struct Lamp * la = 0;
|
||||
struct Camera * ca = 0;
|
||||
struct Object * ob = 0;
|
||||
struct Tex * tex = 0;
|
||||
struct World * wo = 0;
|
||||
struct Material * mat = 0;
|
||||
struct Key * ke = 0;
|
||||
/*struct bAction * ac = 0;*/
|
||||
struct Curve * cu = 0;
|
||||
/*struct Sequence * seq = 0;*/
|
||||
Ipo *ipo = 0;
|
||||
IpoCurve *icu = 0;
|
||||
Link *link;
|
||||
struct Object *object = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "s", &s))
|
||||
return (EXPP_ReturnPyObjError
|
||||
(PyExc_TypeError, "expected string argument"));
|
||||
|
||||
/* insertkey demande un pointeur sur l'objet pour lequel on veut ajouter
|
||||
une courbe IPO */
|
||||
link = G.main->object.first;
|
||||
while (link)
|
||||
|
||||
link = G.main->ipo.first;
|
||||
|
||||
while(link)
|
||||
{
|
||||
object = (Object *) link;
|
||||
if (object->ipo == self->ipo)
|
||||
break;
|
||||
ipo = (Ipo *)link;
|
||||
if(ipo == self->ipo) {
|
||||
ipofound = 1;
|
||||
break;
|
||||
}
|
||||
link = link->next;
|
||||
}
|
||||
/* todo : what kind of object....
|
||||
#define GS(a) (*((short *)(a)))
|
||||
printf("object %p\n",object);
|
||||
printf("type %d\n",GS(object->id.name));
|
||||
*/
|
||||
|
||||
if (!strcmp (s, "LocX"))
|
||||
{
|
||||
param = OB_LOC_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "LocY"))
|
||||
{
|
||||
param = OB_LOC_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "LocZ"))
|
||||
{
|
||||
param = OB_LOC_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RotX"))
|
||||
{
|
||||
param = OB_ROT_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RotY"))
|
||||
{
|
||||
param = OB_ROT_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "RotZ"))
|
||||
{
|
||||
param = OB_ROT_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeX"))
|
||||
{
|
||||
param = OB_SIZE_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeY"))
|
||||
{
|
||||
param = OB_SIZE_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "SizeZ"))
|
||||
{
|
||||
param = OB_SIZE_Z;
|
||||
ok = 1;
|
||||
if(ipo && ipofound) {
|
||||
switch(ipo->blocktype) {
|
||||
case ID_OB:
|
||||
ok = Ipo_obIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
ob = Ipo_getIdObj(ipo);
|
||||
if(ob) icu = get_ipocurve (&(ob->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case ID_CA:
|
||||
ok = Ipo_caIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
ca = Ipo_getIdCam(ipo);
|
||||
if(ca) icu = get_ipocurve (&(ca->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case ID_LA:
|
||||
ok = Ipo_laIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
la = Ipo_getIdLa(ipo);
|
||||
if(la) icu = get_ipocurve (&(la->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case ID_TE:
|
||||
ok = Ipo_texIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
tex = Ipo_getIdTex(ipo);
|
||||
if(tex) icu = get_ipocurve (&(tex->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case ID_WO:
|
||||
ok = Ipo_woIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
wo = Ipo_getIdWorld(ipo);
|
||||
if(wo) icu = get_ipocurve (&(wo->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case ID_MA:
|
||||
ok = Ipo_maIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
mat = Ipo_getIdMat(ipo);
|
||||
if(mat) icu = get_ipocurve (&(mat->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
/*case ID_AC:
|
||||
ok = Ipo_acIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
ac = Ipo_getIdAc(ipo);
|
||||
if(ac) icu = get_ipocurve (&(ac->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case IPO_CO:
|
||||
ok = Ipo_coIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
co = Ipo_getIdCo(ipo);
|
||||
if(co) icu = get_ipocurve (&(ac->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;*/
|
||||
case ID_CU:
|
||||
ok = Ipo_cuIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
cu = Ipo_getIdCu(ipo);
|
||||
if(cu) icu = get_ipocurve (&(cu->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
case ID_KE:
|
||||
ok = Ipo_keIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
ke = Ipo_getIdKe(ipo);
|
||||
if(ke) icu = get_ipocurve (&(ke->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;
|
||||
/*case ID_SEQ:
|
||||
ok = Ipo_seqIcuName(s, ¶m);
|
||||
if(ok) {
|
||||
seq = Ipo_getIdSeq(ipo);
|
||||
if(seq) icu = get_ipocurve (&(seq->id), ipo->blocktype, param, self->ipo );
|
||||
}
|
||||
break;*/
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp (s, "dLocX"))
|
||||
{
|
||||
param = OB_DLOC_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dLocY"))
|
||||
{
|
||||
param = OB_DLOC_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dLocZ"))
|
||||
{
|
||||
param = OB_DLOC_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dRotX"))
|
||||
{
|
||||
param = OB_DROT_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dRotY"))
|
||||
{
|
||||
param = OB_DROT_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dRotZ"))
|
||||
{
|
||||
param = OB_DROT_Z;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dSizeX"))
|
||||
{
|
||||
param = OB_DSIZE_X;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dSizeY"))
|
||||
{
|
||||
param = OB_DSIZE_Y;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "dSizeZ"))
|
||||
{
|
||||
param = OB_DSIZE_Z;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (s, "Layer"))
|
||||
{
|
||||
param = OB_LAY;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "Time"))
|
||||
{
|
||||
param = OB_TIME;
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
if (!strcmp (s, "ColR"))
|
||||
{
|
||||
param = OB_COL_R;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColG"))
|
||||
{
|
||||
param = OB_COL_G;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColB"))
|
||||
{
|
||||
param = OB_COL_B;
|
||||
ok = 1;
|
||||
}
|
||||
if (!strcmp (s, "ColA"))
|
||||
{
|
||||
param = OB_COL_A;
|
||||
ok = 1;
|
||||
}
|
||||
if (!ok)
|
||||
return (EXPP_ReturnPyObjError (PyExc_ValueError, "Not a valid param."));
|
||||
|
||||
/* add a new curve to the ipo. we pass in self->ipo so a new one does
|
||||
not get created */
|
||||
icu = get_ipocurve (&(object->id), ID_OB, param, self->ipo );
|
||||
|
||||
if (icu==0) return (EXPP_ReturnPyObjError (PyExc_ValueError, "Not a valid param."));
|
||||
|
||||
#define REMAKEIPO 1
|
||||
#define REDRAWIPO 0x4023
|
||||
#define REDRAWIPO 0x4023
|
||||
allspace (REMAKEIPO, 0);
|
||||
allqueue (REDRAWIPO, 0);
|
||||
|
||||
@@ -621,15 +1417,14 @@ Ipo_addCurve (BPy_Ipo * self, PyObject * args)
|
||||
static PyObject *
|
||||
Ipo_getCurve (BPy_Ipo * self, PyObject * args)
|
||||
{
|
||||
char *str;
|
||||
char *str, *str1;
|
||||
IpoCurve *icu = 0;
|
||||
if (!PyArg_ParseTuple (args, "s", &str))
|
||||
return (EXPP_ReturnPyObjError
|
||||
(PyExc_TypeError, "expected string argument"));
|
||||
for (icu = self->ipo->curve.first; icu; icu = icu->next)
|
||||
{
|
||||
char str1[80];
|
||||
GetIpoCurveName (icu, str1);
|
||||
str1 = GetIpoCurveName (icu);
|
||||
if (!strcmp (str1, str))
|
||||
return IpoCurve_CreatePyObject (icu);
|
||||
}
|
||||
@@ -638,36 +1433,58 @@ Ipo_getCurve (BPy_Ipo * self, PyObject * args)
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GetIpoCurveName (IpoCurve * icu, char *s)
|
||||
char *
|
||||
GetIpoCurveName(IpoCurve * icu)
|
||||
{
|
||||
switch (icu->blocktype)
|
||||
{
|
||||
case ID_MA:
|
||||
{
|
||||
getname_mat_ei (icu->adrcode, s);
|
||||
break;
|
||||
return getname_mat_ei (icu->adrcode);
|
||||
}
|
||||
case ID_WO:
|
||||
{
|
||||
getname_world_ei (icu->adrcode, s);
|
||||
break;
|
||||
return getname_world_ei (icu->adrcode);
|
||||
}
|
||||
case ID_CA:
|
||||
{
|
||||
getname_cam_ei (icu->adrcode, s);
|
||||
break;
|
||||
return getname_cam_ei (icu->adrcode);
|
||||
}
|
||||
case ID_OB:
|
||||
{
|
||||
getname_ob_ei (icu->adrcode, s);
|
||||
break;
|
||||
return getname_ob_ei (icu->adrcode, 1); /* solve: what if EffX/Y/Z are wanted? */
|
||||
}
|
||||
case ID_TE:
|
||||
{
|
||||
return getname_tex_ei (icu->adrcode);
|
||||
}
|
||||
case ID_LA:
|
||||
{
|
||||
return getname_la_ei(icu->adrcode);
|
||||
}
|
||||
case ID_AC:
|
||||
{
|
||||
return getname_ac_ei(icu->adrcode);
|
||||
}
|
||||
case ID_CU:
|
||||
{
|
||||
return getname_cu_ei(icu->adrcode);
|
||||
}
|
||||
case ID_KE:
|
||||
{
|
||||
return getname_key_ei(icu->adrcode);
|
||||
}
|
||||
case ID_SEQ:
|
||||
{
|
||||
return getname_seq_ei(icu->adrcode);
|
||||
}
|
||||
case IPO_CO:
|
||||
{
|
||||
return getname_co_ei(icu->adrcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static PyObject *
|
||||
Ipo_getCurves (BPy_Ipo * self)
|
||||
{
|
||||
@@ -859,7 +1676,7 @@ Ipo_getCurvecurval (BPy_Ipo * self, PyObject * args)
|
||||
{
|
||||
int numcurve = 0, i;
|
||||
IpoCurve *icu;
|
||||
char *stringname = 0;
|
||||
char *stringname = 0, *str1 = 0;
|
||||
|
||||
icu = self->ipo->curve.first;
|
||||
if (!icu)
|
||||
@@ -886,8 +1703,9 @@ Ipo_getCurvecurval (BPy_Ipo * self, PyObject * args)
|
||||
(PyExc_TypeError, "expected int or string argument"));
|
||||
while (icu)
|
||||
{
|
||||
char str1[10];
|
||||
GetIpoCurveName (icu, str1);
|
||||
/*char str1[10];
|
||||
GetIpoCurveName (icu, str1);*/
|
||||
str1 = GetIpoCurveName(icu);
|
||||
if (!strcmp (str1, stringname))
|
||||
break;
|
||||
icu = icu->next;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* This is a new part of Blender.
|
||||
*
|
||||
* Contributor(s): Jacques Guignot
|
||||
* Contributor(s): Jacques Guignot, Nathan Letwory
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <BKE_library.h>
|
||||
#include <BKE_ipo.h>
|
||||
#include <BLI_blenlib.h>
|
||||
#include <BSE_editipo.h>
|
||||
|
||||
#include "constant.h"
|
||||
#include "gen_utils.h"
|
||||
@@ -349,46 +350,35 @@ IpoCurve_Recalc (C_IpoCurve * self)
|
||||
static PyObject *
|
||||
IpoCurve_getName (C_IpoCurve * self)
|
||||
{
|
||||
const int objectType=self->ipocurve->blocktype;
|
||||
const int trackType=self->ipocurve->adrcode;
|
||||
|
||||
const char * ob_nametab[24] = {"LocX","LocY","LocZ","dLocX","dLocY","dLocZ",
|
||||
"RotX","RotY","RotZ","dRotX","dRotY","dRotZ","SizeX","SizeY","SizeZ",
|
||||
"dSizeX","dSizeY","dSizeZ","Layer","Time","ColR","ColG","ColB","ColA"};
|
||||
|
||||
const char * ac_nametab[5] = {"QuatW", "QuatX", "QuatY", "QuatZ"};
|
||||
|
||||
switch (objectType) {
|
||||
case ID_OB: {
|
||||
if (self->ipocurve->adrcode <= 0 ) {
|
||||
return PyString_FromString("Index too small");
|
||||
} else if (self->ipocurve->adrcode >= 25 ) {
|
||||
return PyString_FromString("Index too big");
|
||||
} else {
|
||||
return PyString_FromString(ob_nametab[trackType-1]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_AC: {
|
||||
switch (trackType) {
|
||||
case 1: case 2: case 3: case 13: case 14: case 15:
|
||||
return PyString_FromString(ob_nametab[trackType-1]);
|
||||
break;
|
||||
|
||||
case 25: case 26: case 27: case 28:
|
||||
return PyString_FromString(ac_nametab[trackType-25]);
|
||||
break;
|
||||
default:
|
||||
return PyString_FromString("Index out of range");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
switch (self->ipocurve->blocktype) {
|
||||
case ID_OB:
|
||||
return PyString_FromString(getname_ob_ei(self->ipocurve->adrcode, 1)); /* solve: what if EffX/Y/Z are wanted? */
|
||||
case ID_TE:
|
||||
return PyString_FromString(getname_tex_ei(self->ipocurve->adrcode));
|
||||
case ID_LA:
|
||||
return PyString_FromString(getname_la_ei(self->ipocurve->adrcode));
|
||||
case ID_MA:
|
||||
return PyString_FromString(getname_mat_ei(self->ipocurve->adrcode));
|
||||
case ID_CA:
|
||||
return PyString_FromString(getname_cam_ei(self->ipocurve->adrcode));
|
||||
case ID_WO:
|
||||
return PyString_FromString(getname_world_ei(self->ipocurve->adrcode));
|
||||
case ID_AC:
|
||||
return PyString_FromString(getname_ac_ei(self->ipocurve->adrcode));
|
||||
case ID_CU:
|
||||
return PyString_FromString(getname_cu_ei(self->ipocurve->adrcode));
|
||||
case ID_KE:
|
||||
return PyString_FromString(getname_key_ei(self->ipocurve->adrcode));
|
||||
case ID_SEQ:
|
||||
return PyString_FromString(getname_seq_ei(self->ipocurve->adrcode));
|
||||
case IPO_CO:
|
||||
return PyString_FromString(getname_co_ei(self->ipocurve->adrcode));
|
||||
default:
|
||||
return EXPP_ReturnPyObjError (PyExc_TypeError,
|
||||
"This function doesn't support this ipocurve type yet");
|
||||
}
|
||||
|
||||
return PyString_FromString("");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* This is a new part of Blender.
|
||||
*
|
||||
* Contributor(s): Willian P. Germano
|
||||
* Contributor(s): Willian P. Germano, Nathan Letwory
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -167,6 +167,9 @@ static PyObject *Lamp_getHaloInt(BPy_Lamp *self);
|
||||
static PyObject *Lamp_getQuad1(BPy_Lamp *self);
|
||||
static PyObject *Lamp_getQuad2(BPy_Lamp *self);
|
||||
static PyObject *Lamp_getCol(BPy_Lamp *self);
|
||||
static PyObject *Lamp_getIpo(BPy_Lamp *self);
|
||||
static PyObject *Lamp_clearIpo(BPy_Lamp *self);
|
||||
static PyObject *Lamp_setIpo(BPy_Lamp *self, PyObject *args);
|
||||
static PyObject *Lamp_setName(BPy_Lamp *self, PyObject *args);
|
||||
static PyObject *Lamp_setType(BPy_Lamp *self, PyObject *args);
|
||||
static PyObject *Lamp_setIntType(BPy_Lamp *self, PyObject *args);
|
||||
@@ -1370,3 +1373,76 @@ static PyObject *Lamp_repr (BPy_Lamp *self)
|
||||
{
|
||||
return PyString_FromFormat("[Lamp \"%s\"]", self->lamp->id.name+2);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
Lamp_getIpo (BPy_Lamp * self)
|
||||
{
|
||||
struct Ipo *ipo = self->lamp->ipo;
|
||||
|
||||
if (!ipo)
|
||||
{
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
return Ipo_CreatePyObject (ipo);
|
||||
}
|
||||
|
||||
extern PyTypeObject Ipo_Type;
|
||||
|
||||
static PyObject *
|
||||
Lamp_setIpo (BPy_Lamp * self, PyObject * args)
|
||||
{
|
||||
PyObject *pyipo = 0;
|
||||
Ipo *ipo = NULL;
|
||||
Ipo *oldipo;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "O!", &Ipo_Type, &pyipo))
|
||||
return EXPP_ReturnPyObjError (PyExc_TypeError,
|
||||
"expected Ipo as argument");
|
||||
|
||||
ipo = Ipo_FromPyObject (pyipo);
|
||||
|
||||
if (!ipo)
|
||||
return EXPP_ReturnPyObjError (PyExc_RuntimeError, "null ipo!");
|
||||
|
||||
if (ipo->blocktype != ID_TE)
|
||||
return EXPP_ReturnPyObjError (PyExc_TypeError,
|
||||
"this ipo is not a lamp data ipo");
|
||||
|
||||
oldipo = self->lamp->ipo;
|
||||
if (oldipo)
|
||||
{
|
||||
ID *id = &oldipo->id;
|
||||
if (id->us > 0)
|
||||
id->us--;
|
||||
}
|
||||
|
||||
((ID *) & ipo->id)->us++;
|
||||
|
||||
self->lamp->ipo = ipo;
|
||||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
Lamp_clearIpo (BPy_Lamp * self)
|
||||
{
|
||||
Lamp *lamp = self->lamp;
|
||||
Ipo *ipo = (Ipo *) lamp->ipo;
|
||||
|
||||
if (ipo)
|
||||
{
|
||||
ID *id = &ipo->id;
|
||||
if (id->us > 0)
|
||||
id->us--;
|
||||
lamp->ipo = NULL;
|
||||
|
||||
Py_INCREF (Py_True);
|
||||
return Py_True;
|
||||
}
|
||||
|
||||
Py_INCREF (Py_False); /* no ipo found */
|
||||
return Py_False;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* This is a new part of Blender.
|
||||
*
|
||||
* Contributor(s): Willian P. Germano
|
||||
* Contributor(s): Willian P. Germano, Nathan Letwory
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* This is a new part of Blender.
|
||||
*
|
||||
* Contributor(s): Alex Mole
|
||||
* Contributor(s): Alex Mole, Nathan Letwory
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -59,9 +59,12 @@
|
||||
#define EXPP_TEX_TYPE_IMAGE TEX_IMAGE
|
||||
#define EXPP_TEX_TYPE_PLUGIN TEX_PLUGIN
|
||||
#define EXPP_TEX_TYPE_ENVMAP TEX_ENVMAP
|
||||
#define EXPP_TEX_TYPE_MUSGRAVE TEX_MUSGRAVE
|
||||
#define EXPP_TEX_TYPE_VORONOI TEX_VORONOI
|
||||
#define EXPP_TEX_TYPE_DISTNOISE TEX_DISTNOISE
|
||||
|
||||
#define EXPP_TEX_TYPE_MIN EXPP_TEX_TYPE_NONE
|
||||
#define EXPP_TEX_TYPE_MAX EXPP_TEX_TYPE_ENVMAP
|
||||
#define EXPP_TEX_TYPE_MAX EXPP_TEX_TYPE_DISTNOISE
|
||||
|
||||
/* i can't find these defined anywhere- they're just taken from looking at */
|
||||
/* the button creation code in source/blender/src/buttons_shading.c */
|
||||
@@ -90,6 +93,12 @@
|
||||
#define EXPP_TEX_STYPE_ENV_STATIC 0
|
||||
#define EXPP_TEX_STYPE_ENV_ANIM 1
|
||||
#define EXPP_TEX_STYPE_ENV_LOAD 2
|
||||
/* musgrave stype */
|
||||
#define EXPP_TEX_STYPE_MUS_MFRACTAL 0
|
||||
#define EXPP_TEX_STYPE_MUS_RIDGEDMF 1
|
||||
#define EXPP_TEX_STYPE_MUS_HYBRIDMF 2
|
||||
#define EXPP_TEX_STYPE_MUS_FBM 3
|
||||
#define EXPP_TEX_STYPE_MUS_HTERRAIN 4
|
||||
|
||||
#define EXPP_TEX_FLAG_COLORBAND TEX_COLORBAND
|
||||
#define EXPP_TEX_FLAG_FLIPBLEND TEX_FLIPBLEND
|
||||
@@ -150,6 +159,9 @@ static const EXPP_map_pair tex_type_map[] = {
|
||||
{ "Image", EXPP_TEX_TYPE_IMAGE },
|
||||
{ "Plugin", EXPP_TEX_TYPE_PLUGIN },
|
||||
{ "EnvMap", EXPP_TEX_TYPE_ENVMAP },
|
||||
{ "Musgrave", EXPP_TEX_TYPE_MUSGRAVE },
|
||||
{ "Voronoi", EXPP_TEX_TYPE_VORONOI },
|
||||
{ "DistortedNoise", EXPP_TEX_TYPE_DISTNOISE },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -234,6 +246,16 @@ static const EXPP_map_pair tex_stype_envmap_map[] = {
|
||||
{ NULL , 0 }
|
||||
};
|
||||
|
||||
static const EXPP_map_pair tex_stype_musg_map[] = {
|
||||
{ "Default", 0},
|
||||
{ "MultiFractal", EXPP_TEX_STYPE_MUS_MFRACTAL },
|
||||
{ "HeteroTerrain", EXPP_TEX_STYPE_MUS_HTERRAIN },
|
||||
{ "RidgedMultiFractal", EXPP_TEX_STYPE_MUS_RIDGEDMF },
|
||||
{ "HybridMultiFractal", EXPP_TEX_STYPE_MUS_HYBRIDMF },
|
||||
{ "fBM", EXPP_TEX_STYPE_MUS_FBM },
|
||||
{ NULL , 0 }
|
||||
};
|
||||
|
||||
static const EXPP_map_pair *tex_stype_map[] = {
|
||||
tex_stype_default_map, /* none */
|
||||
tex_stype_clouds_map,
|
||||
@@ -245,7 +267,8 @@ static const EXPP_map_pair *tex_stype_map[] = {
|
||||
tex_stype_default_map, /* noise */
|
||||
tex_stype_default_map, /* image */
|
||||
tex_stype_default_map, /* plugin */
|
||||
tex_stype_envmap_map
|
||||
tex_stype_envmap_map,
|
||||
tex_stype_musg_map /* musgrave */
|
||||
};
|
||||
|
||||
|
||||
@@ -298,6 +321,9 @@ GETFUNC (getImage);
|
||||
GETFUNC (getName);
|
||||
GETFUNC (getType);
|
||||
GETFUNC (getSType);
|
||||
GETFUNC (getIpo);
|
||||
GETFUNC (clearIpo);
|
||||
SETFUNC (setIpo);
|
||||
SETFUNC (setAnimFrames);
|
||||
SETFUNC (setAnimLength);
|
||||
SETFUNC (setAnimMontage);
|
||||
@@ -342,6 +368,12 @@ static PyMethodDef BPy_Texture_methods[] = {
|
||||
"() - Return Texture stype as string"},
|
||||
{"getType", (PyCFunction)Texture_getType, METH_NOARGS,
|
||||
"() - Return Texture type as string"},
|
||||
{"getIpo", (PyCFunction)Texture_getIpo, METH_NOARGS,
|
||||
"() - Return Texture Ipo"},
|
||||
{"setIpo", (PyCFunction)Texture_setIpo, METH_VARARGS,
|
||||
"(Blender Ipo) - Set Texture Ipo"},
|
||||
{"clearIpo", (PyCFunction) Texture_clearIpo, METH_NOARGS,
|
||||
"() - Unlink Ipo from this Texture."},
|
||||
{"setExtend", (PyCFunction)Texture_setExtend, METH_VARARGS,
|
||||
"(s) - Set Texture extend mode"},
|
||||
{"setFlags", (PyCFunction)Texture_setFlags, METH_VARARGS,
|
||||
@@ -508,6 +540,9 @@ static PyObject *M_Texture_TypesDict (void)
|
||||
EXPP_ADDCONST (IMAGE);
|
||||
EXPP_ADDCONST (PLUGIN);
|
||||
EXPP_ADDCONST (ENVMAP);
|
||||
EXPP_ADDCONST (MUSGRAVE);
|
||||
EXPP_ADDCONST (VORONOI);
|
||||
EXPP_ADDCONST (DISTNOISE);
|
||||
}
|
||||
return Types;
|
||||
}
|
||||
@@ -547,6 +582,11 @@ static PyObject *M_Texture_STypesDict (void)
|
||||
EXPP_ADDCONST(ENV_STATIC);
|
||||
EXPP_ADDCONST(ENV_ANIM);
|
||||
EXPP_ADDCONST(ENV_LOAD);
|
||||
EXPP_ADDCONST(MUS_MFRACTAL);
|
||||
EXPP_ADDCONST(MUS_RIDGEDMF);
|
||||
EXPP_ADDCONST(MUS_HYBRIDMF);
|
||||
EXPP_ADDCONST(MUS_FBM);
|
||||
EXPP_ADDCONST(MUS_HTERRAIN);
|
||||
}
|
||||
return STypes;
|
||||
}
|
||||
@@ -1511,3 +1551,76 @@ static PyObject *Texture_repr (BPy_Texture *self)
|
||||
return PyString_FromFormat("[Texture \"%s\"]", self->texture->id.name+2);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
Texture_getIpo (BPy_Texture * self)
|
||||
{
|
||||
struct Ipo *ipo = self->texture->ipo;
|
||||
|
||||
if (!ipo)
|
||||
{
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
return Ipo_CreatePyObject (ipo);
|
||||
}
|
||||
|
||||
extern PyTypeObject Ipo_Type;
|
||||
|
||||
static PyObject *
|
||||
Texture_setIpo (BPy_Texture * self, PyObject * args)
|
||||
{
|
||||
PyObject *pyipo = 0;
|
||||
Ipo *ipo = NULL;
|
||||
Ipo *oldipo;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "O!", &Ipo_Type, &pyipo))
|
||||
return EXPP_ReturnPyObjError (PyExc_TypeError,
|
||||
"expected Ipo as argument");
|
||||
|
||||
ipo = Ipo_FromPyObject (pyipo);
|
||||
|
||||
if (!ipo)
|
||||
return EXPP_ReturnPyObjError (PyExc_RuntimeError, "null ipo!");
|
||||
|
||||
if (ipo->blocktype != ID_TE)
|
||||
return EXPP_ReturnPyObjError (PyExc_TypeError,
|
||||
"this ipo is not a texture data ipo");
|
||||
|
||||
oldipo = self->texture->ipo;
|
||||
if (oldipo)
|
||||
{
|
||||
ID *id = &oldipo->id;
|
||||
if (id->us > 0)
|
||||
id->us--;
|
||||
}
|
||||
|
||||
((ID *) & ipo->id)->us++;
|
||||
|
||||
self->texture->ipo = ipo;
|
||||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
Texture_clearIpo (BPy_Texture * self)
|
||||
{
|
||||
Tex *tex = self->texture;
|
||||
Ipo *ipo = (Ipo *) tex->ipo;
|
||||
|
||||
if (ipo)
|
||||
{
|
||||
ID *id = &ipo->id;
|
||||
if (id->us > 0)
|
||||
id->us--;
|
||||
tex->ipo = NULL;
|
||||
|
||||
Py_INCREF (Py_True);
|
||||
return Py_True;
|
||||
}
|
||||
|
||||
Py_INCREF (Py_False); /* no ipo found */
|
||||
return Py_False;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ def New (type, name):
|
||||
@type type: string
|
||||
@type name: string
|
||||
@param type: The Ipo's blocktype. Depends on the object the ipo will be
|
||||
linked to. Currently supported types are Object, Camera, World, Material.
|
||||
linked to. Currently supported types are Object, Camera, World,
|
||||
Material, Texture, Lamp, Curve, Key.
|
||||
@param name: The name for this Ipo.
|
||||
@rtype: Blender Ipo
|
||||
@return: The created Ipo.
|
||||
@@ -71,14 +72,26 @@ class Ipo:
|
||||
'curvename' are:
|
||||
1. Camera Ipo: Lens, ClSta, ClEnd.
|
||||
2. Material Ipo: R, G, B, SpecR, SpecG, SpecB, MirR, MirG, MirB, Ref,
|
||||
Alpha, Emit, Amb, Spec, Hard, SpTra, Ang, Mode, HaSize, OfsX, OfsY,
|
||||
Alpha, Emit, Amb, Spec, Hard, SpTra, Ang, Mode, HaSize, Translu,
|
||||
RayMir, FresMir, FresMirI, FresTra, FresTraI, TraGlow, OfsX, OfsY,
|
||||
OfsZ, SizeX, SizeY, SizeZ, TexR, TexG, TexB, DefVar, Col, Nor, Var;
|
||||
3. Object Ipo: LocX, LocY, LocZ, dLocX, dLocY, dLocZ, RotX, RotY, RotZ,
|
||||
dRotX, dRotY, dRotZ, SizeX, SizeY, SizeZ, dSizeX, dSizeY, dSizeZ,
|
||||
Layer, Time, ColR, ColG, ColB, ColA;
|
||||
4. World Ipo: HorR, HorG, HorB, ZenR, ZenG, ZenB, Expos, Misi, MisDi,
|
||||
Layer, Time, ColR, ColG, ColB, ColA, FStreng, FFOff, Damping,
|
||||
RDamp, Perm;
|
||||
4. Lamp Ipo: Energ, R, G, B, Dist, SpoSi, SpoBl, Quad1, Quad2, HaIntl;
|
||||
5. World Ipo: HorR, HorG, HorB, ZenR, ZenG, ZenB, Expos, Misi, MisDi,
|
||||
MisSta, MisHi, StaR, StaG, StaB, StarDi, StarSi, OfsX, OfsY, OfsZ,
|
||||
SizeX, SizeY, SizeZ, TexR, TexG, TexB, DefVar, Col, Nor, Var;
|
||||
6. Texture Ipo: NSize, NDepth, NType, Turb, Vnw1, Vnw2, Vnw3, Vnw4,
|
||||
MinkMExp, DistM, ColT, iScale, DistA, MgType, MgH, Lacu, Oct,
|
||||
MgOff, MgGan, NBase1, NBase2;
|
||||
7. Curve Ipo: Speed;
|
||||
8. Key Ipo: Speed, 'Key 1' - 'Key 31';
|
||||
9. Action Ipo: LocX, LocY, LocZ, SizeX, SizeY, SizeZ,
|
||||
QuatX, QuatY, QuatZ, QuatW;
|
||||
10.Sequence Ipo: Fac;
|
||||
11.Constraint Ipo: Inf.
|
||||
@type curvename : string
|
||||
@rtype: IpoCurve object
|
||||
@return: the corresponding IpoCurve, or None.
|
||||
@@ -89,7 +102,21 @@ class Ipo:
|
||||
Add a new curve to the IPO object. The possible values for 'curvename' are:
|
||||
1. Object Ipo: LocX, LocY, LocZ, dLocX, dLocY, dLocZ, RotX, RotY, RotZ,
|
||||
dRotX, dRotY, dRotZ, SizeX, SizeY, SizeZ, dSizeX, dSizeY, dSizeZ,
|
||||
Layer, Time, ColR, ColG, ColB, ColA.
|
||||
Layer, Time, ColR, ColG, ColB, ColA, FStreng, FFOff, Damping, RDamp,
|
||||
Perm;
|
||||
2. Camera Ipo: Lens, ClSta, ClEnd;
|
||||
3. Lamp Ipo: Energ, R, G, B, Dist, SpoSi, SpoBl, Quad1, Quad2, HaIntl
|
||||
4. Texture Ipo: NSize, NDepth, NType, Turb, Vnw1, Vnw2, Vnw3, Vnw4,
|
||||
MinkMExp, DistM, ColT, iScale, DistA, MgType, MgH, Lacu, Oct,
|
||||
MgOff, MgGan, NBase1, NBase2;
|
||||
5. World Ipo: HorR, HorG, HorB, ZenR, ZenG, ZenB, Expos, Misi, MisDi,
|
||||
MisSta, MisHi, StaR, StaG, StaB, StarDi, StarSi, OfsX, OfsY, OfsZ,
|
||||
SizeX, SizeY, SizeZ, TexR, TexG, TexB, DefVar, Col, Nor, Var;
|
||||
6. Material Ipo: R, G, B, SpecR, SpecG, SpecB, MirR, MirG, MirB, Ref,
|
||||
Alpha, Emit, Amb, Spec, Hard, SpTra, Ior, Mode, HaSize, Translu,
|
||||
RayMir, FresMir, FresMirI, FresTra, FresTraI, TraGlow;
|
||||
7. Curve Ipo: Speed;
|
||||
8. Key Ipo: Speed, 'Key 1' - 'Key 31'
|
||||
@type curvename : string
|
||||
@rtype: IpoCurve object
|
||||
@return: the corresponding IpoCurve, or None.
|
||||
@@ -265,10 +292,28 @@ class IpoCurve:
|
||||
def getName():
|
||||
"""
|
||||
Returns the name of the ipo curve. This name can be:
|
||||
1. LocX, LocY, LocZ, dLocX, dLocY, dLocZ, RotX, RotY, RotZ,
|
||||
1. Camera Ipo: Lens, ClSta, ClEnd.
|
||||
2. Material Ipo: R, G, B, SpecR, SpecG, SpecB, MirR, MirG, MirB, Ref,
|
||||
Alpha, Emit, Amb, Spec, Hard, SpTra, Ang, Mode, HaSize, Translu,
|
||||
RayMir, FresMir, FresMirI, FresTra, FresTraI, TraGlow, OfsX, OfsY,
|
||||
OfsZ, SizeX, SizeY, SizeZ, TexR, TexG, TexB, DefVar, Col, Nor, Var;
|
||||
3. Object Ipo: LocX, LocY, LocZ, dLocX, dLocY, dLocZ, RotX, RotY, RotZ,
|
||||
dRotX, dRotY, dRotZ, SizeX, SizeY, SizeZ, dSizeX, dSizeY, dSizeZ,
|
||||
Layer, Time, ColR, ColG, ColB, ColA, QuatX, QuatY, QuatZ or QuatW.
|
||||
@warn: currently this only works with object and action IPO's..
|
||||
Layer, Time, ColR, ColG, ColB, ColA, FStreng, FFOff, Damping,
|
||||
RDamp, Perm;
|
||||
4. Lamp Ipo: Energ, R, G, B, Dist, SpoSi, SpoBl, Quad1, Quad2, HaIntl;
|
||||
5. World Ipo: HorR, HorG, HorB, ZenR, ZenG, ZenB, Expos, Misi, MisDi,
|
||||
MisSta, MisHi, StaR, StaG, StaB, StarDi, StarSi, OfsX, OfsY, OfsZ,
|
||||
SizeX, SizeY, SizeZ, TexR, TexG, TexB, DefVar, Col, Nor, Var;
|
||||
6. Texture Ipo: NSize, NDepth, NType, Turb, Vnw1, Vnw2, Vnw3, Vnw4,
|
||||
MinkMExp, DistM, ColT, iScale, DistA, MgType, MgH, Lacu, Oct,
|
||||
MgOff, MgGan, NBase1, NBase2;
|
||||
7. Curve Ipo: Speed;
|
||||
8. Key Ipo: Speed, 'Key 1' - 'Key 31';
|
||||
9. Action Ipo: LocX, LocY, LocZ, SizeX, SizeY, SizeZ,
|
||||
QuatX, QuatY, QuatZ, QuatW;
|
||||
10.Sequence Ipo: Fac;
|
||||
11.Constraint Ipo: Inf.
|
||||
@rtype: string
|
||||
@return: the name of the ipo curve.
|
||||
"""
|
||||
|
||||
@@ -348,3 +348,23 @@ class Lamp:
|
||||
@type event: string
|
||||
@param event: "FrameChanged" or "Redraw".
|
||||
"""
|
||||
|
||||
def getIpo():
|
||||
"""
|
||||
Get the Ipo associated with this Lamp object, if any.
|
||||
@rtype: Ipo
|
||||
@return: the wrapped ipo or None.
|
||||
"""
|
||||
|
||||
def setIpo(ipo):
|
||||
"""
|
||||
Link an ipo to this Lamp object.
|
||||
@type ipo: Blender Ipo
|
||||
@param ipo: a "lamp data" ipo.
|
||||
"""
|
||||
|
||||
def clearIpo():
|
||||
"""
|
||||
Unlink the ipo from this Lamp object.
|
||||
@return: True if there was an ipo linked or False otherwise.
|
||||
"""
|
||||
|
||||
@@ -302,3 +302,22 @@ class MTex:
|
||||
@cvar mapto: "Map to" field of texture. OR'd values of L{MapTo}
|
||||
"""
|
||||
|
||||
def getIpo():
|
||||
"""
|
||||
Get the Ipo associated with this texture object, if any.
|
||||
@rtype: Ipo
|
||||
@return: the wrapped ipo or None.
|
||||
"""
|
||||
|
||||
def setIpo(ipo):
|
||||
"""
|
||||
Link an ipo to this texture object.
|
||||
@type ipo: Blender Ipo
|
||||
@param ipo: a "texture data" ipo.
|
||||
"""
|
||||
|
||||
def clearIpo():
|
||||
"""
|
||||
Unlink the ipo from this texture object.
|
||||
@return: True if there was an ipo linked or False otherwise.
|
||||
"""
|
||||
|
||||
@@ -71,7 +71,7 @@ class World:
|
||||
================
|
||||
This object gives access to generic data from all worlds in Blender.
|
||||
Its attributes depend upon its type.
|
||||
|
||||
|
||||
@cvar name: the name of the world.
|
||||
@cvar skytype: type of the sky. Bit 0 : Blend; Bit 1 : Real; Bit 2 : paper.
|
||||
@cvar mode:
|
||||
@@ -145,7 +145,6 @@ class World:
|
||||
@return: the skytype of the world object.
|
||||
"""
|
||||
|
||||
|
||||
def setSkytype(skytype):
|
||||
"""
|
||||
Sets the skytype of a world object.
|
||||
@@ -164,7 +163,6 @@ class World:
|
||||
@return: the mode of the world object.
|
||||
"""
|
||||
|
||||
|
||||
def setMode(mode):
|
||||
"""
|
||||
Sets the mode of a world object.
|
||||
@@ -183,7 +181,6 @@ class World:
|
||||
@return: the mistype of the world object.
|
||||
"""
|
||||
|
||||
|
||||
def setMistype(mistype):
|
||||
"""
|
||||
Sets the mist type of a world object.
|
||||
@@ -202,7 +199,6 @@ class World:
|
||||
@return: the horizon color of the world object.
|
||||
"""
|
||||
|
||||
|
||||
def setHor(hor):
|
||||
"""
|
||||
Sets the horizon color of a world object.
|
||||
@@ -220,7 +216,6 @@ class World:
|
||||
@return: the zenith color of the world object.
|
||||
"""
|
||||
|
||||
|
||||
def setZen(zen):
|
||||
"""
|
||||
Sets the zenith color of a world object.
|
||||
@@ -238,7 +233,6 @@ class World:
|
||||
@return: the ambient color of the world object.
|
||||
"""
|
||||
|
||||
|
||||
def setAmb(amb):
|
||||
"""
|
||||
Sets the ambient color of a world object.
|
||||
@@ -263,7 +257,6 @@ class World:
|
||||
@return: the star parameters
|
||||
"""
|
||||
|
||||
|
||||
def setStar(star):
|
||||
"""
|
||||
Sets the star parameters of a world object.
|
||||
@@ -286,7 +279,6 @@ class World:
|
||||
@return: the mist parameters
|
||||
"""
|
||||
|
||||
|
||||
def setMist(mist):
|
||||
"""
|
||||
Sets the mist parameters of a world object.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* This is a new part of Blender.
|
||||
*
|
||||
* Contributor(s): Michel Selten, Willian P. Germano
|
||||
* Contributor(s): Michel Selten, Willian P. Germano, Nathan Letwory
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
@@ -46,9 +46,13 @@
|
||||
#include <DNA_effect_types.h>
|
||||
#include <DNA_meta_types.h>
|
||||
#include <DNA_image_types.h>
|
||||
#include <DNA_texture_types.h>
|
||||
#include <DNA_text_types.h>
|
||||
#include <DNA_world_types.h>
|
||||
#include <DNA_key_types.h>
|
||||
#include <DNA_sequence_types.h>
|
||||
#include <DNA_action_types.h>
|
||||
#include <DNA_constraint_types.h>
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Global variables */
|
||||
|
||||
Reference in New Issue
Block a user