Shortcut for setting origin to vertexSet origin to vertex in edit mode?Left MB Click is setting the origin of the object“Cursor to selected” does not go to the center of selected verticesMove the origin point to the cursor in Edit ModeLock object origin to 3D cursorHow to add another option to set object origin hotkeyWhy does the object change its location after setting origin?Messed up origin pointCan't remove keyboard shortcut for vertex paintSet up shortcut for object interaction modeChanging an objects origin just changes its location
Is there any common country to visit for uk and schengen visa?
Print last inputted byte
Weird lines in Microsoft Word
I got the following comment from a reputed math journal. What does it mean?
Why does Surtur say that Thor is Asgard's doom?
Which partition to make active?
Why didn’t Eve recognize the little cockroach as a living organism?
What (if any) is the reason to buy in small local stores?
Error in master's thesis, I do not know what to do
Animating wave motion in water
Does the Shadow Magic sorcerer's Eyes of the Dark feature work on all Darkness spells or just his/her own?
How do researchers send unsolicited emails asking for feedback on their works?
SQL PRINT vs SQL EXEC
Should I be concerned about student access to a test bank?
How to test the sharpness of a knife?
How to balance a monster modification (zombie)?
If I cast the Enlarge/Reduce spell on an arrow, what weapon could it count as?
Jem'Hadar, something strange about their life expectancy
How are passwords stolen from companies if they only store hashes?
"Marked down as someone wanting to sell shares." What does that mean?
The English Debate
What is the tangent at a sharp point on a curve?
Have any astronauts/cosmonauts died in space?
How to read string as hex number in bash?
Shortcut for setting origin to vertex
Set origin to vertex in edit mode?Left MB Click is setting the origin of the object“Cursor to selected” does not go to the center of selected verticesMove the origin point to the cursor in Edit ModeLock object origin to 3D cursorHow to add another option to set object origin hotkeyWhy does the object change its location after setting origin?Messed up origin pointCan't remove keyboard shortcut for vertex paintSet up shortcut for object interaction modeChanging an objects origin just changes its location
$begingroup$
I find myself doing the following quite often:
- go into edit mode
- select a single vertex
- press Space to enter the search menu
- type
cur
select
Set cursor to active
- leave edit mode
- press Shift+Ctrl+Alt+C to get the set origin choices
Choose
Set origin to 3D cursor
This seems like a very tedious process to me. I'm sure there's a shorter version of setting the origin to a vertex. Please tell me how to make this process more efficient.
I am open to installing an Addon if necessary.
shortcut 3d-cursor origin
$endgroup$
add a comment |
$begingroup$
I find myself doing the following quite often:
- go into edit mode
- select a single vertex
- press Space to enter the search menu
- type
cur
select
Set cursor to active
- leave edit mode
- press Shift+Ctrl+Alt+C to get the set origin choices
Choose
Set origin to 3D cursor
This seems like a very tedious process to me. I'm sure there's a shorter version of setting the origin to a vertex. Please tell me how to make this process more efficient.
I am open to installing an Addon if necessary.
shortcut 3d-cursor origin
$endgroup$
2
$begingroup$
OK, but I hope somebody will give a more complete answer, because i do this steps quite often too and a way to automate it would be handy.
$endgroup$
– thibsert
2 days ago
$begingroup$
I don't think there is any built-in way as of 2.79. There were talks it will be In 2.8. With addons it can be made faster, like with Dynamic Context menu (built-in one), see blender.stackexchange.com/a/71319/1245. There are also some 3-rd party addons as well though their workable state is to be checked
$endgroup$
– Mr Zak
2 days ago
1
$begingroup$
Related: blender.meta.stackexchange.com/questions/2387/…
$endgroup$
– batFINGER
2 days ago
$begingroup$
lol, don't be sorry.. I love that question (and especially the deleted answer) it appeals to my warped SOH. Post it whenever I'm given the opportunity.
$endgroup$
– batFINGER
2 days ago
add a comment |
$begingroup$
I find myself doing the following quite often:
- go into edit mode
- select a single vertex
- press Space to enter the search menu
- type
cur
select
Set cursor to active
- leave edit mode
- press Shift+Ctrl+Alt+C to get the set origin choices
Choose
Set origin to 3D cursor
This seems like a very tedious process to me. I'm sure there's a shorter version of setting the origin to a vertex. Please tell me how to make this process more efficient.
I am open to installing an Addon if necessary.
shortcut 3d-cursor origin
$endgroup$
I find myself doing the following quite often:
- go into edit mode
- select a single vertex
- press Space to enter the search menu
- type
cur
select
Set cursor to active
- leave edit mode
- press Shift+Ctrl+Alt+C to get the set origin choices
Choose
Set origin to 3D cursor
This seems like a very tedious process to me. I'm sure there's a shorter version of setting the origin to a vertex. Please tell me how to make this process more efficient.
I am open to installing an Addon if necessary.
shortcut 3d-cursor origin
shortcut 3d-cursor origin
edited 2 days ago
Thomas Weller
asked 2 days ago
Thomas WellerThomas Weller
656617
656617
2
$begingroup$
OK, but I hope somebody will give a more complete answer, because i do this steps quite often too and a way to automate it would be handy.
$endgroup$
– thibsert
2 days ago
$begingroup$
I don't think there is any built-in way as of 2.79. There were talks it will be In 2.8. With addons it can be made faster, like with Dynamic Context menu (built-in one), see blender.stackexchange.com/a/71319/1245. There are also some 3-rd party addons as well though their workable state is to be checked
$endgroup$
– Mr Zak
2 days ago
1
$begingroup$
Related: blender.meta.stackexchange.com/questions/2387/…
$endgroup$
– batFINGER
2 days ago
$begingroup$
lol, don't be sorry.. I love that question (and especially the deleted answer) it appeals to my warped SOH. Post it whenever I'm given the opportunity.
$endgroup$
– batFINGER
2 days ago
add a comment |
2
$begingroup$
OK, but I hope somebody will give a more complete answer, because i do this steps quite often too and a way to automate it would be handy.
$endgroup$
– thibsert
2 days ago
$begingroup$
I don't think there is any built-in way as of 2.79. There were talks it will be In 2.8. With addons it can be made faster, like with Dynamic Context menu (built-in one), see blender.stackexchange.com/a/71319/1245. There are also some 3-rd party addons as well though their workable state is to be checked
$endgroup$
– Mr Zak
2 days ago
1
$begingroup$
Related: blender.meta.stackexchange.com/questions/2387/…
$endgroup$
– batFINGER
2 days ago
$begingroup$
lol, don't be sorry.. I love that question (and especially the deleted answer) it appeals to my warped SOH. Post it whenever I'm given the opportunity.
$endgroup$
– batFINGER
2 days ago
2
2
$begingroup$
OK, but I hope somebody will give a more complete answer, because i do this steps quite often too and a way to automate it would be handy.
$endgroup$
– thibsert
2 days ago
$begingroup$
OK, but I hope somebody will give a more complete answer, because i do this steps quite often too and a way to automate it would be handy.
$endgroup$
– thibsert
2 days ago
$begingroup$
I don't think there is any built-in way as of 2.79. There were talks it will be In 2.8. With addons it can be made faster, like with Dynamic Context menu (built-in one), see blender.stackexchange.com/a/71319/1245. There are also some 3-rd party addons as well though their workable state is to be checked
$endgroup$
– Mr Zak
2 days ago
$begingroup$
I don't think there is any built-in way as of 2.79. There were talks it will be In 2.8. With addons it can be made faster, like with Dynamic Context menu (built-in one), see blender.stackexchange.com/a/71319/1245. There are also some 3-rd party addons as well though their workable state is to be checked
$endgroup$
– Mr Zak
2 days ago
1
1
$begingroup$
Related: blender.meta.stackexchange.com/questions/2387/…
$endgroup$
– batFINGER
2 days ago
$begingroup$
Related: blender.meta.stackexchange.com/questions/2387/…
$endgroup$
– batFINGER
2 days ago
$begingroup$
lol, don't be sorry.. I love that question (and especially the deleted answer) it appeals to my warped SOH. Post it whenever I'm given the opportunity.
$endgroup$
– batFINGER
2 days ago
$begingroup$
lol, don't be sorry.. I love that question (and especially the deleted answer) it appeals to my warped SOH. Post it whenever I'm given the opportunity.
$endgroup$
– batFINGER
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Steps 3/4/5 can be replaced by Shift+S (for Snapping) / O.
Step 8 can be replaced by T. In general, you can look for underlined letters in such menus.
I also wrote an add-on to automate the process: OriginToSelection.py.
Install the add-on via User Preferences / Add-ons / Install from file, don't forget to activate it (check the box before its name). Press Spacebar and search Origin, then select Origin To Selection.
Be careful, I'm new to publishing add-ons and I'm pretty sure it can cause crashes. Save your work before using!
$endgroup$
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ieif __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
|
show 1 more comment
$begingroup$
Little bmesh helper script.
The process to move the origin involves making the new point the origin by subtracting it from all other verts, then translating the matrix world of the object such that the global location stays the same
Run in edit mode. Moves origin to selected geo.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)
selverts = [v.co for v in bm.verts if v.select]
if len(selverts):
pt = sum(selverts, Vector()) / len(selverts)
#T = Matrix.Translation(-pt)
bmesh.ops.translate(bm, vec=-pt, verts=bm.verts)
mw.translation = mw @ pt # replace @ with * for 2.7x
bmesh.update_edit_mesh(me)
As an addon for 2.80
$endgroup$
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any@
with*
and change the version accordingly inbl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
1
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "502"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f134440%2fshortcut-for-setting-origin-to-vertex%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Steps 3/4/5 can be replaced by Shift+S (for Snapping) / O.
Step 8 can be replaced by T. In general, you can look for underlined letters in such menus.
I also wrote an add-on to automate the process: OriginToSelection.py.
Install the add-on via User Preferences / Add-ons / Install from file, don't forget to activate it (check the box before its name). Press Spacebar and search Origin, then select Origin To Selection.
Be careful, I'm new to publishing add-ons and I'm pretty sure it can cause crashes. Save your work before using!
$endgroup$
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ieif __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
|
show 1 more comment
$begingroup$
Steps 3/4/5 can be replaced by Shift+S (for Snapping) / O.
Step 8 can be replaced by T. In general, you can look for underlined letters in such menus.
I also wrote an add-on to automate the process: OriginToSelection.py.
Install the add-on via User Preferences / Add-ons / Install from file, don't forget to activate it (check the box before its name). Press Spacebar and search Origin, then select Origin To Selection.
Be careful, I'm new to publishing add-ons and I'm pretty sure it can cause crashes. Save your work before using!
$endgroup$
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ieif __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
|
show 1 more comment
$begingroup$
Steps 3/4/5 can be replaced by Shift+S (for Snapping) / O.
Step 8 can be replaced by T. In general, you can look for underlined letters in such menus.
I also wrote an add-on to automate the process: OriginToSelection.py.
Install the add-on via User Preferences / Add-ons / Install from file, don't forget to activate it (check the box before its name). Press Spacebar and search Origin, then select Origin To Selection.
Be careful, I'm new to publishing add-ons and I'm pretty sure it can cause crashes. Save your work before using!
$endgroup$
Steps 3/4/5 can be replaced by Shift+S (for Snapping) / O.
Step 8 can be replaced by T. In general, you can look for underlined letters in such menus.
I also wrote an add-on to automate the process: OriginToSelection.py.
Install the add-on via User Preferences / Add-ons / Install from file, don't forget to activate it (check the box before its name). Press Spacebar and search Origin, then select Origin To Selection.
Be careful, I'm new to publishing add-ons and I'm pretty sure it can cause crashes. Save your work before using!
edited 2 days ago
Community♦
1
1
answered 2 days ago
thibsertthibsert
2,0091311
2,0091311
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ieif __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
|
show 1 more comment
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ieif __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
The plugin is cool. Works fine so far.
$endgroup$
– Thomas Weller
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
It works but is insecure (ie, it drops an error if used in Object mode), and i can't guarantee it won't crash Blender. Using Dynamic Context as suggested by Mr Zak seems way better (and it's build-in).
$endgroup$
– thibsert
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I wonder why the bother with the context overriding in your addon. Consider having it poll only when in 3d view and edit mode. As it is it will fail silently when run when no 3d views in screen.
$endgroup$
– batFINGER
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
I still don't understand that context thing really well. Before packing it as an addon I was running it trough the script window, so the overriding was necessary (I think?). You say it's safe to remove it ? Edit : it works well without it, thank you!
$endgroup$
– thibsert
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ie
if __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
$begingroup$
Can override going the other way when testing in the text editor, ie
if __name__ == "__main__": bpy.ops.my_new.operator(ctx, 'INVOKE_DEFAULT')
$endgroup$
– batFINGER
2 days ago
|
show 1 more comment
$begingroup$
Little bmesh helper script.
The process to move the origin involves making the new point the origin by subtracting it from all other verts, then translating the matrix world of the object such that the global location stays the same
Run in edit mode. Moves origin to selected geo.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)
selverts = [v.co for v in bm.verts if v.select]
if len(selverts):
pt = sum(selverts, Vector()) / len(selverts)
#T = Matrix.Translation(-pt)
bmesh.ops.translate(bm, vec=-pt, verts=bm.verts)
mw.translation = mw @ pt # replace @ with * for 2.7x
bmesh.update_edit_mesh(me)
As an addon for 2.80
$endgroup$
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any@
with*
and change the version accordingly inbl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
1
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
|
show 1 more comment
$begingroup$
Little bmesh helper script.
The process to move the origin involves making the new point the origin by subtracting it from all other verts, then translating the matrix world of the object such that the global location stays the same
Run in edit mode. Moves origin to selected geo.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)
selverts = [v.co for v in bm.verts if v.select]
if len(selverts):
pt = sum(selverts, Vector()) / len(selverts)
#T = Matrix.Translation(-pt)
bmesh.ops.translate(bm, vec=-pt, verts=bm.verts)
mw.translation = mw @ pt # replace @ with * for 2.7x
bmesh.update_edit_mesh(me)
As an addon for 2.80
$endgroup$
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any@
with*
and change the version accordingly inbl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
1
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
|
show 1 more comment
$begingroup$
Little bmesh helper script.
The process to move the origin involves making the new point the origin by subtracting it from all other verts, then translating the matrix world of the object such that the global location stays the same
Run in edit mode. Moves origin to selected geo.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)
selverts = [v.co for v in bm.verts if v.select]
if len(selverts):
pt = sum(selverts, Vector()) / len(selverts)
#T = Matrix.Translation(-pt)
bmesh.ops.translate(bm, vec=-pt, verts=bm.verts)
mw.translation = mw @ pt # replace @ with * for 2.7x
bmesh.update_edit_mesh(me)
As an addon for 2.80
$endgroup$
Little bmesh helper script.
The process to move the origin involves making the new point the origin by subtracting it from all other verts, then translating the matrix world of the object such that the global location stays the same
Run in edit mode. Moves origin to selected geo.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)
selverts = [v.co for v in bm.verts if v.select]
if len(selverts):
pt = sum(selverts, Vector()) / len(selverts)
#T = Matrix.Translation(-pt)
bmesh.ops.translate(bm, vec=-pt, verts=bm.verts)
mw.translation = mw @ pt # replace @ with * for 2.7x
bmesh.update_edit_mesh(me)
As an addon for 2.80
edited 2 days ago
answered 2 days ago
batFINGERbatFINGER
25.6k52876
25.6k52876
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any@
with*
and change the version accordingly inbl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
1
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
|
show 1 more comment
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any@
with*
and change the version accordingly inbl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
1
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
1
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
$begingroup$
does it work for blender 2.78a,2.79?
$endgroup$
– Michael Ben David
2 days ago
1
1
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any
@
with *
and change the version accordingly in bl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
Without testing (library upgrades for 2.80 have bombed my 2.79 build, too lazy to fix atm) Pretty sure the required changes to make it work for 2.7x is replacing any
@
with *
and change the version accordingly in bl_info
$endgroup$
– batFINGER
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
$begingroup$
well anyways the other addon works for me too
$endgroup$
– Michael Ben David
2 days ago
1
1
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
$begingroup$
Yes this one is by no means better, simply more "mesh-centric". The other addon in theory will also work for other types like curve and armature too. Script wise wanted to show how to do this without toggling edit mode, which can mean death to an edit bmesh.
$endgroup$
– batFINGER
2 days ago
1
1
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
$begingroup$
This one also works better with the Undo logic of Blender. As the Undo history is independent in Edit and Object mode, the other addon leads to a hard to predict behavior when using Undo.
$endgroup$
– thibsert
2 days ago
|
show 1 more comment
Thanks for contributing an answer to Blender Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f134440%2fshortcut-for-setting-origin-to-vertex%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
OK, but I hope somebody will give a more complete answer, because i do this steps quite often too and a way to automate it would be handy.
$endgroup$
– thibsert
2 days ago
$begingroup$
I don't think there is any built-in way as of 2.79. There were talks it will be In 2.8. With addons it can be made faster, like with Dynamic Context menu (built-in one), see blender.stackexchange.com/a/71319/1245. There are also some 3-rd party addons as well though their workable state is to be checked
$endgroup$
– Mr Zak
2 days ago
1
$begingroup$
Related: blender.meta.stackexchange.com/questions/2387/…
$endgroup$
– batFINGER
2 days ago
$begingroup$
lol, don't be sorry.. I love that question (and especially the deleted answer) it appeals to my warped SOH. Post it whenever I'm given the opportunity.
$endgroup$
– batFINGER
2 days ago