Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c26
-rw-r--r--source/blender/editors/transform/transform_generics.c10
-rw-r--r--source/blender/editors/transform/transform_manipulator.c12
-rw-r--r--source/blender/editors/transform/transform_orientations.c8
-rw-r--r--source/blender/editors/transform/transform_snap.c2
-rw-r--r--source/blender/editors/transform/transform_snap_object.c2
7 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 494cf3459df..e036ffd526c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1906,7 +1906,7 @@ static void drawTransformPixel(const struct bContext *UNUSED(C), ARegion *ar, vo
TransInfo *t = arg;
Scene *scene = t->scene;
SceneLayer *sl = t->scene_layer;
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
/* draw autokeyframing hint in the corner
* - only draw if enabled (advanced users may be distracted/annoyed),
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 922cae1320d..29401bc2da1 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -292,7 +292,7 @@ static void createTransTexspace(TransInfo *t)
ID *id;
short *texflag;
- ob = OBACT_NEW(sl);
+ ob = OBACT(sl);
if (ob == NULL) { // Shouldn't logically happen, but still...
t->total = 0;
@@ -2011,7 +2011,7 @@ void flushTransParticles(TransInfo *t)
{
Scene *scene = t->scene;
SceneLayer *sl = t->scene_layer;
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
PTCacheEdit *edit = PE_get_current(scene, sl, ob);
ParticleSystem *psys = edit->psys;
ParticleSystemModifierData *psmd = NULL;
@@ -2053,7 +2053,7 @@ void flushTransParticles(TransInfo *t)
EvaluationContext eval_ctx;
CTX_data_eval_ctx(t->context, &eval_ctx);
- PE_update_object(&eval_ctx, scene, sl, OBACT_NEW(sl), 1);
+ PE_update_object(&eval_ctx, scene, sl, OBACT(sl), 1);
}
/* ********************* mesh ****************** */
@@ -5576,7 +5576,7 @@ static void set_trans_object_base_flags(TransInfo *t)
for (base = sl->object_bases.first; base; base = base->next) {
base->flag_legacy &= ~BA_WAS_SEL;
- if (TESTBASELIB_BGMODE_NEW(base)) {
+ if (TESTBASELIB_BGMODE(base)) {
Object *ob = base->object;
Object *parsel = ob->parent;
@@ -5585,7 +5585,7 @@ static void set_trans_object_base_flags(TransInfo *t)
if (parsel->base_flag & BASE_SELECTED) {
Base *parbase = BKE_scene_layer_base_find(sl, parsel);
if (parbase) { /* in rare cases this can fail */
- if (TESTBASELIB_BGMODE_NEW(parbase)) {
+ if (TESTBASELIB_BGMODE(parbase)) {
break;
}
}
@@ -5656,7 +5656,7 @@ static int count_proportional_objects(TransInfo *t)
{
/* mark all parents */
for (base = sl->object_bases.first; base; base = base->next) {
- if (TESTBASELIB_BGMODE_NEW(base)) {
+ if (TESTBASELIB_BGMODE(base)) {
Object *parent = base->object->parent;
/* flag all parents */
@@ -5672,7 +5672,7 @@ static int count_proportional_objects(TransInfo *t)
/* all base not already selected or marked that is editable */
if ((base->object->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 &&
(base->flag & BASE_SELECTED) == 0 &&
- (BASE_EDITABLE_BGMODE_NEW(base)))
+ (BASE_EDITABLE_BGMODE(base)))
{
mark_children(base->object);
}
@@ -5685,7 +5685,7 @@ static int count_proportional_objects(TransInfo *t)
/* if base is not selected, not a parent of selection or not a child of selection and it is editable */
if ((ob->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 &&
(base->flag & BASE_SELECTED) == 0 &&
- (BASE_EDITABLE_BGMODE_NEW(base)))
+ (BASE_EDITABLE_BGMODE(base)))
{
DEG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -5778,7 +5778,7 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, SceneLayer *sl, View3D *
}
else if (ELEM(tmode, TFM_ROTATION, TFM_TRACKBALL)) {
if (v3d->around == V3D_AROUND_ACTIVE) {
- if (ob != OBACT_NEW(sl))
+ if (ob != OBACT(sl))
do_loc = true;
}
else if (v3d->around == V3D_AROUND_CURSOR)
@@ -5789,7 +5789,7 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, SceneLayer *sl, View3D *
}
else if (tmode == TFM_RESIZE) {
if (v3d->around == V3D_AROUND_ACTIVE) {
- if (ob != OBACT_NEW(sl))
+ if (ob != OBACT(sl))
do_loc = true;
}
else if (v3d->around == V3D_AROUND_CURSOR)
@@ -6643,7 +6643,7 @@ static void createTransObject(bContext *C, TransInfo *t)
/* if base is not selected, not a parent of selection or not a child of selection and it is editable */
if ((ob->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 &&
(base->flag & BASE_SELECTED) == 0 &&
- BASE_EDITABLE_BGMODE_NEW(base))
+ BASE_EDITABLE_BGMODE(base))
{
td->protectflag = ob->protectflag;
td->ext = tx;
@@ -8091,7 +8091,7 @@ void createTransData(bContext *C, TransInfo *t)
{
Scene *scene = t->scene;
SceneLayer *sl = t->scene_layer;
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
/* if tests must match recalcData for correct updates */
if (t->options & CTX_TEXTURE) {
@@ -8258,7 +8258,7 @@ void createTransData(bContext *C, TransInfo *t)
if (ob_armature && ob_armature->mode & OB_MODE_POSE) {
Base *base_arm = BKE_scene_layer_base_find(t->scene_layer, ob_armature);
if (base_arm) {
- if (BASE_VISIBLE_NEW(base_arm)) {
+ if (BASE_VISIBLE(base_arm)) {
createTransPose(t, ob_armature);
}
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 5081b65c215..863e0c822dd 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -331,7 +331,7 @@ static void recalcData_actedit(TransInfo *t)
/* NOTE: sync this with the code in ANIM_animdata_get_context() */
ac.scene = t->scene;
ac.scene_layer = t->scene_layer;
- ac.obact = OBACT_NEW(sl);
+ ac.obact = OBACT(sl);
ac.sa = t->sa;
ac.ar = t->ar;
ac.sl = (t->sa) ? t->sa->spacedata.first : NULL;
@@ -381,7 +381,7 @@ static void recalcData_graphedit(TransInfo *t)
/* NOTE: sync this with the code in ANIM_animdata_get_context() */
ac.scene = t->scene;
ac.scene_layer = t->scene_layer;
- ac.obact = OBACT_NEW(sl);
+ ac.obact = OBACT(sl);
ac.sa = t->sa;
ac.ar = t->ar;
ac.sl = (t->sa) ? t->sa->spacedata.first : NULL;
@@ -1804,7 +1804,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
}
else if (t->flag & T_POSE) {
SceneLayer *sl = t->scene_layer;
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
if (ob) {
bPoseChannel *pchan = BKE_pose_channel_active(ob);
if (pchan && (!select_only || (pchan->bone->flag & BONE_SELECTED))) {
@@ -1824,8 +1824,8 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
else {
/* object mode */
SceneLayer *sl = t->scene_layer;
- Object *ob = OBACT_NEW(sl);
- Base *base = BASACT_NEW(sl);
+ Object *ob = OBACT(sl);
+ Base *base = BASACT(sl);
if (ob && ((!select_only) || ((base->flag & BASE_SELECTED) != 0))) {
copy_v3_v3(r_center, ob->obmat[3]);
ok = true;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index d1f17ac7cb2..be33cb85f0e 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -596,7 +596,7 @@ static int calc_manipulator_stats(
View3D *v3d = sa->spacedata.first;
RegionView3D *rv3d = ar->regiondata;
Base *base;
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
bGPdata *gpd = CTX_data_gpencil_data(C);
const bool is_gp_edit = ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE));
int a, totsel = 0;
@@ -998,12 +998,12 @@ static int calc_manipulator_stats(
else {
/* we need the one selected object, if its not active */
- base = BASACT_NEW(sl);
- ob = OBACT_NEW(sl);
+ base = BASACT(sl);
+ ob = OBACT(sl);
if (base && ((base->flag & BASE_SELECTED) == 0)) ob = NULL;
for (base = sl->object_bases.first; base; base = base->next) {
- if (TESTBASELIB_NEW(base)) {
+ if (TESTBASELIB(base)) {
if (ob == NULL)
ob = base->object;
if (use_only_center || base->object->bb == NULL) {
@@ -1062,7 +1062,7 @@ static void manipulator_prepare_mat(
case V3D_AROUND_ACTIVE:
{
bGPdata *gpd = CTX_data_gpencil_data(C);
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
if (((v3d->around == V3D_AROUND_ACTIVE) && (scene->obedit == NULL)) &&
((gpd == NULL) || !(gpd->flag & GP_DATA_STROKE_EDITMODE)) &&
@@ -1591,7 +1591,7 @@ static void WIDGETGROUP_xform_cage_draw_prepare(const bContext *C, wmManipulator
wmManipulator *mpr = xmgroup->manipulator;
SceneLayer *sl = CTX_data_scene_layer(C);
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
if (ob && ob->mode & OB_MODE_EDIT) {
copy_m4_m4(mpr->matrix_space, ob->obmat);
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index e91db762eb1..86f99c4fed2 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -581,7 +581,7 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
SceneLayer *sl = CTX_data_scene_layer(C);
Object *obedit = CTX_data_edit_object(C);
Base *base;
- Object *ob = OBACT_NEW(sl);
+ Object *ob = OBACT(sl);
int result = ORIENTATION_NONE;
const bool activeOnly = (around == V3D_AROUND_ACTIVE);
@@ -1044,8 +1044,8 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
}
else {
/* we need the one selected object, if its not active */
- base = BASACT_NEW(sl);
- ob = OBACT_NEW(sl);
+ base = BASACT(sl);
+ ob = OBACT(sl);
if (base && ((base->flag & BASE_SELECTED) != 0)) {
/* pass */
}
@@ -1053,7 +1053,7 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
/* first selected */
ob = NULL;
for (base = sl->object_bases.first; base; base = base->next) {
- if (TESTBASELIB_NEW(base)) {
+ if (TESTBASELIB(base)) {
ob = base->object;
break;
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 3aedb53cfce..3a71800e9cd 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -78,7 +78,7 @@
#include "transform.h"
/* this should be passed as an arg for use in snap functions */
-#undef BASACT_NEW
+#undef BASACT
/* use half of flt-max so we can scale up without an exception */
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index af3c78f5d89..135ea406d60 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -171,7 +171,7 @@ static void iter_snap_objects(
}
for (Base *base = sctx->eval_ctx.scene_layer->object_bases.first; base != NULL; base = base->next) {
- if ((BASE_VISIBLE_NEW(base)) && (base->flag_legacy & (BA_HAS_RECALC_OB | BA_HAS_RECALC_DATA)) == 0 &&
+ if ((BASE_VISIBLE(base)) && (base->flag_legacy & (BA_HAS_RECALC_OB | BA_HAS_RECALC_DATA)) == 0 &&
!((snap_select == SNAP_NOT_SELECTED && ((base->flag & BASE_SELECTED) || (base->flag_legacy & BA_WAS_SEL))) ||
(snap_select == SNAP_NOT_ACTIVE && base == base_act)))
{