Need a bit of Advice about running a script.

Below I copied the highlighted text in the info window and then pasted into the text window but I have no clue why its not copying and pasting what I copy and paste ??? ? ?


Its like the info panel text is of its own breed with its own set of rules and it appears that the text editor has its own little quirks. Like half the time it wont do what is expected.
Thank you !

The text you highlighted was bpy.ops.object.duplicate… whereas the first line int he text editor is bpy.ops.mesh.extrude_region_move

dupliate should work in object mode, mesh will only work when in edit mode iirc

HMM I am confused by that. I will re-ask the the question a screen shot of blender with green text should be below :


I think I had this problem too. Check if you have additional lines selected further up. They don’t deselect automatically.

yes this would be nice to know why text acts so differntly here. Its open source unlike other software i have faith i will eventually find out why.

Ok lets break down what i posted.

>The text you highlighted was bpy.ops.object.duplicate… whereas the first line int he text editor is bpy.ops.mesh.extrude_region_move

> dupliate should work in object mode, mesh will only work when in edit mode iirc

The first line that is executed (after import bpy) is the third line, which is bpy.ops.mesh.extrude_region_move. Now, can you extrude a face in object mode in normal blender? no. You cannot. You have to be in edit mode ( bpy.ops.object.mode_set(mode=“EDIT”) ). Put that before any bpy.ops.mesh commands.

The fifth line reexecutes the python script which you do not want.

The 9th line you have a transform operation (bpy.ops.transform). this needs to happen in object mode, if you have previuosly set it to edit mode, you need to re set it in object mode – ( bpy.ops.object.mode_set(mode=“OBJECT”) )

Pretty much you NEED to do a bit of coding to make it work, but it will work if you think through it logically.