OBJ export scale question

Is there a way to change the scale of OBJs?
I’m exporting an OBJ sequence to AE. To have something acceptable I’ve to scale up a lot the elements in Blender.
If there’s a way to specify the scale of the OBJs that would be great.

Sorry to bump this post, I’m kinda in a hurry hope someone can helps.
Thanks

If you’re using an “export” script… it will take the “scene” as-is. You could create a script to change the metrics, but that’s hardly useful - since you could select all, scale, and export. If you have a script that you are working with, add a step to “upscale” the objects - something like:


bpy.ops.transform.resize(value=(2.5, 2.5, 2.5), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), texture_space=False, release_confirm=False)

Thanks Jambay.

I’m exporting OBJs using the default exporter that comes with Blender.
No idea if I can change it though.
I can give it a try, in that case where should I paste your code?

hi, if you need to scale all scene with relative positions the simple way would be parenting to an empty and scaling that empty… why can’t you do just this? is it a complex scene?

If you want to modifiy the script: to change the scale of all meshes BUT IN PLACE add this at line 350 of export_obj.bpy -I don’t think this is what you want-


            me = ob.to_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW')
            
            ######################################
            value = 2.5
            sca = mathutils.Matrix.Scale(value, 4)
            me.transform(sca)
            ######################################
            
            if EXPORT_ROTX90:

this seond one will scale all objects in a relative way, but will reset their origins to world origin, and is VERY slow… could be better but would need some extra thinking…


            me = ob.to_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW')
            
            ######################################
            value = 2.5
            sca = Matrix.Scale(value, 4)
            me.transform(ob.matrix_world*sca)
            ######################################
            
            if EXPORT_ROTX90:

or maybe you can use cinema import - export scale preferences to do the job

Thanks Liero,

I’ll try your scripts.
The scene eventually could be complex, but that’s not the point.
The thing is, I’ve to scale it up so much that become awkward to work in it (rotating the camera, speed of the mouse when moving objects, etc.).
Actually C4D import / export doesn’t help in this case as I’ve to import the objs in AE.

No need to insert code… just select all, scale (manually), and then export :slight_smile:

You can always change your view - if that is a problem - so it doesn’t seem “exploded”.

It’s not really a script question if you aren’t using a custom, built-in, or add-on to export. Probably best asked in general forum.

Doesn’t work that way either.
For instance, if you have a Curve modifier the animation gets messy.

I used to use the standalone utility - Objaction Scaler 3c. It can be downloaded at http://mystic-nights.com/freebies/details.php?image_id=320

After you exported the OBJ from Blender, use it as an input of Objaction Scaler 3c, set your output file and the scale factor, click Convert. That’s easy. It works for me when I converted my Blender models to be used with Poser or DAZ Studio, but it is for Windows only.

And I always just modify manually… :slight_smile: good to see others are trying to do it programatically…

Jambay, have you tried to modify manually a mesh animated with a curve modifier?
Have you tried to modify manually a lot of meshes animated with a a lot of curve modifiers?
When you scale up the curve and the object, the center of the curve gets messy and you have to reassign the center for each curve.
"Manually’ not always is the solution. When you’re in a rush and you’ve to deliver a work, just a few hours left and 3D is part of a process, and your work is part of that process, manually doesn’t help.

amy_aimei, thanks for the link, it seems a very handy tool!