resolve bad level calls from blenkenel/ into editors/ & remove editors from the include path from CMake & SCons.
* ED_curve_editnurbs --> curve_editnurbs * ED_sculpt_modifiers_changed --> object_sculpt_modifiers_changed
This commit is contained in:
@@ -34,14 +34,16 @@
|
||||
* \since March 2001
|
||||
* \author nzc
|
||||
*/
|
||||
|
||||
struct BevList;
|
||||
struct BezTriple;
|
||||
struct Curve;
|
||||
struct EditNurb;
|
||||
struct ListBase;
|
||||
struct ListBase;
|
||||
struct Nurb;
|
||||
struct Object;
|
||||
struct Scene;
|
||||
struct Nurb;
|
||||
struct ListBase;
|
||||
struct BezTriple;
|
||||
struct BevList;
|
||||
|
||||
#define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) )
|
||||
#define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) )
|
||||
@@ -55,11 +57,14 @@ struct BevList;
|
||||
|
||||
|
||||
void unlink_curve( struct Curve *cu);
|
||||
void free_curve_editNurb_keyIndex(struct EditNurb *editnurb);
|
||||
void free_curve_editNurb(struct Curve *cu);
|
||||
void free_curve( struct Curve *cu);
|
||||
void BKE_free_editfont(struct Curve *cu);
|
||||
struct Curve *add_curve(const char *name, int type);
|
||||
struct Curve *copy_curve( struct Curve *cu);
|
||||
void make_local_curve( struct Curve *cu);
|
||||
struct ListBase *curve_editnurbs(struct Curve *cu);
|
||||
short curve_type( struct Curve *cu);
|
||||
void test_curve_type( struct Object *ob);
|
||||
void tex_space_curve( struct Curve *cu);
|
||||
|
||||
@@ -128,6 +128,7 @@ void *object_tfm_backup(struct Object *ob);
|
||||
void object_tfm_restore(struct Object *ob, void *obtfm_pt);
|
||||
|
||||
void object_handle_update(struct Scene *scene, struct Object *ob);
|
||||
void object_sculpt_modifiers_changed(struct Object *ob);
|
||||
|
||||
float give_timeoffset(struct Object *ob);
|
||||
int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
|
||||
|
||||
@@ -97,5 +97,6 @@ typedef struct SculptSession {
|
||||
} SculptSession;
|
||||
|
||||
void free_sculptsession(struct Object *ob);
|
||||
void free_sculptsession_deformMats(struct SculptSession *ss);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,6 @@ set(INC
|
||||
../blenfont
|
||||
../blenlib
|
||||
../blenloader
|
||||
../editors/include
|
||||
../gpu
|
||||
../ikplugin
|
||||
../imbuf
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
|
||||
sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp')
|
||||
|
||||
incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include'
|
||||
incs = '. #/intern/guardedalloc #/intern/memutil'
|
||||
incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
|
||||
incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
|
||||
incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
|
||||
|
||||
@@ -60,18 +60,16 @@
|
||||
#include "BKE_texture.h"
|
||||
#include "BKE_multires.h"
|
||||
|
||||
|
||||
#include "BLO_sys_types.h" // for intptr_t support
|
||||
|
||||
#include "BIF_gl.h"
|
||||
#include "BIF_glutil.h"
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "GPU_buffers.h"
|
||||
#include "GPU_draw.h"
|
||||
#include "GPU_extensions.h"
|
||||
#include "GPU_material.h"
|
||||
|
||||
#include "ED_sculpt.h" /* for ED_sculpt_modifiers_changed */
|
||||
extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
|
||||
|
||||
///////////////////////////////////
|
||||
///////////////////////////////////
|
||||
@@ -2322,7 +2320,7 @@ static void clear_mesh_caches(Object *ob)
|
||||
}
|
||||
|
||||
if(ob->sculpt) {
|
||||
ED_sculpt_modifiers_changed(ob);
|
||||
object_sculpt_modifiers_changed(ob);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,7 @@
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
|
||||
/* TODO maybe BIF_gl.h should include string.h? */
|
||||
#include <string.h>
|
||||
#include "BIF_gl.h"
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_edgehash.h"
|
||||
|
||||
@@ -41,9 +41,10 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_ghash.h"
|
||||
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_material_types.h"
|
||||
@@ -66,9 +67,6 @@
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_material.h"
|
||||
|
||||
|
||||
#include "ED_curve.h"
|
||||
|
||||
/* globals */
|
||||
|
||||
/* local */
|
||||
@@ -118,6 +116,25 @@ void BKE_free_editfont(Curve *cu)
|
||||
}
|
||||
}
|
||||
|
||||
void free_curve_editNurb_keyIndex(EditNurb *editnurb)
|
||||
{
|
||||
if (!editnurb->keyindex) {
|
||||
return;
|
||||
}
|
||||
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
|
||||
editnurb->keyindex= NULL;
|
||||
}
|
||||
|
||||
void free_curve_editNurb (Curve *cu)
|
||||
{
|
||||
if(cu->editnurb) {
|
||||
freeNurblist(&cu->editnurb->nurbs);
|
||||
free_curve_editNurb_keyIndex(cu->editnurb);
|
||||
MEM_freeN(cu->editnurb);
|
||||
cu->editnurb= NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* don't free curve itself */
|
||||
void free_curve(Curve *cu)
|
||||
{
|
||||
@@ -281,6 +298,16 @@ void make_local_curve(Curve *cu)
|
||||
}
|
||||
}
|
||||
|
||||
/* Get list of nurbs from editnurbs structure */
|
||||
ListBase *curve_editnurbs(Curve *cu)
|
||||
{
|
||||
if (cu->editnurb) {
|
||||
return &cu->editnurb->nurbs;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
short curve_type(Curve *cu)
|
||||
{
|
||||
Nurb *nu;
|
||||
@@ -358,7 +385,6 @@ void tex_space_curve(Curve *cu)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int count_curveverts(ListBase *nurb)
|
||||
{
|
||||
Nurb *nu;
|
||||
@@ -2049,7 +2075,7 @@ void makeBevelList(Object *ob)
|
||||
|
||||
BLI_freelistN(&(cu->bev));
|
||||
if(cu->editnurb && ob->type!=OB_FONT) {
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
nu= nurbs->first;
|
||||
} else nu= cu->nurb.first;
|
||||
|
||||
@@ -3157,7 +3183,7 @@ int clamp_nurb_order_v( struct Nurb *nu)
|
||||
ListBase *BKE_curve_nurbs(Curve *cu)
|
||||
{
|
||||
if (cu->editnurb) {
|
||||
return ED_curve_editnurbs(cu);
|
||||
return curve_editnurbs(cu);
|
||||
}
|
||||
|
||||
return &cu->nurb;
|
||||
|
||||
@@ -67,8 +67,6 @@
|
||||
|
||||
#include "BLO_sys_types.h" // for intptr_t support
|
||||
|
||||
#include "ED_curve.h" /* for BKE_curve_nurbs */
|
||||
|
||||
extern Material defmaterial; /* material.c */
|
||||
|
||||
static void boundbox_displist(Object *ob);
|
||||
@@ -1102,7 +1100,7 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase,
|
||||
float (*deformedVerts)[3];
|
||||
|
||||
if(!forRender && cu->editnurb)
|
||||
nubase= ED_curve_editnurbs(cu);
|
||||
nubase= curve_editnurbs(cu);
|
||||
else
|
||||
nubase= &cu->nurb;
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve
|
||||
|
||||
BLI_assert(!(do_fixes && me == NULL));
|
||||
|
||||
PRINT("ED_mesh_validate: verts(%u), edges(%u), faces(%u)\n", totvert, totedge, totface);
|
||||
PRINT("%s: verts(%u), edges(%u), faces(%u)\n", __func__, totvert, totedge, totface);
|
||||
|
||||
if(totedge == 0 && totface != 0) {
|
||||
PRINT(" locical error, %u faces and 0 edges\n", totface);
|
||||
|
||||
@@ -235,6 +235,17 @@ void object_free_display(Object *ob)
|
||||
freedisplist(&ob->disp);
|
||||
}
|
||||
|
||||
void free_sculptsession_deformMats(SculptSession *ss)
|
||||
{
|
||||
if(ss->orig_cos) MEM_freeN(ss->orig_cos);
|
||||
if(ss->deform_cos) MEM_freeN(ss->deform_cos);
|
||||
if(ss->deform_imats) MEM_freeN(ss->deform_imats);
|
||||
|
||||
ss->orig_cos = NULL;
|
||||
ss->deform_cos = NULL;
|
||||
ss->deform_imats = NULL;
|
||||
}
|
||||
|
||||
void free_sculptsession(Object *ob)
|
||||
{
|
||||
if(ob && ob->sculpt) {
|
||||
@@ -265,6 +276,7 @@ void free_sculptsession(Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* do not free object itself */
|
||||
void free_object(Object *ob)
|
||||
{
|
||||
@@ -2759,6 +2771,33 @@ void object_handle_update(Scene *scene, Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
void object_sculpt_modifiers_changed(Object *ob)
|
||||
{
|
||||
SculptSession *ss= ob->sculpt;
|
||||
|
||||
if(!ss->cache) {
|
||||
/* we free pbvh on changes, except during sculpt since it can't deal with
|
||||
changing PVBH node organization, we hope topology does not change in
|
||||
the meantime .. weak */
|
||||
if(ss->pbvh) {
|
||||
BLI_pbvh_free(ss->pbvh);
|
||||
ss->pbvh= NULL;
|
||||
}
|
||||
|
||||
free_sculptsession_deformMats(ob->sculpt);
|
||||
} else {
|
||||
PBVHNode **nodes;
|
||||
int n, totnode;
|
||||
|
||||
BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
|
||||
|
||||
for(n = 0; n < totnode; n++)
|
||||
BLI_pbvh_node_mark_update(nodes[n]);
|
||||
|
||||
MEM_freeN(nodes);
|
||||
}
|
||||
}
|
||||
|
||||
float give_timeoffset(Object *ob) {
|
||||
if ((ob->ipoflag & OB_OFFS_PARENTADD) && ob->parent) {
|
||||
return ob->sf + give_timeoffset(ob->parent);
|
||||
|
||||
@@ -61,9 +61,7 @@
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_subsurf.h"
|
||||
|
||||
|
||||
#include "BIF_gl.h"
|
||||
#include "BIF_glutil.h"
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "GPU_draw.h"
|
||||
#include "GPU_extensions.h"
|
||||
@@ -71,6 +69,8 @@
|
||||
|
||||
#include "CCGSubSurf.h"
|
||||
|
||||
extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
|
||||
|
||||
static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v);
|
||||
static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e);
|
||||
static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f);
|
||||
|
||||
@@ -46,14 +46,12 @@
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "ED_curve.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_transform.h"
|
||||
|
||||
#include "curve_intern.h"
|
||||
|
||||
|
||||
/************************* registration ****************************/
|
||||
|
||||
void ED_operatortypes_curve(void)
|
||||
|
||||
@@ -117,7 +117,7 @@ static float nurbcircle[8][2]= {
|
||||
{0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
|
||||
};
|
||||
|
||||
ListBase *curve_get_editcurve(Object *ob)
|
||||
ListBase *object_editcurve_get(Object *ob)
|
||||
{
|
||||
if(ob && ELEM(ob->type, OB_CURVE, OB_SURF)) {
|
||||
Curve *cu= ob->data;
|
||||
@@ -134,7 +134,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
|
||||
if(nu==NULL)
|
||||
cu->actnu = -1;
|
||||
else {
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
cu->actnu = BLI_findindex(nurbs, nu);
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
|
||||
static Nurb *get_actNurb(Object *obedit)
|
||||
{
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
return BLI_findlink(nurbs, cu->actnu);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ static int isNurbsel_count(Curve *cu, Nurb *nu)
|
||||
|
||||
void printknots(Object *obedit)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
int a, num;
|
||||
|
||||
@@ -302,11 +302,6 @@ static CVKeyIndex *init_cvKeyIndex(void *cv, int key_index, int nu_index, int pt
|
||||
return cvIndex;
|
||||
}
|
||||
|
||||
static void free_cvKeyIndex(CVKeyIndex *pointIndex)
|
||||
{
|
||||
MEM_freeN(pointIndex);
|
||||
}
|
||||
|
||||
static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
|
||||
{
|
||||
Nurb *nu= editnurb->nurbs.first;
|
||||
@@ -358,15 +353,6 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
|
||||
editnurb->keyindex= gh;
|
||||
}
|
||||
|
||||
static void free_editNurb_keyIndex(EditNurb *editnurb)
|
||||
{
|
||||
if (!editnurb->keyindex) {
|
||||
return;
|
||||
}
|
||||
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_cvKeyIndex);
|
||||
editnurb->keyindex= NULL;
|
||||
}
|
||||
|
||||
static CVKeyIndex *getCVKeyIndex(EditNurb *editnurb, void *cv)
|
||||
{
|
||||
return BLI_ghash_lookup(editnurb->keyindex, cv);
|
||||
@@ -411,7 +397,7 @@ static void keyIndex_delCV(EditNurb *editnurb, void *cv)
|
||||
return;
|
||||
}
|
||||
|
||||
BLI_ghash_remove(editnurb->keyindex, cv, NULL, (GHashValFreeFP)free_cvKeyIndex);
|
||||
BLI_ghash_remove(editnurb->keyindex, cv, NULL, (GHashValFreeFP)MEM_freeN);
|
||||
}
|
||||
|
||||
static void keyIndex_delBezt(EditNurb *editnurb, BezTriple *bezt)
|
||||
@@ -437,7 +423,7 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
|
||||
a= nu->pntsu;
|
||||
|
||||
while (a--) {
|
||||
BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)free_cvKeyIndex);
|
||||
BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)MEM_freeN);
|
||||
++bezt;
|
||||
}
|
||||
} else {
|
||||
@@ -445,7 +431,7 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
|
||||
a= nu->pntsu * nu->pntsv;
|
||||
|
||||
while (a--) {
|
||||
BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)free_cvKeyIndex);
|
||||
BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)MEM_freeN);
|
||||
++bp;
|
||||
}
|
||||
}
|
||||
@@ -1198,7 +1184,7 @@ int ED_curve_updateAnimPaths(Object *obedit)
|
||||
/* load editNurb in object */
|
||||
void load_editNurb(Object *obedit)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
if(obedit==NULL) return;
|
||||
|
||||
@@ -1251,7 +1237,7 @@ void make_editNurb(Object *obedit)
|
||||
|
||||
if(editnurb) {
|
||||
freeNurblist(&editnurb->nurbs);
|
||||
free_editNurb_keyIndex(editnurb);
|
||||
free_curve_editNurb_keyIndex(editnurb);
|
||||
editnurb->keyindex= NULL;
|
||||
} else {
|
||||
editnurb= MEM_callocN(sizeof(EditNurb), "editnurb");
|
||||
@@ -1283,16 +1269,6 @@ void make_editNurb(Object *obedit)
|
||||
}
|
||||
}
|
||||
|
||||
void free_curve_editNurb (Curve *cu)
|
||||
{
|
||||
if(cu->editnurb) {
|
||||
freeNurblist(&cu->editnurb->nurbs);
|
||||
free_editNurb_keyIndex(cu->editnurb);
|
||||
MEM_freeN(cu->editnurb);
|
||||
cu->editnurb= NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void free_editNurb(Object *obedit)
|
||||
{
|
||||
Curve *cu= obedit->data;
|
||||
@@ -1302,7 +1278,7 @@ void free_editNurb(Object *obedit)
|
||||
|
||||
void CU_deselect_all(Object *obedit)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
if (editnurb) {
|
||||
selectend_nurb(obedit, FIRST, 0, DESELECT); /* set first control points as unselected */
|
||||
@@ -1312,7 +1288,7 @@ void CU_deselect_all(Object *obedit)
|
||||
|
||||
void CU_select_all(Object *obedit)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
if (editnurb) {
|
||||
selectend_nurb(obedit, FIRST, 0, SELECT); /* set first control points as unselected */
|
||||
@@ -1322,7 +1298,7 @@ void CU_select_all(Object *obedit)
|
||||
|
||||
void CU_select_swap(Object *obedit)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
if (editnurb) {
|
||||
Curve *cu= obedit->data;
|
||||
@@ -1397,7 +1373,7 @@ static int separate_exec(bContext *C, wmOperator *op)
|
||||
make_editNurb(newob);
|
||||
newedit= newcu->editnurb;
|
||||
freeNurblist(&newedit->nurbs);
|
||||
free_editNurb_keyIndex(newedit);
|
||||
free_curve_editNurb_keyIndex(newedit);
|
||||
|
||||
/* 3. move over parts from old object */
|
||||
for(nu= oldedit->nurbs.first; nu; nu=nu1) {
|
||||
@@ -1588,7 +1564,7 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu, *next;
|
||||
BPoint *bp, *bpn, *newbp;
|
||||
int a, b, newu, newv, sel;
|
||||
@@ -1835,7 +1811,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
|
||||
|
||||
static void adduplicateflagNurb(Object *obedit, short flag)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu, *newnu;
|
||||
BezTriple *bezt, *bezt1;
|
||||
BPoint *bp, *bp1;
|
||||
@@ -2051,7 +2027,7 @@ void CURVE_OT_switch_direction(wmOperatorType *ot)
|
||||
static int set_goal_weight_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
@@ -2103,7 +2079,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot)
|
||||
static int set_radius_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
@@ -2155,7 +2131,7 @@ void CURVE_OT_radius_set(wmOperatorType *ot)
|
||||
static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BezTriple *bezt, *beztOrig;
|
||||
BPoint *bp, *bpOrig;
|
||||
@@ -2228,7 +2204,7 @@ void CURVE_OT_smooth(wmOperatorType *ot)
|
||||
static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
@@ -2461,7 +2437,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
|
||||
/* selstatus: selection status in case doswap is false */
|
||||
void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatus)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
@@ -2603,7 +2579,7 @@ static short nurb_has_selected_cps(ListBase *editnurb)
|
||||
static int de_select_all_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
int action = RNA_enum_get(op->ptr, "action");
|
||||
|
||||
if (action == SEL_TOGGLE) {
|
||||
@@ -2652,7 +2628,7 @@ static int hide_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
@@ -2725,7 +2701,7 @@ void CURVE_OT_hide(wmOperatorType *ot)
|
||||
static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
@@ -2783,7 +2759,7 @@ static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
@@ -3542,7 +3518,7 @@ void ED_nurb_set_spline_type(Nurb *nu, int type)
|
||||
static int set_spline_type_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
int changed=0, type= RNA_enum_get(op->ptr, "type");
|
||||
|
||||
@@ -3606,7 +3582,7 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
|
||||
static int set_handle_type_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type"));
|
||||
|
||||
@@ -3928,7 +3904,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
|
||||
static int merge_nurb(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
NurbSort *nus1, *nus2;
|
||||
int ok= 1;
|
||||
|
||||
@@ -3984,7 +3960,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
|
||||
/* joins 2 curves */
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *nubase= curve_get_editcurve(obedit);
|
||||
ListBase *nubase= object_editcurve_get(obedit);
|
||||
Nurb *nu, *nu1=NULL, *nu2=NULL;
|
||||
BPoint *bp;
|
||||
float *fp, offset;
|
||||
@@ -4180,7 +4156,7 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
ViewContext vc;
|
||||
Nurb *nu;
|
||||
BezTriple *bezt=NULL;
|
||||
@@ -4264,7 +4240,7 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
|
||||
static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cent)
|
||||
{
|
||||
Curve *cu= (Curve*)obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
float si,phi,n[3],q[4],cmat[3][3],tmat[3][3],imat[3][3];
|
||||
float bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
|
||||
@@ -4786,7 +4762,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
@@ -4863,7 +4839,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
|
||||
static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
uiPopupMenu *pup;
|
||||
uiLayout *layout;
|
||||
Nurb *nu;
|
||||
@@ -5050,7 +5026,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
static BPoint *last= NULL;
|
||||
static int direction=0;
|
||||
Nurb *nu;
|
||||
@@ -5124,7 +5100,7 @@ void CURVE_OT_select_row(wmOperatorType *ot)
|
||||
static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
select_adjacent_cp(editnurb, 1, 0, SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
|
||||
@@ -5151,7 +5127,7 @@ void CURVE_OT_select_next(wmOperatorType *ot)
|
||||
static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
select_adjacent_cp(editnurb, -1, 0, SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
|
||||
@@ -5178,7 +5154,7 @@ void CURVE_OT_select_previous(wmOperatorType *ot)
|
||||
static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp, *tempbp;
|
||||
int a;
|
||||
@@ -5266,7 +5242,7 @@ void CURVE_OT_select_more(wmOperatorType *ot)
|
||||
static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
@@ -5458,7 +5434,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
|
||||
static int select_random_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
if(!RNA_boolean_get(op->ptr, "extend"))
|
||||
CU_deselect_all(obedit);
|
||||
@@ -5550,7 +5526,7 @@ static void select_nth_bp(Nurb *nu, BPoint *bp, int nth)
|
||||
int CU_select_nth(Object *obedit, int nth)
|
||||
{
|
||||
Curve *cu= (Curve*)obedit->data;
|
||||
ListBase *nubase= ED_curve_editnurbs(cu);
|
||||
ListBase *nubase= curve_editnurbs(cu);
|
||||
Nurb *nu;
|
||||
int ok=0;
|
||||
|
||||
@@ -6024,7 +6000,7 @@ void CURVE_OT_delete(wmOperatorType *ot)
|
||||
static int shade_smooth_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
int clear= (strcmp(op->idname, "CURVE_OT_shade_flat") == 0);
|
||||
|
||||
@@ -6196,7 +6172,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
|
||||
{
|
||||
static int xzproj= 0; /* this function calls itself... */
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
View3D *v3d= CTX_wm_view3d(C);
|
||||
RegionView3D *rv3d= ED_view3d_context_rv3d(C);
|
||||
Nurb *nu = NULL;
|
||||
@@ -6612,7 +6588,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
|
||||
ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
|
||||
|
||||
nu= add_nurbs_primitive(C, mat, type, newob);
|
||||
editnurb= curve_get_editcurve(obedit);
|
||||
editnurb= object_editcurve_get(obedit);
|
||||
BLI_addtail(editnurb, nu);
|
||||
|
||||
/* userdef */
|
||||
@@ -6895,7 +6871,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
@@ -6965,7 +6941,7 @@ static void undoCurve_to_editCurve(void *ucu, void *obe)
|
||||
Curve *cu= (Curve*)obedit->data;
|
||||
UndoCurve *undoCurve= ucu;
|
||||
ListBase *undobase= &undoCurve->nubase;
|
||||
ListBase *editbase= ED_curve_editnurbs(cu);
|
||||
ListBase *editbase= curve_editnurbs(cu);
|
||||
Nurb *nu, *newnu;
|
||||
EditNurb *editnurb= cu->editnurb;
|
||||
void *lastsel= NULL;
|
||||
@@ -6974,7 +6950,7 @@ static void undoCurve_to_editCurve(void *ucu, void *obe)
|
||||
freeNurblist(editbase);
|
||||
|
||||
if (undoCurve->undoIndex) {
|
||||
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_cvKeyIndex);
|
||||
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
|
||||
editnurb->keyindex= dupli_keyIndexHash(undoCurve->undoIndex);
|
||||
}
|
||||
|
||||
@@ -7013,7 +6989,7 @@ static void *editCurve_to_undoCurve(void *obe)
|
||||
{
|
||||
Object *obedit= obe;
|
||||
Curve *cu= (Curve*)obedit->data;
|
||||
ListBase *nubase= ED_curve_editnurbs(cu);
|
||||
ListBase *nubase= curve_editnurbs(cu);
|
||||
UndoCurve *undoCurve;
|
||||
EditNurb *editnurb= cu->editnurb, tmpEditnurb;
|
||||
Nurb *nu, *newnu;
|
||||
@@ -7062,7 +7038,7 @@ static void free_undoCurve(void *ucv)
|
||||
freeNurblist(&undoCurve->nubase);
|
||||
|
||||
if(undoCurve->undoIndex)
|
||||
BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)free_cvKeyIndex);
|
||||
BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)MEM_freeN);
|
||||
|
||||
free_fcurves(&undoCurve->fcurves);
|
||||
free_fcurves(&undoCurve->drivers);
|
||||
@@ -7082,15 +7058,6 @@ void undo_push_curve(bContext *C, const char *name)
|
||||
undo_editmode_push(C, name, get_data, free_undoCurve, undoCurve_to_editCurve, editCurve_to_undoCurve, NULL);
|
||||
}
|
||||
|
||||
/* Get list of nurbs from editnurbs structure */
|
||||
ListBase *ED_curve_editnurbs(Curve *cu)
|
||||
{
|
||||
if (cu->editnurb) {
|
||||
return &cu->editnurb->nurbs;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count)
|
||||
{
|
||||
memcpy(dst, src, count*sizeof(BezTriple));
|
||||
|
||||
@@ -58,7 +58,7 @@ void CU_select_swap(struct Object *obedit);
|
||||
|
||||
|
||||
void undo_push_curve (struct bContext *C, const char *name);
|
||||
ListBase *curve_get_editcurve(struct Object *ob);
|
||||
ListBase *object_editcurve_get(struct Object *ob);
|
||||
|
||||
void load_editNurb (struct Object *obedit);
|
||||
void make_editNurb (struct Object *obedit);
|
||||
|
||||
@@ -44,7 +44,6 @@ void ED_operatortypes_sculpt(void);
|
||||
void sculpt_get_redraw_planes(float planes[4][4], struct ARegion *ar,
|
||||
struct RegionView3D *rv3d, struct Object *ob);
|
||||
void ED_sculpt_force_update(struct bContext *C);
|
||||
void ED_sculpt_modifiers_changed(struct Object *ob);
|
||||
|
||||
/* paint_ops.c */
|
||||
void ED_operatortypes_paint(void);
|
||||
|
||||
@@ -400,7 +400,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
|
||||
((Curve*)ob->data)->flag |= CU_PATH|CU_3D;
|
||||
ED_object_enter_editmode(C, 0);
|
||||
ED_object_new_primitive_matrix(C, ob, loc, rot, mat);
|
||||
BLI_addtail(curve_get_editcurve(ob), add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_PATH, 1));
|
||||
BLI_addtail(object_editcurve_get(ob), add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_PATH, 1));
|
||||
|
||||
if(!enter_editmode)
|
||||
ED_object_exit_editmode(C, EM_FREEDATA);
|
||||
|
||||
@@ -217,7 +217,7 @@ static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
|
||||
|
||||
static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, float *cent)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
@@ -329,7 +329,7 @@ static int object_hook_index_array(Object *obedit, int *tot, int **indexar, char
|
||||
|
||||
static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
|
||||
{
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
|
||||
@@ -140,7 +140,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
|
||||
BKE_mesh_end_editmesh(me, em);
|
||||
}
|
||||
else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) {
|
||||
ListBase *editnurb= curve_get_editcurve(obedit);
|
||||
ListBase *editnurb= object_editcurve_get(obedit);
|
||||
|
||||
cu= obedit->data;
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include "BKE_animsys.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_depsgraph.h"
|
||||
#include "BKE_font.h"
|
||||
#include "BKE_global.h"
|
||||
@@ -176,7 +177,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
|
||||
Nurb *nu;
|
||||
ListBase *nurbs= ED_curve_editnurbs((Curve*)ob->data);
|
||||
ListBase *nurbs= curve_editnurbs((Curve*)ob->data);
|
||||
|
||||
if(nurbs) {
|
||||
for(nu= nurbs->first; nu; nu= nu->next)
|
||||
@@ -234,7 +235,7 @@ static int material_slot_de_select(bContext *C, int select)
|
||||
}
|
||||
}
|
||||
else if ELEM(ob->type, OB_CURVE, OB_SURF) {
|
||||
ListBase *nurbs= ED_curve_editnurbs((Curve*)ob->data);
|
||||
ListBase *nurbs= curve_editnurbs((Curve*)ob->data);
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
|
||||
@@ -102,33 +102,6 @@ void ED_sculpt_force_update(bContext *C)
|
||||
multires_force_update(ob);
|
||||
}
|
||||
|
||||
void ED_sculpt_modifiers_changed(Object *ob)
|
||||
{
|
||||
SculptSession *ss= ob->sculpt;
|
||||
|
||||
if(!ss->cache) {
|
||||
/* we free pbvh on changes, except during sculpt since it can't deal with
|
||||
changing PVBH node organization, we hope topology does not change in
|
||||
the meantime .. weak */
|
||||
if(ss->pbvh) {
|
||||
BLI_pbvh_free(ss->pbvh);
|
||||
ss->pbvh= NULL;
|
||||
}
|
||||
|
||||
sculpt_free_deformMats(ob->sculpt);
|
||||
} else {
|
||||
PBVHNode **nodes;
|
||||
int n, totnode;
|
||||
|
||||
BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
|
||||
|
||||
for(n = 0; n < totnode; n++)
|
||||
BLI_pbvh_node_mark_update(nodes[n]);
|
||||
|
||||
MEM_freeN(nodes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Sculpt mode handles multires differently from regular meshes, but only if
|
||||
it's the last modifier on the stack and it is not on the first level */
|
||||
struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
|
||||
@@ -2694,17 +2667,6 @@ static void sculpt_update_tex(Sculpt *sd, SculptSession *ss)
|
||||
}
|
||||
}
|
||||
|
||||
void sculpt_free_deformMats(SculptSession *ss)
|
||||
{
|
||||
if(ss->orig_cos) MEM_freeN(ss->orig_cos);
|
||||
if(ss->deform_cos) MEM_freeN(ss->deform_cos);
|
||||
if(ss->deform_imats) MEM_freeN(ss->deform_imats);
|
||||
|
||||
ss->orig_cos = NULL;
|
||||
ss->deform_cos = NULL;
|
||||
ss->deform_imats = NULL;
|
||||
}
|
||||
|
||||
void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_fmap)
|
||||
{
|
||||
DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
|
||||
@@ -2741,7 +2703,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
|
||||
if(!ss->orig_cos) {
|
||||
int a;
|
||||
|
||||
sculpt_free_deformMats(ss);
|
||||
free_sculptsession_deformMats(ss);
|
||||
|
||||
if(ss->kb) ss->orig_cos = key_to_vertcos(ob, ss->kb);
|
||||
else ss->orig_cos = mesh_getVertexCos(ob->data, NULL);
|
||||
@@ -2752,7 +2714,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
|
||||
for(a = 0; a < ((Mesh*)ob->data)->totvert; ++a)
|
||||
invert_m3(ss->deform_imats[a]);
|
||||
}
|
||||
} else sculpt_free_deformMats(ss);
|
||||
} else free_sculptsession_deformMats(ss);
|
||||
|
||||
/* if pbvh is deformed, key block is already applied to it */
|
||||
if (ss->kb && !BLI_pbvh_isDeformed(ss->pbvh)) {
|
||||
|
||||
@@ -67,7 +67,7 @@ int sculpt_poll(struct bContext *C);
|
||||
void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_fmap);
|
||||
|
||||
/* Deformed mesh sculpt */
|
||||
void sculpt_free_deformMats(struct SculptSession *ss);
|
||||
void free_sculptsession_deformMats(struct SculptSession *ss);
|
||||
|
||||
/* Stroke */
|
||||
struct SculptStroke *sculpt_stroke_new(const int max);
|
||||
|
||||
@@ -199,7 +199,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
|
||||
Mesh *me= ob->data;
|
||||
mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
|
||||
|
||||
sculpt_free_deformMats(ss);
|
||||
free_sculptsession_deformMats(ss);
|
||||
tag_update|= 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_anim.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_displist.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_key.h"
|
||||
@@ -51,7 +52,6 @@
|
||||
#include "ED_info.h"
|
||||
#include "ED_armature.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
|
||||
#include "BLI_editVert.h"
|
||||
|
||||
@@ -193,7 +193,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
int a;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
for(nu=nurbs->first; nu; nu=nu->next) {
|
||||
if(nu->type == CU_BEZIER) {
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
#include "BKE_anim.h" //for the where_on_path function
|
||||
#include "BKE_constraint.h" // for the get_constraint_target function
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_deform.h"
|
||||
#include "BKE_displist.h"
|
||||
@@ -92,7 +93,7 @@
|
||||
#include "ED_screen.h"
|
||||
#include "ED_sculpt.h"
|
||||
#include "ED_types.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
#include "ED_curve.h" /* for curve_editnurbs */
|
||||
|
||||
#include "UI_resources.h"
|
||||
|
||||
@@ -1796,7 +1797,7 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb
|
||||
short s[2] = {IS_CLIPPED, 0};
|
||||
Nurb *nu;
|
||||
int i;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
ED_view3d_local_clipping(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
|
||||
|
||||
@@ -6065,7 +6066,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
|
||||
cu= ob->data;
|
||||
|
||||
if(cu->editnurb) {
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
drawnurb(scene, v3d, rv3d, base, nurbs->first, dt);
|
||||
}
|
||||
else if(dt==OB_BOUNDBOX) {
|
||||
|
||||
@@ -210,7 +210,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
int a;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
nu= nurbs->first;
|
||||
while(nu) {
|
||||
@@ -457,7 +457,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
int a;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
nu= nurbs->first;
|
||||
while(nu) {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "ED_armature.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
#include "ED_curve.h" /* for curve_editnurbs */
|
||||
|
||||
#include "view3d_intern.h"
|
||||
|
||||
@@ -102,7 +102,7 @@ static void special_transvert_update(Object *obedit)
|
||||
}
|
||||
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
|
||||
Curve *cu= obedit->data;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
Nurb *nu= nurbs->first;
|
||||
|
||||
while(nu) {
|
||||
@@ -312,7 +312,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
|
||||
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
|
||||
Curve *cu= obedit->data;
|
||||
int totmalloc= 0;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
for(nu= nurbs->first; nu; nu= nu->next) {
|
||||
if(nu->type == CU_BEZIER)
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
#include "ED_node.h"
|
||||
#include "ED_types.h"
|
||||
#include "ED_uvedit.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
#include "ED_util.h" /* for crazyspace correction */
|
||||
|
||||
#include "UI_view2d.h"
|
||||
@@ -1395,7 +1394,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
|
||||
if(cu->editnurb==NULL) return;
|
||||
|
||||
/* count total of vertices, check identical as in 2nd loop for making transdata! */
|
||||
nurbs= ED_curve_editnurbs(cu);
|
||||
nurbs= curve_editnurbs(cu);
|
||||
for(nu= nurbs->first; nu; nu= nu->next) {
|
||||
if(nu->type == CU_BEZIER) {
|
||||
for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
#include "ED_space_api.h"
|
||||
#include "ED_uvedit.h"
|
||||
#include "ED_view3d.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
#include "ED_curve.h" /* for curve_editnurbs */
|
||||
|
||||
//#include "BDR_unwrapper.h"
|
||||
|
||||
@@ -626,7 +626,7 @@ static void recalcData_view3d(TransInfo *t)
|
||||
if (t->obedit) {
|
||||
if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
|
||||
Curve *cu= t->obedit->data;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
Nurb *nu= nurbs->first;
|
||||
|
||||
if(t->state != TRANS_CANCEL) {
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_particle.h"
|
||||
@@ -75,7 +76,6 @@
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_particle.h"
|
||||
#include "ED_view3d.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
|
||||
#include "UI_resources.h"
|
||||
|
||||
@@ -395,7 +395,7 @@ int calc_manipulator_stats(const bContext *C)
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
nu= nurbs->first;
|
||||
while(nu) {
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
|
||||
#include "BKE_armature.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_report.h"
|
||||
|
||||
@@ -56,8 +57,6 @@
|
||||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_curve.h" /* for ED_curve_editnurbs */
|
||||
|
||||
|
||||
#include "RNA_define.h"
|
||||
|
||||
@@ -721,7 +720,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
|
||||
Nurb *nu;
|
||||
BezTriple *bezt;
|
||||
int a;
|
||||
ListBase *nurbs= ED_curve_editnurbs(cu);
|
||||
ListBase *nurbs= curve_editnurbs(cu);
|
||||
|
||||
for (nu = nurbs->first; nu; nu = nu->next)
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ struct SculptSession;
|
||||
struct ShadeInput;
|
||||
struct ShadeResult;
|
||||
struct SpaceImage;
|
||||
struct SpaceNode;
|
||||
struct Tex;
|
||||
struct TexResult;
|
||||
struct Text;
|
||||
@@ -105,7 +106,6 @@ struct bConstraintOb;
|
||||
struct Context;
|
||||
struct ChannelDriver;
|
||||
|
||||
|
||||
/*new render funcs */
|
||||
float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype) {return (float *) NULL;}
|
||||
float RE_filter_value(int type, float x) {return 0.0f;}
|
||||
@@ -298,8 +298,6 @@ void ED_sequencer_update_view(struct bContext *C, int view){}
|
||||
float ED_rollBoneToVector(struct EditBone *bone, float new_up_axis[3]){return 0.0f;}
|
||||
void ED_space_image_size(struct SpaceImage *sima, int *width, int *height){}
|
||||
|
||||
struct ListBase *ED_curve_editnurbs(struct Curve *cu){return NULL;}
|
||||
void free_curve_editNurb (struct Curve *cu){}
|
||||
void ED_nurb_set_spline_type(struct Nurb *nu, int type){}
|
||||
|
||||
void EM_selectmode_set(struct EditMesh *em){}
|
||||
|
||||
Reference in New Issue
Block a user