From 7f24dbe5fc5a00ee161717070deb6baf4af8e83e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 31 Oct 2008 23:50:02 +0000 Subject: RNA / Data API This is the first code for the Data API, also known as RNA system in the 2.5 Branch. It does not include a user interface, and only wraps some Scene properties for testing. It is integrated with Scons and Makefiles, and compiles a 'makesrna' program that generates an RNA.c file. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA The changes are quite local, basically adding a makesrna module which works similar to the makesdna module. The one external change is in moving genfile.c from blenloader to the makesdna module, so that it can be reused by the RNA code. This also meant changing the DNA makefiles. It seems to be doing dependencies correct still in my tests, but if there is an issue with the DNA not being rebuilt this commit might be the one causing it. Also it seems for scons the makesdna and makesrna modules are compiling without warnings. Not a new issue but this should be fixed. The RNA code supports all types as defined in the Data API design, so in that sense it is fairly complete and I hope that aspect will not have to change much. Some obviously missing parts are context related code, notify() functions for updates and user defined / ID properties. --- source/blender/makesrna/intern/SConscript | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 source/blender/makesrna/intern/SConscript (limited to 'source/blender/makesrna/intern/SConscript') diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript new file mode 100644 index 00000000000..1dfc5df4202 --- /dev/null +++ b/source/blender/makesrna/intern/SConscript @@ -0,0 +1,49 @@ +#!/usr/bin/python +import sys +import os + +Import ('env') +cflags = '' +defines = [] +root_build_dir=env['BF_BUILDDIR'] + +source_files = env.Glob('*.c') + +# making rna_access.c part of both makesrna and blender seems to +# give conflict, how to solve? +source_files.remove('rna_access.c') + +makesrna_tool = env.Copy() +rna = env.Copy() +makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" ') + +makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc', + '../../makesdna', + '../../makesrna']) + +if env['OURPLATFORM'] == 'linuxcross': + makesrna_tool.Replace(CC='gcc') + makesrna_tool.Replace(AR='ar') + makesrna_tool.Replace(LINK='gcc') + +if sys.platform != 'cygwin': + makesrna_tool.Append (CCFLAGS = cflags) +makesrna_tool.Append (CPPDEFINES = defines) +makesrna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib') +if env['BF_PROFILE']: + makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS']) + +if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep: + makesrna = makesrna_tool.Program (target = root_build_dir+'/makesrna', source = source_files, LIBS=['bf_guardedalloc', 'bf_dna']) +else: + makesrna = makesrna_tool.Program (target = '#'+root_build_dir+'/makesrna', source = source_files, LIBS=['bf_guardedalloc', 'bf_dna']) + +rna_dict = rna.Dictionary() +rna.Depends ('rna.c', makesrna) +if env['OURPLATFORM'] != 'linuxcross': + rna.Command ('rna.c', '', root_build_dir+os.sep+"makesrna $TARGET") +else: + rna.Command ('rna.c', '', root_build_dir+os.sep+"makesrna.exe $TARGET") +obj = ['intern/rna.c', 'intern/rna_access.c'] +Return ('obj') + -- cgit v1.2.3