Hey guys, I know this will have an easy answer, but I have been awake far too long to see it :P
I am doing some coding with classes in python, and it just isn't working.
Here is the code:
from bpy import *
from os import *
from mathutils import *
from random import *
base_dir = "C:/Users/Alienware/Desktop/aftereffects/project/content/"
area = "palmerston"
dir_ads = base_dir+"ads/"+area
length = 50
class section(object):
def __init__(self,dir,base):
self.content=listdir(self.dir)
shuffle(self.content)
self.max=len(self.content)
self.count=1
ad_5_1500 = section(dir="/5/1500",base=dir_ads)
Basically I am setting up a class so I can call ad_5_1500.content to get the contents etc.
it just needs the same effect as what was there originally
dir_ads_5_1500=dir_ads+"/5/1500"
content_ads_5_1500 = listdir(dir_ads_5_1500)
shuffle(content_ads_5_1500)
max_ads_5_1500 = len(content_ads_5_1500)
count_ads_5_1500 = 1
as you can see I am not a python developer so any help would be appreciated :D