Ejemplo n.º 1
0
    def execute(self, context):
        s = bpy.context.scene
        fixUnits()

        if s.objects.get('CAM_machine') is None:
            utils.addMachineAreaObject()
        # if len(s.cam_material)==0:
        #     s.cam_material.add()

        s.cam_operations.add()
        o = s.cam_operations[-1]
        s.cam_active_operation = len(s.cam_operations) - 1
        o.name = 'Operation_' + str(s.cam_active_operation + 1)
        o.filename = o.name
        ob = bpy.context.active_object
        if ob is not None:
            o.object_name = ob.name
            minx, miny, minz, maxx, maxy, maxz = utils.getBoundsWorldspace([ob])
            o.minz = minz

        return {'FINISHED'}
Ejemplo n.º 2
0
	def execute(self, context):
		#main(context)
		s=bpy.context.scene
		
		fixUnits()
		
		if s.objects.get('CAM_machine')==None:
			utils.addMachineAreaObject()
		#if len(s.cam_material)==0:
		#	 s.cam_material.add()
		  
		s.cam_operations.add()
		o=s.cam_operations[-1]
		s.cam_active_operation=len(s.cam_operations)-1
		o.name='Operation_'+str(s.cam_active_operation+1)
		o.filename=o.name
		ob=bpy.context.active_object
		if ob!=None:
			o.object_name=ob.name
			minx,miny,minz,maxx,maxy,maxz=utils.getBoundsWorldspace([ob])
			o.minz=minz
		
		return {'FINISHED'}
Ejemplo n.º 3
0
def updateMachine(self,context):
	print('update machine ')
	utils.addMachineAreaObject()