summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mittendrein <maxmitti@maxmitti.tk>2022-02-20 17:14:26 +0100
committerMarkus Mittendrein <maxmitti@maxmitti.tk>2022-02-20 17:14:26 +0100
commitc1ba997205f51153a8fd82d00bfb6976466d49b7 (patch)
tree8740caf4f4d2e07d6b6d84c87c4982405f59ca26
parent4ffbace3cc065a7272bc6a7b205a7ef18a249192 (diff)
downloadObjectsAppend-master.tar.gz
ObjectsAppend-master.zip
SelectMark: Simplify and fix behavior when the target Shape has been altered with SetShapeHEADmaster
-rw-r--r--SelectMark.c4d/Script.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/SelectMark.c4d/Script.c b/SelectMark.c4d/Script.c
index f3f8990..e233443 100644
--- a/SelectMark.c4d/Script.c
+++ b/SelectMark.c4d/Script.c
@@ -20,10 +20,11 @@ func MarkObject(object obj, int time, bool noShow)
Show();
}
var id = GetID(obj);
- var w = GetObjWidth(obj);
- var h = GetObjHeight(obj);
- var x = GetX(obj) + GetDefOffset(id) + (GetDefWidth(id) - w) / 2;
- var y = GetY(obj) + GetDefOffset(id, 1) + (GetDefHeight(id) - h) / 2;
+ var shape = obj->GetShape();
+ var w = shape[2];
+ var h = shape[3];
+ var x = GetX(obj) + shape[0];
+ var y = GetY(obj) + shape[1];
var xOff = 0;
var xPad = Padding(w);
var yPad = Padding(h);