zero rotation values for quat_apply_track() which were in fact just float in precision.
also minor code cleanup - tabs -> spaces in scons file.
This commit is contained in:
68
SConstruct
68
SConstruct
@@ -422,16 +422,16 @@ if not quickie and do_clean:
|
||||
# with _any_ library but since we used a fixed python version this tends to
|
||||
# be most problematic.
|
||||
if env['WITH_BF_PYTHON']:
|
||||
py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
|
||||
py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
|
||||
|
||||
if not os.path.exists(py_h):
|
||||
print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
|
||||
" Set 'BF_PYTHON_INC' to point "
|
||||
"to a valid python include path.\n Containing "
|
||||
"Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
|
||||
if not os.path.exists(py_h):
|
||||
print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
|
||||
" Set 'BF_PYTHON_INC' to point "
|
||||
"to a valid python include path.\n Containing "
|
||||
"Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
|
||||
|
||||
Exit()
|
||||
del py_h
|
||||
Exit()
|
||||
del py_h
|
||||
|
||||
|
||||
if not os.path.isdir ( B.root_build_dir):
|
||||
@@ -449,39 +449,39 @@ if not os.path.isdir ( B.root_build_dir):
|
||||
# Ensure all data files are valid #
|
||||
###################################
|
||||
if not os.path.isdir ( B.root_build_dir + 'data_headers'):
|
||||
os.makedirs ( B.root_build_dir + 'data_headers' )
|
||||
os.makedirs ( B.root_build_dir + 'data_headers' )
|
||||
# use for includes
|
||||
env['DATA_HEADERS'] = "#" + env['BF_BUILDDIR'] + "/data_headers"
|
||||
def ensure_data(FILE_FROM, FILE_TO, VAR_NAME):
|
||||
if os.sep == "\\":
|
||||
FILE_FROM = FILE_FROM.replace("/", "\\")
|
||||
FILE_TO = FILE_TO.replace("/", "\\")
|
||||
if os.sep == "\\":
|
||||
FILE_FROM = FILE_FROM.replace("/", "\\")
|
||||
FILE_TO = FILE_TO.replace("/", "\\")
|
||||
|
||||
# first check if we need to bother.
|
||||
if os.path.exists(FILE_TO):
|
||||
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
|
||||
return
|
||||
# first check if we need to bother.
|
||||
if os.path.exists(FILE_TO):
|
||||
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
|
||||
return
|
||||
|
||||
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
|
||||
fpin = open(FILE_FROM, "rb")
|
||||
fpin.seek(0, os.SEEK_END)
|
||||
size = fpin.tell()
|
||||
fpin.seek(0)
|
||||
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
|
||||
fpin = open(FILE_FROM, "rb")
|
||||
fpin.seek(0, os.SEEK_END)
|
||||
size = fpin.tell()
|
||||
fpin.seek(0)
|
||||
|
||||
fpout = open(FILE_TO, "w")
|
||||
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
|
||||
fpout.write("char %s[] = {\n" % VAR_NAME)
|
||||
fpout = open(FILE_TO, "w")
|
||||
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
|
||||
fpout.write("char %s[] = {\n" % VAR_NAME)
|
||||
|
||||
while size > 0:
|
||||
size -= 1
|
||||
if size % 32 == 31:
|
||||
fpout.write("\n")
|
||||
while size > 0:
|
||||
size -= 1
|
||||
if size % 32 == 31:
|
||||
fpout.write("\n")
|
||||
|
||||
fpout.write("%3d," % ord(fpin.read(1)))
|
||||
fpout.write("\n 0};\n\n")
|
||||
fpout.write("%3d," % ord(fpin.read(1)))
|
||||
fpout.write("\n 0};\n\n")
|
||||
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
|
||||
ensure_data("source/blender/compositor/operations/COM_OpenCLKernels.cl",
|
||||
B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
|
||||
@@ -815,8 +815,8 @@ if env['OURPLATFORM'] == 'win64-mingw':
|
||||
if env['WITH_BF_SDL']:
|
||||
dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
|
||||
|
||||
if(env['WITH_BF_OPENMP']):
|
||||
dllsources.append('${LCGDIR}/binaries/libgomp-1.dll')
|
||||
if(env['WITH_BF_OPENMP']):
|
||||
dllsources.append('${LCGDIR}/binaries/libgomp-1.dll')
|
||||
|
||||
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
|
||||
dllsources.append('${LCGDIR}/binaries/libgcc_s_sjlj-1.dll')
|
||||
|
@@ -1665,7 +1665,7 @@ void quat_apply_track(float quat[4], short axis, short upflag)
|
||||
{M_SQRT1_2, 0.0, 0.0, M_SQRT1_2}, /* pos-z90 */
|
||||
{M_SQRT1_2, 0.0, M_SQRT1_2, 0.0}, /* neg-y90 */
|
||||
{0.5, -0.5, -0.5, 0.5}, /* Quaternion((1,0,0), radians(-90)) * Quaternion((0,1,0), radians(-90)) */
|
||||
{-3.0908619663705394e-08, M_SQRT1_2, M_SQRT1_2, 3.0908619663705394e-08} /* no rotation */
|
||||
{0.0, M_SQRT1_2, M_SQRT1_2, 0.0} /* no rotation */
|
||||
};
|
||||
|
||||
assert(axis >= 0 && axis <= 5);
|
||||
|
Reference in New Issue
Block a user