-- this finishes the heavier part (not counting tweaks and possible bugs) of letting scripts be accessed from Blender menus. Will explain more in emails to bf and bpython lists, but just check source/blender/python/BPY_menus.[hc] and source/blender/src/header_info.c and header_script.c for details. Scripts need a small update (registering info, basically a header) to be used. Scripts dir (user pref file paths: Python) must be set.
		
			
				
	
	
		
			64 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| python_env = Environment ()
 | |
| 
 | |
| # Import the C flags set in the SConstruct file
 | |
| Import ('cflags')
 | |
| Import ('cxxflags')
 | |
| Import ('defines')
 | |
| Import ('python_include')
 | |
| Import ('extra_includes')
 | |
| python_env.Append (CCFLAGS = cflags)
 | |
| python_env.Append (CXXFLAGS = cxxflags)
 | |
| python_env.Append (CPPDEFINES = defines)
 | |
| 
 | |
| source_files = ['BPY_interface.c',
 | |
|                 'BPY_menus.c',
 | |
|                 'api2_2x/Blender.c',
 | |
|                 'api2_2x/Sys.c',
 | |
|                 'api2_2x/Registry.c',
 | |
|                 'api2_2x/Scene.c',
 | |
|                 'api2_2x/Types.c',
 | |
|                 'api2_2x/Object.c',
 | |
|                 'api2_2x/NMesh.c',
 | |
|                 'api2_2x/Material.c',
 | |
|                 'api2_2x/Camera.c',
 | |
|                 'api2_2x/World.c',
 | |
|                 'api2_2x/Lamp.c',
 | |
|                 'api2_2x/Lattice.c',
 | |
|                 'api2_2x/Curve.c',
 | |
|                 'api2_2x/Armature.c',
 | |
|                 'api2_2x/Bone.c',
 | |
|                 'api2_2x/Ipo.c',
 | |
|                 'api2_2x/Ipocurve.c',
 | |
|                 'api2_2x/BezTriple.c',
 | |
|                 'api2_2x/Metaball.c',
 | |
|                 'api2_2x/Effect.c',
 | |
|                 'api2_2x/Particle.c',
 | |
|                 'api2_2x/Wave.c',
 | |
|                 'api2_2x/Build.c',
 | |
|                 'api2_2x/Image.c',
 | |
|                 'api2_2x/Window.c',
 | |
|                 'api2_2x/Draw.c',
 | |
|                 'api2_2x/BGL.c',
 | |
|                 'api2_2x/Text.c',
 | |
|                 'api2_2x/Texture.c',
 | |
|                 'api2_2x/MTex.c',
 | |
|                 'api2_2x/vector.c',
 | |
|                 'api2_2x/constant.c',
 | |
|                 'api2_2x/matrix.c',
 | |
|                 'api2_2x/rgbTuple.c',
 | |
|                 'api2_2x/gen_utils.c',
 | |
|                 'api2_2x/EXPP_interface.c']
 | |
| 
 | |
| python_env.Append (CPPPATH = ['api2_2x',
 | |
|                               '../blenkernel',
 | |
|                               '../blenlib',
 | |
|                               '../makesdna',
 | |
|                               '#/intern/guardedalloc',
 | |
|                               '#/intern/bmfont',
 | |
|                               '../imbuf',
 | |
|                               '../include',
 | |
|                               python_include])
 | |
| 
 | |
| python_env.Append (CPPPATH = extra_includes)
 | |
| python_env.Library (target='#/lib/blender_python', source=source_files)
 |