Extrude along normal: update: 26-01-04

original message:

Hi all,

I’ve made a script that extrudes selected faces along their normal.
something like this:

the script can be found here

Most of the time it works fine, but sometimes it gives error messages like this (in Blender228a):

Using a clean Global Dictionary.
In Object_GetSelected()
Traceback (most recent call last):
  File "extrudealongnormal.py", line 276, in bevent
  File "extrudealongnormal.py", line 205, in main
AttributeError: 'NoneType' object has no attribute 'getSelectedFaces'

I don’t know where this NoneType comes from, because i select a mesh.
A file which gives this mistake is here

Anybody has a clue? :-?

–edit–
script is here

script is updated, version 0.6.2, (26-01-04):
changes:

  • script header added for blender232 compatibility
  • specify the number of segments to extrude per face
  • choose to make new mesh or use original mesh (with the possibility to UNDO the extrusion by entering editmode and pressing UKEY, if the mesh had already been edited before extrusion.

Greets,

Wim

That will happen when there is no active object.

Martin

Hmm … in the file I uploaded, there are only 2 objects, a camera and a mesh. i select the mesh (it turns pink) then enter faceselectmode (F), select some faces and execute the script. And it gives the same error. :frowning:

I like this script. Wings can extrude this way…now I can do it in Blender also. Thanks.

Got it. It happens when the name of the mesh datablock is different from the object datablock.

Instead of calling GetRaw, use ob.getData() to get the NMesh object.

Martin

Here’s a recent post regarding Shift S, which can almost do this.

https://blenderartists.org/forum/viewtopic.php?t=15847

thanks for the help :smiley:
updated version in first post

In edit mode just after an “extrude”,
alt-s makes a deplacement on normal
direction.

Notice also that there is yet an other script to do this
since years:
http://jmsoler.free.fr/didacticiel/blender/tutor/python_wireshadows.htm

In edit mode just after an “extrude”,
alt-s makes a deplacement on normal
direction.

Notice also that there is yet an other script to do this
since years:
http://jmsoler.free.fr/didacticiel/blender/tutor/python_wireshadows.htm[/quote]
Yes, but Extrude will link the faces together whereas this script (and Wings too) extrude them individually.

Martin

I love it! :smiley: thx very much.
got b2.28, p2.23, linux and works just fine

cu

EDIT
a small… cheap… 2 minutes work of mine :slight_smile:
http://files.blender3d.ch/temporary/extrude_normals.jpg

I am just testing the script :
http://users.pandora.be/tuinbels/scripts/extrudealongnormal.py
and do not see how the faces are linked?

You can also use subsurf statement to see one little problem.

I know the faces are not linked, thats why in the beginning of the script I said to remove doubles after executing the script :wink:
I don’t have time right now, but i will try to change that.

Here is my test render:

http://sbup.jyscomputers.com/ada89/Images/testrend.jpg

Thanks tuinbels, for the script :smiley:

here is my next one :smiley: I just like this script

http://files.blender3d.ch/temporary/extrude_normals22.png

Is it this:

and this?:

:stuck_out_tongue:

I hate posting then as [img] ( I got a phpbb2 board at my own… I know the tags…) but visitors should choose if they want to see them. and belive it or not… there are still poor ones out there with a <128k connection :).

no, not about that, its about u posted a wrong link :stuck_out_tongue:

lol… SHAME ON ME! ;). everytime clicking on a dead link I though. "this ain’t gonna happen to me :slight_smile: "

This could be like the “matrix extrude” function in Cinema 4D xl6,

if you can set the number of segments to extrude,
set length of (segments) extrusions,
set x y z offset of (segments) extrusions,
set rotation of(segments) extrusions,
plus random parameters (size ,offset ,rot).

Fixed that :slight_smile: (well, not completely, but trying to link all faces would be a bit more complicated)

updated script in first post

Sounds interesting, but that will have to wait some time, want de tentamens komen er weer aan :wink:

greets

Wim