not working !
i testes several ways t do it and not working
ok so here is the script i tried this ?
there is on mistake or more which i cannnot find why it is doing theses errors!
import bpy
from bpy.props import *
from mathutils import *
from math import *
bpy.types.Scene.vertInt1 = IntProperty(
name="Integer",
description="Enter an integer",
default = 2,
min = -4,
max=10,
subtype='UNSIGNED')
print ('Propertie vertInt1 =',bpy.context.scene.vertInt1 ) # Print data value of the Integer propertie
bpy.types.Scene.edgeInt1 = IntProperty(
name="Integer",
description="Enter an integer",
default = 2,
min = -4,
max=10,
subtype='UNSIGNED')
#bpy.context.scene.['edgeInt1'] = 22
bpy.context.scene.edgeInt1 = 3
#py.context.scene.edgeInt1
print ('Propertie edgeInt1 =',bpy.context.scene.edgeInt1 ) # Print data value of the Integer propertie
bpy.types.Scene.faceInt1 = IntProperty(
name="Integer",
description="Enter an integer",
default = 2,
min = -4,
max=10,
subtype='UNSIGNED')
print ('Propertie faceInt1 =',bpy.context.scene.faceInt1 ) # Print data value of the Integer propertie
############
object=bpy.context.active_object
print ('Active object = =',object )
myMesh = object.data
print ('data =',myMesh )
print (' myMesh.faces =',myMesh.faces)
print ()
#face1=bpy
##########
class Panellightsetup1(bpy.types.Panel): # This is the panel
'''Panel'''
bl_label = "Light setup Panel" # Header Panel's name
bl_space_type = "VIEW_3D" # in 3D view
# bl_region_type = "TOOLS" # in tool shelf
bl_region_type = "TOOL_PROPS"
bl_show_header=True
# http://www.blender.org/documentation/250PythonDoc/bpy.types.Panel.html#bpy.types.Panel
def draw(self, context):
global last_menu0,last_menu1, last_menu2,last_menu3,last_menu4,check1 # Access global Var to find the last operation
layout = self.layout
scene = context.scene
object=bpy.context.active_object
print ('Active object = =',object )
myMesh = object.data
vert_count = bpy.context.active_object.data.vertices
edge_count = bpy.context.active_object.data.edges
face_count = bpy.context.active_object.data.faces
# ['MyInt'] = 17
print ('vert_count =', len(vert_count) )
# bpy.context.scene.featureminlat
# bpy.context.scene.['vertInt1']= len(vert_count)
# bpy.scene.vertInt1= len(vert_count)
bpy.context.scene.edgeInt1= len(vert_count)
# bpy.context.scene['vertInt1']= len(vert_count)
# bpy.context.scene['edgeInt1']= len(edge_count)
# bpy.context.scene['faceInt1']= len(face_count)
col = layout.column()
st1=' Object Name = ' +object.name
col.label(st1, 'LAMP_DATA')
col.separator()
col.prop(scene, "vertInt1", text = "Vert Count")
col.prop(scene, "edgeInt1", text = "Edge Count")
col.prop(scene, "faceInt1", text = "Face Count")
##########
class OBJECT_OT_CustomButton1(bpy.types.Operator):
bl_idname = "OBJECT_OT_CustomButton1"
bl_label = "Execute Erase all lamps in Scene"
__doc__ = "Simple Custom Button"
def invoke(self, context, event):
# when the button is press it prints this to the Console
print ()
print(" ))))))))))))))))) Custom Button1 )))))))))))))) ")
print ()
return{'FINISHED'}
##################
see error on line 101 for interger assingmet
still not working there may be because of the scene label but not certain tried different things and still error !
Thanks for any help
and happy 2.5