0
$\begingroup$

Been smashing my head against this all day. When I select a vertex group and press E on the keyboard, I am able to extrude the selection to a locked axis/direction that is in line with the geometry.

How can I do this in Python?

I made a quick video: https://www.youtube.com/watch?v=f5fW5Ug2ZPU&feature=youtu.be

$\endgroup$
2
$\begingroup$

A simple way to reproduce operations in python is by using the the info editor.
In this case i first executed the "extrude-region" in edit mode and copied the info log to my python script.

enter image description here

$\endgroup$
5
  • $\begingroup$ If I do this and copy the exact line of code and run it from my script, it doesn't seem to reproduce the same thing I get when I run the tool manually. $\endgroup$
    – DrewTNBD
    Sep 15 '20 at 7:59
  • $\begingroup$ It should if you have the same selection. Otherwise you could always go in and tweak the parameters. I think they are named in an understandable way, so "[..] TRANSFORM_OT_translator={"value":(0, 0, 0.8), [...]" for example does the amout of extrusion. $\endgroup$
    – A M
    Sep 15 '20 at 8:06
  • $\begingroup$ If your usecase is more special, i could take a look at your file, if you want. $\endgroup$
    – A M
    Sep 15 '20 at 8:06
  • $\begingroup$ Weirdly, it started working this morning after I posted!! Cheers dude. I think I've got it from here. $\endgroup$
    – DrewTNBD
    Sep 15 '20 at 11:09
  • 2
    $\begingroup$ Glad too hear that! I good night sleep can fix many things xD $\endgroup$
    – A M
    Sep 15 '20 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.