Scale geometry when importing shapes #12
Labels
No Label
bug
confirmed
duplicate
enhancement
help wanted
High
known issue
Low
Normal
not a task
question
task
v2.4
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: extensions/io_scene_x3d#12
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The standard states in §4.3.3 that size and coordinates are in meters :
However some software exports the geometry in their current base unit, e.g. millimeter. I'd suggest to add a
scale
parameter in the import file selector.There's two options for the implementation :
I can produce a patch for any of these solutions. Which one is preferable ? The first solution is the least invasive.
I'm totally with you on this feature. A great improvement indeed, although probably only a very small user base might benefit from it.
However one tiny improvement suggestion from my side by having two new options instead of just one:
As long as it works it doesn't matter tbh + users don't have to use it, which means that even if stuff sometimes breaks it's not too bad.
Probably the easiest solution would be just to do a simple mesh transform via API (as in adjusting the scale factor of the object). But keep in mind, that scaling of objects might result in different order of the objects in 3D space (if there are multiple objects), so the relations have to be kept intact.
Btw for the how part you can also look up how other importers handle scaling, e.g. the legacy python stl exporter has it and it usually works well: https://projects.blender.org/extensions/io_mesh_stl
I've created the
import-scale
branch that implement scaling, with a combobox for file unit selection or using a scale value. I chose to modify the base data instead of using the transformation matrix.I still have to find out where to translate strings ...and find out how to add a branch directly to trunk in Eclipse 😊.
Hi, great so see you back. Unfortunately i'm currently a bit occupied by work, but i'd be glad to test and review once finished (just remove the WIP in the PR for that).
About string translations: https://docs.blender.org/api/current/bpy.app.translations.html
I assume you want the description text to be localized? If so, what languages? Currently there's only english, and most other addons also are just english i believe, however it for sure couldn't hurt to include some major languages as well.
Hi @Bujus_Krachus,
I'm still having trouble with my ISP regarding SSH connexion, and have some work to do in my flat too, but I'll try to do the things I've talked about or in mind as soon as possible.
Thanks for the link about translations. I was asking because some label (e.g. "scale") are automatically translated, and I was curious if translation could be easily done. I'll have a look.
I think the patch is finished but I want to test on more files first.
tbh i actually prefer https over ssh. ssh may be more secure but also can be quite buggy from time to time (at least that's my experience with git over ssh).
When using the https link of a repo, simply clone it and authorize the user by logging in with the username and an application key (https://projects.blender.org/user/settings/applications).
As long as it's no hotfix, time is of no matter :D
i believe it's because blenders RNA System detects all translatable strings - and if they do have a translation from the official translation project they will be localized. This may include commonly used strings (or substrings) like scale, rotation, etc.
quoting from https://developer.blender.org/docs/handbook/translating/developer_guide/#python-translation-api:
Merged to master, will close this task.