[Bf-extensions-cvs] [92c901f] master: minor cleanup no new functions.
Brendon Murphy
noreply at git.blender.org
Mon Jul 7 13:29:56 CEST 2014
Commit: 92c901f1fd8c55f066c47b18a5b42ec837e9624e
Author: Brendon Murphy
Date: Mon Jul 7 21:27:36 2014 +1000
https://developer.blender.org/rBAC92c901f1fd8c55f066c47b18a5b42ec837e9624e
minor cleanup no new functions.
Signed-off-by: Brendon Murphy <meta.androcto1 at gmail.com>
===================================================================
M add_mesh_building_objects/__init__.py
M add_mesh_building_objects/add_mesh_beam_builder.py
M add_mesh_building_objects/add_mesh_sove.py
M add_mesh_building_objects/add_mesh_window.py
===================================================================
diff --git a/add_mesh_building_objects/__init__.py b/add_mesh_building_objects/__init__.py
index 49b7a81..a0a5164 100644
--- a/add_mesh_building_objects/__init__.py
+++ b/add_mesh_building_objects/__init__.py
@@ -22,7 +22,7 @@ bl_info = {
"name": "Building Objects",
"author": "Multiple Authors",
"version": (0, 2),
- "blender": (2, 64, 0),
+ "blender": (2, 71, 0),
"location": "View3D > Add > Mesh > Cad Objects",
"description": "Add building object types",
"warning": "",
diff --git a/add_mesh_building_objects/add_mesh_beam_builder.py b/add_mesh_building_objects/add_mesh_beam_builder.py
index 1fe695e..42b6962 100644
--- a/add_mesh_building_objects/add_mesh_beam_builder.py
+++ b/add_mesh_building_objects/add_mesh_beam_builder.py
@@ -15,7 +15,7 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
-
+'''
bl_info = {
"name": "Beam Builder",
"description": "Creates various types of beams.",
@@ -28,7 +28,7 @@ bl_info = {
"Scripts/Add_Mesh/BeamBuilder",
"tracker_url": "https://developer.blender.org/Taid=26911",
"category": "Add Mesh"}
-
+'''
#
# Creates a rectangluar, 'C', 'L', 'T', or 'I' - type beam.
#
@@ -1449,30 +1449,3 @@ class INFO_MT_mesh_beambuilder_add(bpy.types.Menu):
layout.operator("mesh.primitive_l_beam_add", text = "L Shaped Beam")
layout.operator("mesh.primitive_t_beam_add", text = "T Shaped Beam")
layout.operator("mesh.primitive_i_beam_add", text = "I Shaped Beam")
-
-
-
-# Define menu
-def menu_func(self, context):
- self.layout.menu("INFO_MT_mesh_beambuilder_add", icon='PLUGIN')
-
-
-# Add
-def register():
- bpy.utils.register_module(__name__)
-
- # Add BeamBuilder menu to the 'Add Mesh' menu
- bpy.types.INFO_MT_mesh_add.append(menu_func)
-
-
-# Remove
-def unregister():
- bpy.utils.unregister_module(__name__)
-
- # Remove BeamBuilder menu from 'Add Mesh' menu
- bpy.types.INFO_MT_mesh_add.remove(menu_func)
-
-
-if __name__ == "__main__":
- register()
-
diff --git a/add_mesh_building_objects/add_mesh_sove.py b/add_mesh_building_objects/add_mesh_sove.py
index 6dee212..da85239 100644
--- a/add_mesh_building_objects/add_mesh_sove.py
+++ b/add_mesh_building_objects/add_mesh_sove.py
@@ -205,17 +205,3 @@ class OBJECT_OT_add_object(bpy.types.Operator):
self.son=self.prs
add_object(self, context)
return {'FINISHED'}
-# Reg--------------------------------
-def add_object_button(self, context):
- self.layout.operator(
- OBJECT_OT_add_object.bl_idname,
- text="Sove",
- icon="MOD_MESHDEFORM")
-def register():
- bpy.utils.register_class(OBJECT_OT_add_object)
- bpy.types.INFO_MT_mesh_add.append(add_object_button)
-def unregister():
- bpy.utils.unregister_class(OBJECT_OT_add_object)
- bpy.types.INFO_MT_mesh_add.remove(add_object_button)
-if __name__ == '__main__':
- register()
\ No newline at end of file
diff --git a/add_mesh_building_objects/add_mesh_window.py b/add_mesh_building_objects/add_mesh_window.py
index e73c6e3..fe59a69 100644
--- a/add_mesh_building_objects/add_mesh_window.py
+++ b/add_mesh_building_objects/add_mesh_window.py
@@ -1,4 +1,4 @@
-bl_info = {
+'''bl_info = {
"name": "Window Generator 2",
"author": "SayPRODUCTIONS",
"version": (2, 0),
@@ -9,9 +9,10 @@ bl_info = {
"wiki_url": "",
"tracker_url": "",
"category": "Add Mesh"}
+ '''
import bpy
from bpy.props import *
-from math import pi, sin, cos, sqrt
+from math import pi, sin, cos, sqrt, radians
def MAT(AD,R,G,B):
if AD not in bpy.data.materials:
mtl=bpy.data.materials.new(AD)
@@ -619,7 +620,8 @@ def add_object(self, context):
mesh.polygons[i].use_smooth = 1
mesh.update(calc_edges=True)
from bpy_extras import object_utils
- return object_utils.object_data_add(context, mesh, operator=None)
+ object_utils.object_data_add(context, mesh, operator=None)
+ return mesh.name
if bpy.context.mode!='EDIT_MESH':
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
@@ -704,6 +706,12 @@ class PENCERE(bpy.types.Operator):
k42=BoolProperty(name='',default=False);k43=BoolProperty(name='',default=False)
k44=BoolProperty(name='',default=False);k45=BoolProperty(name='',default=False)
k46=BoolProperty(name='',default=False);k47=BoolProperty(name='',default=False)
+ rotationPropX=IntProperty(name='',min=0,max=360,default= 0,description='Window Rotation X')
+ rotationPropY=IntProperty(name='',min=0,max=360,default= 0,description='Window Rotation Y')
+ rotationPropZ=IntProperty(name='',min=0,max=360,default= 0,description='Window Rotation Z')
+ locationPropX=FloatProperty(name='',min=-10000,max=10000,default= 0,description='Window Location X')
+ locationPropY=FloatProperty(name='',min=-10000,max=10000,default= 0,description='Window Location Y')
+ locationPropZ=FloatProperty(name='',min=-10000,max=10000,default= 0,description='Window Location Z')
#--------------------------------------------------------------
def draw(self, context):
layout = self.layout
@@ -744,20 +752,26 @@ class PENCERE(bpy.types.Operator):
row.prop(self,'gny'+str(self.yuk-j-1))
for i in range(0,self.gen):
row.prop(self,'k'+str(self.yuk-j-1)+str(i))
+ row =layout.row()
+ box.row();row.label('X');row.label('Y');row.label('Z')
+ row =layout.row()
+ row.label("Rotation")
+ row =layout.row()
+ box.row();row.prop(self,'rotationPropX');row.prop(self,'rotationPropY');row.prop(self,'rotationPropZ')
+ row =layout.row()
+ row.label("Location")
+ row =layout.row()
+ box.row();row.prop(self,'locationPropX');row.prop(self,'locationPropY');row.prop(self,'locationPropZ')
+
def execute(self, context):
if self.son!=self.prs:
Prs(self)
self.son=self.prs
- add_object(self,context)
+ name = add_object(self,context)
+ bpy.data.objects[name].rotation_euler[0] = radians(self.rotationPropX)
+ bpy.data.objects[name].rotation_euler[1] = radians(self.rotationPropY)
+ bpy.data.objects[name].rotation_euler[2] = radians(self.rotationPropZ)
+ bpy.data.objects[name].location[0] = bpy.context.scene.cursor_location[0] + self.locationPropX
+ bpy.data.objects[name].location[1] = bpy.context.scene.cursor_location[1] + self.locationPropY
+ bpy.data.objects[name].location[2] = bpy.context.scene.cursor_location[2] + self.locationPropZ
return {'FINISHED'}
-# Registration
-def menu_func_pencere(self, context):
- self.layout.operator(PENCERE.bl_idname,text="Window",icon="MOD_LATTICE")
-def register():
- bpy.utils.register_class(PENCERE)
- bpy.types.INFO_MT_mesh_add.append(menu_func_pencere)
-def unregister():
- bpy.utils.unregister_class(PENCERE)
- bpy.types.INFO_MT_mesh_add.remove(menu_func_pencere)
-if __name__ == '__main__':
- register()
\ No newline at end of file
More information about the Bf-extensions-cvs
mailing list