Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-04-16 22:25:42 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2005-04-16 22:25:42 +0400
commitfa5d910f93c0cb279f5a41af9cc3d36d53f8c94f (patch)
tree86202b41c7d56d2b1fc857f2693de8e0f129f478
parentdfe3ad0d7bb09129adee4eb27a7367ae6c40b54e (diff)
Updating build systems: folder release/bpydata/ moved to release/scripts/bpydata/
It seemed trivial enough, so I updated all systems (makefiles, xcode, scons, scons win installer), please complain if something went wrong. Mostly it was just removing release/bpydata references, since the release/scripts dir is already worked on recursevely, handling dirs inside it. For the scons nsi file writer script I had to write code for each new dir, but it can be recoded recursively, too (in fact joining all release stuff in a single dir tree with nothing else would be a good idea, making installation code simpler). Since it's just python and I have a little more time now, I can help scons managers if they still need. Thanks Campbell Barton for reporting.
-rw-r--r--release/Makefile2
-rw-r--r--release/scripts/bpydata/config/readme.txt10
-rw-r--r--release/windows/installer/00.blender.nsi32
-rw-r--r--release/windows/installer/00.sconsblender.nsi12
-rw-r--r--source/blender/python/api2_2x/doc/NMesh.py18
-rw-r--r--source/darwin/Makefile1
-rw-r--r--tools/scons/bs/bs_arc.py4
-rw-r--r--tools/scons/bs/bs_dirs.py12
-rw-r--r--tools/scons/bs/bs_nsis.py50
9 files changed, 90 insertions, 51 deletions
diff --git a/release/Makefile b/release/Makefile
index 50493edb362..31a7f04dbb0 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -144,8 +144,6 @@ endif
@echo "----> Copy python infrastructure"
@[ ! -d scripts ] || cp -r scripts $(CONFDIR)/scripts
@[ ! -d $(CONFDIR)/scripts ] || rm -fr $(CONFDIR)/scripts/CVS
- @[ ! -d bpydata ] || cp -r bpydata $(CONFDIR)/bpydata
- @[ ! -d $(CONFDIR)/bpydata ] || rm -fr $(CONFDIR)/bpydata/CVS
ifeq ($(OS),darwin)
@echo "----> Move .blender to .app/Contents/MacOS/"
diff --git a/release/scripts/bpydata/config/readme.txt b/release/scripts/bpydata/config/readme.txt
index 099ade0f3e5..4b5cb61b063 100644
--- a/release/scripts/bpydata/config/readme.txt
+++ b/release/scripts/bpydata/config/readme.txt
@@ -1,10 +1,6 @@
This folder is for automatically saved scripts configuration data.
-This data is loaded when Blender starts and saved whenever a .blend file is
-saved.
-To use this feature scripts just need to set a Blender.Registry key with the
-extension ".cfg" (for example, "myscript.cfg").
+To use this feature scripts just need to set a proper Blender.Registry key.
-Please check the API Reference doc or the documentation for the
-"Scripts Config Editor" script with the Help menu-> "Scripts Help Browser"
-script in Blender.
+To know more, check the API Reference doc (specifically the API_related and
+Registry parts) and the documentation for the "Scripts Config Editor" script.
diff --git a/release/windows/installer/00.blender.nsi b/release/windows/installer/00.blender.nsi
index 24c7c472e41..8666ed812b3 100644
--- a/release/windows/installer/00.blender.nsi
+++ b/release/windows/installer/00.blender.nsi
@@ -265,11 +265,13 @@ Section "Blender-VERSION (required)" SecCopyUI
File DISTDIR\.blender\scripts\bvh_export.py
File DISTDIR\.blender\scripts\bvh_import.py
File DISTDIR\.blender\scripts\clean_mesh.py
+ File DISTDIR\.blender\scripts\config.py
File DISTDIR\.blender\scripts\DirectX8Exporter.py
File DISTDIR\.blender\scripts\DirectXExporter.py
File DISTDIR\.blender\scripts\disp_paint.py
File DISTDIR\.blender\scripts\doc_browser.py
File DISTDIR\.blender\scripts\fixfromarmature.py
+ File DISTDIR\.blender\scripts\help_browser.py
File DISTDIR\.blender\scripts\help_getting_started.py
File DISTDIR\.blender\scripts\help_manual.py
File DISTDIR\.blender\scripts\help_py_reference.py
@@ -284,12 +286,6 @@ Section "Blender-VERSION (required)" SecCopyUI
File DISTDIR\.blender\scripts\knife.py
File DISTDIR\.blender\scripts\lightwave_export.py
File DISTDIR\.blender\scripts\lightwave_import.py
- File DISTDIR\.blender\scripts\mod_ai2obj.py
- File DISTDIR\.blender\scripts\mod_blender.py
- File DISTDIR\.blender\scripts\mod_eps2obj.py
- File DISTDIR\.blender\scripts\mod_gimp2obj.py
- File DISTDIR\.blender\scripts\mod_meshtools.py
- File DISTDIR\.blender\scripts\mod_svg2obj.py
File DISTDIR\.blender\scripts\nendo_export.py
File DISTDIR\.blender\scripts\nendo_import.py
File DISTDIR\.blender\scripts\obdatacopier.py
@@ -304,6 +300,7 @@ Section "Blender-VERSION (required)" SecCopyUI
File DISTDIR\.blender\scripts\raw_import.py
File DISTDIR\.blender\scripts\renameobjectbyblock.py
File DISTDIR\.blender\scripts\rvk1_torvk2.py
+ File DISTDIR\.blender\scripts\save_theme.py
File DISTDIR\.blender\scripts\sel_same.py
File DISTDIR\.blender\scripts\skin.py
File DISTDIR\.blender\scripts\slp_import.py
@@ -311,16 +308,27 @@ Section "Blender-VERSION (required)" SecCopyUI
File DISTDIR\.blender\scripts\tex2uvbaker.py
File DISTDIR\.blender\scripts\truespace_export.py
File DISTDIR\.blender\scripts\truespace_import.py
- File DISTDIR\.blender\scripts\unweld044.py
+ File DISTDIR\.blender\scripts\unweld.py
File DISTDIR\.blender\scripts\uv_export.py
File DISTDIR\.blender\scripts\UVpaint05.py
File DISTDIR\.blender\scripts\videoscape_export.py
+ File DISTDIR\.blender\scripts\vrml97_export.py
File DISTDIR\.blender\scripts\wings_export.py
File DISTDIR\.blender\scripts\wings_import.py
File DISTDIR\.blender\scripts\wrl2export.py
- SetOutPath $BLENDERHOME\.blender\bpydata
- File DISTDIR\.blender\bpydata\readme.txt
- File DISTDIR\.blender\bpydata\KUlang.txt
+ SetOutPath $BLENDERHOME\.blender\scripts\bpymodules
+ File DISTDIR\.blender\scripts\bpymodules\ai2obj.py
+ File DISTDIR\.blender\scripts\bpymodules\BPyBlender.py
+ File DISTDIR\.blender\scripts\bpymodules\BPyRegistry.py
+ File DISTDIR\.blender\scripts\bpymodules\eps2obj.py
+ File DISTDIR\.blender\scripts\bpymodules\gimp2obj.py
+ File DISTDIR\.blender\scripts\bpymodules\meshtools.py
+ File DISTDIR\.blender\scripts\bpymodules\svg2obj.py
+ SetOutPath $BLENDERHOME\.blender\scripts\bpydata
+ File DISTDIR\.blender\scripts\bpydata\readme.txt
+ File DISTDIR\.blender\scripts\bpydata\KUlang.txt
+ SetOutPath $BLENDERHOME\.blender\scripts\bpydata\config
+ File DISTDIR\.blender\scripts\bpydata\config\readme.txt
; Additional Languages files
SetOutPath $BLENDERHOME\.blender
@@ -424,7 +432,9 @@ Section "Uninstall"
; remove directories used.
RMDir /r $INSTDIR\.blender\locale
RMDir /r $INSTDIR\.blender\scripts
- RMDir /r $INSTDIR\.blender\bpydata
+ RMDir /r $INSTDIR\.blender\scripts\bpydata
+ RMDir /r $INSTDIR\.blender\scripts\bpydata\config
+ RMDir /r $INSTDIR\.blender\scripts\bpymodules
RMDir $INSTDIR\.blender
RMDir "$SMPROGRAMS\Blender Foundation\Blender"
RMDir "$SMPROGRAMS\Blender Foundation"
diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi
index b6dd8f4c4b4..4bbea68c62f 100644
--- a/release/windows/installer/00.sconsblender.nsi
+++ b/release/windows/installer/00.sconsblender.nsi
@@ -244,8 +244,12 @@ Section "Blender-VERSION (required)" SecCopyUI
SetOutPath $BLENDERHOME\.blender\scripts
[SCRIPTCONTS]
- SetOutPath $BLENDERHOME\.blender\bpydata
- [BPYCONTS]
+ SetOutPath $BLENDERHOME\.blender\scripts\bpymodules
+ [SCRIPTMODCONTS]
+ SetOutPath $BLENDERHOME\.blender\scripts\bpydata
+ [SCRIPTDATACONTS]
+ SetOutPath $BLENDERHOME\.blender\scripts\bpydata\config
+ [SCRIPTDATACFGCONTS]
; Language files
[LANGUAGECONTS]
@@ -306,7 +310,9 @@ Section "Uninstall"
; remove directories used.
RMDir /r $INSTDIR\.blender\locale
RMDir /r $INSTDIR\.blender\scripts
- RMDir /r $INSTDIR\.blender\bpydata
+ RMDir /r $INSTDIR\.blender\scripts\bpymodules
+ RMDir /r $INSTDIR\.blender\scripts\bpydata
+ RMDir /r $INSTDIR\.blender\scripts\bpydata\config
RMDir $INSTDIR\.blender
RMDir "$SMPROGRAMS\Blender Foundation\Blender"
RMDir "$SMPROGRAMS\Blender Foundation"
diff --git a/source/blender/python/api2_2x/doc/NMesh.py b/source/blender/python/api2_2x/doc/NMesh.py
index 8b5be59b38f..fb7b1a8e735 100644
--- a/source/blender/python/api2_2x/doc/NMesh.py
+++ b/source/blender/python/api2_2x/doc/NMesh.py
@@ -157,7 +157,12 @@ def GetRawFromObject(name):
def PutRaw(nmesh, name = None, recalc_normals = 1, store_edges = 0):
"""
- Put an NMesh object back in Blender.
+ Put a BPython NMesh object as a mesh data object in Blender.
+ @note: if there is already a mesh with the given 'name', its contents are
+ freed and the new data is put in it. Also, if this mesh is not linked to any
+ object, a new object for it is created. Reminder: in Blender an object is
+ composed of the base object and linked object data (mesh, metaball, camera,
+ etc. etc).
@type nmesh: NMesh
@type name: string
@type recalc_normals: int
@@ -546,8 +551,8 @@ class NMesh:
def update(recalc_normals = 0, store_edges = 0, vertex_shade = 0):
"""
Update the mesh in Blender. The changes made are put back to the mesh in
- Blender, if available, or put in a newly created mesh object if this NMesh
- wasn't already linked to one.
+ Blender, if available, or put in a newly created mesh if this NMesh wasn't
+ already linked to one.
@type recalc_normals: int (bool)
@param recalc_normals: if nonzero the vertex normals are recalculated.
@type store_edges: int (bool)
@@ -565,6 +570,13 @@ class NMesh:
programmers should leave EditMode B{before} getting a mesh, or changes
made to the editmesh in Blender may not be visible to your script
(check the example at the top of NMesh module doc).
+ @warn: unlike the L{PutRaw} function, this method doesn't check validity of
+ vertex, face and material lists, because it is meant to be as fast as
+ possible (and already performs many tasks). So programmers should make
+ sure they only feed proper data to the nmesh -- a good general
+ recommendation, of course. It's also trivial to write code to check
+ all data before updating, for example by comparing each item's type
+ with the actual L{Types}, if you need to.
@note: this method also redraws the 3d view and -- if 'vertex_shade' is
nonzero -- the edit buttons window.
@note: if your mesh disappears after it's updated, try
diff --git a/source/darwin/Makefile b/source/darwin/Makefile
index 52381081d67..83748250633 100644
--- a/source/darwin/Makefile
+++ b/source/darwin/Makefile
@@ -52,7 +52,6 @@ ifeq ($(APPLICATION), blender)
@echo "---> copying .blender/ scripts"
@cp -R $(NANBLENDERHOME)/bin/.blender $(DIR)/bin/$(APPLICATION).app/Contents/MacOS
@cp -R $(NANBLENDERHOME)/release/scripts $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/scripts
- @cp -R $(NANBLENDERHOME)/release/bpydata $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/bpydata
endif
@echo "---> removing CVS directories and Mac hidden files from distribution"
@find $(DIR)/bin/$(APPLICATION).app -name CVS -prune -exec rm -rf {} \;
diff --git a/tools/scons/bs/bs_arc.py b/tools/scons/bs/bs_arc.py
index b215b9dc977..4c827632633 100644
--- a/tools/scons/bs/bs_arc.py
+++ b/tools/scons/bs/bs_arc.py
@@ -52,8 +52,6 @@ def appit(target, source, env):
commands.getoutput(cmd)
cmd = 'mkdir %s.app/Contents/MacOS/.blender'%target
commands.getoutput(cmd)
- cmd = 'cp -R release/bpydata %s.app/Contents/MacOS/.blender'%target
- commands.getoutput(cmd)
cmd = 'cp -R release/scripts %s.app/Contents/MacOS/.blender/'%target
commands.getoutput(cmd)
cmd = 'cp -R release/plugins %s.app/Contents/Resources/'%target
@@ -88,8 +86,6 @@ def appit(target, source, env):
shutil.copy('bin/.blender/.Blanguages', cmd)
cmd = 'cp -R bin/.blender/locale %s.app/Contents/Resources/'%target
commands.getoutput(cmd)
- cmd = 'cp -R release/bpydata %s.app/Contents/MacOS/.blender'%target
- commands.getoutput(cmd)
cmd = 'cp -R release/scripts %s.app/Contents/MacOS/.blender/'%target
commands.getoutput(cmd)
cmd = 'cp -R release/plugins %s.app/Contents/Resources/'%target
diff --git a/tools/scons/bs/bs_dirs.py b/tools/scons/bs/bs_dirs.py
index a12472246f5..224a95afe57 100644
--- a/tools/scons/bs/bs_dirs.py
+++ b/tools/scons/bs/bs_dirs.py
@@ -78,16 +78,10 @@ def preparedist():
os.chdir(startdir)
if os.path.isdir("dist/.blender/scripts"):
shutil.rmtree("dist/.blender/scripts")
- if os.path.isdir("dist/.blender/bpydata"):
- shutil.rmtree("dist/.blender/bpydata")
-
- os.makedirs("dist/.blender/bpydata")
- shutil.copy("release/bpydata/readme.txt", "dist/.blender/bpydata/readme.txt")
- shutil.copy("release/bpydata/KUlang.txt", "dist/.blender/bpydata/KUlang.txt")
-
+
os.chdir("release")
shutil.copytree("scripts/", "../dist/.blender/scripts")
-
+
# finally copy auxiliaries (readme, license, etc.)
if sys.platform == 'win32':
shutil.copy("windows/extra/Help.url", "../dist/Help.url")
@@ -123,4 +117,4 @@ def finalisedist(zipname):
#shutil.copy("dist/" + zipname, zipname)
#shutil.rmtree("dist")
- return 1 \ No newline at end of file
+ return 1
diff --git a/tools/scons/bs/bs_nsis.py b/tools/scons/bs/bs_nsis.py
index df6dcdb1c08..cdac85560eb 100644
--- a/tools/scons/bs/bs_nsis.py
+++ b/tools/scons/bs/bs_nsis.py
@@ -50,24 +50,52 @@ def donsis(env, target, source):
# do scripts
scriptlist = []
- scriptdir = os.listdir(startdir + "\\dist\\.blender\\scripts")
+ scriptpath = "%s%s" % (startdir, "\\dist\\.blender\\scripts")
+ scriptdir = os.listdir(scriptpath)
for scriptitem in scriptdir:
- if os.path.isdir(startdir + "\\dist\\.blender\\scripts\\" + scriptitem) == 0:
- scriptlist.append("File " + startdir + "\\dist\\.blender\\scripts\\" + scriptitem)
+ scriptfile = "%s\\%s" % (scriptpath, scriptitem)
+ if os.path.isdir(scriptfile) == 0:
+ scriptlist.append("File %s" % scriptfile)
scriptstring = string.join(scriptlist, "\n ")
scriptstring += "\n\n"
nsis_cnt = string.replace(nsis_cnt, "[SCRIPTCONTS]", scriptstring)
-
- # do bpycontents
+
+ # do scripts\bpymodules
+ bpymodlist = []
+ bpymodpath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpymodules")
+ bpymoddir = os.listdir(bpymodpath)
+ for bpymoditem in bpymoddir:
+ bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
+ if os.path.isdir(bpymodfile) == 0:
+ bpymodlist.append("File %s" % bpymodfile)
+ bpymodstring = string.join(bpymodlist, "\n ")
+ bpymodstring += "\n\n"
+ nsis_cnt = string.replace(nsis_cnt, "[SCRIPTMODCONTS]", bpymodstring)
+
+ # do scripts\bpydata
bpydatalist = []
- bpydatadir = os.listdir(startdir + "\\dist\\.blender\\bpydata")
+ bpydatapath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpydata")
+ bpydatadir = os.listdir(bpydatapath)
for bpydataitem in bpydatadir:
- if os.path.isdir(startdir + "\\dist\\.blender\\bpydata\\" + bpydataitem) == 0:
- bpydatalist.append("File " + startdir + "\\dist\\.blender\\bpydata\\" + bpydataitem)
+ bpydatafile = "%s\\%s" % (bpydatapath, bpydataitem)
+ if os.path.isdir(bpydatafile) == 0:
+ bpydatalist.append("File %s" % bpydatafile)
bpydatastring = string.join(bpydatalist, "\n ")
bpydatastring += "\n\n"
- nsis_cnt = string.replace(nsis_cnt, "[BPYCONTS]", bpydatastring)
-
+ nsis_cnt = string.replace(nsis_cnt, "[SCRIPTDATACONTS]", bpydatastring)
+
+ # do scripts\bpydata\config
+ cfglist = []
+ cfgpath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpydata\\config")
+ cfgdir = os.listdir(cfgpath)
+ for cfgitem in cfgdir:
+ cfgfile = "%s\\%s" % (cfgpath, cfgitem)
+ if os.path.isdir(cfgfile) == 0:
+ cfglist.append("File %s" % cfgfile)
+ cfgstring = string.join(cfglist, "\n ")
+ cfgstring += "\n\n"
+ nsis_cnt = string.replace(nsis_cnt, "[SCRIPTDATACFGCONTS]", cfgstring)
+
# do dotblender
dotblendlist = []
dotblenddir = os.listdir(startdir+"\\dist\\.blender")
@@ -112,4 +140,4 @@ def BlenderNSIS(target):
nsis_inst = inst_env.Command('nsisinstaller', 'blender$PROGSUFFIX', donsis)
if bs_globals.user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
inst_env.Depends(nsis_inst, 'blenderplayer$PROGSUFFIX')
- inst_env.Alias("wininst", nsis_inst) \ No newline at end of file
+ inst_env.Alias("wininst", nsis_inst)