Hi, I am doing a brush that paint snapshot of objects while applying them some modifications. Among the modifs a scale.
Here’s what I am doing. Scale, resetXform, re align pivot.
It works all good BUT it is very slow.
I have try to cut the Undo Off but it don’t seem to change anything.
Is there anything else I could do to improve the speed ?
To avoid the reset xform I have think getting the position of each verts of my object and apply a offset to it, so it will give me a cleaner scale and no need for resetxform anymore, whish should greatly improve the speed, BUT I’d rather not doing that and wonder if there is something else I can do.
Like disabling the command Panel refreshing for instance (which seem to be one the the cause of the slowiness) ?
undo off
(
-- //////////////////////////Scale//////////////////////////
if ScaleTrigger == True do
(
for Orientvalues = 0.5 to 1.2 do
(
ScaleIndex = random 0.5 1.2
scale MySnapshot [ScaleIndex,ScaleIndex,ScaleIndex]
)
--need Reset Xform...
ResetXForm MySnapshot
-- ...and re-align pivot
MySnapshot.pivot = [MySnapshot.center.x,MySnapshot.center.y,MySnapshot.min.z]
)
)
Thanks
Bloby