[Bf-extensions-cvs] [baa07430] master: space_view3d_quickPrefs: remove: unsupported T63750
meta-androcto
noreply at git.blender.org
Thu Sep 19 08:21:08 CEST 2019
Commit: baa07430f7eacac91ed6004b193e7962ad355b26
Author: meta-androcto
Date: Thu Sep 19 16:20:49 2019 +1000
Branches: master
https://developer.blender.org/rBACbaa07430f7eacac91ed6004b193e7962ad355b26
space_view3d_quickPrefs: remove: unsupported T63750
===================================================================
D space_view3d_quickPrefs.py
===================================================================
diff --git a/space_view3d_quickPrefs.py b/space_view3d_quickPrefs.py
deleted file mode 100644
index e0f060ce..00000000
--- a/space_view3d_quickPrefs.py
+++ /dev/null
@@ -1,984 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
- "name": "QuickPrefs",
- "author": "Sean Olson",
- "version": (2, 2, 1),
- "blender": (2, 80, 0),
- "location": "Properties, Render Tab",
- "description": "Add often changed User Preference options to Properties panel.",
- "warning": "Under Reconstruction",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
- "Scripts/3D_interaction/QuickPrefs",
- "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
- "category": "3D View"}
-
-
-import os
-
-import bpy
-from bpy.types import Menu, Panel
-from rna_prop_ui import PropertyPanel
-from bpy.app.handlers import persistent
-from bpy.props import (
- BoolProperty,
- EnumProperty,
- FloatProperty,
- CollectionProperty,
- IntProperty,
- StringProperty,
- PointerProperty
- )
-
-
-import bpy_extras
-
-#Global Variables
-recursive = False
-renaming = True
-lastindex = 0
-lastname = ""
-debug = 0
-defaultfilepath=os.path.join(bpy.utils.script_paths(subdir="addons")[0], "quickprefpresets")
-
-
-##########################################
-####### Import/Export Functions ##########
-##########################################
-
-#import all grabs all files in the given directory and imports them
- at persistent
-def gllightpreset_importall():
- path = bpy.context.scene.quickprefs.gllightpreset_importdirectory
- directorylisting = os.listdir(path)
-
- for infile in directorylisting:
- if not os.path.isdir(infile): #check if the file is a directory
- if '.preset' in infile: #check that this is a .preset file
- thefile=os.path.join(path, infile) #join the filename with the path
- gllightpreset_importsingle(thefile) #import it!
-
-
-#import single takes a given filename and imports it
-def gllightpreset_importsingle(filename):
-
- if not os.path.isdir(filename): #check if the file is a directory
- if '.preset' in filename: #check to make sure this is a preset file
- readfile=open(filename, 'r')
-
- name=readfile.readline()
- name=name[:-1]
-
- illuminationString0=readfile.readline()
- illuminationString0=illuminationString0[:-1]
-
- if illuminationString0=="True":
- illumination0=True
- else:
- illumination0=False
-
- illuminationString1=readfile.readline()
- illuminationString1=illuminationString1[:-1]
- if illuminationString1=="True":
- illumination1=True
- else:
- illumination1=False
-
- illuminationString2=readfile.readline()
- illuminationString2=illuminationString2[:-1]
- if illuminationString2=="True":
- illumination2=True
- else:
- illumination2=False
-
- #convert strings to booleans
-
- str=readfile.readline()
- strArray=str.split()
- direction0x=strArray[0]
- direction0y=strArray[1]
- direction0z=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- direction1x=strArray[0]
- direction1y=strArray[1]
- direction1z=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- direction2x=strArray[0]
- direction2y=strArray[1]
- direction2z=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- diffuse0r=strArray[0]
- diffuse0g=strArray[1]
- diffuse0b=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- diffuse1r=strArray[0]
- diffuse1g=strArray[1]
- diffuse1b=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- diffuse2r=strArray[0]
- diffuse2g=strArray[1]
- diffuse2b=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- spec0r=strArray[0]
- spec0g=strArray[1]
- spec0b=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- spec1r=strArray[0]
- spec1g=strArray[1]
- spec1b=strArray[2]
-
- str=readfile.readline()
- strArray=str.split()
- spec2r=strArray[0]
- spec2g=strArray[1]
- spec2b=strArray[2]
-
- #set the variables
- system=bpy.context.preferences.system
- system.solid_lights[0].use=illumination0
- system.solid_lights[1].use=illumination1
- system.solid_lights[2].use=illumination2
-
- system.solid_lights[0].direction = (float(direction0x), float(direction0y), float(direction0z))
- system.solid_lights[1].direction = (float(direction1x), float(direction1y), float(direction1z))
- system.solid_lights[2].direction = (float(direction2x), float(direction2y), float(direction2z))
-
- system.solid_lights[0].diffuse_color=(float(diffuse0r), float(diffuse0g), float(diffuse0b))
- system.solid_lights[1].diffuse_color=(float(diffuse1r), float(diffuse1g), float(diffuse1b))
- system.solid_lights[2].diffuse_color=(float(diffuse2r), float(diffuse2g), float(diffuse2b))
-
- system.solid_lights[0].specular_color=(float(spec0r), float(spec0g), float(spec0b))
- system.solid_lights[1].specular_color=(float(spec1r), float(spec1g), float(spec1b))
- system.solid_lights[2].specular_color=(float(spec2r), float(spec2g), float(spec2b))
- gllightpreset_add(name)
- gllightpreset_save()
-
-
-#Export all exports the entire contents of your presets list to the given file
- at persistent
-def gllightpreset_exportall(context):
- for i in range(len(bpy.context.scene.quickprefs.gllightpreset)):
- gllightpreset_exportsingle(i, True)
-
-
-def gllightpreset_exportsingle(index, multiimport):
- scn=bpy.context.scene.quickprefs
- name=scn.gllightpreset[index].name
-
- illuminatedBool0=scn.gllightpreset[index].illuminated0
- illuminatedBool1=scn.gllightpreset[index].illuminated1
- illuminatedBool2=scn.gllightpreset[index].illuminated2
-
- #illuminations
- if illuminatedBool0==True:
- illuminated0="True"
- else:
- illuminated0="False"
-
- if illuminatedBool1==True:
- illuminated1="True"
- else:
- illuminated1="False"
-
- if illuminatedBool2==True:
- illuminated2="True"
- else:
- illuminated2="False"
-
- #direction light0
- dirx=str(scn.gllightpreset[index].direction0[0])
- diry=str(scn.gllightpreset[index].direction0[1])
- dirz=str(scn.gllightpreset[index].direction0[2])
- direction0=dirx + " " + diry + " " + dirz + " "
-
- #direction light1
- dirx=str(scn.gllightpreset[index].direction1[0])
- diry=str(scn.gllightpreset[index].direction1[1])
- dirz=str(scn.gllightpreset[index].direction1[2])
- direction1=dirx + " " + diry + " " + dirz + " "
-
- #direction light2
- dirx=str(scn.gllightpreset[index].direction2[0])
- diry=str(scn.gllightpreset[index].direction2[1])
- dirz=str(scn.gllightpreset[index].direction2[2])
- direction2=dirx + " " + diry + " " + dirz + " "
-
- #diffuse light0
- difr=str(scn.gllightpreset[index].diffuse0[0])
- difg=str(scn.gllightpreset[index].diffuse0[1])
- difb=str(scn.gllightpreset[index].diffuse0[2])
- diffuse0=difr + " " + difg + " " + difb + " "
-
- #diffuse light1
- difr=str(scn.gllightpreset[index].diffuse1[0])
- difg=str(scn.gllightpreset[index].diffuse1[1])
- difb=str(scn.gllightpreset[index].diffuse1[2])
- diffuse1=difr + " " + difg + " " + difb + " "
-
- #diffuse light2
- difr=str(scn.gllightpreset[index].diffuse2[0])
- difg=str(scn.gllightpreset[index].diffuse2[1])
- difb=str(scn.gllightpreset[index].diffuse2[2])
- diffuse2=difr + " " + difg + " " + difb + " "
-
- #specular light 0
- specr=str(scn.gllightpreset[index].specular0[0])
- specg=str(scn.gllightpreset[index].specular0[1])
- specb=str(scn.gllightpreset[index].specular0[2])
- specular0=specr + " " + specg + " " + specb + " "
-
- #specular light 1
- specr=str(scn.gllightpreset[index].specular1[0])
- specg=str(scn.gllightpreset[index].specular1[1])
- specb=str(scn.gllightpreset[index].specular1[2])
- specular1=specr + " " + specg + " " + specb + " "
-
- #specular light 2
- specr=str(scn.gllightpreset[index].specular2[0])
- specg=str(scn.gllightpreset[index].specular2[1])
- specb=str(scn.gllightpreset[index].specular2[2])
- specular2=specr + " " + specg + " " + specb + " "
-
- printstring=name+"\n"
- printstring+=illuminated0 +"\n"+ illuminated1 +"\n"+ illuminated2+"\n"
- printstring+=direction0 +"\n"+ direction1 +"\n"+ direction2 +"\n"
- printstring+=diffuse
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list