How to get the base dimensions of an object (ignoring all of it's modifiers)? I'm trying to code a function that gets the base dimensions of an object that has multiple modifiers applied.
Sure, I can turn all the modifiers off, get the dimensions and then re-enable everything, but I'm wondering if anyone knows a different solution.
I tried with the bounding box but that is also affected by the modifiers. I also tried using the mesh data object.data.dimensions but meshes don't seem to have the &quot;dimensions&quot; attribute.
Any ideas, elegant or otherwise?
Look at the mesh coordinates.
The unmodified dimensions of the mesh can be obtained from the mesh.
import bpy
import numpy as np

ob = bpy.context.object
me = ob.data

coords = np.empty(3 * len(me.vertices))
me.vertices.foreach_get(&quot;co&quot;, coords)
x, y, z = coords.reshape((-1, 3)).T

mesh_dim = (
        x.max() - x.min(),
        y.max() - y.min(),
        z.max() - z.min()
        )
        
print(mesh_dim)

Could use this to give a mesh a dimensions property
import bpy
import numpy as np
from bpy.props import FloatVectorProperty

def get_mesh_dims(self):
    coords = np.empty(3 * len(me.vertices))
    me.vertices.foreach_get(&quot;co&quot;, coords)

    x, y, z = coords.reshape((-1, 3)).T

    return (
            x.max() - x.min(),
            y.max() - y.min(),
            z.max() - z.min()
            )

bpy.types.Mesh.dimensions = FloatVectorProperty(
        name=&quot;Mesh Dimensions&quot;,
        get=get_mesh_dims,
        subtype='XYZ',
        unit='LENGTH',
        )  

python console code, default cube, arrayed subsurfed spun and hung.
&gt;&gt;&gt; C.object.data.dimensions
Vector((2.0, 2.0, 2.0))