Discussion:
[Bf-python] Open dental CAD add on
Zvi Fudim
2015-01-22 14:04:11 UTC
Permalink
Hi,
can someone tell me where is the Open dental CAD disappeared since Blender
version 2.6?

Best regards

Zvi Fudim
Ryan Southall
2015-01-25 21:41:45 UTC
Permalink
Hello.
I'm hoping someone here might have an idea as to why I can run some code
from the Python command window or Blender's text editor and it runs fine,
but as soon as I place it into my add-on it doesn't work.
The code in question is:

bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude_edges_indiv=None,
TRANSFORM_OT_translate=None)
bpy.ops.transform.resize(value=(2, 2, 2))

The first line always works and the new edges are created but the second
line does nothing when I place it in an add-on.
I have another line of code later on:

bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude_edges_indiv=None,
TRANSFORM_OT_translate= {"value":(0.025, 0.05)[j == 0]*(tmatrot*direc)})

which does again extrude the edges but does not move the new edge when I
place it in an add-on.
I appreciate I'm probably missing something simple, but I just can't
figure it out.
I'm using 2.73 on 64-bit Arch linux platform.
Thanks
Ryan

___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________
Ryan Southall
2015-01-25 21:43:09 UTC
Permalink
Forgot to change the email subject on the last post. Sorry for the
confusion.


Hello.
I'm hoping someone here might have an idea as to why I can run some code
from the Python command window or Blender's text editor and it runs fine,
but as soon as I place it into my add-on it doesn't work.
The code in question is:

bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude_edges_indiv=None,
TRANSFORM_OT_translate=None)
bpy.ops.transform.resize(value=(2, 2, 2))

The first line always works and the new edges are created but the second
line does nothing when I place it in an add-on.
I have another line of code later on:

bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude_edges_indiv=None,
TRANSFORM_OT_translate= {"value":(0.025, 0.05)[j == 0]*(tmatrot*direc)})

which does again extrude the edges but does not move the new edge when I
place it in an add-on.
I appreciate I'm probably missing something simple, but I just can't
figure it out.
I'm using 2.73 on 64-bit Arch linux platform.
Thanks
Ryan

___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________
Jenny
2015-04-14 15:25:37 UTC
Permalink
Hi Ryan,

I plugged in your code and the resize works fine in my add-on.
I'm on 2.74 on OSX 10.10.

<code>

bl_info = {
"name": "Scale Test",
"category": "Edit",
}

import bpy


class ScaleTest(bpy.types.Operator):
"""Scale Test"""
bl_idname = "mesh.scale_test"
bl_label = "Scale Test"
bl_options = {'REGISTER', 'UNDO'}

def execute(self, context):

bpy.ops.mesh.extrude_edges_move()
bpy.ops.transform.resize(value=(2, 2, 2))

return {'FINISHED'}

def register():
bpy.utils.register_class(ScaleTest)


def unregister():
bpy.utils.unregister_class(ScaleTest)

if __name__ == "__main__":
register()

</code>

Can you send your .blend file?

-Jenny
Post by Ryan Southall
Forgot to change the email subject on the last post. Sorry for the
confusion.
Hello.
I'm hoping someone here might have an idea as to why I can run some code
from the Python command window or Blender's text editor and it runs fine,
but as soon as I place it into my add-on it doesn't work.
bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude_edges_indiv=None,
TRANSFORM_OT_translate=None)
bpy.ops.transform.resize(value=(2, 2, 2))
The first line always works and the new edges are created but the second
line does nothing when I place it in an add-on.
bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude_edges_indiv=None,
TRANSFORM_OT_translate= {"value":(0.025, 0.05)[j == 0]*(tmatrot*direc)})
which does again extrude the edges but does not move the new edge when I
place it in an add-on.
I appreciate I'm probably missing something simple, but I just can't
figure it out.
I'm using 2.73 on 64-bit Arch linux platform.
Thanks
Ryan
___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________
_______________________________________________
Bf-python mailing list
http://lists.blender.org/mailman/listinfo/bf-python
Loading...