forked from bartvdbraak/blender
Style cleanup: rename BKE_metaball* to BKE_mball -- mball is more commonly used term in Blender
This commit is contained in:
parent
d881f9225c
commit
c7b20e79cd
@ -37,30 +37,30 @@ struct Object;
|
||||
struct Scene;
|
||||
struct MetaElem;
|
||||
|
||||
void BKE_metaball_unlink(struct MetaBall *mb);
|
||||
void BKE_metaball_free(struct MetaBall *mb);
|
||||
struct MetaBall *BKE_metaball_add(const char *name);
|
||||
struct MetaBall *BKE_metaball_copy(struct MetaBall *mb);
|
||||
void BKE_mball_unlink(struct MetaBall *mb);
|
||||
void BKE_mball_free(struct MetaBall *mb);
|
||||
struct MetaBall *BKE_mball_add(const char *name);
|
||||
struct MetaBall *BKE_mball_copy(struct MetaBall *mb);
|
||||
|
||||
void BKE_metaball_make_local(struct MetaBall *mb);
|
||||
void BKE_mball_make_local(struct MetaBall *mb);
|
||||
|
||||
void BKE_metaball_cubeTable_free(void);
|
||||
void BKE_mball_cubeTable_free(void);
|
||||
|
||||
void BKE_metaball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
|
||||
int BKE_metaball_is_basis_for(struct Object *ob1, struct Object *ob2);
|
||||
int BKE_metaball_is_basis(struct Object *ob);
|
||||
struct Object *BKE_metaball_basis_find(struct Scene *scene, struct Object *ob);
|
||||
void BKE_mball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
|
||||
int BKE_mball_is_basis_for(struct Object *ob1, struct Object *ob2);
|
||||
int BKE_mball_is_basis(struct Object *ob);
|
||||
struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);
|
||||
|
||||
void BKE_metaball_texspace_calc(struct Object *ob);
|
||||
float *BKE_metaball_make_orco(struct Object *ob, struct ListBase *dispbase);
|
||||
void BKE_mball_texspace_calc(struct Object *ob);
|
||||
float *BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase);
|
||||
|
||||
void BKE_metaball_properties_copy(struct Scene *scene, struct Object *active_object);
|
||||
void BKE_mball_properties_copy(struct Scene *scene, struct Object *active_object);
|
||||
|
||||
int BKE_metaball_minmax(struct MetaBall *mb, float min[3], float max[3]);
|
||||
int BKE_metaball_center_median(struct MetaBall *mb, float cent[3]);
|
||||
int BKE_metaball_center_bounds(struct MetaBall *mb, float cent[3]);
|
||||
void BKE_metaball_translate(struct MetaBall *mb, float offset[3]);
|
||||
int BKE_mball_minmax(struct MetaBall *mb, float min[3], float max[3]);
|
||||
int BKE_mball_center_median(struct MetaBall *mb, float cent[3]);
|
||||
int BKE_mball_center_bounds(struct MetaBall *mb, float cent[3]);
|
||||
void BKE_mball_translate(struct MetaBall *mb, float offset[3]);
|
||||
|
||||
struct MetaElem *BKE_metaball_element_add(struct MetaBall *mb, const int type);
|
||||
struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, const int type);
|
||||
|
||||
#endif
|
||||
|
@ -540,7 +540,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
|
||||
break;
|
||||
case OB_MBALL:
|
||||
{
|
||||
Object *mom = BKE_metaball_basis_find(scene, ob);
|
||||
Object *mom = BKE_mball_basis_find(scene, ob);
|
||||
|
||||
if (mom != ob) {
|
||||
node2 = dag_get_node(dag, mom);
|
||||
|
@ -672,9 +672,9 @@ void makeDispListMBall(Scene *scene, Object *ob)
|
||||
freedisplist(&(ob->disp));
|
||||
|
||||
if (ob->type == OB_MBALL) {
|
||||
if (ob == BKE_metaball_basis_find(scene, ob)) {
|
||||
BKE_metaball_polygonize(scene, ob, &ob->disp);
|
||||
BKE_metaball_texspace_calc(ob);
|
||||
if (ob == BKE_mball_basis_find(scene, ob)) {
|
||||
BKE_mball_polygonize(scene, ob, &ob->disp);
|
||||
BKE_mball_texspace_calc(ob);
|
||||
|
||||
object_deform_mball(ob, &ob->disp);
|
||||
}
|
||||
@ -685,8 +685,8 @@ void makeDispListMBall(Scene *scene, Object *ob)
|
||||
|
||||
void makeDispListMBall_forRender(Scene *scene, Object *ob, ListBase *dispbase)
|
||||
{
|
||||
BKE_metaball_polygonize(scene, ob, dispbase);
|
||||
BKE_metaball_texspace_calc(ob);
|
||||
BKE_mball_polygonize(scene, ob, dispbase);
|
||||
BKE_mball_texspace_calc(ob);
|
||||
|
||||
object_deform_mball(ob, dispbase);
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ int id_make_local(ID *id, int test)
|
||||
}
|
||||
return 1;
|
||||
case ID_MB:
|
||||
if (!test) BKE_metaball_make_local((MetaBall *)id);
|
||||
if (!test) BKE_mball_make_local((MetaBall *)id);
|
||||
return 1;
|
||||
case ID_MA:
|
||||
if (!test) BKE_material_make_local((Material *)id);
|
||||
@ -294,7 +294,7 @@ int id_copy(ID *id, ID **newid, int test)
|
||||
if (!test) *newid = (ID *)BKE_curve_copy((Curve *)id);
|
||||
return 1;
|
||||
case ID_MB:
|
||||
if (!test) *newid = (ID *)BKE_metaball_copy((MetaBall *)id);
|
||||
if (!test) *newid = (ID *)BKE_mball_copy((MetaBall *)id);
|
||||
return 1;
|
||||
case ID_MA:
|
||||
if (!test) *newid = (ID *)BKE_material_copy((Material *)id);
|
||||
@ -813,7 +813,7 @@ void BKE_libblock_free(ListBase *lb, void *idv)
|
||||
BKE_curve_free((Curve *)id);
|
||||
break;
|
||||
case ID_MB:
|
||||
BKE_metaball_free((MetaBall *)id);
|
||||
BKE_mball_free((MetaBall *)id);
|
||||
break;
|
||||
case ID_MA:
|
||||
BKE_material_free((Material *)id);
|
||||
|
@ -173,7 +173,7 @@ static MetaElem **mainb;
|
||||
static octal_tree *metaball_tree = NULL;
|
||||
/* Functions */
|
||||
|
||||
void BKE_metaball_unlink(MetaBall *mb)
|
||||
void BKE_mball_unlink(MetaBall *mb)
|
||||
{
|
||||
int a;
|
||||
|
||||
@ -185,9 +185,9 @@ void BKE_metaball_unlink(MetaBall *mb)
|
||||
|
||||
|
||||
/* do not free mball itself */
|
||||
void BKE_metaball_free(MetaBall *mb)
|
||||
void BKE_mball_free(MetaBall *mb)
|
||||
{
|
||||
BKE_metaball_unlink(mb);
|
||||
BKE_mball_unlink(mb);
|
||||
|
||||
if (mb->adt) {
|
||||
BKE_free_animdata((ID *)mb);
|
||||
@ -199,7 +199,7 @@ void BKE_metaball_free(MetaBall *mb)
|
||||
if (mb->disp.first) freedisplist(&mb->disp);
|
||||
}
|
||||
|
||||
MetaBall *BKE_metaball_add(const char *name)
|
||||
MetaBall *BKE_mball_add(const char *name)
|
||||
{
|
||||
MetaBall *mb;
|
||||
|
||||
@ -215,7 +215,7 @@ MetaBall *BKE_metaball_add(const char *name)
|
||||
return mb;
|
||||
}
|
||||
|
||||
MetaBall *BKE_metaball_copy(MetaBall *mb)
|
||||
MetaBall *BKE_mball_copy(MetaBall *mb)
|
||||
{
|
||||
MetaBall *mbn;
|
||||
int a;
|
||||
@ -243,7 +243,7 @@ static void extern_local_mball(MetaBall *mb)
|
||||
}
|
||||
}
|
||||
|
||||
void BKE_metaball_make_local(MetaBall *mb)
|
||||
void BKE_mball_make_local(MetaBall *mb)
|
||||
{
|
||||
Main *bmain = G.main;
|
||||
Object *ob;
|
||||
@ -274,7 +274,7 @@ void BKE_metaball_make_local(MetaBall *mb)
|
||||
extern_local_mball(mb);
|
||||
}
|
||||
else if (is_local && is_lib) {
|
||||
MetaBall *mb_new = BKE_metaball_copy(mb);
|
||||
MetaBall *mb_new = BKE_mball_copy(mb);
|
||||
mb_new->id.us = 0;
|
||||
|
||||
/* Remap paths of new ID using old library as base. */
|
||||
@ -294,7 +294,7 @@ void BKE_metaball_make_local(MetaBall *mb)
|
||||
|
||||
/* most simple meta-element adding function
|
||||
* don't do context manipulation here (rna uses) */
|
||||
MetaElem *BKE_metaball_element_add(MetaBall *mb, const int type)
|
||||
MetaElem *BKE_mball_element_add(MetaBall *mb, const int type)
|
||||
{
|
||||
MetaElem *ml = MEM_callocN(sizeof(MetaElem), "metaelem");
|
||||
|
||||
@ -346,7 +346,7 @@ MetaElem *BKE_metaball_element_add(MetaBall *mb, const int type)
|
||||
* basic MetaBall (usually with name Meta). All other MetaBalls (with
|
||||
* names Meta.001, Meta.002, etc) are included in this Bounding Box.
|
||||
*/
|
||||
void BKE_metaball_texspace_calc(Object *ob)
|
||||
void BKE_mball_texspace_calc(Object *ob)
|
||||
{
|
||||
DispList *dl;
|
||||
BoundBox *bb;
|
||||
@ -390,7 +390,7 @@ void BKE_metaball_texspace_calc(Object *ob)
|
||||
BKE_boundbox_init_from_minmax(bb, min, max);
|
||||
}
|
||||
|
||||
float *BKE_metaball_make_orco(Object *ob, ListBase *dispbase)
|
||||
float *BKE_mball_make_orco(Object *ob, ListBase *dispbase)
|
||||
{
|
||||
BoundBox *bb;
|
||||
DispList *dl;
|
||||
@ -442,7 +442,7 @@ float *BKE_metaball_make_orco(Object *ob, ListBase *dispbase)
|
||||
* It test last character of Object ID name. If last character
|
||||
* is digit it return 0, else it return 1.
|
||||
*/
|
||||
int BKE_metaball_is_basis(Object *ob)
|
||||
int BKE_mball_is_basis(Object *ob)
|
||||
{
|
||||
int len;
|
||||
|
||||
@ -453,7 +453,7 @@ int BKE_metaball_is_basis(Object *ob)
|
||||
}
|
||||
|
||||
/* return nonzero if ob1 is a basis mball for ob */
|
||||
int BKE_metaball_is_basis_for(Object *ob1, Object *ob2)
|
||||
int BKE_mball_is_basis_for(Object *ob1, Object *ob2)
|
||||
{
|
||||
int basis1nr, basis2nr;
|
||||
char basis1name[MAX_ID_NAME], basis2name[MAX_ID_NAME];
|
||||
@ -461,7 +461,7 @@ int BKE_metaball_is_basis_for(Object *ob1, Object *ob2)
|
||||
BLI_split_name_num(basis1name, &basis1nr, ob1->id.name + 2, '.');
|
||||
BLI_split_name_num(basis2name, &basis2nr, ob2->id.name + 2, '.');
|
||||
|
||||
if (!strcmp(basis1name, basis2name)) return BKE_metaball_is_basis(ob1);
|
||||
if (!strcmp(basis1name, basis2name)) return BKE_mball_is_basis(ob1);
|
||||
else return 0;
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ int BKE_metaball_is_basis_for(Object *ob1, Object *ob2)
|
||||
* are copied to all metaballs in same "group" (metaballs with same base name: MBall,
|
||||
* MBall.001, MBall.002, etc). The most important is to copy properties to the base metaball,
|
||||
* because this metaball influence polygonisation of metaballs. */
|
||||
void BKE_metaball_properties_copy(Scene *scene, Object *active_object)
|
||||
void BKE_mball_properties_copy(Scene *scene, Object *active_object)
|
||||
{
|
||||
Scene *sce_iter = scene;
|
||||
Base *base;
|
||||
@ -516,7 +516,7 @@ void BKE_metaball_properties_copy(Scene *scene, Object *active_object)
|
||||
*
|
||||
* warning!, is_basis_mball() can fail on returned object, see long note above.
|
||||
*/
|
||||
Object *BKE_metaball_basis_find(Scene *scene, Object *basis)
|
||||
Object *BKE_mball_basis_find(Scene *scene, Object *basis)
|
||||
{
|
||||
Scene *sce_iter = scene;
|
||||
Base *base;
|
||||
@ -1174,7 +1174,7 @@ static void makecubetable(void)
|
||||
}
|
||||
}
|
||||
|
||||
void BKE_metaball_cubeTable_free(void)
|
||||
void BKE_mball_cubeTable_free(void)
|
||||
{
|
||||
int i;
|
||||
INTLISTS *lists, *nlists;
|
||||
@ -2277,7 +2277,7 @@ static void init_metaball_octal_tree(int depth)
|
||||
subdivide_metaball_octal_node(node, size[0], size[1], size[2], metaball_tree->depth);
|
||||
}
|
||||
|
||||
void BKE_metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
|
||||
void BKE_mball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
|
||||
{
|
||||
PROCESS mbproc;
|
||||
MetaBall *mb;
|
||||
@ -2390,7 +2390,7 @@ void BKE_metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
|
||||
}
|
||||
|
||||
/* basic vertex data functions */
|
||||
int BKE_metaball_minmax(MetaBall *mb, float min[3], float max[3])
|
||||
int BKE_mball_minmax(MetaBall *mb, float min[3], float max[3])
|
||||
{
|
||||
MetaElem *ml;
|
||||
|
||||
@ -2403,7 +2403,7 @@ int BKE_metaball_minmax(MetaBall *mb, float min[3], float max[3])
|
||||
return (mb->elems.first != NULL);
|
||||
}
|
||||
|
||||
int BKE_metaball_center_median(MetaBall *mb, float cent[3])
|
||||
int BKE_mball_center_median(MetaBall *mb, float cent[3])
|
||||
{
|
||||
MetaElem *ml;
|
||||
int total = 0;
|
||||
@ -2420,11 +2420,11 @@ int BKE_metaball_center_median(MetaBall *mb, float cent[3])
|
||||
return (total != 0);
|
||||
}
|
||||
|
||||
int BKE_metaball_center_bounds(MetaBall *mb, float cent[3])
|
||||
int BKE_mball_center_bounds(MetaBall *mb, float cent[3])
|
||||
{
|
||||
float min[3], max[3];
|
||||
|
||||
if (BKE_metaball_minmax(mb, min, max)) {
|
||||
if (BKE_mball_minmax(mb, min, max)) {
|
||||
mid_v3_v3v3(cent, min, max);
|
||||
return 1;
|
||||
}
|
||||
@ -2432,7 +2432,7 @@ int BKE_metaball_center_bounds(MetaBall *mb, float cent[3])
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BKE_metaball_translate(MetaBall *mb, float offset[3])
|
||||
void BKE_mball_translate(MetaBall *mb, float offset[3])
|
||||
{
|
||||
MetaElem *ml;
|
||||
|
||||
|
@ -301,7 +301,7 @@ void BKE_object_free(Object *ob)
|
||||
if (id->us == 0) {
|
||||
if (ob->type == OB_MESH) BKE_mesh_unlink(ob->data);
|
||||
else if (ob->type == OB_CURVE) BKE_curve_unlink(ob->data);
|
||||
else if (ob->type == OB_MBALL) BKE_metaball_unlink(ob->data);
|
||||
else if (ob->type == OB_MBALL) BKE_mball_unlink(ob->data);
|
||||
}
|
||||
ob->data = NULL;
|
||||
}
|
||||
@ -440,7 +440,7 @@ void BKE_object_unlink(Object *ob)
|
||||
}
|
||||
}
|
||||
else if (ELEM(OB_MBALL, ob->type, obt->type)) {
|
||||
if (BKE_metaball_is_basis_for(obt, ob))
|
||||
if (BKE_mball_is_basis_for(obt, ob))
|
||||
obt->recalc |= OB_RECALC_DATA;
|
||||
}
|
||||
|
||||
@ -734,7 +734,7 @@ void *BKE_object_obdata_add_from_type(int type)
|
||||
case OB_CURVE: return BKE_curve_add("Curve", OB_CURVE);
|
||||
case OB_SURF: return BKE_curve_add("Surf", OB_SURF);
|
||||
case OB_FONT: return BKE_curve_add("Text", OB_FONT);
|
||||
case OB_MBALL: return BKE_metaball_add("Meta");
|
||||
case OB_MBALL: return BKE_mball_add("Meta");
|
||||
case OB_CAMERA: return BKE_camera_add("Camera");
|
||||
case OB_LAMP: return BKE_lamp_add("Lamp");
|
||||
case OB_LATTICE: return BKE_lattice_add("Lattice");
|
||||
|
@ -111,7 +111,7 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
|
||||
ml= ml->next;
|
||||
}
|
||||
|
||||
ml= BKE_metaball_element_add(mball, type);
|
||||
ml= BKE_mball_element_add(mball, type);
|
||||
copy_v3_v3(&ml->x, mat[3]);
|
||||
|
||||
ml->flag |= SELECT;
|
||||
|
@ -1479,7 +1479,7 @@ static int convert_exec(bContext *C, wmOperator *op)
|
||||
base->flag &= ~SELECT;
|
||||
ob->flag &= ~SELECT;
|
||||
|
||||
baseob = BKE_metaball_basis_find(scene, ob);
|
||||
baseob = BKE_mball_basis_find(scene, ob);
|
||||
|
||||
if (ob != baseob) {
|
||||
/* if motherball is converting it would be marked as done later */
|
||||
@ -1736,7 +1736,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
|
||||
if (dupflag & USER_DUP_MBALL) {
|
||||
ID_NEW_US2(obn->data)
|
||||
else {
|
||||
obn->data = BKE_metaball_copy(obn->data);
|
||||
obn->data = BKE_mball_copy(obn->data);
|
||||
didit = 1;
|
||||
}
|
||||
id->us--;
|
||||
|
@ -749,7 +749,7 @@ static void copy_texture_space(Object *to, Object *ob)
|
||||
/* pass */
|
||||
}
|
||||
else if (to->type == OB_MBALL) {
|
||||
BKE_metaball_texspace_calc(to);
|
||||
BKE_mball_texspace_calc(to);
|
||||
}
|
||||
else {
|
||||
BKE_curve_texspace_calc(to->data);
|
||||
|
@ -1495,7 +1495,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
|
||||
// ipo_idnew(me->key->ipo); /* drivers */
|
||||
break;
|
||||
case OB_MBALL:
|
||||
ob->data = BKE_metaball_copy(ob->data);
|
||||
ob->data = BKE_mball_copy(ob->data);
|
||||
break;
|
||||
case OB_CURVE:
|
||||
case OB_SURF:
|
||||
|
@ -867,11 +867,11 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
|
||||
MetaBall *mb = ob->data;
|
||||
|
||||
if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
|
||||
else if (around == V3D_CENTROID) { BKE_metaball_center_median(mb, cent); }
|
||||
else { BKE_metaball_center_bounds(mb, cent); }
|
||||
else if (around == V3D_CENTROID) { BKE_mball_center_median(mb, cent); }
|
||||
else { BKE_mball_center_bounds(mb, cent); }
|
||||
|
||||
negate_v3_v3(cent_neg, cent);
|
||||
BKE_metaball_translate(mb, cent_neg);
|
||||
BKE_mball_translate(mb, cent_neg);
|
||||
|
||||
tot_change++;
|
||||
mb->id.flag |= LIB_DOIT;
|
||||
|
@ -3982,7 +3982,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
|
||||
break;
|
||||
case OB_MBALL:
|
||||
|
||||
if (BKE_metaball_is_basis(ob)) {
|
||||
if (BKE_mball_is_basis(ob)) {
|
||||
lb = &ob->disp;
|
||||
if (lb->first == NULL) makeDispListMBall(scene, ob);
|
||||
if (lb->first == NULL) return 1;
|
||||
@ -6159,7 +6159,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type)
|
||||
bb = ob->bb ? ob->bb : ( (Curve *)ob->data)->bb;
|
||||
}
|
||||
else if (ob->type == OB_MBALL) {
|
||||
if (BKE_metaball_is_basis(ob)) {
|
||||
if (BKE_mball_is_basis(ob)) {
|
||||
bb = ob->bb;
|
||||
if (bb == NULL) {
|
||||
makeDispListMBall(scene, ob);
|
||||
@ -6250,7 +6250,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
|
||||
}
|
||||
}
|
||||
else if (ob->type == OB_MBALL) {
|
||||
if (BKE_metaball_is_basis(ob)) {
|
||||
if (BKE_mball_is_basis(ob)) {
|
||||
if ((base->flag & OB_FROMDUPLI) == 0)
|
||||
drawDispListwire(&ob->disp);
|
||||
}
|
||||
@ -6310,7 +6310,7 @@ static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob)
|
||||
}
|
||||
}
|
||||
else if (ob->type == OB_MBALL) {
|
||||
if (BKE_metaball_is_basis(ob)) {
|
||||
if (BKE_mball_is_basis(ob)) {
|
||||
drawDispListwire(&ob->disp);
|
||||
}
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
|
||||
|
||||
MetaBall *rna_Main_metaballs_new(Main *UNUSED(bmain), const char *name)
|
||||
{
|
||||
MetaBall *mb = BKE_metaball_add(name);
|
||||
MetaBall *mb = BKE_mball_add(name);
|
||||
id_us_min(&mb->id);
|
||||
return mb;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
if (mb->id.us > 0) {
|
||||
for (ob = bmain->object.first; ob; ob = ob->id.next)
|
||||
if (ob->data == mb)
|
||||
BKE_metaball_properties_copy(scene, ob);
|
||||
BKE_mball_properties_copy(scene, ob);
|
||||
|
||||
DAG_id_tag_update(&mb->id, 0);
|
||||
WM_main_add_notifier(NC_GEOM|ND_DATA, mb);
|
||||
@ -115,7 +115,7 @@ static void rna_MetaBall_update_rotation(Main *bmain, Scene *scene, PointerRNA *
|
||||
|
||||
static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type)
|
||||
{
|
||||
MetaElem *ml = BKE_metaball_element_add(mb, type);
|
||||
MetaElem *ml = BKE_mball_element_add(mb, type);
|
||||
|
||||
/* cheating way for importers to avoid slow updates */
|
||||
if (mb->id.us > 0) {
|
||||
|
@ -124,7 +124,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
|
||||
|
||||
case OB_MBALL: {
|
||||
/* metaballs don't have modifiers, so just convert to mesh */
|
||||
Object *basis_ob = BKE_metaball_basis_find(sce, ob);
|
||||
Object *basis_ob = BKE_mball_basis_find(sce, ob);
|
||||
/* todo, re-generatre for render-res */
|
||||
/* metaball_polygonize(scene, ob) */
|
||||
|
||||
|
@ -2437,7 +2437,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
|
||||
int a, need_orco, vlakindex, *index, negative_scale;
|
||||
ListBase dispbase= {NULL, NULL};
|
||||
|
||||
if (ob!=BKE_metaball_basis_find(re->scene, ob))
|
||||
if (ob!=BKE_mball_basis_find(re->scene, ob))
|
||||
return;
|
||||
|
||||
mult_m4_m4m4(mat, re->viewmat, ob->obmat);
|
||||
@ -2463,7 +2463,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
|
||||
|
||||
if (!orco) {
|
||||
/* orco hasn't been found in cache - create new one and add to cache */
|
||||
orco= BKE_metaball_make_orco(ob, &dispbase);
|
||||
orco= BKE_mball_make_orco(ob, &dispbase);
|
||||
set_object_orco(re, ob, orco);
|
||||
}
|
||||
}
|
||||
@ -4725,7 +4725,7 @@ static int allow_render_object(Render *re, Object *ob, int nolamps, int onlysele
|
||||
return 0;
|
||||
|
||||
/* don't add non-basic meta objects, ends up having renderobjects with no geometry */
|
||||
if (ob->type == OB_MBALL && ob!=BKE_metaball_basis_find(re->scene, ob))
|
||||
if (ob->type == OB_MBALL && ob!=BKE_mball_basis_find(re->scene, ob))
|
||||
return 0;
|
||||
|
||||
if (nolamps && (ob->type==OB_LAMP))
|
||||
|
@ -364,7 +364,7 @@ void WM_exit_ext(bContext *C, const short do_python)
|
||||
|
||||
free_openrecent();
|
||||
|
||||
BKE_metaball_cubeTable_free();
|
||||
BKE_mball_cubeTable_free();
|
||||
|
||||
ED_preview_free_dbase(); /* frees a Main dbase, before free_blender! */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user