porblem is that i entered objects in BU = Metric but values where in feet
so i need to modify the dimensions so that when i go into imperial mode i get the same values!
hope your following here!
what is the n panel scale value?
let say that in bu mode you have the cube 2 meters dim scale=1
i need to make the dim = 2 ft when in imperial mode
so this means i have to change the dimensions of the ob like 2 /3.2808
so that when i change mode to imperial i have 2 feet !
how do you change the dimensions of the ob and not the scale !
did a new test and to see the proper dimensions in N panel
i also needed to ctrl-A the objects
then the re scaled values are showing the right values in feet or metric in N panel window
but again wondering here if the object already has a scale or if the scene has a scale value how this would change things!
also using this world transform what does the 4 means or do here ?
you really don’t have to apply transformations, my both code snippets work fine…
there is a scene scale property:
scene.unit_settings.scale_length
so you could change from BU/metric to imperial and change that scale to 1/3.2808399 (look at the grid to see what’s going on)
but that scale_length property doesn’t change when you switch between unit systems
Scale(factor, size, axis)
… classmethod:: Scale(factor, size, axis)
Create a matrix representing a scaling.
:arg factor: The factor of scaling to apply.
:type factor: float
:arg size: The size of the scale matrix to construct [2, 4].
:type size: int
:arg axis: Direction to influence scale. (optional).
:type axis: :class:Vector
:return: A new scale matrix.
:rtype: :class:Matrix
well one way i found
may be join the related different objects together then the scaling would be done for one object and all parts would then stay where they should be
grouping is a good idea, parent to an empty at 0,0,0 and scale - this hack was already recommended in a case, if one wants to transform with a certain pivot point. If you call the bpy.ops.transform.resize() operator, it won’t respect your pivot settings and doesn’t have a pivot argument. So the only chance is to use temp group…