forked from bartvdbraak/blender
COLLADA branch: merge from trunk -r 24522:24758.
This commit is contained in:
commit
8512013536
@ -70,7 +70,6 @@ OPTION(WITH_PYTHON "Enable Embedded Python API" ON)
|
||||
OPTION(WITH_SDL "Enable SDL for sound and joystick support" ON)
|
||||
OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
|
||||
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
|
||||
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
|
||||
OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF)
|
||||
OPTION(WITH_FFTW3 "Enable FFTW3 support" OFF)
|
||||
OPTION(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF)
|
||||
@ -82,9 +81,17 @@ OPTION(WITH_BUILDINFO "Include extra build details" ON)
|
||||
OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON)
|
||||
OPTION(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org/)" ON)
|
||||
|
||||
# Unix defaults to OpenMP On
|
||||
IF (UNIX)
|
||||
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON)
|
||||
ELSE(UNIX)
|
||||
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF (APPLE)
|
||||
OPTION(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON)
|
||||
OPTION(WITH_LIBS10.5 "Use 10.5 libs (needed for 64bit builds)" OFF)
|
||||
OPTION(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON)
|
||||
OPTION(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
|
||||
OPTION(WITH_LIBS10.5 "Use 10.5 libs (needed for 64bit builds)" OFF)
|
||||
ENDIF (APPLE)
|
||||
|
||||
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
@ -236,7 +243,7 @@ IF(UNIX AND NOT APPLE)
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-char-subscripts")
|
||||
|
||||
SET(PLATFORM_LINKFLAGS "-pthread")
|
||||
|
||||
@ -525,7 +532,15 @@ IF(APPLE)
|
||||
|
||||
IF (WITH_COCOA)
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DGHOST_COCOA")
|
||||
SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
|
||||
SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio")
|
||||
IF(USE_QTKIT)
|
||||
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DUSE_QTKIT")
|
||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
|
||||
ELSE(USE_QTKIT)
|
||||
IF(WITH_QUICKTIME)
|
||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
|
||||
ENDIF(WITH_QUICKTIME)
|
||||
ENDIF(USE_QTKIT)
|
||||
ELSE (WITH_COCOA)
|
||||
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
|
||||
|
@ -224,6 +224,11 @@ if env['WITH_GHOST_COCOA'] == True:
|
||||
env.Append(CFLAGS=['-DGHOST_COCOA'])
|
||||
env.Append(CXXFLAGS=['-DGHOST_COCOA'])
|
||||
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
|
||||
|
||||
if env['USE_QTKIT'] == True:
|
||||
env.Append(CFLAGS=['-DUSE_QTKIT'])
|
||||
env.Append(CXXFLAGS=['-DUSE_QTKIT'])
|
||||
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
|
||||
|
||||
#check for additional debug libnames
|
||||
|
||||
|
@ -13,7 +13,6 @@ USE_SDK=True
|
||||
#############################################################################
|
||||
################### Cocoa & architecture settings ##################
|
||||
#############################################################################
|
||||
|
||||
WITH_GHOST_COCOA=True
|
||||
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
@ -31,30 +30,36 @@ elif cmd_res[0]=='9':
|
||||
elif cmd_res[0]=='10':
|
||||
MAC_CUR_VER='10.6'
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'ppc':
|
||||
LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
else :
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
BF_PYTHON_VERSION = '3.1'
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'ppc' and BF_PYTHON_VERSION == '2.3':
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
USE_QTKIT=True # Carbon quicktime is not available for 64bit
|
||||
|
||||
|
||||
# Default target OSX settings per architecture
|
||||
# Can be customized
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'ppc':
|
||||
MAC_MIN_VERS = '10.3'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
elif MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'ppc':
|
||||
LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
CC = 'gcc-3.3'
|
||||
CXX = 'g++-3.3'
|
||||
elif MACOSX_ARCHITECTURE == 'i386':
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.x.i386'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
else :
|
||||
MAC_MIN_VERS = '10.5'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
#############################################################################
|
||||
################### Dependency settings ##################
|
||||
#############################################################################
|
||||
@ -229,10 +234,7 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME ( disable for 64bit atm )
|
||||
else:
|
||||
WITH_BF_QUICKTIME = True
|
||||
WITH_BF_QUICKTIME = True
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = '/usr'
|
||||
@ -285,7 +287,10 @@ else:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
|
||||
if WITH_BF_QUICKTIME == True:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
|
||||
if USE_QTKIT == True:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
|
||||
|
||||
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
||||
LLIBS = ['stdc++', 'SystemStubs']
|
||||
|
@ -161,7 +161,7 @@ CXX = 'CC'
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC', '-n32']
|
||||
|
||||
CPPFLAGS = ['-DXP_UNIX']
|
||||
CPPFLAGS = []
|
||||
CXXFLAGS = ['-pipe','-fPIC', '-n32']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
@ -165,6 +165,8 @@ BF_EXPAT = '/usr'
|
||||
BF_EXPAT_LIB = 'expat'
|
||||
BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
@ -173,7 +175,7 @@ CXX = 'g++'
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
|
||||
CPPFLAGS = ['-DXP_UNIX']
|
||||
CPPFLAGS = []
|
||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
@ -119,7 +119,7 @@ CXX = 'i586-mingw32msvc-g++'
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
|
||||
CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS']
|
||||
CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
REL_CFLAGS = [ '-O2' ]
|
||||
REL_CCFLAGS = [ '-O2' ]
|
||||
|
@ -136,7 +136,7 @@ CXX = 'g++'
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
|
||||
CPPFLAGS = ['-DXP_UNIX', '-DSUN_OGL_NO_VERTEX_MACROS']
|
||||
CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS']
|
||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
@ -136,7 +136,7 @@ CXX = 'g++'
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
|
||||
CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS']
|
||||
CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
REL_CFLAGS = [ '-O2' ]
|
||||
REL_CCFLAGS = [ '-O2' ]
|
||||
|
2
extern/glew/CMakeLists.txt
vendored
2
extern/glew/CMakeLists.txt
vendored
@ -34,5 +34,7 @@ SET(SRC
|
||||
src/glew.c
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||
|
||||
BLENDERLIB(extern_glew "${SRC}" "${INC}")
|
||||
|
||||
|
2
extern/glew/SConscript
vendored
2
extern/glew/SConscript
vendored
@ -6,7 +6,7 @@ Import('env')
|
||||
|
||||
sources = ['src/glew.c']
|
||||
|
||||
defs = ''
|
||||
defs = 'GLEW_STATIC'
|
||||
incs = 'include'
|
||||
|
||||
env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[50,230])
|
||||
|
2580
extern/glew/include/GL/glew.h
vendored
2580
extern/glew/include/GL/glew.h
vendored
File diff suppressed because it is too large
Load Diff
381
extern/glew/include/GL/glxew.h
vendored
381
extern/glew/include/GL/glxew.h
vendored
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** The OpenGL Extension Wrangler Library
|
||||
** Copyright (C) 2002-2006, Milan Ikits <milan ikits[]ieee org>
|
||||
** Copyright (C) 2002-2006, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002, Lev Povalahev
|
||||
** All rights reserved.
|
||||
**
|
||||
@ -30,22 +30,50 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
** The contents of this file are subject to the GLX Public License Version 1.0
|
||||
** (the "License"). You may not use this file except in compliance with the
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is Silicon Graphics, Inc.
|
||||
** Those portions of the Subject Software created by Silicon Graphics, Inc.
|
||||
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.0
|
||||
*
|
||||
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __glxew_h__
|
||||
@ -55,9 +83,13 @@
|
||||
#ifdef __glxext_h_
|
||||
#error glxext.h included before glxew.h
|
||||
#endif
|
||||
#ifdef GLX_H
|
||||
#error glx.h included before glxew.h
|
||||
#endif
|
||||
|
||||
#define __glxext_h_
|
||||
#define __GLX_glx_h__
|
||||
#define GLX_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
@ -100,7 +132,13 @@ extern "C" {
|
||||
|
||||
typedef XID GLXDrawable;
|
||||
typedef XID GLXPixmap;
|
||||
#ifdef __sun
|
||||
typedef struct __glXContextRec *GLXContext;
|
||||
#else
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
#endif
|
||||
|
||||
typedef unsigned int GLXVideoDeviceNV;
|
||||
|
||||
extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
|
||||
extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
|
||||
@ -111,7 +149,7 @@ extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
|
||||
extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
|
||||
extern void glXDestroyContext (Display *dpy, GLXContext ctx);
|
||||
extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
|
||||
extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
|
||||
extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLulong mask);
|
||||
extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
||||
extern GLXContext glXGetCurrentContext (void);
|
||||
extern GLXDrawable glXGetCurrentDrawable (void);
|
||||
@ -220,8 +258,24 @@ typedef XID GLXFBConfigID;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef struct { int event_type; int draw_type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; unsigned int buffer_mask; unsigned int aux_buffer; int x, y; int width, height; int count; } GLXPbufferClobberEvent;
|
||||
typedef union __GLXEvent { GLXPbufferClobberEvent glxpbufferclobber; long pad[24]; } GLXEvent;
|
||||
|
||||
typedef struct {
|
||||
int event_type;
|
||||
int draw_type;
|
||||
unsigned long serial;
|
||||
Bool send_event;
|
||||
Display *display;
|
||||
GLXDrawable drawable;
|
||||
unsigned int buffer_mask;
|
||||
unsigned int aux_buffer;
|
||||
int x, y;
|
||||
int width, height;
|
||||
int count;
|
||||
} GLXPbufferClobberEvent;
|
||||
typedef union __GLXEvent {
|
||||
GLXPbufferClobberEvent glxpbufferclobber;
|
||||
long pad[24];
|
||||
} GLXEvent;
|
||||
|
||||
typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
@ -289,6 +343,25 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
|
||||
#endif /* GLX_3DFX_multisample */
|
||||
|
||||
/* ------------------------- GLX_ARB_create_context ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
#define GLX_ARB_create_context 1
|
||||
|
||||
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define GLX_CONTEXT_FLAGS_ARB 0x2094
|
||||
|
||||
typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
|
||||
#define glXCreateContextAttribsARB GLXEW_GET_FUN(__glewXCreateContextAttribsARB)
|
||||
|
||||
#define GLXEW_ARB_create_context GLXEW_GET_VAR(__GLXEW_ARB_create_context)
|
||||
|
||||
#endif /* GLX_ARB_create_context */
|
||||
|
||||
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
@ -301,6 +374,17 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
|
||||
#endif /* GLX_ARB_fbconfig_float */
|
||||
|
||||
/* ------------------------ GLX_ARB_framebuffer_sRGB ----------------------- */
|
||||
|
||||
#ifndef GLX_ARB_framebuffer_sRGB
|
||||
#define GLX_ARB_framebuffer_sRGB 1
|
||||
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
|
||||
|
||||
#define GLXEW_ARB_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_ARB_framebuffer_sRGB)
|
||||
|
||||
#endif /* GLX_ARB_framebuffer_sRGB */
|
||||
|
||||
/* ------------------------ GLX_ARB_get_proc_address ----------------------- */
|
||||
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
@ -388,6 +472,29 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
|
||||
|
||||
#endif /* GLX_ATI_render_texture */
|
||||
|
||||
/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
#define GLX_EXT_fbconfig_packed_float 1
|
||||
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
|
||||
#define GLXEW_EXT_fbconfig_packed_float GLXEW_GET_VAR(__GLXEW_EXT_fbconfig_packed_float)
|
||||
|
||||
#endif /* GLX_EXT_fbconfig_packed_float */
|
||||
|
||||
/* ------------------------ GLX_EXT_framebuffer_sRGB ----------------------- */
|
||||
|
||||
#ifndef GLX_EXT_framebuffer_sRGB
|
||||
#define GLX_EXT_framebuffer_sRGB 1
|
||||
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
||||
|
||||
#define GLXEW_EXT_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_EXT_framebuffer_sRGB)
|
||||
|
||||
#endif /* GLX_EXT_framebuffer_sRGB */
|
||||
|
||||
/* ------------------------- GLX_EXT_import_context ------------------------ */
|
||||
|
||||
#ifndef GLX_EXT_import_context
|
||||
@ -422,6 +529,53 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
|
||||
|
||||
#endif /* GLX_EXT_scene_marker */
|
||||
|
||||
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_EXT_texture_from_pixmap 1
|
||||
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
||||
#define GLX_AUX0_EXT 0x20E2
|
||||
#define GLX_AUX1_EXT 0x20E3
|
||||
#define GLX_AUX2_EXT 0x20E4
|
||||
#define GLX_AUX3_EXT 0x20E5
|
||||
#define GLX_AUX4_EXT 0x20E6
|
||||
#define GLX_AUX5_EXT 0x20E7
|
||||
#define GLX_AUX6_EXT 0x20E8
|
||||
#define GLX_AUX7_EXT 0x20E9
|
||||
#define GLX_AUX8_EXT 0x20EA
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
|
||||
typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display* display, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable drawable, int buffer);
|
||||
|
||||
#define glXBindTexImageEXT GLXEW_GET_FUN(__glewXBindTexImageEXT)
|
||||
#define glXReleaseTexImageEXT GLXEW_GET_FUN(__glewXReleaseTexImageEXT)
|
||||
|
||||
#define GLXEW_EXT_texture_from_pixmap GLXEW_GET_VAR(__GLXEW_EXT_texture_from_pixmap)
|
||||
|
||||
#endif /* GLX_EXT_texture_from_pixmap */
|
||||
|
||||
/* -------------------------- GLX_EXT_visual_info -------------------------- */
|
||||
|
||||
#ifndef GLX_EXT_visual_info
|
||||
@ -540,6 +694,46 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
||||
|
||||
#endif /* GLX_NV_float_buffer */
|
||||
|
||||
/* -------------------------- GLX_NV_present_video ------------------------- */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_NV_present_video 1
|
||||
|
||||
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
|
||||
typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display* dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
typedef unsigned int* ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
|
||||
#define glXBindVideoDeviceNV GLXEW_GET_FUN(__glewXBindVideoDeviceNV)
|
||||
#define glXEnumerateVideoDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoDevicesNV)
|
||||
|
||||
#define GLXEW_NV_present_video GLXEW_GET_VAR(__GLXEW_NV_present_video)
|
||||
|
||||
#endif /* GLX_NV_present_video */
|
||||
|
||||
/* --------------------------- GLX_NV_swap_group --------------------------- */
|
||||
|
||||
#ifndef GLX_NV_swap_group
|
||||
#define GLX_NV_swap_group 1
|
||||
|
||||
typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display* dpy, GLuint group, GLuint barrier);
|
||||
typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display* dpy, GLXDrawable drawable, GLuint group);
|
||||
typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display* dpy, int screen, GLuint *count);
|
||||
typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display* dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display* dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display* dpy, int screen);
|
||||
|
||||
#define glXBindSwapBarrierNV GLXEW_GET_FUN(__glewXBindSwapBarrierNV)
|
||||
#define glXJoinSwapGroupNV GLXEW_GET_FUN(__glewXJoinSwapGroupNV)
|
||||
#define glXQueryFrameCountNV GLXEW_GET_FUN(__glewXQueryFrameCountNV)
|
||||
#define glXQueryMaxSwapGroupsNV GLXEW_GET_FUN(__glewXQueryMaxSwapGroupsNV)
|
||||
#define glXQuerySwapGroupNV GLXEW_GET_FUN(__glewXQuerySwapGroupNV)
|
||||
#define glXResetFrameCountNV GLXEW_GET_FUN(__glewXResetFrameCountNV)
|
||||
|
||||
#define GLXEW_NV_swap_group GLXEW_GET_VAR(__GLXEW_NV_swap_group)
|
||||
|
||||
#endif /* GLX_NV_swap_group */
|
||||
|
||||
/* ----------------------- GLX_NV_vertex_array_range ----------------------- */
|
||||
|
||||
#ifndef GLX_NV_vertex_array_range
|
||||
@ -555,6 +749,40 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#endif /* GLX_NV_vertex_array_range */
|
||||
|
||||
/* -------------------------- GLX_NV_video_output -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
|
||||
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||
|
||||
typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display* dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display* dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display* dpy, GLXPbuffer pbuf);
|
||||
typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
|
||||
#define glXBindVideoImageNV GLXEW_GET_FUN(__glewXBindVideoImageNV)
|
||||
#define glXGetVideoDeviceNV GLXEW_GET_FUN(__glewXGetVideoDeviceNV)
|
||||
#define glXGetVideoInfoNV GLXEW_GET_FUN(__glewXGetVideoInfoNV)
|
||||
#define glXReleaseVideoDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoDeviceNV)
|
||||
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
|
||||
#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
|
||||
|
||||
#define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output)
|
||||
|
||||
#endif /* GLX_NV_video_output */
|
||||
|
||||
/* -------------------------- GLX_OML_swap_method -------------------------- */
|
||||
|
||||
#ifndef GLX_OML_swap_method
|
||||
@ -683,6 +911,73 @@ typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLX
|
||||
|
||||
#endif /* GLX_SGIX_fbconfig */
|
||||
|
||||
/* --------------------------- GLX_SGIX_hyperpipe -------------------------- */
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe
|
||||
#define GLX_SGIX_hyperpipe 1
|
||||
|
||||
#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
|
||||
#define GLX_PIPE_RECT_SGIX 0x00000001
|
||||
#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
|
||||
#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
|
||||
#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
|
||||
#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
|
||||
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
|
||||
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
|
||||
#define GLX_BAD_HYPERPIPE_SGIX 92
|
||||
#define GLX_HYPERPIPE_ID_SGIX 0x8030
|
||||
|
||||
typedef struct {
|
||||
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
|
||||
int networkId;
|
||||
} GLXHyperpipeNetworkSGIX;
|
||||
typedef struct {
|
||||
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
|
||||
int XOrigin;
|
||||
int YOrigin;
|
||||
int maxHeight;
|
||||
int maxWidth;
|
||||
} GLXPipeRectLimits;
|
||||
typedef struct {
|
||||
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
|
||||
int channel;
|
||||
unsigned int participationType;
|
||||
int timeSlice;
|
||||
} GLXHyperpipeConfigSGIX;
|
||||
typedef struct {
|
||||
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
|
||||
int srcXOrigin;
|
||||
int srcYOrigin;
|
||||
int srcWidth;
|
||||
int srcHeight;
|
||||
int destXOrigin;
|
||||
int destYOrigin;
|
||||
int destWidth;
|
||||
int destHeight;
|
||||
} GLXPipeRect;
|
||||
|
||||
typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
|
||||
typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
|
||||
|
||||
#define glXBindHyperpipeSGIX GLXEW_GET_FUN(__glewXBindHyperpipeSGIX)
|
||||
#define glXDestroyHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXDestroyHyperpipeConfigSGIX)
|
||||
#define glXHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXHyperpipeAttribSGIX)
|
||||
#define glXHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXHyperpipeConfigSGIX)
|
||||
#define glXQueryHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeAttribSGIX)
|
||||
#define glXQueryHyperpipeBestAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeBestAttribSGIX)
|
||||
#define glXQueryHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeConfigSGIX)
|
||||
#define glXQueryHyperpipeNetworkSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeNetworkSGIX)
|
||||
|
||||
#define GLXEW_SGIX_hyperpipe GLXEW_GET_VAR(__GLXEW_SGIX_hyperpipe)
|
||||
|
||||
#endif /* GLX_SGIX_hyperpipe */
|
||||
|
||||
/* ---------------------------- GLX_SGIX_pbuffer --------------------------- */
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
@ -911,6 +1206,8 @@ extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
|
||||
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
|
||||
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
|
||||
@ -920,6 +1217,9 @@ extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
||||
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
|
||||
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
|
||||
|
||||
extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
|
||||
|
||||
extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
|
||||
@ -930,9 +1230,26 @@ extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
|
||||
|
||||
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
|
||||
|
||||
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
|
||||
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
|
||||
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
|
||||
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
|
||||
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
|
||||
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
|
||||
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
|
||||
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
|
||||
|
||||
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
|
||||
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
|
||||
|
||||
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
|
||||
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
|
||||
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
|
||||
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
|
||||
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
|
||||
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
|
||||
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
|
||||
@ -948,6 +1265,15 @@ extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
|
||||
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
|
||||
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
|
||||
|
||||
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
|
||||
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
|
||||
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
|
||||
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
|
||||
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
|
||||
|
||||
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
|
||||
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
|
||||
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
|
||||
@ -991,13 +1317,18 @@ GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
|
||||
@ -1006,7 +1337,10 @@ GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
@ -1014,6 +1348,7 @@ GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
|
||||
@ -1041,12 +1376,12 @@ extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
|
||||
#define glxewInit() glxewContextInit(glxewGetContext())
|
||||
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
|
||||
|
||||
#define GLXEW_GET_VAR(x) glxewGetContext()->x
|
||||
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&(glxewGetContext()->x))
|
||||
#define GLXEW_GET_FUN(x) x
|
||||
|
||||
#else /* GLEW_MX */
|
||||
|
||||
#define GLXEW_GET_VAR(x) x
|
||||
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
|
||||
#define GLXEW_GET_FUN(x) x
|
||||
|
||||
extern GLboolean glxewIsSupported (const char* name);
|
||||
|
239
extern/glew/include/GL/wglew.h
vendored
239
extern/glew/include/GL/wglew.h
vendored
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** The OpenGL Extension Wrangler Library
|
||||
** Copyright (C) 2002-2006, Milan Ikits <milan ikits[]ieee org>
|
||||
** Copyright (C) 2002-2006, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002, Lev Povalahev
|
||||
** All rights reserved.
|
||||
**
|
||||
@ -29,6 +29,29 @@
|
||||
** THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __wglew_h__
|
||||
#define __wglew_h__
|
||||
#define __WGLEW_H__
|
||||
@ -118,6 +141,26 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
|
||||
|
||||
#endif /* WGL_ARB_buffer_region */
|
||||
|
||||
/* ------------------------- WGL_ARB_create_context ------------------------ */
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_ARB_create_context 1
|
||||
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
|
||||
|
||||
#define wglCreateContextAttribsARB WGLEW_GET_FUN(__wglewCreateContextAttribsARB)
|
||||
|
||||
#define WGLEW_ARB_create_context WGLEW_GET_VAR(__WGLEW_ARB_create_context)
|
||||
|
||||
#endif /* WGL_ARB_create_context */
|
||||
|
||||
/* ----------------------- WGL_ARB_extensions_string ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
@ -131,11 +174,25 @@ typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
|
||||
#endif /* WGL_ARB_extensions_string */
|
||||
|
||||
/* ------------------------ WGL_ARB_framebuffer_sRGB ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_framebuffer_sRGB
|
||||
#define WGL_ARB_framebuffer_sRGB 1
|
||||
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||
|
||||
#define WGLEW_ARB_framebuffer_sRGB WGLEW_GET_VAR(__WGLEW_ARB_framebuffer_sRGB)
|
||||
|
||||
#endif /* WGL_ARB_framebuffer_sRGB */
|
||||
|
||||
/* ----------------------- WGL_ARB_make_current_read ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (VOID);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
|
||||
@ -386,11 +443,24 @@ typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
|
||||
#endif /* WGL_EXT_extensions_string */
|
||||
|
||||
/* ------------------------ WGL_EXT_framebuffer_sRGB ----------------------- */
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_EXT_framebuffer_sRGB 1
|
||||
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||
|
||||
#define WGLEW_EXT_framebuffer_sRGB WGLEW_GET_VAR(__WGLEW_EXT_framebuffer_sRGB)
|
||||
|
||||
#endif /* WGL_EXT_framebuffer_sRGB */
|
||||
|
||||
/* ----------------------- WGL_EXT_make_current_read ----------------------- */
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (VOID);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
|
||||
@ -509,6 +579,17 @@ typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixel
|
||||
|
||||
#endif /* WGL_EXT_pixel_format */
|
||||
|
||||
/* ------------------- WGL_EXT_pixel_format_packed_float ------------------- */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_EXT_pixel_format_packed_float 1
|
||||
|
||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||
|
||||
#define WGLEW_EXT_pixel_format_packed_float WGLEW_GET_VAR(__WGLEW_EXT_pixel_format_packed_float)
|
||||
|
||||
#endif /* WGL_EXT_pixel_format_packed_float */
|
||||
|
||||
/* -------------------------- WGL_EXT_swap_control ------------------------- */
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
@ -690,6 +771,60 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
||||
|
||||
#endif /* WGL_NV_float_buffer */
|
||||
|
||||
/* -------------------------- WGL_NV_gpu_affinity -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_NV_gpu_affinity 1
|
||||
|
||||
#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||
#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||
|
||||
DECLARE_HANDLE(HGPUNV);
|
||||
typedef struct _GPU_DEVICE {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD Flags;
|
||||
RECT rcVirtualScreen;
|
||||
} GPU_DEVICE, *PGPU_DEVICE;
|
||||
|
||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
|
||||
#define wglCreateAffinityDCNV WGLEW_GET_FUN(__wglewCreateAffinityDCNV)
|
||||
#define wglDeleteDCNV WGLEW_GET_FUN(__wglewDeleteDCNV)
|
||||
#define wglEnumGpuDevicesNV WGLEW_GET_FUN(__wglewEnumGpuDevicesNV)
|
||||
#define wglEnumGpusFromAffinityDCNV WGLEW_GET_FUN(__wglewEnumGpusFromAffinityDCNV)
|
||||
#define wglEnumGpusNV WGLEW_GET_FUN(__wglewEnumGpusNV)
|
||||
|
||||
#define WGLEW_NV_gpu_affinity WGLEW_GET_VAR(__WGLEW_NV_gpu_affinity)
|
||||
|
||||
#endif /* WGL_NV_gpu_affinity */
|
||||
|
||||
/* -------------------------- WGL_NV_present_video ------------------------- */
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NV_present_video 1
|
||||
|
||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
|
||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int* piAttribList);
|
||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV* phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int* piValue);
|
||||
|
||||
#define wglBindVideoDeviceNV WGLEW_GET_FUN(__wglewBindVideoDeviceNV)
|
||||
#define wglEnumerateVideoDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoDevicesNV)
|
||||
#define wglQueryCurrentContextNV WGLEW_GET_FUN(__wglewQueryCurrentContextNV)
|
||||
|
||||
#define WGLEW_NV_present_video WGLEW_GET_VAR(__WGLEW_NV_present_video)
|
||||
|
||||
#endif /* WGL_NV_present_video */
|
||||
|
||||
/* ---------------------- WGL_NV_render_depth_texture ---------------------- */
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
@ -719,6 +854,29 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
||||
|
||||
#endif /* WGL_NV_render_texture_rectangle */
|
||||
|
||||
/* --------------------------- WGL_NV_swap_group --------------------------- */
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#define WGL_NV_swap_group 1
|
||||
|
||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
|
||||
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
|
||||
#define wglJoinSwapGroupNV WGLEW_GET_FUN(__wglewJoinSwapGroupNV)
|
||||
#define wglQueryFrameCountNV WGLEW_GET_FUN(__wglewQueryFrameCountNV)
|
||||
#define wglQueryMaxSwapGroupsNV WGLEW_GET_FUN(__wglewQueryMaxSwapGroupsNV)
|
||||
#define wglQuerySwapGroupNV WGLEW_GET_FUN(__wglewQuerySwapGroupNV)
|
||||
#define wglResetFrameCountNV WGLEW_GET_FUN(__wglewResetFrameCountNV)
|
||||
|
||||
#define WGLEW_NV_swap_group WGLEW_GET_VAR(__WGLEW_NV_swap_group)
|
||||
|
||||
#endif /* WGL_NV_swap_group */
|
||||
|
||||
/* ----------------------- WGL_NV_vertex_array_range ----------------------- */
|
||||
|
||||
#ifndef WGL_NV_vertex_array_range
|
||||
@ -734,6 +892,45 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
|
||||
#endif /* WGL_NV_vertex_array_range */
|
||||
|
||||
/* -------------------------- WGL_NV_video_output -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
#define WGL_NV_video_output 1
|
||||
|
||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||
|
||||
DECLARE_HANDLE(HPVIDEODEV);
|
||||
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV* hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long* pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long* pulCounterPbuffer, BOOL bBlock);
|
||||
|
||||
#define wglBindVideoImageNV WGLEW_GET_FUN(__wglewBindVideoImageNV)
|
||||
#define wglGetVideoDeviceNV WGLEW_GET_FUN(__wglewGetVideoDeviceNV)
|
||||
#define wglGetVideoInfoNV WGLEW_GET_FUN(__wglewGetVideoInfoNV)
|
||||
#define wglReleaseVideoDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoDeviceNV)
|
||||
#define wglReleaseVideoImageNV WGLEW_GET_FUN(__wglewReleaseVideoImageNV)
|
||||
#define wglSendPbufferToVideoNV WGLEW_GET_FUN(__wglewSendPbufferToVideoNV)
|
||||
|
||||
#define WGLEW_NV_video_output WGLEW_GET_VAR(__WGLEW_NV_video_output)
|
||||
|
||||
#endif /* WGL_NV_video_output */
|
||||
|
||||
/* -------------------------- WGL_OML_sync_control ------------------------- */
|
||||
|
||||
#ifndef WGL_OML_sync_control
|
||||
@ -777,6 +974,8 @@ WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
|
||||
@ -855,9 +1054,33 @@ WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
||||
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
|
||||
WGLEW_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
|
||||
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
|
||||
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
|
||||
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
|
||||
WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
|
||||
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
|
||||
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
|
||||
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
|
||||
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
|
||||
@ -867,7 +1090,9 @@ WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
@ -879,10 +1104,12 @@ WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
|
||||
@ -891,9 +1118,13 @@ WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
|
||||
|
||||
#ifdef GLEW_MX
|
||||
@ -911,12 +1142,12 @@ GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
|
||||
#define wglewInit() wglewContextInit(wglewGetContext())
|
||||
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
|
||||
|
||||
#define WGLEW_GET_VAR(x) wglewGetContext()->x
|
||||
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&(wglewGetContext()->x))
|
||||
#define WGLEW_GET_FUN(x) wglewGetContext()->x
|
||||
|
||||
#else /* GLEW_MX */
|
||||
|
||||
#define WGLEW_GET_VAR(x) x
|
||||
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
|
||||
#define WGLEW_GET_FUN(x) x
|
||||
|
||||
GLEWAPI GLboolean wglewIsSupported (const char* name);
|
||||
|
3520
extern/glew/src/glew.c
vendored
3520
extern/glew/src/glew.c
vendored
File diff suppressed because it is too large
Load Diff
@ -414,7 +414,7 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
|
||||
/**
|
||||
* Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
|
||||
*/
|
||||
extern void GHOST_setAcceptDragOperation(GHOST_SystemHandle systemhandle, GHOST_TInt8 canAccept);
|
||||
extern void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -369,21 +369,6 @@ public:
|
||||
virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
|
||||
|
||||
|
||||
/***************************************************************************************
|
||||
** Drag'n'drop operations
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
|
||||
*/
|
||||
virtual void setAcceptDragOperation(bool canAccept) = 0;
|
||||
|
||||
/**
|
||||
* Returns acceptance of the dropped object
|
||||
* Usually called by the "object dropped" event handling function
|
||||
*/
|
||||
virtual bool canAcceptDragOperation() const = 0;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Initialize the system.
|
||||
|
@ -148,6 +148,17 @@ public:
|
||||
*/
|
||||
virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0;
|
||||
|
||||
/**
|
||||
* Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
|
||||
*/
|
||||
virtual void setAcceptDragOperation(bool canAccept) = 0;
|
||||
|
||||
/**
|
||||
* Returns acceptance of the dropped object
|
||||
* Usually called by the "object dropped" event handling function
|
||||
*/
|
||||
virtual bool canAcceptDragOperation() const = 0;
|
||||
|
||||
/**
|
||||
* Returns the state of the window (normal, minimized, maximized).
|
||||
* @return The state of the window.
|
||||
|
@ -404,11 +404,11 @@ GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
|
||||
}
|
||||
|
||||
|
||||
void GHOST_setAcceptDragOperation(GHOST_SystemHandle systemhandle, GHOST_TInt8 canAccept)
|
||||
void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept)
|
||||
{
|
||||
GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
|
||||
GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
|
||||
|
||||
system->setAcceptDragOperation(canAccept);
|
||||
window->setAcceptDragOperation(canAccept);
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,11 +155,11 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(GHOST_TUns8 d
|
||||
NULL);*/
|
||||
|
||||
#ifdef GHOST_DEBUG
|
||||
printf("GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): switching to:\n");
|
||||
/* printf("GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): switching to:\n");
|
||||
printf(" setting.xPixels=%d\n", getValue(displayModeValues, kCGDisplayWidth));
|
||||
printf(" setting.yPixels=%d\n", getValue(displayModeValues, kCGDisplayHeight));
|
||||
printf(" setting.bpp=%d\n", getValue(displayModeValues, kCGDisplayBitsPerPixel));
|
||||
printf(" setting.frequency=%d\n", getValue(displayModeValues, kCGDisplayRefreshRate));
|
||||
printf(" setting.frequency=%d\n", getValue(displayModeValues, kCGDisplayRefreshRate)); */
|
||||
#endif // GHOST_DEBUG
|
||||
|
||||
//CGDisplayErr err = ::CGDisplaySwitchToMode(m_displayIDs[display], displayModeValues);
|
||||
|
@ -50,8 +50,7 @@
|
||||
* <li> Outside of the normal sequence, dropped data can be sent (GHOST_kEventDraggingDropOnIcon). This can happen when the user drops an object
|
||||
* on the application icon. (Also used in OSX to pass the filename of the document the user doubled-clicked in the finder)
|
||||
*
|
||||
* <br><br>Note that the event handler is responsible for freeing the received data.
|
||||
* <br>And the mouse positions are given in Blender coordinates (y=0 at bottom)
|
||||
* <br><br>Note that the mouse positions are given in Blender coordinates (y=0 at bottom)
|
||||
*
|
||||
* <br>Currently supported object types :
|
||||
* <li>UTF-8 string
|
||||
@ -81,6 +80,38 @@ public:
|
||||
m_dragnDropEventData.data = data;
|
||||
m_data = &m_dragnDropEventData;
|
||||
}
|
||||
|
||||
~GHOST_EventDragnDrop()
|
||||
{
|
||||
//Free the dropped object data
|
||||
if (m_dragnDropEventData.data == NULL)
|
||||
return;
|
||||
|
||||
switch (m_dragnDropEventData.dataType) {
|
||||
case GHOST_kDragnDropTypeBitmap:
|
||||
//Not currently implemented
|
||||
break;
|
||||
case GHOST_kDragnDropTypeFilenames:
|
||||
{
|
||||
GHOST_TStringArray *strArray = (GHOST_TStringArray*)m_dragnDropEventData.data;
|
||||
int i;
|
||||
|
||||
for (i=0;i<strArray->count;i++)
|
||||
free(strArray->strings[i]);
|
||||
|
||||
free(strArray);
|
||||
}
|
||||
break;
|
||||
case GHOST_kDragnDropTypeString:
|
||||
free(m_dragnDropEventData.data);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
/** The x,y-coordinates of the cursor position. */
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "GHOST_EventPrinter.h"
|
||||
#include <iostream>
|
||||
#include "GHOST_EventKey.h"
|
||||
#include "GHOST_EventDragnDrop.h"
|
||||
#include "GHOST_Debug.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -97,7 +98,77 @@ bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
|
||||
std::cout << "GHOST_kEventKeyDown, key: " << str.Ptr();
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_kEventDraggingEntered:
|
||||
{
|
||||
GHOST_TEventDragnDropData* dragnDropData = (GHOST_TEventDragnDropData*)((GHOST_IEvent*)event)->getData();
|
||||
std::cout << "GHOST_kEventDraggingEntered, dragged object type : " << dragnDropData->dataType;
|
||||
std::cout << " mouse at x=" << dragnDropData->x << " y=" << dragnDropData->y;
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_kEventDraggingUpdated:
|
||||
{
|
||||
GHOST_TEventDragnDropData* dragnDropData = (GHOST_TEventDragnDropData*)((GHOST_IEvent*)event)->getData();
|
||||
std::cout << "GHOST_kEventDraggingUpdated, dragged object type : " << dragnDropData->dataType;
|
||||
std::cout << " mouse at x=" << dragnDropData->x << " y=" << dragnDropData->y;
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_kEventDraggingExited:
|
||||
{
|
||||
GHOST_TEventDragnDropData* dragnDropData = (GHOST_TEventDragnDropData*)((GHOST_IEvent*)event)->getData();
|
||||
std::cout << "GHOST_kEventDraggingExited, dragged object type : " << dragnDropData->dataType;
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_kEventDraggingDropDone:
|
||||
{
|
||||
GHOST_TEventDragnDropData* dragnDropData = (GHOST_TEventDragnDropData*)((GHOST_IEvent*)event)->getData();
|
||||
std::cout << "GHOST_kEventDraggingDropDone, dragged object type : " << dragnDropData->dataType;
|
||||
std::cout << " mouse at x=" << dragnDropData->x << " y=" << dragnDropData->y;
|
||||
switch (dragnDropData->dataType) {
|
||||
case GHOST_kDragnDropTypeString:
|
||||
std::cout << " string received = " << (char*)dragnDropData->data;
|
||||
break;
|
||||
case GHOST_kDragnDropTypeFilenames:
|
||||
{
|
||||
GHOST_TStringArray *strArray = (GHOST_TStringArray*)dragnDropData->data;
|
||||
int i;
|
||||
std::cout << "\nReceived " << strArray->count << " filenames";
|
||||
for (i=0;i<strArray->count;i++)
|
||||
std::cout << " Filename #" << i << ": " << strArray->strings[i];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_kEventDraggingDropOnIcon:
|
||||
{
|
||||
GHOST_TEventDragnDropData* dragnDropData = (GHOST_TEventDragnDropData*)((GHOST_IEvent*)event)->getData();
|
||||
std::cout << "GHOST_kEventDraggingDropOnIcon, dragged object type : " << dragnDropData->dataType;
|
||||
switch (dragnDropData->dataType) {
|
||||
case GHOST_kDragnDropTypeString:
|
||||
std::cout << " string received = " << (char*)dragnDropData->data;
|
||||
break;
|
||||
case GHOST_kDragnDropTypeFilenames:
|
||||
{
|
||||
GHOST_TStringArray *strArray = (GHOST_TStringArray*)dragnDropData->data;
|
||||
int i;
|
||||
std::cout << "\nReceived " << strArray->count << " filenames";
|
||||
for (i=0;i<strArray->count;i++)
|
||||
std::cout << " Filename #" << i << ": " << strArray->strings[i];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_kEventQuit:
|
||||
std::cout << "GHOST_kEventQuit";
|
||||
break;
|
||||
|
@ -54,7 +54,6 @@
|
||||
GHOST_System::GHOST_System()
|
||||
: m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0), m_ndofManager(0)
|
||||
{
|
||||
m_canAcceptDragOperation = false;
|
||||
}
|
||||
|
||||
|
||||
@ -276,16 +275,6 @@ GHOST_TSuccess GHOST_System::getButtonState(GHOST_TButtonMask mask, bool& isDown
|
||||
return success;
|
||||
}
|
||||
|
||||
void GHOST_System::setAcceptDragOperation(bool canAccept)
|
||||
{
|
||||
m_canAcceptDragOperation = canAccept;
|
||||
}
|
||||
|
||||
bool GHOST_System::canAcceptDragOperation() const
|
||||
{
|
||||
return m_canAcceptDragOperation;
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_System::init()
|
||||
{
|
||||
m_timerManager = new GHOST_TimerManager ();
|
||||
|
@ -232,21 +232,6 @@ public:
|
||||
*/
|
||||
virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const;
|
||||
|
||||
/***************************************************************************************
|
||||
** Drag'n'drop operations
|
||||
***************************************************************************************/
|
||||
|
||||
/**
|
||||
* Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
|
||||
*/
|
||||
virtual void setAcceptDragOperation(bool canAccept);
|
||||
|
||||
/**
|
||||
* Returns acceptance of the dropped object
|
||||
* Usually called by the "object dropped" event handling function
|
||||
*/
|
||||
virtual bool canAcceptDragOperation() const;
|
||||
|
||||
/***************************************************************************************
|
||||
** Other (internal) functionality.
|
||||
***************************************************************************************/
|
||||
@ -348,9 +333,6 @@ protected:
|
||||
/** The N-degree of freedom device manager */
|
||||
GHOST_NDOFManager* m_ndofManager;
|
||||
|
||||
/** The acceptance of the "drop candidate" of the current drag'n'drop operation */
|
||||
bool m_canAcceptDragOperation;
|
||||
|
||||
/** Prints all the events. */
|
||||
#ifdef GHOST_DEBUG
|
||||
GHOST_EventPrinter* m_eventPrinter;
|
||||
|
@ -246,6 +246,9 @@ protected:
|
||||
/** Start time at initialization. */
|
||||
GHOST_TUns64 m_start_time;
|
||||
|
||||
/** Event has been processed directly by Cocoa and has sent a ghost event to be dispatched */
|
||||
bool m_outsideLoopEventProcessed;
|
||||
|
||||
/** Mouse buttons state */
|
||||
GHOST_TUns32 m_pressedMouseButtons;
|
||||
|
||||
|
@ -449,12 +449,12 @@ GHOST_SystemCocoa::GHOST_SystemCocoa()
|
||||
m_pressedMouseButtons =0;
|
||||
m_cursorDelta_x=0;
|
||||
m_cursorDelta_y=0;
|
||||
m_outsideLoopEventProcessed = false;
|
||||
m_displayManager = new GHOST_DisplayManagerCocoa ();
|
||||
GHOST_ASSERT(m_displayManager, "GHOST_SystemCocoa::GHOST_SystemCocoa(): m_displayManager==0\n");
|
||||
m_displayManager->initialize();
|
||||
|
||||
//NSEvent timeStamp is given in system uptime, state start date is boot time
|
||||
//FIXME : replace by Cocoa equivalent
|
||||
int mib[2];
|
||||
struct timeval boottime;
|
||||
size_t len;
|
||||
@ -560,17 +560,13 @@ GHOST_TSuccess GHOST_SystemCocoa::init()
|
||||
GHOST_TUns64 GHOST_SystemCocoa::getMilliSeconds() const
|
||||
{
|
||||
//Cocoa equivalent exists in 10.6 ([[NSProcessInfo processInfo] systemUptime])
|
||||
int mib[2];
|
||||
struct timeval boottime;
|
||||
size_t len;
|
||||
struct timeval currentTime;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_BOOTTIME;
|
||||
len = sizeof(struct timeval);
|
||||
gettimeofday(¤tTime, NULL);
|
||||
|
||||
sysctl(mib, 2, &boottime, &len, NULL, 0);
|
||||
|
||||
return ((boottime.tv_sec*1000)+(boottime.tv_usec/1000));
|
||||
//Return timestamp of system uptime
|
||||
|
||||
return ((currentTime.tv_sec*1000)+(currentTime.tv_usec/1000)-m_start_time);
|
||||
}
|
||||
|
||||
|
||||
@ -744,6 +740,8 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
|
||||
bool anyProcessed = false;
|
||||
NSEvent *event;
|
||||
|
||||
m_outsideLoopEventProcessed = false;
|
||||
|
||||
// SetMouseCoalescingEnabled(false, NULL);
|
||||
//TODO : implement timer ??
|
||||
|
||||
@ -842,7 +840,7 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
|
||||
|
||||
|
||||
|
||||
return anyProcessed;
|
||||
return anyProcessed || m_outsideLoopEventProcessed;
|
||||
}
|
||||
|
||||
//Note: called from NSWindow delegate
|
||||
@ -879,6 +877,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
|
||||
return GHOST_kFailure;
|
||||
break;
|
||||
}
|
||||
|
||||
m_outsideLoopEventProcessed = true;
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
@ -892,10 +892,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
switch(eventType)
|
||||
{
|
||||
case GHOST_kEventDraggingEntered:
|
||||
setAcceptDragOperation(FALSE); //Drag operation needs to be accepted explicitely by the event manager
|
||||
case GHOST_kEventDraggingUpdated:
|
||||
case GHOST_kEventDraggingExited:
|
||||
pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),GHOST_kEventDraggingEntered,draggedObjectType,window,mouseX,mouseY,NULL));
|
||||
pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),eventType,draggedObjectType,window,mouseX,mouseY,NULL));
|
||||
break;
|
||||
|
||||
case GHOST_kEventDraggingDropDone:
|
||||
@ -914,6 +913,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
switch (draggedObjectType) {
|
||||
case GHOST_kDragnDropTypeBitmap:
|
||||
//TODO: implement bitmap conversion to a blender friendly format
|
||||
return GHOST_kFailure;
|
||||
break;
|
||||
case GHOST_kDragnDropTypeFilenames:
|
||||
droppedArray = (NSArray*)data;
|
||||
@ -930,7 +930,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
{
|
||||
droppedStr = [droppedArray objectAtIndex:i];
|
||||
|
||||
pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
|
||||
temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1);
|
||||
|
||||
if (!temp_buff) {
|
||||
@ -938,7 +938,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
break;
|
||||
}
|
||||
|
||||
strncpy((char*)temp_buff, [droppedStr UTF8String], pastedTextSize);
|
||||
strncpy((char*)temp_buff, [droppedStr cStringUsingEncoding:NSISOLatin1StringEncoding], pastedTextSize);
|
||||
temp_buff[pastedTextSize] = '\0';
|
||||
|
||||
strArray->strings[i] = temp_buff;
|
||||
@ -949,7 +949,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
|
||||
case GHOST_kDragnDropTypeString:
|
||||
droppedStr = (NSString*)data;
|
||||
pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
|
||||
|
||||
temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1);
|
||||
|
||||
@ -957,7 +957,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
strncpy((char*)temp_buff, [droppedStr UTF8String], pastedTextSize);
|
||||
strncpy((char*)temp_buff, [droppedStr cStringUsingEncoding:NSISOLatin1StringEncoding], pastedTextSize);
|
||||
|
||||
temp_buff[pastedTextSize] = '\0';
|
||||
|
||||
@ -968,12 +968,13 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
return GHOST_kFailure;
|
||||
break;
|
||||
}
|
||||
pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),GHOST_kEventDraggingEntered,draggedObjectType,window,mouseX,mouseY,eventData));
|
||||
pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),eventType,draggedObjectType,window,mouseX,mouseY,eventData));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
m_outsideLoopEventProcessed = true;
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
@ -1006,6 +1007,7 @@ GHOST_TUns8 GHOST_SystemCocoa::handleQuitRequest()
|
||||
}
|
||||
else {
|
||||
pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventQuit, NULL) );
|
||||
m_outsideLoopEventProcessed = true;
|
||||
return GHOST_kExitNow;
|
||||
}
|
||||
|
||||
@ -1078,7 +1080,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
case NSLeftMouseDown:
|
||||
case NSRightMouseDown:
|
||||
case NSOtherMouseDown:
|
||||
pushEvent(new GHOST_EventButton([event timestamp], GHOST_kEventButtonDown, window, convertButton([event buttonNumber])));
|
||||
pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonDown, window, convertButton([event buttonNumber])));
|
||||
//Handle tablet events combined with mouse events
|
||||
switch ([event subtype]) {
|
||||
case NX_SUBTYPE_TABLET_POINT:
|
||||
@ -1096,7 +1098,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
case NSLeftMouseUp:
|
||||
case NSRightMouseUp:
|
||||
case NSOtherMouseUp:
|
||||
pushEvent(new GHOST_EventButton([event timestamp], GHOST_kEventButtonUp, window, convertButton([event buttonNumber])));
|
||||
pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonUp, window, convertButton([event buttonNumber])));
|
||||
//Handle tablet events combined with mouse events
|
||||
switch ([event subtype]) {
|
||||
case NX_SUBTYPE_TABLET_POINT:
|
||||
@ -1140,7 +1142,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
y_accum += -[event deltaY]; //Strange Apple implementation (inverted coordinates for the deltaY) ...
|
||||
window->setCursorGrabAccum(x_accum, y_accum);
|
||||
|
||||
pushEvent(new GHOST_EventCursor([event timestamp], GHOST_kEventCursorMove, window, x_warp+x_accum, y_warp+y_accum));
|
||||
pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x_warp+x_accum, y_warp+y_accum));
|
||||
}
|
||||
break;
|
||||
case GHOST_kGrabWrap: //Wrap cursor at area/window boundaries
|
||||
@ -1184,14 +1186,14 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
|
||||
//Post event
|
||||
window->getCursorGrabInitPos(x_cur, y_cur);
|
||||
pushEvent(new GHOST_EventCursor([event timestamp], GHOST_kEventCursorMove, window, x_cur + x_accum, y_cur + y_accum));
|
||||
pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x_cur + x_accum, y_cur + y_accum));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
//Normal cursor operation: send mouse position in window
|
||||
NSPoint mousePos = [event locationInWindow];
|
||||
pushEvent(new GHOST_EventCursor([event timestamp], GHOST_kEventCursorMove, window, mousePos.x, mousePos.y));
|
||||
pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, mousePos.x, mousePos.y));
|
||||
m_cursorDelta_x=0;
|
||||
m_cursorDelta_y=0; //Mouse motion occured between two cursor warps, so we can reset the delta counter
|
||||
}
|
||||
@ -1207,7 +1209,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
if (deltaF == 0.0) break; //discard trackpad delta=0 events
|
||||
|
||||
delta = deltaF > 0.0 ? 1 : -1;
|
||||
pushEvent(new GHOST_EventWheel([event timestamp], window, delta));
|
||||
pushEvent(new GHOST_EventWheel([event timestamp]*1000, window, delta));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1266,26 +1268,26 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
|
||||
break; //Cmd-Q is directly handled by Cocoa
|
||||
|
||||
if ([event type] == NSKeyDown) {
|
||||
pushEvent( new GHOST_EventKey([event timestamp], GHOST_kEventKeyDown, window, keyCode, ascii) );
|
||||
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyDown, window, keyCode, ascii) );
|
||||
//printf("\nKey pressed keyCode=%u ascii=%i %c",keyCode,ascii,ascii);
|
||||
} else {
|
||||
pushEvent( new GHOST_EventKey([event timestamp], GHOST_kEventKeyUp, window, keyCode, ascii) );
|
||||
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, ascii) );
|
||||
}
|
||||
break;
|
||||
|
||||
case NSFlagsChanged:
|
||||
modifiers = [event modifierFlags];
|
||||
if ((modifiers & NSShiftKeyMask) != (m_modifierMask & NSShiftKeyMask)) {
|
||||
pushEvent( new GHOST_EventKey([event timestamp], (modifiers & NSShiftKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftShift) );
|
||||
pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSShiftKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftShift) );
|
||||
}
|
||||
if ((modifiers & NSControlKeyMask) != (m_modifierMask & NSControlKeyMask)) {
|
||||
pushEvent( new GHOST_EventKey([event timestamp], (modifiers & NSControlKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftControl) );
|
||||
pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSControlKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftControl) );
|
||||
}
|
||||
if ((modifiers & NSAlternateKeyMask) != (m_modifierMask & NSAlternateKeyMask)) {
|
||||
pushEvent( new GHOST_EventKey([event timestamp], (modifiers & NSAlternateKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftAlt) );
|
||||
pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSAlternateKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftAlt) );
|
||||
}
|
||||
if ((modifiers & NSCommandKeyMask) != (m_modifierMask & NSCommandKeyMask)) {
|
||||
pushEvent( new GHOST_EventKey([event timestamp], (modifiers & NSCommandKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyCommand) );
|
||||
pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSCommandKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyCommand) );
|
||||
}
|
||||
|
||||
m_modifierMask = modifiers;
|
||||
@ -1318,7 +1320,7 @@ GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
|
||||
}
|
||||
|
||||
NSArray *supportedTypes =
|
||||
[NSArray arrayWithObjects: @"public.utf8-plain-text", nil];
|
||||
[NSArray arrayWithObjects: NSStringPboardType, nil];
|
||||
|
||||
NSString *bestType = [[NSPasteboard generalPasteboard]
|
||||
availableTypeFromArray:supportedTypes];
|
||||
@ -1328,14 +1330,14 @@ GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NSString * textPasted = [pasteBoard stringForType:@"public.utf8-plain-text"];
|
||||
NSString * textPasted = [pasteBoard stringForType:NSStringPboardType];
|
||||
|
||||
if (textPasted == nil) {
|
||||
[pool drain];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pastedTextSize = [textPasted lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
pastedTextSize = [textPasted lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
|
||||
|
||||
temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1);
|
||||
|
||||
@ -1344,7 +1346,7 @@ GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
strncpy((char*)temp_buff, [textPasted UTF8String], pastedTextSize);
|
||||
strncpy((char*)temp_buff, [textPasted cStringUsingEncoding:NSISOLatin1StringEncoding], pastedTextSize);
|
||||
|
||||
temp_buff[pastedTextSize] = '\0';
|
||||
|
||||
@ -1372,13 +1374,13 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
|
||||
return;
|
||||
}
|
||||
|
||||
NSArray *supportedTypes = [NSArray arrayWithObject:@"public.utf8-plain-text"];
|
||||
NSArray *supportedTypes = [NSArray arrayWithObject:NSStringPboardType];
|
||||
|
||||
[pasteBoard declareTypes:supportedTypes owner:nil];
|
||||
|
||||
textToCopy = [NSString stringWithUTF8String:buffer];
|
||||
textToCopy = [NSString stringWithCString:buffer encoding:NSISOLatin1StringEncoding];
|
||||
|
||||
[pasteBoard setString:textToCopy forType:@"public.utf8-plain-text"];
|
||||
[pasteBoard setString:textToCopy forType:NSStringPboardType];
|
||||
|
||||
[pool drain];
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ GHOST_Window::GHOST_Window(
|
||||
m_stereoVisual(stereoVisual)
|
||||
{
|
||||
m_isUnsavedChanges = false;
|
||||
m_canAcceptDragOperation = false;
|
||||
|
||||
m_cursorGrabAccumPos[0] = 0;
|
||||
m_cursorGrabAccumPos[1] = 0;
|
||||
@ -154,6 +155,15 @@ GHOST_TSuccess GHOST_Window::setCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUn
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_Window::setAcceptDragOperation(bool canAccept)
|
||||
{
|
||||
m_canAcceptDragOperation = canAccept;
|
||||
}
|
||||
|
||||
bool GHOST_Window::canAcceptDragOperation() const
|
||||
{
|
||||
return m_canAcceptDragOperation;
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_Window::setModifiedState(bool isUnsavedChanges)
|
||||
{
|
||||
|
@ -183,6 +183,17 @@ public:
|
||||
*/
|
||||
virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect& bounds);
|
||||
|
||||
/**
|
||||
* Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
|
||||
*/
|
||||
virtual void setAcceptDragOperation(bool canAccept);
|
||||
|
||||
/**
|
||||
* Returns acceptance of the dropped object
|
||||
* Usually called by the "object dropped" event handling function
|
||||
*/
|
||||
virtual bool canAcceptDragOperation() const;
|
||||
|
||||
/**
|
||||
* Sets the window "modified" status, indicating unsaved changes
|
||||
* @param isUnsavedChanges Unsaved changes or not
|
||||
@ -294,6 +305,9 @@ protected:
|
||||
/** The current shape of the cursor */
|
||||
GHOST_TStandardCursor m_cursorShape;
|
||||
|
||||
/** The acceptance of the "drop candidate" of the current drag'n'drop operation */
|
||||
bool m_canAcceptDragOperation;
|
||||
|
||||
/** Modified state : are there unsaved changes */
|
||||
bool m_isUnsavedChanges;
|
||||
|
||||
|
@ -153,10 +153,15 @@ extern "C" {
|
||||
else if ([[draggingPBoard types] containsObject:NSStringPboardType]) m_draggedObjectType = GHOST_kDragnDropTypeString;
|
||||
else return NSDragOperationNone;
|
||||
|
||||
associatedWindow->setAcceptDragOperation(FALSE); //Drag operation needs to be accepted explicitly by the event manager
|
||||
systemCocoa->handleDraggingEvent(GHOST_kEventDraggingEntered, m_draggedObjectType, associatedWindow, mouseLocation.x, mouseLocation.y, nil);
|
||||
return NSDragOperationCopy;
|
||||
}
|
||||
|
||||
- (BOOL)wantsPeriodicDraggingUpdates
|
||||
{
|
||||
return NO; //No need to overflow blender event queue. Events shall be sent only on changes
|
||||
}
|
||||
|
||||
- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
|
||||
{
|
||||
@ -174,7 +179,7 @@ extern "C" {
|
||||
|
||||
- (BOOL)prepareForDragOperation:(id < NSDraggingInfo >)sender
|
||||
{
|
||||
if (systemCocoa->canAcceptDragOperation())
|
||||
if (associatedWindow->canAcceptDragOperation())
|
||||
return YES;
|
||||
else
|
||||
return NO;
|
||||
@ -194,7 +199,7 @@ extern "C" {
|
||||
data = [draggingPBoard propertyListForType:NSFilenamesPboardType];
|
||||
break;
|
||||
case GHOST_kDragnDropTypeString:
|
||||
data = [draggingPBoard stringForType:@"public.utf8-plain-text"];
|
||||
data = [draggingPBoard stringForType:NSStringPboardType];
|
||||
break;
|
||||
default:
|
||||
return NO;
|
||||
|
@ -364,6 +364,10 @@
|
||||
RelativePath="..\..\intern\GHOST_EventCursor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\intern\GHOST_EventDragnDrop.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\intern\GHOST_EventKey.h"
|
||||
>
|
||||
|
@ -387,6 +387,10 @@
|
||||
RelativePath="..\..\..\source\blender\python\generic\Geometry.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\python\generic\IDProp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\python\generic\Mathutils.c"
|
||||
>
|
||||
|
@ -169,7 +169,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386
"
|
||||
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib OpenCOLLADABaseUtils.lib OpenCOLLADAFramework.lib OpenCOLLADAStreamWriter.lib OpenCOLLADASaxFrameworkLoader.lib pcre.lib UTF.lib GeneratedSaxParser.lib MathMLSolver.lib xml2.lib"
|
||||
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib OpenCOLLADABaseUtils_d.lib OpenCOLLADAFramework_d.lib OpenCOLLADAStreamWriter_d.lib OpenCOLLADASaxFrameworkLoader_d.lib pcre_d.lib UTF_d.lib GeneratedSaxParser_d.lib MathMLSolver_d.lib xml2_d.lib"
|
||||
ShowProgress="0"
|
||||
OutputFile="..\..\..\install\msvc_9d\blender.exe"
|
||||
LinkIncremental="2"
|
||||
|
@ -479,10 +479,6 @@
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\arithb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\BLI_bfile.c"
|
||||
>
|
||||
@ -571,6 +567,34 @@
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\listbase.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_base.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_color.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_geom.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_matrix.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_rotation.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_vector.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\math_vector_inline.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\intern\noise.c"
|
||||
>
|
||||
@ -620,10 +644,6 @@
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_arithb.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_bfile.h"
|
||||
>
|
||||
@ -696,6 +716,34 @@
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_linklist.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math_base.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math_color.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math_geom.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math_matrix.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math_rotation.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_math_vector.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\blenlib\BLI_memarena.h"
|
||||
>
|
||||
|
@ -695,6 +695,10 @@
|
||||
RelativePath="..\..\..\source\blender\editors\space_node\drawnode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\editors\space_node\node_buttons.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\source\blender\editors\space_node\node_draw.c"
|
||||
>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@ -119,7 +119,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,USE_SUMO_SOLID"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@ -195,7 +195,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@ -270,7 +270,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,USE_SUMO_SOLID"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
@ -346,7 +346,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
PreprocessorDefinitions="WIN32,_LIB,_DEBUG"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@ -421,7 +421,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\source\blender;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesrna;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\ode;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\source\gameengine\rasterizer\ras_openglrasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\gameengine\soundsystem\snd_blenderwavecache;..\..\..\source\sumo\include;..\..\..\source\sumo\Fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin"
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,USE_SUMO_SOLID"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
|
@ -43,7 +43,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
@ -119,7 +119,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG;USE_SUMO_SOLID"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@ -194,7 +194,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="JANCODEPANCO;WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG;USE_SUMO_SOLID;WITH_GLEXT"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@ -271,7 +271,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID;WITH_GLEXT"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@ -347,7 +347,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="JANCODEPANCO;WIN32;_LIB;EXP_PYTHON_EMBEDDING;_DEBUG;USE_SUMO_SOLID;WITH_GLEXT"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@ -423,7 +423,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\build\msvc_9\intern\moto\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\solid\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\sdl\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\python\generic;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\blenkernel;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\physics;..\..\..\source\gameengine\rasterizer;..\..\..\source\gameengine\network;..\..\..\source\gameengine\Converter;..\..\..\source\gameengine\gamelogic;..\..\..\source\gameengine\scenegraph;..\..\..\source\gameengine\expressions;..\..\..\source\gameengine\physics\sumo;..\..\..\source\gameengine\physics\dummy;..\..\..\source\gameengine\physics\BlOde;..\..\..\source\gameengine\ketsji\kxnetwork;..\..\..\source\gameengine\physics\common;..\..\..\source\gameengine\physics\sumo\include;..\..\..\source\gameengine\physics\common\dummy;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\physics\sumo\fuzzics\include;..\..\..\source\sumo\include;..\..\..\source\sumo\fuzzics\include;..\..\..\source\gameengine\physics\bullet;..\..\..\source\blender\python\api2_2x;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;USE_SUMO_SOLID;WITH_GLEXT"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
|
@ -285,7 +285,7 @@ def write_pov(filename, scene=None, info_callback = None):
|
||||
for ob in sel:
|
||||
ob_num+= 1
|
||||
|
||||
if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META'):
|
||||
if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META', 'ARMATURE'):
|
||||
continue
|
||||
|
||||
me = ob.data
|
||||
@ -722,26 +722,26 @@ class PovrayRender(bpy.types.RenderEngine):
|
||||
def _export(self, scene):
|
||||
import tempfile
|
||||
|
||||
self.temp_file_in = tempfile.mktemp(suffix='.pov')
|
||||
self.temp_file_out = tempfile.mktemp(suffix='.tga')
|
||||
self.temp_file_ini = tempfile.mktemp(suffix='.ini')
|
||||
self._temp_file_in = tempfile.mktemp(suffix='.pov')
|
||||
self._temp_file_out = tempfile.mktemp(suffix='.tga')
|
||||
self._temp_file_ini = tempfile.mktemp(suffix='.ini')
|
||||
'''
|
||||
self.temp_file_in = '/test.pov'
|
||||
self.temp_file_out = '/test.tga'
|
||||
self.temp_file_ini = '/test.ini'
|
||||
self._temp_file_in = '/test.pov'
|
||||
self._temp_file_out = '/test.tga'
|
||||
self._temp_file_ini = '/test.ini'
|
||||
'''
|
||||
|
||||
def info_callback(txt):
|
||||
self.update_stats("", "POVRAY: " + txt)
|
||||
|
||||
write_pov(self.temp_file_in, scene, info_callback)
|
||||
write_pov(self._temp_file_in, scene, info_callback)
|
||||
|
||||
def _render(self):
|
||||
|
||||
try: os.remove(self.temp_file_out) # so as not to load the old file
|
||||
try: os.remove(self._temp_file_out) # so as not to load the old file
|
||||
except: pass
|
||||
|
||||
write_pov_ini(self.temp_file_ini, self.temp_file_in, self.temp_file_out)
|
||||
write_pov_ini(self._temp_file_ini, self._temp_file_in, self._temp_file_out)
|
||||
|
||||
print ("***-STARTING-***")
|
||||
|
||||
@ -757,15 +757,15 @@ class PovrayRender(bpy.types.RenderEngine):
|
||||
pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine'
|
||||
|
||||
if 1:
|
||||
self.process = subprocess.Popen([pov_binary, self.temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
else:
|
||||
# This works too but means we have to wait until its done
|
||||
os.system('%s %s' % (pov_binary, self.temp_file_ini))
|
||||
os.system('%s %s' % (pov_binary, self._temp_file_ini))
|
||||
|
||||
print ("***-DONE-***")
|
||||
|
||||
def _cleanup(self):
|
||||
for f in (self.temp_file_in, self.temp_file_ini, self.temp_file_out):
|
||||
for f in (self._temp_file_in, self._temp_file_ini, self._temp_file_out):
|
||||
try: os.remove(f)
|
||||
except: pass
|
||||
|
||||
@ -785,19 +785,19 @@ class PovrayRender(bpy.types.RenderEngine):
|
||||
y= int(r.resolution_y*r.resolution_percentage*0.01)
|
||||
|
||||
# Wait for the file to be created
|
||||
while not os.path.exists(self.temp_file_out):
|
||||
while not os.path.exists(self._temp_file_out):
|
||||
if self.test_break():
|
||||
try: self.process.terminate()
|
||||
try: self._process.terminate()
|
||||
except: pass
|
||||
break
|
||||
|
||||
if self.process.poll() != None:
|
||||
if self._process.poll() != None:
|
||||
self.update_stats("", "POVRAY: Failed")
|
||||
break
|
||||
|
||||
time.sleep(self.DELAY)
|
||||
|
||||
if os.path.exists(self.temp_file_out):
|
||||
if os.path.exists(self._temp_file_out):
|
||||
|
||||
self.update_stats("", "POVRAY: Rendering")
|
||||
|
||||
@ -807,7 +807,7 @@ class PovrayRender(bpy.types.RenderEngine):
|
||||
result = self.begin_result(0, 0, x, y)
|
||||
lay = result.layers[0]
|
||||
# possible the image wont load early on.
|
||||
try: lay.load_from_file(self.temp_file_out)
|
||||
try: lay.load_from_file(self._temp_file_out)
|
||||
except: pass
|
||||
self.end_result(result)
|
||||
|
||||
@ -815,23 +815,23 @@ class PovrayRender(bpy.types.RenderEngine):
|
||||
while True:
|
||||
|
||||
# test if povray exists
|
||||
if self.process.poll() != None:
|
||||
if self._process.poll() != None:
|
||||
update_image();
|
||||
break
|
||||
|
||||
# user exit
|
||||
if self.test_break():
|
||||
try: self.process.terminate()
|
||||
try: self._process.terminate()
|
||||
except: pass
|
||||
|
||||
break
|
||||
|
||||
# Would be nice to redirect the output
|
||||
# stdout_value, stderr_value = self.process.communicate() # locks
|
||||
# stdout_value, stderr_value = self._process.communicate() # locks
|
||||
|
||||
|
||||
# check if the file updated
|
||||
new_size = os.path.getsize(self.temp_file_out)
|
||||
new_size = os.path.getsize(self._temp_file_out)
|
||||
|
||||
if new_size != prev_size:
|
||||
update_image()
|
||||
|
@ -1123,7 +1123,7 @@ class Export3DS(bpy.types.Operator):
|
||||
|
||||
|
||||
def execute(self, context):
|
||||
save_3ds(self.path, context)
|
||||
save_3ds(self.properties.path, context)
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
|
@ -498,8 +498,7 @@ def write(filename, batch_objects = None, \
|
||||
# not public
|
||||
pose = fbxArm.blenObject.pose
|
||||
# pose = fbxArm.blenObject.getPose()
|
||||
self.__pose_bone = pose.pose_channels[self.blenName]
|
||||
# self.__pose_bone = pose.bones[self.blenName]
|
||||
self.__pose_bone = pose.bones[self.blenName]
|
||||
|
||||
# store a list if matricies here, (poseMatrix, head, tail)
|
||||
# {frame:posematrix, frame:posematrix, ...}
|
||||
@ -3394,36 +3393,36 @@ class ExportFBX(bpy.types.Operator):
|
||||
return context.active_object != None
|
||||
|
||||
def execute(self, context):
|
||||
if not self.path:
|
||||
if not self.properties.path:
|
||||
raise Exception("path not set")
|
||||
|
||||
GLOBAL_MATRIX = mtx4_identity
|
||||
GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self._SCALE
|
||||
if self._XROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_x90n
|
||||
if self._YROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_y90n
|
||||
if self._ZROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_z90n
|
||||
GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.properties._SCALE
|
||||
if self.properties._XROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_x90n
|
||||
if self.properties._YROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_y90n
|
||||
if self.properties._ZROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_z90n
|
||||
|
||||
write(self.path,
|
||||
write(self.properties.path,
|
||||
None, # XXX
|
||||
context,
|
||||
self.EXP_OBS_SELECTED,
|
||||
self.EXP_MESH,
|
||||
self.EXP_MESH_APPLY_MOD,
|
||||
# self.EXP_MESH_HQ_NORMALS,
|
||||
self.EXP_ARMATURE,
|
||||
self.EXP_LAMP,
|
||||
self.EXP_CAMERA,
|
||||
self.EXP_EMPTY,
|
||||
self.EXP_IMAGE_COPY,
|
||||
self.properties.EXP_OBS_SELECTED,
|
||||
self.properties.EXP_MESH,
|
||||
self.properties.EXP_MESH_APPLY_MOD,
|
||||
# self.properties.EXP_MESH_HQ_NORMALS,
|
||||
self.properties.EXP_ARMATURE,
|
||||
self.properties.EXP_LAMP,
|
||||
self.properties.EXP_CAMERA,
|
||||
self.properties.EXP_EMPTY,
|
||||
self.properties.EXP_IMAGE_COPY,
|
||||
GLOBAL_MATRIX,
|
||||
self.ANIM_ENABLE,
|
||||
self.ANIM_OPTIMIZE,
|
||||
self.ANIM_OPTIMIZE_PRECISSION,
|
||||
self.ANIM_ACTION_ALL,
|
||||
self.BATCH_ENABLE,
|
||||
self.BATCH_GROUP,
|
||||
self.BATCH_FILE_PREFIX,
|
||||
self.BATCH_OWN_DIR)
|
||||
self.properties.ANIM_ENABLE,
|
||||
self.properties.ANIM_OPTIMIZE,
|
||||
self.properties.ANIM_OPTIMIZE_PRECISSION,
|
||||
self.properties.ANIM_ACTION_ALL,
|
||||
self.properties.BATCH_ENABLE,
|
||||
self.properties.BATCH_GROUP,
|
||||
self.properties.BATCH_FILE_PREFIX,
|
||||
self.properties.BATCH_OWN_DIR)
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
|
@ -156,11 +156,10 @@ class ExportMDD(bpy.types.Operator):
|
||||
|
||||
# get first scene to get min and max properties for frames, fps
|
||||
|
||||
sce = bpy.data.scenes[bpy.data.scenes.keys()[0]]
|
||||
minframe = sce.rna_type.properties["current_frame"].soft_min
|
||||
maxframe = sce.rna_type.properties["current_frame"].soft_max
|
||||
minfps = sce.render_data.rna_type.properties["fps"].soft_min
|
||||
maxfps = sce.render_data.rna_type.properties["fps"].soft_max
|
||||
minframe = 1
|
||||
maxframe = 300000
|
||||
minfps = 1
|
||||
maxfps = 120
|
||||
|
||||
# List of operator properties, the attributes will be assigned
|
||||
# to the class instance from the operator settings before calling.
|
||||
@ -174,10 +173,10 @@ class ExportMDD(bpy.types.Operator):
|
||||
return (ob and ob.type=='MESH')
|
||||
|
||||
def execute(self, context):
|
||||
if not self.path:
|
||||
if not self.properties.path:
|
||||
raise Exception("filename not set")
|
||||
write(self.path, context.scene, context.active_object,
|
||||
self.start_frame, self.end_frame, self.fps )
|
||||
write(self.properties.path, context.scene, context.active_object,
|
||||
self.properties.start_frame, self.properties.end_frame, self.properties.fps )
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
@ -197,5 +196,4 @@ def menu_func(self, context):
|
||||
menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
|
||||
|
||||
if __name__=='__main__':
|
||||
#Blender.Window.FileSelector(mdd_export_ui, 'EXPORT MDD', sys.makename(ext='.mdd'))
|
||||
bpy.ops.EXPORT_OT_mdd(path="/tmp/test.mdd")
|
||||
bpy.ops.export.mdd(path="/tmp/test.mdd")
|
||||
|
@ -485,10 +485,10 @@ def write(filename, objects, scene,
|
||||
newob = bpy.data.add_object('MESH', 'temp_object')
|
||||
newob.data = me
|
||||
# if we forget to set Object.data - crash
|
||||
scene.add_object(newob)
|
||||
scene.objects.link(newob)
|
||||
newob.convert_to_triface(scene)
|
||||
# mesh will still be there
|
||||
scene.remove_object(newob)
|
||||
scene.objects.unlink(newob)
|
||||
'''
|
||||
|
||||
# Make our own list so it can be sorted to reduce context switching
|
||||
@ -972,24 +972,24 @@ class ExportOBJ(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
do_export(self.path, context,
|
||||
EXPORT_TRI=self.use_triangles,
|
||||
EXPORT_EDGES=self.use_edges,
|
||||
EXPORT_NORMALS=self.use_normals,
|
||||
EXPORT_NORMALS_HQ=self.use_hq_normals,
|
||||
EXPORT_UV=self.use_uvs,
|
||||
EXPORT_MTL=self.use_materials,
|
||||
EXPORT_COPY_IMAGES=self.copy_images,
|
||||
EXPORT_APPLY_MODIFIERS=self.use_modifiers,
|
||||
EXPORT_ROTX90=self.use_rotate90,
|
||||
EXPORT_BLEN_OBS=self.use_blen_objects,
|
||||
EXPORT_GROUP_BY_OB=self.group_by_object,
|
||||
EXPORT_GROUP_BY_MAT=self.group_by_material,
|
||||
EXPORT_KEEP_VERT_ORDER=self.keep_vertex_order,
|
||||
EXPORT_POLYGROUPS=self.use_vertex_groups,
|
||||
EXPORT_CURVE_AS_NURBS=self.use_nurbs,
|
||||
EXPORT_SEL_ONLY=self.use_selection,
|
||||
EXPORT_ALL_SCENES=self.use_all_scenes)
|
||||
do_export(self.properties.path, context,
|
||||
EXPORT_TRI=self.properties.use_triangles,
|
||||
EXPORT_EDGES=self.properties.use_edges,
|
||||
EXPORT_NORMALS=self.properties.use_normals,
|
||||
EXPORT_NORMALS_HQ=self.properties.use_hq_normals,
|
||||
EXPORT_UV=self.properties.use_uvs,
|
||||
EXPORT_MTL=self.properties.use_materials,
|
||||
EXPORT_COPY_IMAGES=self.properties.copy_images,
|
||||
EXPORT_APPLY_MODIFIERS=self.properties.use_modifiers,
|
||||
EXPORT_ROTX90=self.properties.use_rotate90,
|
||||
EXPORT_BLEN_OBS=self.properties.use_blen_objects,
|
||||
EXPORT_GROUP_BY_OB=self.properties.group_by_object,
|
||||
EXPORT_GROUP_BY_MAT=self.properties.group_by_material,
|
||||
EXPORT_KEEP_VERT_ORDER=self.properties.keep_vertex_order,
|
||||
EXPORT_POLYGROUPS=self.properties.use_vertex_groups,
|
||||
EXPORT_CURVE_AS_NURBS=self.properties.use_nurbs,
|
||||
EXPORT_SEL_ONLY=self.properties.use_selection,
|
||||
EXPORT_ALL_SCENES=self.properties.use_all_scenes)
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
|
@ -274,14 +274,14 @@ class ExportPLY(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
# print("Selected: " + context.active_object.name)
|
||||
|
||||
if not self.path:
|
||||
if not self.properties.path:
|
||||
raise Exception("filename not set")
|
||||
|
||||
write(self.path, context.scene, context.active_object,\
|
||||
EXPORT_APPLY_MODIFIERS = self.use_modifiers,
|
||||
EXPORT_NORMALS = self.use_normals,
|
||||
EXPORT_UV = self.use_uvs,
|
||||
EXPORT_COLORS = self.use_colors,
|
||||
write(self.properties.path, context.scene, context.active_object,\
|
||||
EXPORT_APPLY_MODIFIERS = self.properties.use_modifiers,
|
||||
EXPORT_NORMALS = self.properties.use_normals,
|
||||
EXPORT_UV = self.properties.use_uvs,
|
||||
EXPORT_COLORS = self.properties.use_colors,
|
||||
)
|
||||
|
||||
return ('FINISHED',)
|
||||
|
@ -1230,7 +1230,7 @@ class ExportX3D(bpy.types.Operator):
|
||||
|
||||
|
||||
def execute(self, context):
|
||||
x3d_export(self.path, context, self.apply_modifiers, self.triangulate, self.compress)
|
||||
x3d_export(self.properties.path, context, self.properties.apply_modifiers, self.properties.triangulate, self.properties.compress)
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
|
@ -460,7 +460,7 @@ def bvh_node_dict2armature(context, bvh_nodes, IMPORT_START_FRAME= 1, IMPORT_LOO
|
||||
bpy.ops.object.mode_set(mode='POSE', toggle=False)
|
||||
|
||||
pose= arm_ob.pose
|
||||
pose_bones= pose.pose_channels
|
||||
pose_bones= pose.bones
|
||||
|
||||
|
||||
if ROT_STYLE=='NATIVE':
|
||||
@ -863,7 +863,7 @@ class BvhImporter(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
# print("Selected: " + context.active_object.name)
|
||||
|
||||
read_bvh(context, self.path)
|
||||
read_bvh(context, self.properties.path)
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
|
@ -465,7 +465,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
|
||||
# bmesh.transform(contextMatrix)
|
||||
ob = bpy.data.add_object("MESH", tempName)
|
||||
ob.data = bmesh
|
||||
SCN.add_object(ob)
|
||||
SCN.objects.link(ob)
|
||||
# ob = SCN_OBJECTS.new(bmesh, tempName)
|
||||
'''
|
||||
if contextMatrix_tx:
|
||||
@ -766,7 +766,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
|
||||
|
||||
ob = bpy.data.add_object("LAMP", "Lamp")
|
||||
ob.data = bpy.data.add_lamp("Lamp")
|
||||
SCN.add_object(ob)
|
||||
SCN.objects.link(ob)
|
||||
|
||||
contextLamp[1]= ob.data
|
||||
# contextLamp[1]= bpy.data.lamps.new()
|
||||
@ -1156,7 +1156,7 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator):
|
||||
# apply_matrix = BoolProperty(name="Transform Fix", description="Workaround for object transformations importing incorrectly", default=False),
|
||||
|
||||
def execute(self, context):
|
||||
load_3ds(self.path, context, 0.0, False, False)
|
||||
load_3ds(self.properties.path, context, 0.0, False, False)
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
|
@ -864,7 +864,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
|
||||
|
||||
ob= bpy.data.add_object("MESH", "Mesh")
|
||||
ob.data= me
|
||||
scn.add_object(ob)
|
||||
scn.objects.link(ob)
|
||||
# ob= scn.objects.new(me)
|
||||
new_objects.append(ob)
|
||||
|
||||
@ -1601,18 +1601,18 @@ class IMPORT_OT_obj(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
# print("Selected: " + context.active_object.name)
|
||||
|
||||
load_obj(self.path,
|
||||
load_obj(self.properties.path,
|
||||
context,
|
||||
self.CLAMP_SIZE,
|
||||
self.CREATE_FGONS,
|
||||
self.CREATE_SMOOTH_GROUPS,
|
||||
self.CREATE_EDGES,
|
||||
self.SPLIT_OBJECTS,
|
||||
self.SPLIT_GROUPS,
|
||||
self.SPLIT_MATERIALS,
|
||||
self.ROTATE_X90,
|
||||
self.IMAGE_SEARCH,
|
||||
self.POLYGROUPS)
|
||||
self.properties.CLAMP_SIZE,
|
||||
self.properties.CREATE_FGONS,
|
||||
self.properties.CREATE_SMOOTH_GROUPS,
|
||||
self.properties.CREATE_EDGES,
|
||||
self.properties.SPLIT_OBJECTS,
|
||||
self.properties.SPLIT_GROUPS,
|
||||
self.properties.SPLIT_MATERIALS,
|
||||
self.properties.ROTATE_X90,
|
||||
self.properties.IMAGE_SEARCH,
|
||||
self.properties.POLYGROUPS)
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
|
@ -18,21 +18,17 @@
|
||||
|
||||
# This directory is a Python package.
|
||||
|
||||
import model
|
||||
import operators
|
||||
import client
|
||||
import slave
|
||||
import master
|
||||
import master_html
|
||||
import utils
|
||||
import balancing
|
||||
import ui
|
||||
from netrender import model
|
||||
from netrender import operators
|
||||
from netrender import client
|
||||
from netrender import slave
|
||||
from netrender import master
|
||||
from netrender import master_html
|
||||
from netrender import utils
|
||||
from netrender import balancing
|
||||
from netrender import ui
|
||||
|
||||
# store temp data in bpy module
|
||||
|
||||
import bpy
|
||||
|
||||
bpy.netrender_jobs = []
|
||||
bpy.netrender_slaves = []
|
||||
bpy.netrender_blacklist = []
|
||||
jobs = []
|
||||
slaves = []
|
||||
blacklist = []
|
||||
|
||||
|
@ -21,6 +21,7 @@ import sys, os, re
|
||||
import http, http.client, http.server, urllib
|
||||
import subprocess, shutil, time, hashlib
|
||||
|
||||
import netrender
|
||||
import netrender.model
|
||||
import netrender.slave as slave
|
||||
import netrender.master as master
|
||||
@ -113,7 +114,7 @@ def clientSendJob(conn, scene, anim = False):
|
||||
# LIBRARIES
|
||||
###########################
|
||||
for lib in bpy.data.libraries:
|
||||
job.addFile(bpy.utils.expandpath(lib_path))
|
||||
job.addFile(bpy.utils.expandpath(lib.filename))
|
||||
|
||||
###########################
|
||||
# IMAGES
|
||||
@ -150,7 +151,7 @@ def clientSendJob(conn, scene, anim = False):
|
||||
|
||||
job.name = job_name
|
||||
|
||||
for slave in scene.network_render.slaves_blacklist:
|
||||
for slave in netrender.blacklist:
|
||||
job.blacklist.append(slave.id)
|
||||
|
||||
job.chunks = netsettings.chunks
|
||||
@ -200,14 +201,14 @@ class NetworkRenderEngine(bpy.types.RenderEngine):
|
||||
|
||||
|
||||
def render_slave(self, scene):
|
||||
slave.render_slave(self, scene)
|
||||
slave.render_slave(self, scene.network_render)
|
||||
|
||||
def render_client(self, scene):
|
||||
netsettings = scene.network_render
|
||||
self.update_stats("", "Network render client initiation")
|
||||
|
||||
|
||||
conn = clientConnection(scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
# Sending file
|
||||
@ -256,10 +257,8 @@ class NetworkRenderEngine(bpy.types.RenderEngine):
|
||||
conn.close()
|
||||
|
||||
def compatible(module):
|
||||
exec("import " + module)
|
||||
module = eval(module)
|
||||
for member in dir(module):
|
||||
subclass = getattr(module, member)
|
||||
module = __import__(module)
|
||||
for subclass in module.__dict__.values():
|
||||
try: subclass.COMPAT_ENGINES.add('NET_RENDER')
|
||||
except: pass
|
||||
del module
|
||||
|
@ -21,6 +21,7 @@ import sys, os
|
||||
import http, http.client, http.server, urllib, socket
|
||||
import webbrowser
|
||||
|
||||
import netrender
|
||||
from netrender.utils import *
|
||||
import netrender.client as client
|
||||
import netrender.model
|
||||
@ -36,8 +37,9 @@ class RENDER_OT_netclientanim(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
scene = context.scene
|
||||
netsettings = scene.network_render
|
||||
|
||||
conn = clientConnection(scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
# Sending file
|
||||
@ -62,8 +64,9 @@ class RENDER_OT_netclientsend(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
scene = context.scene
|
||||
netsettings = scene.network_render
|
||||
|
||||
conn = clientConnection(scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
# Sending file
|
||||
@ -86,7 +89,7 @@ class RENDER_OT_netclientstatus(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
netsettings = context.scene.network_render
|
||||
conn = clientConnection(context.scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
conn.request("GET", "/status")
|
||||
@ -99,10 +102,10 @@ class RENDER_OT_netclientstatus(bpy.types.Operator):
|
||||
while(len(netsettings.jobs) > 0):
|
||||
netsettings.jobs.remove(0)
|
||||
|
||||
bpy.netrender_jobs = []
|
||||
netrender.jobs = []
|
||||
|
||||
for j in jobs:
|
||||
bpy.netrender_jobs.append(j)
|
||||
netrender.jobs.append(j)
|
||||
netsettings.jobs.add()
|
||||
job = netsettings.jobs[-1]
|
||||
|
||||
@ -130,8 +133,8 @@ class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
|
||||
if netsettings.active_slave_index >= 0:
|
||||
|
||||
# deal with data
|
||||
slave = bpy.netrender_slaves.pop(netsettings.active_slave_index)
|
||||
bpy.netrender_blacklist.append(slave)
|
||||
slave = netrender.slaves.pop(netsettings.active_slave_index)
|
||||
netrender.blacklist.append(slave)
|
||||
|
||||
# deal with rna
|
||||
netsettings.slaves_blacklist.add()
|
||||
@ -160,8 +163,8 @@ class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
|
||||
if netsettings.active_blacklisted_slave_index >= 0:
|
||||
|
||||
# deal with data
|
||||
slave = bpy.netrender_blacklist.pop(netsettings.active_blacklisted_slave_index)
|
||||
bpy.netrender_slaves.append(slave)
|
||||
slave = netrender.blacklist.pop(netsettings.active_blacklisted_slave_index)
|
||||
netrender.slaves.append(slave)
|
||||
|
||||
# deal with rna
|
||||
netsettings.slaves.add()
|
||||
@ -187,7 +190,7 @@ class RENDER_OT_netclientslaves(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
netsettings = context.scene.network_render
|
||||
conn = clientConnection(context.scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
conn.request("GET", "/slaves")
|
||||
@ -200,17 +203,17 @@ class RENDER_OT_netclientslaves(bpy.types.Operator):
|
||||
while(len(netsettings.slaves) > 0):
|
||||
netsettings.slaves.remove(0)
|
||||
|
||||
bpy.netrender_slaves = []
|
||||
netrender.slaves = []
|
||||
|
||||
for s in slaves:
|
||||
for i in range(len(bpy.netrender_blacklist)):
|
||||
slave = bpy.netrender_blacklist[i]
|
||||
for i in range(len(netrender.blacklist)):
|
||||
slave = netrender.blacklist[i]
|
||||
if slave.id == s.id:
|
||||
bpy.netrender_blacklist[i] = s
|
||||
netrender.blacklist[i] = s
|
||||
netsettings.slaves_blacklist[i].name = s.name
|
||||
break
|
||||
else:
|
||||
bpy.netrender_slaves.append(s)
|
||||
netrender.slaves.append(s)
|
||||
|
||||
netsettings.slaves.add()
|
||||
slave = netsettings.slaves[-1]
|
||||
@ -233,10 +236,10 @@ class RENDER_OT_netclientcancel(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
netsettings = context.scene.network_render
|
||||
conn = clientConnection(context.scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
job = bpy.netrender_jobs[netsettings.active_job_index]
|
||||
job = netrender.jobs[netsettings.active_job_index]
|
||||
|
||||
conn.request("POST", "/cancel", headers={"job-id":job.id})
|
||||
|
||||
@ -261,7 +264,7 @@ class RENDER_OT_netclientcancelall(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
netsettings = context.scene.network_render
|
||||
conn = clientConnection(context.scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
conn.request("POST", "/clear")
|
||||
@ -291,10 +294,10 @@ class netclientdownload(bpy.types.Operator):
|
||||
netsettings = context.scene.network_render
|
||||
rd = context.scene.render_data
|
||||
|
||||
conn = clientConnection(context.scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
job = bpy.netrender_jobs[netsettings.active_job_index]
|
||||
job = netrender.jobs[netsettings.active_job_index]
|
||||
|
||||
for frame in job.frames:
|
||||
client.requestResult(conn, job.id, frame.number)
|
||||
@ -332,26 +335,16 @@ class netclientscan(bpy.types.Operator):
|
||||
return True
|
||||
|
||||
def execute(self, context):
|
||||
netsettings = context.scene.network_render
|
||||
|
||||
try:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||
s.settimeout(30)
|
||||
|
||||
s.bind(('', 8000))
|
||||
|
||||
buf, address = s.recvfrom(64)
|
||||
|
||||
print("received:", buf)
|
||||
|
||||
netsettings.server_address = address[0]
|
||||
netsettings.server_port = int(str(buf, encoding='utf8'))
|
||||
except socket.timeout:
|
||||
print("no server info")
|
||||
address, port = clientScan()
|
||||
|
||||
if address:
|
||||
scene = context.scene
|
||||
netsettings = scene.network_render
|
||||
netsettings.server_address = address
|
||||
netsettings.server_port = port
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@ -369,7 +362,7 @@ class netclientweb(bpy.types.Operator):
|
||||
|
||||
|
||||
# open connection to make sure server exists
|
||||
conn = clientConnection(context.scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
conn.close()
|
||||
|
@ -23,6 +23,8 @@ import subprocess, time
|
||||
from netrender.utils import *
|
||||
import netrender.model
|
||||
|
||||
BLENDER_PATH = sys.argv[0]
|
||||
|
||||
CANCEL_POLL_SPEED = 2
|
||||
MAX_TIMEOUT = 10
|
||||
INCREMENT_TIMEOUT = 1
|
||||
@ -85,13 +87,12 @@ def testFile(conn, job_id, slave_id, JOB_PREFIX, file_path, main_path = None):
|
||||
return job_full_path
|
||||
|
||||
|
||||
def render_slave(engine, scene):
|
||||
netsettings = scene.network_render
|
||||
def render_slave(engine, netsettings):
|
||||
timeout = 1
|
||||
|
||||
engine.update_stats("", "Network render node initiation")
|
||||
|
||||
conn = clientConnection(scene)
|
||||
conn = clientConnection(netsettings.server_address, netsettings.server_port)
|
||||
|
||||
if conn:
|
||||
conn.request("POST", "/slave", repr(slave_Info().serialize()))
|
||||
@ -150,7 +151,7 @@ def render_slave(engine, scene):
|
||||
frame_args += ["-f", str(frame.number)]
|
||||
|
||||
val = SetErrorMode()
|
||||
process = subprocess.Popen([sys.argv[0], "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
process = subprocess.Popen([BLENDER_PATH, "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
RestoreErrorMode(val)
|
||||
elif job.type == netrender.model.JOB_PROCESS:
|
||||
command = job.frames[0].command
|
||||
@ -240,3 +241,6 @@ def render_slave(engine, scene):
|
||||
return
|
||||
|
||||
conn.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
pass
|
@ -21,6 +21,7 @@ import sys, os
|
||||
import http, http.client, http.server, urllib
|
||||
import subprocess, shutil, time, hashlib
|
||||
|
||||
import netrender
|
||||
import netrender.slave as slave
|
||||
import netrender.master as master
|
||||
|
||||
@ -122,14 +123,14 @@ class RENDER_PT_network_slaves(RenderButtonsPanel):
|
||||
sub.itemO("render.netclientslaves", icon="ICON_FILE_REFRESH", text="")
|
||||
sub.itemO("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="")
|
||||
|
||||
if len(bpy.netrender_slaves) == 0 and len(netsettings.slaves) > 0:
|
||||
if len(netrender.slaves) == 0 and len(netsettings.slaves) > 0:
|
||||
while(len(netsettings.slaves) > 0):
|
||||
netsettings.slaves.remove(0)
|
||||
|
||||
if netsettings.active_slave_index >= 0 and len(netsettings.slaves) > 0:
|
||||
layout.itemS()
|
||||
|
||||
slave = bpy.netrender_slaves[netsettings.active_slave_index]
|
||||
slave = netrender.slaves[netsettings.active_slave_index]
|
||||
|
||||
layout.itemL(text="Name: " + slave.name)
|
||||
layout.itemL(text="Address: " + slave.address[0])
|
||||
@ -157,19 +158,19 @@ class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel):
|
||||
sub = row.column(align=True)
|
||||
sub.itemO("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="")
|
||||
|
||||
if len(bpy.netrender_blacklist) == 0 and len(netsettings.slaves_blacklist) > 0:
|
||||
if len(netrender.blacklist) == 0 and len(netsettings.slaves_blacklist) > 0:
|
||||
while(len(netsettings.slaves_blacklist) > 0):
|
||||
netsettings.slaves_blacklist.remove(0)
|
||||
|
||||
if netsettings.active_blacklisted_slave_index >= 0 and len(netsettings.slaves_blacklist) > 0:
|
||||
layout.itemS()
|
||||
|
||||
slave = bpy.netrender_blacklist[netsettings.active_blacklisted_slave_index]
|
||||
slave = netrender.blacklist[netsettings.active_blacklisted_slave_index]
|
||||
|
||||
layout.itemL(text="Name: " + slave.name)
|
||||
layout.itemL(text="Address: " + slave.address[0])
|
||||
layout.itemL(text="Seen: " + slave.last_seen)
|
||||
layout.itemL(text="Stats: " + time.ctime(slave.stats))
|
||||
layout.itemL(text="Seen: " + time.ctime(slave.last_seen))
|
||||
layout.itemL(text="Stats: " + slave.stats)
|
||||
|
||||
@rnaType
|
||||
class RENDER_PT_network_jobs(RenderButtonsPanel):
|
||||
@ -195,14 +196,14 @@ class RENDER_PT_network_jobs(RenderButtonsPanel):
|
||||
sub.itemO("render.netclientcancelall", icon="ICON_PANEL_CLOSE", text="")
|
||||
sub.itemO("render.netclientdownload", icon='ICON_RENDER_ANIMATION', text="")
|
||||
|
||||
if len(bpy.netrender_jobs) == 0 and len(netsettings.jobs) > 0:
|
||||
if len(netrender.jobs) == 0 and len(netsettings.jobs) > 0:
|
||||
while(len(netsettings.jobs) > 0):
|
||||
netsettings.jobs.remove(0)
|
||||
|
||||
if netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0:
|
||||
layout.itemS()
|
||||
|
||||
job = bpy.netrender_jobs[netsettings.active_job_index]
|
||||
job = netrender.jobs[netsettings.active_job_index]
|
||||
|
||||
layout.itemL(text="Name: %s" % job.name)
|
||||
layout.itemL(text="Length: %04i" % len(job))
|
||||
|
@ -16,14 +16,18 @@
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import bpy
|
||||
import sys, os
|
||||
import re
|
||||
import http, http.client, http.server, urllib
|
||||
import http, http.client, http.server, urllib, socket
|
||||
import subprocess, shutil, time, hashlib
|
||||
|
||||
import netrender.model
|
||||
|
||||
try:
|
||||
import bpy
|
||||
except:
|
||||
bpy = None
|
||||
|
||||
VERSION = b"0.5"
|
||||
|
||||
# Jobs status
|
||||
@ -39,27 +43,48 @@ DONE = 2
|
||||
ERROR = 3
|
||||
|
||||
STATUS_TEXT = {
|
||||
QUEUED: "Queued",
|
||||
DISPATCHED: "Dispatched",
|
||||
DONE: "Done",
|
||||
ERROR: "Error"
|
||||
}
|
||||
QUEUED: "Queued",
|
||||
DISPATCHED: "Dispatched",
|
||||
DONE: "Done",
|
||||
ERROR: "Error"
|
||||
}
|
||||
|
||||
def rnaType(rna_type):
|
||||
bpy.types.register(rna_type)
|
||||
if bpy: bpy.types.register(rna_type)
|
||||
return rna_type
|
||||
|
||||
def rnaOperator(rna_op):
|
||||
bpy.ops.add(rna_op)
|
||||
if bpy: bpy.ops.add(rna_op)
|
||||
return rna_op
|
||||
|
||||
def clientConnection(scene):
|
||||
netsettings = scene.network_render
|
||||
def clientScan():
|
||||
try:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||
s.settimeout(30)
|
||||
|
||||
s.bind(('', 8000))
|
||||
|
||||
if netsettings.server_address == "[default]":
|
||||
bpy.ops.render.netclientscan()
|
||||
buf, address = s.recvfrom(64)
|
||||
|
||||
conn = http.client.HTTPConnection(netsettings.server_address, netsettings.server_port)
|
||||
print("received:", buf)
|
||||
|
||||
address = address[0]
|
||||
port = int(str(buf, encoding='utf8'))
|
||||
return (address, port)
|
||||
except socket.timeout:
|
||||
print("no server info")
|
||||
return ("", 8000) # return default values
|
||||
|
||||
def clientConnection(address, port):
|
||||
if address == "[default]":
|
||||
# calling operator from python is fucked, scene isn't in context
|
||||
# if bpy:
|
||||
# bpy.ops.render.netclientscan()
|
||||
# else:
|
||||
address, port = clientScan()
|
||||
|
||||
conn = http.client.HTTPConnection(address, port)
|
||||
|
||||
if clientVerifyVersion(conn):
|
||||
return conn
|
||||
|
86
release/scripts/modules/bpy/__init__.py
Normal file
86
release/scripts/modules/bpy/__init__.py
Normal file
@ -0,0 +1,86 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# internal blender C module
|
||||
import _bpy
|
||||
from _bpy import types, props
|
||||
|
||||
data = _bpy.data
|
||||
context = _bpy.context
|
||||
|
||||
# python modules
|
||||
from bpy import utils
|
||||
|
||||
from bpy import ops as _ops_module
|
||||
|
||||
# fake operator module
|
||||
ops = _ops_module.ops_fake_module
|
||||
|
||||
def load_scripts(reload_scripts=False):
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
def test_import(module_name):
|
||||
try:
|
||||
return __import__(module_name)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return None
|
||||
|
||||
for base_path in utils.script_paths():
|
||||
print(base_path)
|
||||
for path_subdir in ("ui", "op", "io"):
|
||||
path = os.path.join(base_path, path_subdir)
|
||||
sys.path.insert(0, path)
|
||||
for f in sorted(os.listdir(path)):
|
||||
if f.endswith(".py"):
|
||||
# python module
|
||||
mod = test_import(f[0:-3])
|
||||
elif "." not in f:
|
||||
# python package
|
||||
mod = test_import(f)
|
||||
else:
|
||||
mod = None
|
||||
|
||||
if reload_scripts and mod:
|
||||
print("Reloading:", mod)
|
||||
reload(mod)
|
||||
|
||||
def _main():
|
||||
|
||||
# a bit nasty but this prevents help() and input() from locking blender
|
||||
# Ideally we could have some way for the console to replace sys.stdin but
|
||||
# python would lock blender while waiting for a return value, not easy :|
|
||||
import sys
|
||||
sys.stdin = None
|
||||
|
||||
if "-d" in sys.argv and False: # Enable this to measure startup speed
|
||||
import cProfile
|
||||
cProfile.run('import bpy; bpy.load_scripts()', 'blender.prof')
|
||||
|
||||
import pstats
|
||||
p = pstats.Stats('blender.prof')
|
||||
p.sort_stats('cumulative').print_stats(100)
|
||||
|
||||
else:
|
||||
load_scripts()
|
||||
|
||||
_main()
|
||||
|
||||
|
@ -19,12 +19,14 @@
|
||||
# <pep8-80 compliant>
|
||||
|
||||
# for slightly faster access
|
||||
from bpy.__ops__ import add as op_add
|
||||
from bpy.__ops__ import remove as op_remove
|
||||
from bpy.__ops__ import dir as op_dir
|
||||
from bpy.__ops__ import call as op_call
|
||||
from bpy.__ops__ import as_string as op_as_string
|
||||
from bpy.__ops__ import get_rna as op_get_rna
|
||||
from _bpy import ops as ops_module
|
||||
|
||||
op_add = ops_module.add
|
||||
op_remove = ops_module.remove
|
||||
op_dir = ops_module.dir
|
||||
op_call = ops_module.call
|
||||
op_as_string = ops_module.as_string
|
||||
op_get_rna = ops_module.get_rna
|
||||
|
||||
# Keep in sync with WM_types.h
|
||||
context_dict = {
|
||||
@ -190,5 +192,4 @@ class bpy_ops_submodule_op(object):
|
||||
return "<function bpy.ops.%s.%s at 0x%x'>" % \
|
||||
(self.module, self.func, id(self))
|
||||
|
||||
import bpy
|
||||
bpy.ops = bpy_ops()
|
||||
ops_fake_module = bpy_ops()
|
@ -25,6 +25,27 @@ def expandpath(path):
|
||||
|
||||
return path
|
||||
|
||||
import types
|
||||
bpy.utils = types.ModuleType("bpy.utils")
|
||||
bpy.utils.expandpath = expandpath
|
||||
# base scripts
|
||||
_scripts = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)
|
||||
_scripts = (os.path.normpath(_scripts), )
|
||||
|
||||
def script_paths(*args):
|
||||
if not args:
|
||||
return _scripts
|
||||
|
||||
subdir = os.path.join(*args)
|
||||
script_paths = []
|
||||
for path in _scripts:
|
||||
script_paths.append(os.path.join(path, subdir))
|
||||
|
||||
return script_paths
|
||||
|
||||
|
||||
_presets = os.path.join(_scripts[0], "presets") # FIXME - multiple paths
|
||||
|
||||
def preset_paths(subdir):
|
||||
'''
|
||||
Returns a list of paths for a spesific preset.
|
||||
'''
|
||||
|
||||
return (os.path.join(_presets, subdir), )
|
@ -15,28 +15,28 @@
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
from _bpy import types as bpy_types
|
||||
|
||||
import bpy
|
||||
|
||||
StructRNA = bpy.types.Struct.__bases__[0]
|
||||
# StructRNA = bpy.types.Struct
|
||||
StructRNA = bpy_types.Struct.__bases__[0]
|
||||
# StructRNA = bpy_types.Struct
|
||||
|
||||
|
||||
class Context(StructRNA):
|
||||
|
||||
|
||||
def copy(self):
|
||||
new_context = {}
|
||||
generic_keys = StructRNA.__dict__.keys()
|
||||
for item in dir(self):
|
||||
if item not in generic_keys:
|
||||
new_context[item] = getattr(self, item)
|
||||
|
||||
|
||||
return new_context
|
||||
|
||||
|
||||
class Object(bpy.types.ID):
|
||||
class Object(bpy_types.ID):
|
||||
|
||||
def _get_children(self):
|
||||
import bpy
|
||||
return [child for child in bpy.data.objects if child.parent == self]
|
||||
|
||||
children = property(_get_children)
|
||||
@ -46,8 +46,8 @@ def ord_ind(i1,i2):
|
||||
if i1<i2: return i1,i2
|
||||
return i2,i1
|
||||
|
||||
class Mesh(bpy.types.ID):
|
||||
|
||||
class Mesh(bpy_types.ID):
|
||||
|
||||
def _get_edge_keys(self):
|
||||
return [edge_key for face in self.faces for edge_key in face.edge_keys]
|
||||
|
||||
@ -92,3 +92,65 @@ class MeshFace(StructRNA):
|
||||
return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[3]), ord_ind(verts[3], verts[0])
|
||||
|
||||
edge_keys = property(_get_edge_keys)
|
||||
|
||||
|
||||
import collections
|
||||
class OrderedMeta(type):
|
||||
def __init__(cls, name, bases, attributes):
|
||||
super(OrderedMeta, cls).__init__(name, bases, attributes)
|
||||
cls.order = list(attributes.keys())
|
||||
def __prepare__(name, bases, **kwargs):
|
||||
return collections.OrderedDict()
|
||||
|
||||
|
||||
# Only defined so operators members can be used by accessing self.order
|
||||
class Operator(StructRNA, metaclass=OrderedMeta):
|
||||
pass
|
||||
|
||||
|
||||
class Menu(StructRNA):
|
||||
|
||||
def path_menu(self, searchpaths, operator):
|
||||
layout = self.layout
|
||||
# hard coded to set the operators 'path' to the filename.
|
||||
|
||||
import os
|
||||
|
||||
def path_to_name(f):
|
||||
''' Only capitalize all lowercase names, mixed case use them as is.
|
||||
'''
|
||||
f_base = os.path.splitext(f)[0]
|
||||
|
||||
# string replacements
|
||||
f_base = f_base.replace("_colon_", ":")
|
||||
|
||||
f_base = f_base.replace("_", " ")
|
||||
|
||||
if f_base.lower() == f_base:
|
||||
return ' '.join([w[0].upper() + w[1:] for w in f_base.split()])
|
||||
else:
|
||||
return f_base
|
||||
|
||||
layout = self.layout
|
||||
|
||||
# collect paths
|
||||
files = []
|
||||
for path in searchpaths:
|
||||
files.extend([(f, os.path.join(path, f)) for f in os.listdir(path)])
|
||||
|
||||
files.sort()
|
||||
|
||||
for f, path in files:
|
||||
|
||||
if f.startswith("."):
|
||||
continue
|
||||
|
||||
layout.item_stringO(operator, "path", path, text=path_to_name(f))
|
||||
|
||||
def draw_preset(self, context):
|
||||
'''Define these on the subclass
|
||||
- preset_operator
|
||||
- preset_subdir
|
||||
'''
|
||||
import bpy
|
||||
self.path_menu(bpy.utils.preset_paths(self.preset_subdir), self.preset_operator)
|
||||
|
@ -109,5 +109,3 @@ DynMenu.add = add
|
||||
# dont ever use this directly!
|
||||
bpy.types.register(DynMenu)
|
||||
'''
|
||||
|
||||
|
||||
|
271
release/scripts/modules/rna_prop_ui.py
Normal file
271
release/scripts/modules/rna_prop_ui.py
Normal file
@ -0,0 +1,271 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
|
||||
def rna_idprop_ui_get(item, create=True):
|
||||
try:
|
||||
return item['_RNA_UI']
|
||||
except:
|
||||
if create:
|
||||
item['_RNA_UI'] = {}
|
||||
return item['_RNA_UI']
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_get(item, prop, create=True):
|
||||
|
||||
rna_ui = rna_idprop_ui_get(item, create)
|
||||
|
||||
if rna_ui == None:
|
||||
return None
|
||||
|
||||
try:
|
||||
return rna_ui[prop]
|
||||
except:
|
||||
rna_ui[prop] = {}
|
||||
return rna_ui[prop]
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_clear(item, prop):
|
||||
rna_ui = rna_idprop_ui_get(item, False)
|
||||
|
||||
if rna_ui == None:
|
||||
return
|
||||
|
||||
try:
|
||||
del rna_ui[prop]
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def draw(layout, context, context_member, use_edit = True):
|
||||
|
||||
def assign_props(prop, val, key):
|
||||
prop.path = context_member
|
||||
prop.property = key
|
||||
|
||||
try:
|
||||
prop.value = str(val)
|
||||
except:
|
||||
pass
|
||||
|
||||
rna_item = eval("context." + context_member)
|
||||
|
||||
items = rna_item.items()
|
||||
items.sort()
|
||||
|
||||
if use_edit:
|
||||
row = layout.row()
|
||||
props = row.itemO("wm.properties_add", properties=True, text="Add")
|
||||
props.path = context_member
|
||||
del row
|
||||
|
||||
for key, val in items:
|
||||
|
||||
if key == '_RNA_UI':
|
||||
continue
|
||||
|
||||
row = layout.row()
|
||||
convert_to_pyobject = getattr(val, "convert_to_pyobject", None)
|
||||
|
||||
val_orig = val
|
||||
if convert_to_pyobject:
|
||||
val_draw = val = val.convert_to_pyobject()
|
||||
val_draw = str(val_draw)
|
||||
else:
|
||||
val_draw = val
|
||||
|
||||
box = row.box()
|
||||
|
||||
if use_edit:
|
||||
split = box.split(percentage=0.75)
|
||||
row = split.row()
|
||||
else:
|
||||
row = box.row()
|
||||
|
||||
row.itemL(text=key)
|
||||
|
||||
# explicit exception for arrays
|
||||
if convert_to_pyobject and not hasattr(val_orig, "len"):
|
||||
row.itemL(text=val_draw)
|
||||
else:
|
||||
row.itemR(rna_item, '["%s"]' % key, text="")
|
||||
|
||||
if use_edit:
|
||||
row = split.row(align=True)
|
||||
prop = row.itemO("wm.properties_edit", properties=True, text="edit")
|
||||
assign_props(prop, val_draw, key)
|
||||
|
||||
prop = row.itemO("wm.properties_remove", properties=True, text="", icon='ICON_ZOOMOUT')
|
||||
assign_props(prop, val_draw, key)
|
||||
|
||||
|
||||
from bpy.props import *
|
||||
|
||||
|
||||
rna_path = StringProperty(name="Property Edit",
|
||||
description="Property path edit", maxlen=1024, default="", hidden=True)
|
||||
|
||||
rna_value = StringProperty(name="Property Value",
|
||||
description="Property value edit", maxlen=1024, default="")
|
||||
|
||||
rna_property = StringProperty(name="Property Name",
|
||||
description="Property name edit", maxlen=1024, default="")
|
||||
|
||||
rna_min = FloatProperty(name="Min", default=0.0, precision=3)
|
||||
rna_max = FloatProperty(name="Max", default=1.0, precision=3)
|
||||
|
||||
class WM_OT_properties_edit(bpy.types.Operator):
|
||||
'''Internal use (edit a property path)'''
|
||||
bl_idname = "wm.properties_edit"
|
||||
bl_label = "Edit Property!"
|
||||
|
||||
path = rna_path
|
||||
property = rna_property
|
||||
value = rna_value
|
||||
min = rna_min
|
||||
max = rna_max
|
||||
description = StringProperty(name="Tip", default="")
|
||||
|
||||
# the class instance is not persistant, need to store in the class
|
||||
# not ideal but changes as the op runs.
|
||||
_last_prop = ['']
|
||||
|
||||
def execute(self, context):
|
||||
path = self.properties.path
|
||||
value = self.properties.value
|
||||
prop = self.properties.property
|
||||
prop_old = self._last_prop[0]
|
||||
|
||||
try:
|
||||
value_eval = eval(value)
|
||||
except:
|
||||
value_eval = value
|
||||
|
||||
if type(value_eval) == str:
|
||||
value_eval = '"' + value_eval + '"'
|
||||
|
||||
# First remove
|
||||
item = eval("context.%s" % path)
|
||||
|
||||
rna_idprop_ui_prop_clear(item, prop_old)
|
||||
exec_str = "del item['%s']" % prop_old
|
||||
# print(exec_str)
|
||||
exec(exec_str)
|
||||
|
||||
|
||||
# Reassign
|
||||
exec_str = "item['%s'] = %s" % (prop, value_eval)
|
||||
# print(exec_str)
|
||||
exec(exec_str)
|
||||
|
||||
prop_type = type(item[prop])
|
||||
|
||||
prop_ui = rna_idprop_ui_prop_get(item, prop)
|
||||
|
||||
if prop_type in (float, int):
|
||||
|
||||
prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
|
||||
prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
|
||||
|
||||
prop_ui['description'] = self.properties.description
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
|
||||
self._last_prop[:] = [self.properties.property]
|
||||
|
||||
item = eval("context.%s" % self.properties.path)
|
||||
|
||||
# setup defaults
|
||||
prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
|
||||
if prop_ui:
|
||||
self.properties.min = prop_ui.get("min", -1000000000)
|
||||
self.properties.max = prop_ui.get("max", 1000000000)
|
||||
self.properties.description = prop_ui.get("description", "")
|
||||
|
||||
if 0:
|
||||
_message= "PyConsole, press Ctrl+D to unlock the BGE"
|
||||
import sys
|
||||
|
||||
# evaluate commands in current namespace
|
||||
frame= sys._getframe()
|
||||
namespace = frame.f_globals.copy()
|
||||
namespace.update(frame.f_locals)
|
||||
|
||||
import code
|
||||
|
||||
# Autocomp in python, not as comprehensive as IPython
|
||||
import rlcompleter
|
||||
|
||||
try: # ick, some pythons dont have this
|
||||
import readline
|
||||
readline.parse_and_bind("tab: complete")
|
||||
except:
|
||||
pass
|
||||
|
||||
code.interact(banner=_message, local=namespace)
|
||||
|
||||
wm = context.manager
|
||||
wm.invoke_props_popup(self, event)
|
||||
return ('RUNNING_MODAL',)
|
||||
|
||||
|
||||
class WM_OT_properties_add(bpy.types.Operator):
|
||||
'''Internal use (edit a property path)'''
|
||||
bl_idname = "wm.properties_add"
|
||||
bl_label = "Add Property"
|
||||
|
||||
path = rna_path
|
||||
|
||||
def execute(self, context):
|
||||
item = eval("context.%s" % self.properties.path)
|
||||
|
||||
def unique_name(names):
|
||||
prop = 'prop'
|
||||
prop_new = prop
|
||||
i = 1
|
||||
while prop_new in names:
|
||||
prop_new = prop + str(i)
|
||||
i+=1
|
||||
|
||||
return prop_new
|
||||
|
||||
property = unique_name(item.keys())
|
||||
|
||||
item[property] = 1.0
|
||||
return ('FINISHED',)
|
||||
|
||||
class WM_OT_properties_remove(bpy.types.Operator):
|
||||
'''Internal use (edit a property path)'''
|
||||
bl_idname = "wm.properties_remove"
|
||||
bl_label = "Add Property"
|
||||
|
||||
path = rna_path
|
||||
property = rna_property
|
||||
|
||||
def execute(self, context):
|
||||
item = eval("context.%s" % self.properties.path)
|
||||
del item[self.properties.property]
|
||||
return ('FINISHED',)
|
||||
|
@ -96,10 +96,10 @@ class AddTorus(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
verts_loc, faces = add_torus(self.major_radius,
|
||||
self.minor_radius,
|
||||
self.major_segments,
|
||||
self.minor_segments)
|
||||
verts_loc, faces = add_torus(self.properties.major_radius,
|
||||
self.properties.minor_radius,
|
||||
self.properties.major_segments,
|
||||
self.properties.minor_segments)
|
||||
|
||||
mesh = bpy.data.add_mesh("Torus")
|
||||
|
||||
@ -116,7 +116,7 @@ class AddTorus(bpy.types.Operator):
|
||||
mesh.update()
|
||||
ob_new = bpy.data.add_object('MESH', "Torus")
|
||||
ob_new.data = mesh
|
||||
scene.add_object(ob_new)
|
||||
scene.objects.link(ob_new)
|
||||
scene.objects.active = ob_new
|
||||
ob_new.selected = True
|
||||
|
||||
|
@ -66,160 +66,130 @@ def get_console(console_id):
|
||||
return console, stdout, stderr
|
||||
|
||||
|
||||
class PyConsoleExec(bpy.types.Operator):
|
||||
'''Execute the current console line as a python expression.'''
|
||||
bl_idname = "console.execute_" + language_id
|
||||
bl_label = "Console Execute"
|
||||
bl_register = False
|
||||
# Both prompts must be the same length
|
||||
PROMPT = '>>> '
|
||||
PROMPT_MULTI = '... '
|
||||
|
||||
# Both prompts must be the same length
|
||||
PROMPT = '>>> '
|
||||
PROMPT_MULTI = '... '
|
||||
def execute(context):
|
||||
sc = context.space_data
|
||||
|
||||
# is this working???
|
||||
'''
|
||||
def poll(self, context):
|
||||
return (context.space_data.type == 'PYTHON')
|
||||
'''
|
||||
# its not :|
|
||||
try:
|
||||
line = sc.history[-1].line
|
||||
except:
|
||||
return ('CANCELLED',)
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
if sc.console_type != 'PYTHON':
|
||||
return ('CANCELLED',)
|
||||
|
||||
try:
|
||||
line = sc.history[-1].line
|
||||
except:
|
||||
return ('CANCELLED',)
|
||||
console, stdout, stderr = get_console(hash(context.region))
|
||||
|
||||
if sc.console_type != 'PYTHON':
|
||||
return ('CANCELLED',)
|
||||
# Hack, useful but must add some other way to access
|
||||
#if "C" not in console.locals:
|
||||
console.locals["C"] = context
|
||||
|
||||
console, stdout, stderr = get_console(hash(context.region))
|
||||
# redirect output
|
||||
sys.stdout = stdout
|
||||
sys.stderr = stderr
|
||||
|
||||
# Hack, useful but must add some other way to access
|
||||
#if "C" not in console.locals:
|
||||
console.locals["C"] = context
|
||||
# run the console
|
||||
if not line.strip():
|
||||
line_exec = '\n' # executes a multiline statement
|
||||
else:
|
||||
line_exec = line
|
||||
|
||||
# redirect output
|
||||
sys.stdout = stdout
|
||||
sys.stderr = stderr
|
||||
is_multiline = console.push(line_exec)
|
||||
|
||||
# run the console
|
||||
if not line.strip():
|
||||
line_exec = '\n' # executes a multiline statement
|
||||
else:
|
||||
line_exec = line
|
||||
stdout.seek(0)
|
||||
stderr.seek(0)
|
||||
|
||||
is_multiline = console.push(line_exec)
|
||||
output = stdout.read()
|
||||
output_err = stderr.read()
|
||||
|
||||
stdout.seek(0)
|
||||
stderr.seek(0)
|
||||
# cleanup
|
||||
sys.stdout = sys.__stdout__
|
||||
sys.stderr = sys.__stderr__
|
||||
sys.last_traceback = None
|
||||
|
||||
output = stdout.read()
|
||||
output_err = stderr.read()
|
||||
# So we can reuse, clear all data
|
||||
stdout.truncate(0)
|
||||
stderr.truncate(0)
|
||||
|
||||
# cleanup
|
||||
sys.stdout = sys.__stdout__
|
||||
sys.stderr = sys.__stderr__
|
||||
sys.last_traceback = None
|
||||
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
|
||||
|
||||
# So we can reuse, clear all data
|
||||
stdout.truncate(0)
|
||||
stderr.truncate(0)
|
||||
if is_multiline:
|
||||
sc.prompt = PROMPT_MULTI
|
||||
else:
|
||||
sc.prompt = PROMPT
|
||||
|
||||
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
|
||||
# insert a new blank line
|
||||
bpy.ops.console.history_append(text="", current_character=0,
|
||||
remove_duplicates=True)
|
||||
|
||||
if is_multiline:
|
||||
sc.prompt = self.PROMPT_MULTI
|
||||
else:
|
||||
sc.prompt = self.PROMPT
|
||||
# Insert the output into the editor
|
||||
# not quite correct because the order might have changed,
|
||||
# but ok 99% of the time.
|
||||
if output:
|
||||
add_scrollback(output, 'OUTPUT')
|
||||
if output_err:
|
||||
add_scrollback(output_err, 'ERROR')
|
||||
|
||||
# insert a new blank line
|
||||
bpy.ops.console.history_append(text="", current_character=0,
|
||||
remove_duplicates=True)
|
||||
|
||||
# Insert the output into the editor
|
||||
# not quite correct because the order might have changed,
|
||||
# but ok 99% of the time.
|
||||
if output:
|
||||
add_scrollback(output, 'OUTPUT')
|
||||
if output_err:
|
||||
add_scrollback(output_err, 'ERROR')
|
||||
|
||||
return ('FINISHED',)
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
class PyConsoleAutocomplete(bpy.types.Operator):
|
||||
'''Evaluate the namespace up until the cursor and give a list of
|
||||
options or complete the name if there is only one.'''
|
||||
bl_idname = "console.autocomplete_" + language_id
|
||||
bl_label = "Python Console Autocomplete"
|
||||
bl_register = False
|
||||
def autocomplete(context):
|
||||
from console import intellisense
|
||||
|
||||
def poll(self, context):
|
||||
return context.space_data.console_type == 'PYTHON'
|
||||
sc = context.space_data
|
||||
|
||||
def execute(self, context):
|
||||
from console import intellisense
|
||||
console = get_console(hash(context.region))[0]
|
||||
|
||||
sc = context.space_data
|
||||
current_line = sc.history[-1]
|
||||
line = current_line.line
|
||||
|
||||
console = get_console(hash(context.region))[0]
|
||||
|
||||
current_line = sc.history[-1]
|
||||
line = current_line.line
|
||||
if not console:
|
||||
return ('CANCELLED',)
|
||||
|
||||
if not console:
|
||||
return ('CANCELLED',)
|
||||
if sc.console_type != 'PYTHON':
|
||||
return ('CANCELLED',)
|
||||
|
||||
if sc.console_type != 'PYTHON':
|
||||
return ('CANCELLED',)
|
||||
# This function isnt aware of the text editor or being an operator
|
||||
# just does the autocomp then copy its results back
|
||||
current_line.line, current_line.current_character, scrollback = \
|
||||
intellisense.expand(
|
||||
line=current_line.line,
|
||||
cursor=current_line.current_character,
|
||||
namespace=console.locals,
|
||||
private='-d' in sys.argv)
|
||||
|
||||
# This function isnt aware of the text editor or being an operator
|
||||
# just does the autocomp then copy its results back
|
||||
current_line.line, current_line.current_character, scrollback = \
|
||||
intellisense.expand(
|
||||
line=current_line.line,
|
||||
cursor=current_line.current_character,
|
||||
namespace=console.locals,
|
||||
private='-d' in sys.argv)
|
||||
# Now we need to copy back the line from blender back into the
|
||||
# text editor. This will change when we dont use the text editor
|
||||
# anymore
|
||||
if scrollback:
|
||||
add_scrollback(scrollback, 'INFO')
|
||||
|
||||
# Now we need to copy back the line from blender back into the
|
||||
# text editor. This will change when we dont use the text editor
|
||||
# anymore
|
||||
if scrollback:
|
||||
add_scrollback(scrollback, 'INFO')
|
||||
context.area.tag_redraw()
|
||||
|
||||
context.area.tag_redraw()
|
||||
|
||||
return ('FINISHED',)
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
class PyConsoleBanner(bpy.types.Operator):
|
||||
bl_idname = "console.banner_" + language_id
|
||||
def banner(context):
|
||||
sc = context.space_data
|
||||
version_string = sys.version.strip().replace('\n', ' ')
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
version_string = sys.version.strip().replace('\n', ' ')
|
||||
add_scrollback(" * Python Interactive Console %s *" % version_string, 'OUTPUT')
|
||||
add_scrollback("Command History: Up/Down Arrow", 'OUTPUT')
|
||||
add_scrollback("Cursor: Left/Right Home/End", 'OUTPUT')
|
||||
add_scrollback("Remove: Backspace/Delete", 'OUTPUT')
|
||||
add_scrollback("Execute: Enter", 'OUTPUT')
|
||||
add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT')
|
||||
add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT')
|
||||
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, Mathutils, Geometry, BGL", 'OUTPUT')
|
||||
add_scrollback("", 'OUTPUT')
|
||||
add_scrollback("", 'OUTPUT')
|
||||
sc.prompt = PROMPT
|
||||
|
||||
add_scrollback(" * Python Interactive Console %s *" % version_string, 'OUTPUT')
|
||||
add_scrollback("Command History: Up/Down Arrow", 'OUTPUT')
|
||||
add_scrollback("Cursor: Left/Right Home/End", 'OUTPUT')
|
||||
add_scrollback("Remove: Backspace/Delete", 'OUTPUT')
|
||||
add_scrollback("Execute: Enter", 'OUTPUT')
|
||||
add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT')
|
||||
add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT')
|
||||
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, Mathutils, Geometry, BGL", 'OUTPUT')
|
||||
add_scrollback("", 'OUTPUT')
|
||||
add_scrollback("", 'OUTPUT')
|
||||
sc.prompt = PyConsoleExec.PROMPT
|
||||
# Add context into the namespace for quick access
|
||||
console = get_console(hash(context.region))[0]
|
||||
console.locals["C"] = bpy.context
|
||||
|
||||
# Add context into the namespace for quick access
|
||||
console = get_console(hash(context.region))[0]
|
||||
console.locals["C"] = bpy.context
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
bpy.ops.add(PyConsoleExec)
|
||||
bpy.ops.add(PyConsoleAutocomplete)
|
||||
bpy.ops.add(PyConsoleBanner)
|
||||
return ('FINISHED',)
|
||||
|
@ -41,73 +41,40 @@ def shell_run(text):
|
||||
|
||||
add_scrollback(output, style)
|
||||
|
||||
|
||||
class ShellConsoleExec(bpy.types.Operator):
|
||||
'''Execute the current console line as a python expression.'''
|
||||
bl_idname = "console.execute_" + language_id
|
||||
bl_label = "Console Execute"
|
||||
bl_register = False
|
||||
|
||||
# Both prompts must be the same length
|
||||
PROMPT = '$ '
|
||||
|
||||
# is this working???
|
||||
'''
|
||||
def poll(self, context):
|
||||
return (context.space_data.type == 'PYTHON')
|
||||
'''
|
||||
# its not :|
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
try:
|
||||
line = sc.history[-1].line
|
||||
except:
|
||||
return ('CANCELLED',)
|
||||
|
||||
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
|
||||
|
||||
shell_run(line)
|
||||
|
||||
# insert a new blank line
|
||||
bpy.ops.console.history_append(text="", current_character=0,
|
||||
remove_duplicates=True)
|
||||
|
||||
sc.prompt = os.getcwd()+ShellConsoleExec.PROMPT
|
||||
return ('FINISHED',)
|
||||
PROMPT = '$ '
|
||||
|
||||
|
||||
class ShellConsoleAutocomplete(bpy.types.Operator):
|
||||
'''Evaluate the namespace up until the cursor and give a list of
|
||||
options or complete the name if there is only one.'''
|
||||
bl_idname = "console.autocomplete_" + language_id
|
||||
bl_label = "Python Console Autocomplete"
|
||||
bl_register = False
|
||||
def execute(context):
|
||||
sc = context.space_data
|
||||
|
||||
def poll(self, context):
|
||||
return context.space_data.console_type == 'PYTHON'
|
||||
|
||||
def execute(self, context):
|
||||
from console import intellisense
|
||||
|
||||
sc = context.space_data
|
||||
|
||||
# TODO
|
||||
try:
|
||||
line = sc.history[-1].line
|
||||
except:
|
||||
return ('CANCELLED',)
|
||||
|
||||
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
|
||||
|
||||
class ShellConsoleBanner(bpy.types.Operator):
|
||||
bl_idname = "console.banner_" + language_id
|
||||
shell_run(line)
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
shell_run("bash --version")
|
||||
sc.prompt = os.getcwd()+ShellConsoleExec.PROMPT
|
||||
# insert a new blank line
|
||||
bpy.ops.console.history_append(text="", current_character=0,
|
||||
remove_duplicates=True)
|
||||
|
||||
return ('FINISHED',)
|
||||
sc.prompt = os.getcwd()+PROMPT
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
def autocomplete(context):
|
||||
# sc = context.space_data
|
||||
# TODO
|
||||
return ('CANCELLED',)
|
||||
|
||||
|
||||
def banner(context):
|
||||
sc = context.space_data
|
||||
|
||||
shell_run("bash --version")
|
||||
sc.prompt = os.getcwd()+PROMPT
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
bpy.ops.add(ShellConsoleExec)
|
||||
bpy.ops.add(ShellConsoleAutocomplete)
|
||||
bpy.ops.add(ShellConsoleBanner)
|
||||
|
@ -4,12 +4,12 @@
|
||||
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
@ -26,12 +26,12 @@ def main(context):
|
||||
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
|
||||
|
||||
mesh = ob.data
|
||||
|
||||
|
||||
face_list = [face for face in mesh.faces]
|
||||
face_edge_keys = [face.edge_keys for face in face_list]
|
||||
|
||||
edge_face_count = mesh.edge_face_count_dict
|
||||
|
||||
|
||||
def test_interior(index):
|
||||
for key in face_edge_keys[index]:
|
||||
if edge_face_count[key] < 3:
|
||||
|
@ -233,9 +233,12 @@ def mesh_faces_extend(me, faces, mat_idx = 0):
|
||||
while i < new_facetot:
|
||||
|
||||
f = [v.index for v in faces[i]]
|
||||
if len(f)==4 and f[3]==0:
|
||||
f = f[1], f[2], f[3], f[0]
|
||||
|
||||
if len(f)==4:
|
||||
if f[3]==0:
|
||||
f = f[1], f[2], f[3], f[0]
|
||||
else:
|
||||
f = f[0], f[1], f[2], 0
|
||||
|
||||
mf = me_faces[orig_facetot+i]
|
||||
mf.verts_raw = f
|
||||
mf.material_index = mat_idx
|
||||
@ -536,10 +539,15 @@ def main(context):
|
||||
|
||||
# The line below checks if any of the vert loops are differenyt in length.
|
||||
if False in [len(v[0]) == len(vertLoops[0][0]) for v in vertLoops]:
|
||||
CULL_METHOD = PupMenu('Small to large edge loop distrobution method%t|remove edges evenly|remove smallest edges')
|
||||
if CULL_METHOD == -1:
|
||||
if is_editmode: Window.EditMode(1)
|
||||
return
|
||||
#XXX CULL_METHOD = PupMenu('Small to large edge loop distrobution method%t|remove edges evenly|remove smallest edges')
|
||||
#XXX if CULL_METHOD == -1:
|
||||
#XXX if is_editmode: Window.EditMode(1)
|
||||
#XXX return
|
||||
|
||||
CULL_METHOD = 1 # XXX FIXME
|
||||
|
||||
|
||||
|
||||
|
||||
if CULL_METHOD ==1: # RESET CULL_METHOD
|
||||
CULL_METHOD = 0 # shortest
|
||||
|
89
release/scripts/op/presets.py
Normal file
89
release/scripts/op/presets.py
Normal file
@ -0,0 +1,89 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import bpy
|
||||
import os
|
||||
|
||||
from wm import AddPresetBase
|
||||
|
||||
|
||||
class AddPresetRender(AddPresetBase):
|
||||
'''Add a Render Preset.'''
|
||||
bl_idname = "render.preset_add"
|
||||
bl_label = "Add Render Preset"
|
||||
name = AddPresetBase.name
|
||||
|
||||
preset_values = [
|
||||
"bpy.context.scene.render_data.resolution_x",
|
||||
"bpy.context.scene.render_data.resolution_y",
|
||||
"bpy.context.scene.render_data.pixel_aspect_x",
|
||||
"bpy.context.scene.render_data.pixel_aspect_y",
|
||||
"bpy.context.scene.render_data.fps",
|
||||
"bpy.context.scene.render_data.fps_base",
|
||||
"bpy.context.scene.render_data.resolution_percentage",
|
||||
]
|
||||
|
||||
preset_path = os.path.join("presets", "render")
|
||||
|
||||
|
||||
class AddPresetSSS(AddPresetBase):
|
||||
'''Add a Subsurface Scattering Preset.'''
|
||||
bl_idname = "material.sss_preset_add"
|
||||
bl_label = "Add SSS Preset"
|
||||
name = AddPresetBase.name
|
||||
|
||||
preset_values = [
|
||||
"bpy.context.material.subsurface_scattering.back",
|
||||
"bpy.context.material.subsurface_scattering.color[0]",
|
||||
"bpy.context.material.subsurface_scattering.color[1]",
|
||||
"bpy.context.material.subsurface_scattering.color[2]",
|
||||
"bpy.context.material.subsurface_scattering.color_factor",
|
||||
"bpy.context.material.subsurface_scattering.error_tolerance",
|
||||
"bpy.context.material.subsurface_scattering.front",
|
||||
"bpy.context.material.subsurface_scattering.ior",
|
||||
"bpy.context.material.subsurface_scattering.radius[0]",
|
||||
"bpy.context.material.subsurface_scattering.radius[1]",
|
||||
"bpy.context.material.subsurface_scattering.radius[2]",
|
||||
"bpy.context.material.subsurface_scattering.scale",
|
||||
"bpy.context.material.subsurface_scattering.texture_factor",
|
||||
]
|
||||
|
||||
preset_path = os.path.join("presets", "sss")
|
||||
|
||||
class AddPresetCloth(AddPresetBase):
|
||||
'''Add a Cloth Preset.'''
|
||||
bl_idname = "cloth.preset_add"
|
||||
bl_label = "Add Cloth Preset"
|
||||
name = AddPresetBase.name
|
||||
|
||||
preset_values = [
|
||||
"bpy.context.cloth.settings.quality",
|
||||
"bpy.context.cloth.settings.mass",
|
||||
"bpy.context.cloth.settings.structural_stiffness",
|
||||
"bpy.context.cloth.settings.bending_stiffness",
|
||||
"bpy.context.cloth.settings.spring_damping",
|
||||
"bpy.context.cloth.settings.air_damping",
|
||||
]
|
||||
|
||||
preset_path = os.path.join("presets", "cloth")
|
||||
|
||||
bpy.ops.add(AddPresetRender)
|
||||
bpy.ops.add(AddPresetSSS)
|
||||
bpy.ops.add(AddPresetCloth)
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ class SmartProject(bpy.types.Operator):
|
||||
return context.active_object != None
|
||||
|
||||
def execute(self, context):
|
||||
main(context, self.island_margin, self.angle_limit)
|
||||
main(context, self.properties.island_margin, self.properties.angle_limit)
|
||||
return ('FINISHED',)
|
||||
|
||||
bpy.ops.add(SmartProject)
|
||||
|
@ -166,7 +166,7 @@ class VertexPaintDirt(bpy.types.Operator):
|
||||
|
||||
t = time.time()
|
||||
|
||||
applyVertexDirt(me, self.blur_iterations, self.blur_strength, math.radians(self.dirt_angle), math.radians(self.clean_angle), self.dirt_only)
|
||||
applyVertexDirt(me, self.properties.blur_iterations, self.properties.blur_strength, math.radians(self.properties.dirt_angle), math.radians(self.properties.clean_angle), self.properties.dirt_only)
|
||||
|
||||
print('Dirt calculated in %.6f' % (time.time()-t))
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
@ -19,6 +19,7 @@
|
||||
# <pep8-80 compliant>
|
||||
|
||||
import bpy
|
||||
import os
|
||||
|
||||
from bpy.props import *
|
||||
|
||||
@ -60,10 +61,9 @@ def context_path_validate(context, path):
|
||||
|
||||
|
||||
def execute_context_assign(self, context):
|
||||
if context_path_validate(context, self.path) == NullPathMember:
|
||||
if context_path_validate(context, self.properties.path) == NullPathMember:
|
||||
return ('PASS_THROUGH',)
|
||||
|
||||
exec("context.%s=self.value" % self.path)
|
||||
exec("context.%s=self.properties.value" % self.properties.path)
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||
|
||||
class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_int"
|
||||
bl_idname = "wm.context_set_float"
|
||||
bl_label = "Context Set"
|
||||
|
||||
path = rna_path_prop
|
||||
@ -135,10 +135,10 @@ class WM_OT_context_toggle(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
if context_path_validate(context, self.path) == NullPathMember:
|
||||
if context_path_validate(context, self.properties.path) == NullPathMember:
|
||||
return ('PASS_THROUGH',)
|
||||
|
||||
exec("context.%s=not (context.%s)" % (self.path, self.path))
|
||||
exec("context.%s=not (context.%s)" % (self.properties.path, self.properties.path))
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
@ -156,11 +156,11 @@ class WM_OT_context_toggle_enum(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
if context_path_validate(context, self.path) == NullPathMember:
|
||||
if context_path_validate(context, self.properties.path) == NullPathMember:
|
||||
return ('PASS_THROUGH',)
|
||||
|
||||
exec("context.%s = ['%s', '%s'][context.%s!='%s']" % \
|
||||
(self.path, self.value_1, self.value_2, self.path, self.value_2))
|
||||
(self.properties.path, self.properties.value_1, self.properties.value_2, self.properties.path, self.properties.value_2))
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
@ -175,23 +175,23 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
value = context_path_validate(context, self.path)
|
||||
value = context_path_validate(context, self.properties.path)
|
||||
if value == NullPathMember:
|
||||
return ('PASS_THROUGH',)
|
||||
|
||||
self.value = value
|
||||
if self.reverse:
|
||||
self.value -= 1
|
||||
self.properties.value = value
|
||||
if self.properties.reverse:
|
||||
self.properties.value -= 1
|
||||
else:
|
||||
self.value += 1
|
||||
self.properties.value += 1
|
||||
execute_context_assign(self, context)
|
||||
|
||||
if self.value != eval("context.%s" % self.path):
|
||||
if self.properties.value != eval("context.%s" % self.properties.path):
|
||||
# relies on rna clamping int's out of the range
|
||||
if self.reverse:
|
||||
self.value = (1 << 32)
|
||||
if self.properties.reverse:
|
||||
self.properties.value = (1 << 32)
|
||||
else:
|
||||
self.value = - (1 << 32)
|
||||
self.properties.value = - (1 << 32)
|
||||
execute_context_assign(self, context)
|
||||
|
||||
return ('FINISHED',)
|
||||
@ -207,14 +207,14 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
value = context_path_validate(context, self.path)
|
||||
value = context_path_validate(context, self.properties.path)
|
||||
if value == NullPathMember:
|
||||
return ('PASS_THROUGH',)
|
||||
|
||||
orig_value = value
|
||||
|
||||
# Have to get rna enum values
|
||||
rna_struct_str, rna_prop_str = self.path.rsplit('.', 1)
|
||||
rna_struct_str, rna_prop_str = self.properties.path.rsplit('.', 1)
|
||||
i = rna_prop_str.find('[')
|
||||
|
||||
# just incse we get "context.foo.bar[0]"
|
||||
@ -232,7 +232,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
|
||||
orig_index = enums.index(orig_value)
|
||||
|
||||
# Have the info we need, advance to the next item
|
||||
if self.reverse:
|
||||
if self.properties.reverse:
|
||||
if orig_index == 0:
|
||||
advance_enum = enums[-1]
|
||||
else:
|
||||
@ -244,7 +244,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
|
||||
advance_enum = enums[orig_index + 1]
|
||||
|
||||
# set the new value
|
||||
exec("context.%s=advance_enum" % self.path)
|
||||
exec("context.%s=advance_enum" % self.properties.path)
|
||||
return ('FINISHED',)
|
||||
|
||||
doc_id = StringProperty(name="Doc ID",
|
||||
@ -271,7 +271,7 @@ class WM_OT_doc_view(bpy.types.Operator):
|
||||
return '.'.join([class_obj.identifier for class_obj in ls])
|
||||
|
||||
def execute(self, context):
|
||||
id_split = self.doc_id.split('.')
|
||||
id_split = self.properties.doc_id.split('.')
|
||||
if len(id_split) == 1: # rna, class
|
||||
url = '%s/bpy.types.%s-class.html' % (self._prefix, id_split[0])
|
||||
elif len(id_split) == 2: # rna, class.prop
|
||||
@ -317,9 +317,9 @@ class WM_OT_doc_edit(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
class_name, class_prop = self.doc_id.split('.')
|
||||
class_name, class_prop = self.properties.doc_id.split('.')
|
||||
|
||||
if not self.doc_new:
|
||||
if not self.properties.doc_new:
|
||||
return ('RUNNING_MODAL',)
|
||||
|
||||
# check if this is an operator
|
||||
@ -332,25 +332,25 @@ class WM_OT_doc_edit(bpy.types.Operator):
|
||||
if op_class:
|
||||
rna = op_class.bl_rna
|
||||
doc_orig = rna.description
|
||||
if doc_orig == self.doc_new:
|
||||
if doc_orig == self.properties.doc_new:
|
||||
return ('RUNNING_MODAL',)
|
||||
|
||||
print("op - old:'%s' -> new:'%s'" % (doc_orig, self.doc_new))
|
||||
upload["title"] = 'OPERATOR %s:%s' % (self.doc_id, doc_orig)
|
||||
upload["description"] = self.doc_new
|
||||
print("op - old:'%s' -> new:'%s'" % (doc_orig, self.properties.doc_new))
|
||||
upload["title"] = 'OPERATOR %s:%s' % (self.properties.doc_id, doc_orig)
|
||||
upload["description"] = self.properties.doc_new
|
||||
|
||||
self._send_xmlrpc(upload)
|
||||
|
||||
else:
|
||||
rna = getattr(bpy.types, class_name).bl_rna
|
||||
doc_orig = rna.properties[class_prop].description
|
||||
if doc_orig == self.doc_new:
|
||||
if doc_orig == self.properties.doc_new:
|
||||
return ('RUNNING_MODAL',)
|
||||
|
||||
print("rna - old:'%s' -> new:'%s'" % (doc_orig, self.doc_new))
|
||||
upload["title"] = 'RNA %s:%s' % (self.doc_id, doc_orig)
|
||||
print("rna - old:'%s' -> new:'%s'" % (doc_orig, self.properties.doc_new))
|
||||
upload["title"] = 'RNA %s:%s' % (self.properties.doc_id, doc_orig)
|
||||
|
||||
upload["description"] = self.doc_new
|
||||
upload["description"] = self.properties.doc_new
|
||||
|
||||
self._send_xmlrpc(upload)
|
||||
|
||||
@ -362,6 +362,84 @@ class WM_OT_doc_edit(bpy.types.Operator):
|
||||
return ('RUNNING_MODAL',)
|
||||
|
||||
|
||||
class WM_OT_reload_scripts(bpy.types.Operator):
|
||||
'''Load online reference docs'''
|
||||
bl_idname = "wm.reload_scripts"
|
||||
bl_label = "Reload Scripts"
|
||||
|
||||
def execute(self, context):
|
||||
MOD = type(bpy)
|
||||
import sys
|
||||
bpy.load_scripts(True)
|
||||
'''
|
||||
prefix = bpy.base_path
|
||||
items = list(sys.modules.items())
|
||||
items.sort()
|
||||
items.reverse()
|
||||
for mod_name, mod in items:
|
||||
mod_file = getattr(mod, "__file__", "")
|
||||
if mod_file.startswith(prefix) and "__init__" not in mod_file:
|
||||
print(mod_file)
|
||||
reload(mod)
|
||||
"""
|
||||
for submod_name in dir(mod):
|
||||
submod = getattr(mod, submod_name)
|
||||
if isinstance(submod, MOD):
|
||||
reload(submod)
|
||||
"""
|
||||
else:
|
||||
print("Ignoring:", mod, mod_file)
|
||||
'''
|
||||
return ('FINISHED',)
|
||||
|
||||
class AddPresetBase(bpy.types.Operator):
|
||||
'''Base preset class, only for subclassing
|
||||
subclasses must define
|
||||
- preset_values
|
||||
- preset_path '''
|
||||
bl_idname = "render.preset_add"
|
||||
bl_label = "Add Render Preset"
|
||||
|
||||
name = bpy.props.StringProperty(name="Name", description="Name of the preset, used to make the path name", maxlen= 64, default= "New Preset")
|
||||
|
||||
'''
|
||||
preset_values = [
|
||||
"bpy.context.scene.render_data.resolution_x",
|
||||
"bpy.context.scene.render_data.resolution_y",
|
||||
"bpy.context.scene.render_data.pixel_aspect_x",
|
||||
"bpy.context.scene.render_data.pixel_aspect_y",
|
||||
"bpy.context.scene.render_data.fps",
|
||||
"bpy.context.scene.render_data.fps_base",
|
||||
"bpy.context.scene.render_data.resolution_percentage",
|
||||
]
|
||||
|
||||
preset_path = os.path.join("presets", "render")
|
||||
'''
|
||||
|
||||
def _as_filename(self, name): # could reuse for other presets
|
||||
for char in " !@#$%^&*(){}:\";'[]<>,./?":
|
||||
name = name.replace('.', '_')
|
||||
return name.lower()
|
||||
|
||||
def execute(self, context):
|
||||
filename = self._as_filename(self.properties.name) + ".py"
|
||||
|
||||
target_path = os.path.join(os.path.dirname(__file__), os.path.pardir, self.preset_path, filename)
|
||||
|
||||
file_preset = open(target_path, 'w')
|
||||
|
||||
for rna_path in self.preset_values:
|
||||
file_preset.write("%s = %s\n" % (rna_path, eval(rna_path)))
|
||||
|
||||
file_preset.close()
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
wm = context.manager
|
||||
wm.invoke_props_popup(self, event)
|
||||
return ('RUNNING_MODAL',)
|
||||
|
||||
bpy.ops.add(MESH_OT_delete_edgeloop)
|
||||
|
||||
bpy.ops.add(WM_OT_context_set_boolean)
|
||||
@ -376,3 +454,11 @@ bpy.ops.add(WM_OT_context_cycle_int)
|
||||
|
||||
bpy.ops.add(WM_OT_doc_view)
|
||||
bpy.ops.add(WM_OT_doc_edit)
|
||||
|
||||
bpy.ops.add(WM_OT_reload_scripts)
|
||||
|
||||
# experemental!
|
||||
import rna_prop_ui
|
||||
bpy.ops.add(rna_prop_ui.WM_OT_properties_edit)
|
||||
bpy.ops.add(rna_prop_ui.WM_OT_properties_add)
|
||||
bpy.ops.add(rna_prop_ui.WM_OT_properties_remove)
|
||||
|
6
release/scripts/presets/cloth/cotton.py
Normal file
6
release/scripts/presets/cloth/cotton.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.cloth.settings.quality = 5
|
||||
bpy.context.cloth.settings.mass = 0.300
|
||||
bpy.context.cloth.settings.structural_stiffness = 15.000
|
||||
bpy.context.cloth.settings.bending_stiffness = 0.500
|
||||
bpy.context.cloth.settings.spring_damping = 5.000
|
||||
bpy.context.cloth.settings.air_damping = 1.000
|
6
release/scripts/presets/cloth/denim.py
Normal file
6
release/scripts/presets/cloth/denim.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.cloth.settings.quality = 12
|
||||
bpy.context.cloth.settings.mass = 1
|
||||
bpy.context.cloth.settings.structural_stiffness = 40
|
||||
bpy.context.cloth.settings.bending_stiffness = 10
|
||||
bpy.context.cloth.settings.spring_damping = 25
|
||||
bpy.context.cloth.settings.air_damping = 1
|
6
release/scripts/presets/cloth/leather.py
Normal file
6
release/scripts/presets/cloth/leather.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.cloth.settings.quality = 15
|
||||
bpy.context.cloth.settings.mass = 0.4
|
||||
bpy.context.cloth.settings.structural_stiffness = 80
|
||||
bpy.context.cloth.settings.bending_stiffness = 150
|
||||
bpy.context.cloth.settings.spring_damping = 25
|
||||
bpy.context.cloth.settings.air_damping = 1
|
6
release/scripts/presets/cloth/rubber.py
Normal file
6
release/scripts/presets/cloth/rubber.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.active_object.modifiers['Cloth'].settings.quality = 7
|
||||
bpy.context.active_object.modifiers['Cloth'].settings.mass = 3
|
||||
bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness = 15
|
||||
bpy.context.active_object.modifiers['Cloth'].settings.bending_stiffness = 25
|
||||
bpy.context.active_object.modifiers['Cloth'].settings.spring_damping = 25
|
||||
bpy.context.active_object.modifiers['Cloth'].settings.air_damping = 1
|
6
release/scripts/presets/cloth/silk.py
Normal file
6
release/scripts/presets/cloth/silk.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.cloth.settings.quality = 5
|
||||
bpy.context.cloth.settings.mass = 0.150
|
||||
bpy.context.cloth.settings.structural_stiffness = 5
|
||||
bpy.context.cloth.settings.bending_stiffness = 0.05
|
||||
bpy.context.cloth.settings.spring_damping = 0
|
||||
bpy.context.cloth.settings.air_damping = 1
|
5
release/scripts/presets/render/HDTV_1080p.py
Normal file
5
release/scripts/presets/render/HDTV_1080p.py
Normal file
@ -0,0 +1,5 @@
|
||||
bpy.context.scene.render_data.resolution_x = 1920
|
||||
bpy.context.scene.render_data.resolution_y = 1080
|
||||
bpy.context.scene.render_data.resolution_percentage = 100
|
||||
bpy.context.scene.render_data.pixel_aspect_x = 1
|
||||
bpy.context.scene.render_data.pixel_aspect_y = 1
|
5
release/scripts/presets/render/HDTV_720p.py
Normal file
5
release/scripts/presets/render/HDTV_720p.py
Normal file
@ -0,0 +1,5 @@
|
||||
bpy.context.scene.render_data.resolution_x = 1280
|
||||
bpy.context.scene.render_data.resolution_y = 720
|
||||
bpy.context.scene.render_data.resolution_percentage = 100
|
||||
bpy.context.scene.render_data.pixel_aspect_x = 1
|
||||
bpy.context.scene.render_data.pixel_aspect_y = 1
|
7
release/scripts/presets/render/TV_NTSC.py
Normal file
7
release/scripts/presets/render/TV_NTSC.py
Normal file
@ -0,0 +1,7 @@
|
||||
bpy.context.scene.render_data.resolution_x = 720
|
||||
bpy.context.scene.render_data.resolution_y = 480
|
||||
bpy.context.scene.render_data.resolution_percentage = 100
|
||||
bpy.context.scene.render_data.pixel_aspect_x = 10
|
||||
bpy.context.scene.render_data.pixel_aspect_y = 11
|
||||
bpy.context.scene.render_data.fps = 30
|
||||
bpy.context.scene.render_data.fps_base = 1.001
|
6
release/scripts/presets/render/TV_PAL.py
Normal file
6
release/scripts/presets/render/TV_PAL.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.scene.render_data.resolution_x = 720
|
||||
bpy.context.scene.render_data.resolution_y = 576
|
||||
bpy.context.scene.render_data.resolution_percentage = 100
|
||||
bpy.context.scene.render_data.pixel_aspect_x = 54
|
||||
bpy.context.scene.render_data.pixel_aspect_y = 51
|
||||
bpy.context.scene.render_data.fps = 25
|
6
release/scripts/presets/render/TV_PAL_16_colon_9.py
Normal file
6
release/scripts/presets/render/TV_PAL_16_colon_9.py
Normal file
@ -0,0 +1,6 @@
|
||||
bpy.context.scene.render_data.resolution_x = 720
|
||||
bpy.context.scene.render_data.resolution_y = 576
|
||||
bpy.context.scene.render_data.resolution_percentage = 100
|
||||
bpy.context.scene.render_data.pixel_aspect_x = 64
|
||||
bpy.context.scene.render_data.pixel_aspect_y = 45
|
||||
bpy.context.scene.render_data.fps = 25
|
2
release/scripts/presets/sss/Apple.py
Normal file
2
release/scripts/presets/sss/Apple.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 11.605, 3.884, 1.754
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.430, 0.210, 0.168
|
2
release/scripts/presets/sss/Chicken.py
Normal file
2
release/scripts/presets/sss/Chicken.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 9.436, 3.348, 1.790
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.439, 0.216, 0.141
|
2
release/scripts/presets/sss/Cream.py
Normal file
2
release/scripts/presets/sss/Cream.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 15.028, 4.664, 2.541
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.987, 0.943, 0.827
|
2
release/scripts/presets/sss/Ketchup.py
Normal file
2
release/scripts/presets/sss/Ketchup.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 4.762, 0.575, 0.394
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.222, 0.008, 0.002
|
2
release/scripts/presets/sss/Marble.py
Normal file
2
release/scripts/presets/sss/Marble.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 8.509, 5.566, 3.951
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.925, 0.905, 0.884
|
2
release/scripts/presets/sss/Potato.py
Normal file
2
release/scripts/presets/sss/Potato.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 14.266, 7.228, 2.036
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.855, 0.740, 0.292
|
2
release/scripts/presets/sss/Skin1.py
Normal file
2
release/scripts/presets/sss/Skin1.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 3.673, 1.367, 0.683
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.574, 0.313, 0.174
|
2
release/scripts/presets/sss/Skin2.py
Normal file
2
release/scripts/presets/sss/Skin2.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 4.821, 1.694, 1.090
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.749, 0.571, 0.467
|
2
release/scripts/presets/sss/Skin_Milk.py
Normal file
2
release/scripts/presets/sss/Skin_Milk.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 18.424, 10.443, 3.502
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.889, 0.888, 0.796
|
2
release/scripts/presets/sss/Whole_Milk.py
Normal file
2
release/scripts/presets/sss/Whole_Milk.py
Normal file
@ -0,0 +1,2 @@
|
||||
bpy.context.active_object.active_material.subsurface_scattering.radius = 10.899, 6.575, 2.508
|
||||
bpy.context.active_object.active_material.subsurface_scattering.color = 0.947, 0.931, 0.852
|
@ -1,21 +1,3 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# This script must be assigned to a python controller
|
||||
# where it can access the object that owns it and the sensors/actuators that it connects to.
|
||||
|
||||
@ -42,23 +24,23 @@ def main():
|
||||
|
||||
# Some example functions, remove to write your own script.
|
||||
# check for a positive sensor, will run on any object without errors.
|
||||
print 'Logic info for KX_GameObject', own.name
|
||||
print('Logic info for KX_GameObject', own.name)
|
||||
input = False
|
||||
|
||||
for sens in cont.sensors:
|
||||
# The sensor can be on another object, we may want to use it
|
||||
own_sens = sens.owner
|
||||
print ' sensor:', sens.name,
|
||||
print(' sensor:', sens.name, end=' ')
|
||||
if sens.positive:
|
||||
print '(true)'
|
||||
print('(true)')
|
||||
input = True
|
||||
else:
|
||||
print '(false)'
|
||||
print('(false)')
|
||||
|
||||
for actu in cont.actuators:
|
||||
# The actuator can be on another object, we may want to use it
|
||||
own_actu = actu.owner
|
||||
print ' actuator:', actu.name
|
||||
print(' actuator:', actu.name)
|
||||
|
||||
# This runs the actuator or turns it off
|
||||
# note that actuators will continue to run unless explicitly turned off.
|
||||
@ -76,9 +58,9 @@ def main():
|
||||
|
||||
# Loop through all other objects in the scene
|
||||
sce = GameLogic.getCurrentScene()
|
||||
print 'Scene Objects:', sce.name
|
||||
print('Scene Objects:', sce.name)
|
||||
for ob in sce.objects:
|
||||
print ' ', ob.name, ob.worldPosition
|
||||
print(' ', ob.name, ob.worldPosition)
|
||||
|
||||
|
||||
# Example where collision objects are checked for their properties
|
||||
@ -90,7 +72,7 @@ def main():
|
||||
if ob.has_key('life'):
|
||||
own['life'] += ob['life']
|
||||
ob['life'] = 0
|
||||
print own['life']
|
||||
print(own['life'])
|
||||
"""
|
||||
|
||||
main()
|
||||
|
@ -1,20 +1,3 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
def main():
|
||||
|
||||
|
@ -1,21 +1,3 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# This module can be accessed by a python controller with
|
||||
# its execution method set to 'Module'
|
||||
# * Set the module string to "gamelogic_module.main" (without quotes)
|
||||
|
@ -1,20 +1,3 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import bpy
|
||||
|
||||
@ -45,7 +28,7 @@ class ExportSomeData(bpy.types.Operator):
|
||||
#if not self.is_property_set("path"):
|
||||
# raise Exception("filename not set")
|
||||
|
||||
write_some_data(self.path, context, self.use_setting)
|
||||
write_some_data(self.properties.path, context, self.properties.use_setting)
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
|
@ -1,20 +1,3 @@
|
||||
# ##### 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
def main(context):
|
||||
for ob in context.scene.objects:
|
||||
|
@ -19,6 +19,8 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
|
||||
class DataButtonsPanel(bpy.types.Panel):
|
||||
bl_space_type = 'PROPERTIES'
|
||||
@ -39,15 +41,18 @@ class DATA_PT_context_arm(DataButtonsPanel):
|
||||
ob = context.object
|
||||
arm = context.armature
|
||||
space = context.space_data
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split(percentage=0.65)
|
||||
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif arm:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
if wide_ui:
|
||||
split = layout.split(percentage=0.65)
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif arm:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
else:
|
||||
layout.template_ID(ob, "data")
|
||||
|
||||
|
||||
class DATA_PT_skeleton(DataButtonsPanel):
|
||||
@ -56,9 +61,8 @@ class DATA_PT_skeleton(DataButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
ob = context.object
|
||||
arm = context.armature
|
||||
space = context.space_data
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(arm, "pose_position", expand=True)
|
||||
|
||||
@ -70,7 +74,8 @@ class DATA_PT_skeleton(DataButtonsPanel):
|
||||
col.itemL(text="Protected Layers:")
|
||||
col.itemR(arm, "layer_protection", text="")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Deform:")
|
||||
col.itemR(arm, "deform_vertexgroups", text="Vertex Groups")
|
||||
col.itemR(arm, "deform_envelope", text="Envelopes")
|
||||
@ -85,15 +90,24 @@ class DATA_PT_display(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
arm = context.armature
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.row().itemR(arm, "drawtype", expand=True)
|
||||
if wide_ui:
|
||||
layout.row().itemR(arm, "drawtype", expand=True)
|
||||
else:
|
||||
layout.row().itemR(arm, "drawtype", text="")
|
||||
|
||||
flow = layout.column_flow()
|
||||
flow.itemR(arm, "draw_names", text="Names")
|
||||
flow.itemR(arm, "draw_axes", text="Axes")
|
||||
flow.itemR(arm, "draw_custom_bone_shapes", text="Shapes")
|
||||
flow.itemR(arm, "draw_group_colors", text="Colors")
|
||||
flow.itemR(arm, "delay_deform", text="Delay Refresh")
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemR(arm, "draw_names", text="Names")
|
||||
col.itemR(arm, "draw_axes", text="Axes")
|
||||
col.itemR(arm, "draw_custom_bone_shapes", text="Shapes")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(arm, "draw_group_colors", text="Colors")
|
||||
col.itemR(arm, "delay_deform", text="Delay Refresh")
|
||||
|
||||
|
||||
class DATA_PT_bone_groups(DataButtonsPanel):
|
||||
@ -107,6 +121,7 @@ class DATA_PT_bone_groups(DataButtonsPanel):
|
||||
|
||||
ob = context.object
|
||||
pose = ob.pose
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
row = layout.row()
|
||||
row.template_list(pose, "bone_groups", pose, "active_bone_group_index", rows=2)
|
||||
@ -122,11 +137,15 @@ class DATA_PT_bone_groups(DataButtonsPanel):
|
||||
col.active = (ob.proxy == None)
|
||||
col.itemR(group, "name")
|
||||
|
||||
split = layout.split(0.5)
|
||||
split = layout.split()
|
||||
split.active = (ob.proxy == None)
|
||||
split.itemR(group, "color_set")
|
||||
|
||||
col = split.column()
|
||||
col.itemR(group, "color_set")
|
||||
if group.color_set:
|
||||
split.template_triColorSet(group, "colors")
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.template_triColorSet(group, "colors")
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.active = (ob.proxy == None)
|
||||
@ -144,8 +163,12 @@ class DATA_PT_paths(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
arm = context.armature
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(arm, "paths_type", expand=True)
|
||||
if wide_ui:
|
||||
layout.itemR(arm, "paths_type", expand=True)
|
||||
else:
|
||||
layout.itemR(arm, "paths_type", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -161,7 +184,8 @@ class DATA_PT_paths(DataButtonsPanel):
|
||||
sub.itemR(arm, "path_size", text="Step")
|
||||
col.row().itemR(arm, "paths_location", expand=True)
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Display:")
|
||||
col.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers")
|
||||
col.itemR(arm, "paths_highlight_keyframes", text="Keyframes")
|
||||
@ -169,9 +193,14 @@ class DATA_PT_paths(DataButtonsPanel):
|
||||
|
||||
layout.itemS()
|
||||
|
||||
row = layout.row()
|
||||
row.itemO("pose.paths_calculate", text="Calculate Paths")
|
||||
row.itemO("pose.paths_clear", text="Clear Paths")
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemO("pose.paths_calculate", text="Calculate Paths")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemO("pose.paths_clear", text="Clear Paths")
|
||||
|
||||
|
||||
class DATA_PT_ghost(DataButtonsPanel):
|
||||
@ -181,8 +210,12 @@ class DATA_PT_ghost(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
arm = context.armature
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(arm, "ghost_type", expand=True)
|
||||
if wide_ui:
|
||||
layout.itemR(arm, "ghost_type", expand=True)
|
||||
else:
|
||||
layout.itemR(arm, "ghost_type", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -197,7 +230,8 @@ class DATA_PT_ghost(DataButtonsPanel):
|
||||
sub.itemR(arm, "ghost_step", text="Range")
|
||||
sub.itemR(arm, "ghost_size", text="Step")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Display:")
|
||||
col.itemR(arm, "ghost_only_selected", text="Selected Only")
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
|
||||
class BoneButtonsPanel(bpy.types.Panel):
|
||||
bl_space_type = 'PROPERTIES'
|
||||
@ -53,42 +55,65 @@ class BONE_PT_transform(BoneButtonsPanel):
|
||||
|
||||
ob = context.object
|
||||
bone = context.bone
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if not bone:
|
||||
bone = context.edit_bone
|
||||
if wide_ui:
|
||||
row = layout.row()
|
||||
row.column().itemR(bone, "head")
|
||||
row.column().itemR(bone, "tail")
|
||||
|
||||
row = layout.row()
|
||||
row.column().itemR(bone, "head")
|
||||
row.column().itemR(bone, "tail")
|
||||
|
||||
col = row.column()
|
||||
sub = col.column(align=True)
|
||||
sub.itemL(text="Roll:")
|
||||
sub.itemR(bone, "roll", text="")
|
||||
sub.itemL()
|
||||
sub.itemR(bone, "locked")
|
||||
col = row.column()
|
||||
sub = col.column(align=True)
|
||||
sub.itemL(text="Roll:")
|
||||
sub.itemR(bone, "roll", text="")
|
||||
sub.itemL()
|
||||
sub.itemR(bone, "locked")
|
||||
else:
|
||||
col = layout.column()
|
||||
col.itemR(bone, "head")
|
||||
col.itemR(bone, "tail")
|
||||
col.itemR(bone, "roll")
|
||||
col.itemR(bone, "locked")
|
||||
|
||||
else:
|
||||
pchan = ob.pose.pose_channels[context.bone.name]
|
||||
pchan = ob.pose.bones[context.bone.name]
|
||||
|
||||
row = layout.row()
|
||||
col = row.column()
|
||||
col.itemR(pchan, "location")
|
||||
col.active = not (bone.parent and bone.connected)
|
||||
if wide_ui:
|
||||
row = layout.row()
|
||||
col = row.column()
|
||||
col.itemR(pchan, "location")
|
||||
col.active = not (bone.parent and bone.connected)
|
||||
|
||||
col = row.column()
|
||||
if pchan.rotation_mode == 'QUATERNION':
|
||||
col.itemR(pchan, "rotation_quaternion", text="Rotation")
|
||||
elif pchan.rotation_mode == 'AXIS_ANGLE':
|
||||
#col.itemL(text="Rotation")
|
||||
#col.itemR(pchan, "rotation_angle", text="Angle")
|
||||
#col.itemR(pchan, "rotation_axis", text="Axis")
|
||||
col.itemR(pchan, "rotation_axis_angle", text="Rotation")
|
||||
col = row.column()
|
||||
if pchan.rotation_mode == 'QUATERNION':
|
||||
col.itemR(pchan, "rotation_quaternion", text="Rotation")
|
||||
elif pchan.rotation_mode == 'AXIS_ANGLE':
|
||||
#col.itemL(text="Rotation")
|
||||
#col.itemR(pchan, "rotation_angle", text="Angle")
|
||||
#col.itemR(pchan, "rotation_axis", text="Axis")
|
||||
col.itemR(pchan, "rotation_axis_angle", text="Rotation")
|
||||
else:
|
||||
col.itemR(pchan, "rotation_euler", text="Rotation")
|
||||
|
||||
row.column().itemR(pchan, "scale")
|
||||
|
||||
layout.itemR(pchan, "rotation_mode")
|
||||
else:
|
||||
col.itemR(pchan, "rotation_euler", text="Rotation")
|
||||
|
||||
row.column().itemR(pchan, "scale")
|
||||
|
||||
layout.itemR(pchan, "rotation_mode")
|
||||
col = layout.column()
|
||||
sub = col.column()
|
||||
sub.active = not (bone.parent and bone.connected)
|
||||
sub.itemR(pchan, "location")
|
||||
col.itemL(text="Rotation:")
|
||||
col.itemR(pchan, "rotation_mode", text="")
|
||||
if pchan.rotation_mode == 'QUATERNION':
|
||||
col.itemR(pchan, "rotation_quaternion", text="")
|
||||
elif pchan.rotation_mode == 'AXIS_ANGLE':
|
||||
col.itemR(pchan, "rotation_axis_angle", text="")
|
||||
else:
|
||||
col.itemR(pchan, "rotation_euler", text="")
|
||||
col.itemR(pchan, "scale")
|
||||
|
||||
|
||||
class BONE_PT_transform_locks(BoneButtonsPanel):
|
||||
@ -103,7 +128,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel):
|
||||
|
||||
ob = context.object
|
||||
bone = context.bone
|
||||
pchan = ob.pose.pose_channels[context.bone.name]
|
||||
pchan = ob.pose.bones[context.bone.name]
|
||||
|
||||
row = layout.row()
|
||||
col = row.column()
|
||||
@ -131,12 +156,13 @@ class BONE_PT_relations(BoneButtonsPanel):
|
||||
ob = context.object
|
||||
bone = context.bone
|
||||
arm = context.armature
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if not bone:
|
||||
bone = context.edit_bone
|
||||
pchan = None
|
||||
else:
|
||||
pchan = ob.pose.pose_channels[context.bone.name]
|
||||
pchan = ob.pose.bones[context.bone.name]
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -150,7 +176,8 @@ class BONE_PT_relations(BoneButtonsPanel):
|
||||
col.itemL(text="Bone Group:")
|
||||
col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Parent:")
|
||||
if context.bone:
|
||||
col.itemR(bone, "parent", text="")
|
||||
@ -175,25 +202,24 @@ class BONE_PT_display(BoneButtonsPanel):
|
||||
|
||||
ob = context.object
|
||||
bone = context.bone
|
||||
arm = context.armature
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if not bone:
|
||||
bone = context.edit_bone
|
||||
pchan = None
|
||||
else:
|
||||
pchan = ob.pose.pose_channels[context.bone.name]
|
||||
pchan = ob.pose.bones[context.bone.name]
|
||||
|
||||
if ob and pchan:
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
|
||||
col.itemR(bone, "draw_wire", text="Wireframe")
|
||||
col.itemR(bone, "hidden", text="Hide")
|
||||
|
||||
col = split.column()
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Custom Shape:")
|
||||
col.itemR(pchan, "custom_shape", text="")
|
||||
|
||||
@ -214,6 +240,7 @@ class BONE_PT_deform(BoneButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
bone = context.bone
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if not bone:
|
||||
bone = context.edit_bone
|
||||
@ -235,7 +262,8 @@ class BONE_PT_deform(BoneButtonsPanel):
|
||||
sub.itemR(bone, "head_radius", text="Head")
|
||||
sub.itemR(bone, "tail_radius", text="Tail")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Curved Bones:")
|
||||
|
||||
sub = col.column(align=True)
|
||||
@ -246,9 +274,26 @@ class BONE_PT_deform(BoneButtonsPanel):
|
||||
col.itemL(text="Offset:")
|
||||
col.itemR(bone, "cyclic_offset")
|
||||
|
||||
|
||||
class BONE_PT_properties(BoneButtonsPanel):
|
||||
bl_label = "Properties"
|
||||
bl_default_closed = True
|
||||
|
||||
def draw(self, context):
|
||||
import rna_prop_ui
|
||||
# reload(rna_prop_ui)
|
||||
obj = context.object
|
||||
if obj and obj.mode == 'POSE':
|
||||
item = "active_pchan"
|
||||
else:
|
||||
item = "active_bone"
|
||||
|
||||
rna_prop_ui.draw(self.layout, context, item)
|
||||
|
||||
bpy.types.register(BONE_PT_context_bone)
|
||||
bpy.types.register(BONE_PT_transform)
|
||||
bpy.types.register(BONE_PT_transform_locks)
|
||||
bpy.types.register(BONE_PT_relations)
|
||||
bpy.types.register(BONE_PT_display)
|
||||
bpy.types.register(BONE_PT_deform)
|
||||
bpy.types.register(BONE_PT_properties)
|
||||
|
@ -19,6 +19,8 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
|
||||
class DataButtonsPanel(bpy.types.Panel):
|
||||
bl_space_type = 'PROPERTIES'
|
||||
@ -39,15 +41,21 @@ class DATA_PT_context_camera(DataButtonsPanel):
|
||||
ob = context.object
|
||||
cam = context.camera
|
||||
space = context.space_data
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split(percentage=0.65)
|
||||
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif cam:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
if wide_ui:
|
||||
split = layout.split(percentage=0.65)
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif cam:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
else:
|
||||
if ob:
|
||||
layout.template_ID(ob, "data")
|
||||
elif cam:
|
||||
layout.template_ID(space, "pin_id")
|
||||
|
||||
|
||||
class DATA_PT_camera(DataButtonsPanel):
|
||||
@ -57,19 +65,27 @@ class DATA_PT_camera(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
cam = context.camera
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(cam, "type", expand=True)
|
||||
if wide_ui:
|
||||
layout.itemR(cam, "type", expand=True)
|
||||
else:
|
||||
layout.itemR(cam, "type", text="")
|
||||
|
||||
row = layout.row()
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
if cam.type == 'PERSP':
|
||||
if cam.lens_unit == 'MILLIMETERS':
|
||||
row.itemR(cam, "lens", text="Angle")
|
||||
col.itemR(cam, "lens", text="Angle")
|
||||
elif cam.lens_unit == 'DEGREES':
|
||||
row.itemR(cam, "angle")
|
||||
row.itemR(cam, "lens_unit", text="")
|
||||
col.itemR(cam, "angle")
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(cam, "lens_unit", text="")
|
||||
|
||||
elif cam.type == 'ORTHO':
|
||||
row.itemR(cam, "ortho_scale")
|
||||
col.itemR(cam, "ortho_scale")
|
||||
|
||||
layout.itemR(cam, "panorama")
|
||||
|
||||
@ -80,16 +96,22 @@ class DATA_PT_camera(DataButtonsPanel):
|
||||
col.itemR(cam, "shift_x", text="X")
|
||||
col.itemR(cam, "shift_y", text="Y")
|
||||
|
||||
col = split.column(align=True)
|
||||
if wide_ui:
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Clipping:")
|
||||
col.itemR(cam, "clip_start", text="Start")
|
||||
col.itemR(cam, "clip_end", text="End")
|
||||
|
||||
layout.itemL(text="Depth of Field:")
|
||||
|
||||
row = layout.row()
|
||||
row.itemR(cam, "dof_object", text="")
|
||||
row.itemR(cam, "dof_distance", text="Distance")
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemR(cam, "dof_object", text="")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(cam, "dof_distance", text="Distance")
|
||||
|
||||
|
||||
class DATA_PT_camera_display(DataButtonsPanel):
|
||||
@ -99,6 +121,7 @@ class DATA_PT_camera_display(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
cam = context.camera
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -108,7 +131,8 @@ class DATA_PT_camera_display(DataButtonsPanel):
|
||||
col.itemR(cam, "show_title_safe", text="Title Safe")
|
||||
col.itemR(cam, "show_name", text="Name")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(cam, "draw_size", text="Size")
|
||||
col.itemS()
|
||||
col.itemR(cam, "show_passepartout", text="Passepartout")
|
||||
|
@ -19,6 +19,8 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
|
||||
class DataButtonsPanel(bpy.types.Panel):
|
||||
bl_space_type = 'PROPERTIES'
|
||||
@ -26,7 +28,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
bl_context = "data"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object and context.object.type in ('CURVE', 'SURFACE') and context.curve)
|
||||
return (context.object and context.object.type in ('CURVE', 'SURFACE', 'TEXT') and context.curve)
|
||||
|
||||
|
||||
class DataButtonsPanelCurve(DataButtonsPanel):
|
||||
@ -54,15 +56,20 @@ class DATA_PT_context_curve(DataButtonsPanel):
|
||||
ob = context.object
|
||||
curve = context.curve
|
||||
space = context.space_data
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split(percentage=0.65)
|
||||
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif curve:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
if wide_ui:
|
||||
split = layout.split(percentage=0.65)
|
||||
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif curve:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
else:
|
||||
layout.template_ID(ob, "data")
|
||||
|
||||
|
||||
class DATA_PT_shape_curve(DataButtonsPanel):
|
||||
@ -73,49 +80,49 @@ class DATA_PT_shape_curve(DataButtonsPanel):
|
||||
|
||||
ob = context.object
|
||||
curve = context.curve
|
||||
space = context.space_data
|
||||
wide_ui = context.region.width > narrowui
|
||||
is_surf = (ob.type == 'SURFACE')
|
||||
is_curve = (ob.type == 'CURVE')
|
||||
is_text = (ob.type == 'TEXT')
|
||||
|
||||
if not is_surf:
|
||||
if is_curve:
|
||||
row = layout.row()
|
||||
row.itemR(curve, "dimensions", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
|
||||
if not is_surf:
|
||||
sub = col.column()
|
||||
sub.active = (curve.dimensions == '2D')
|
||||
sub.itemL(text="Caps:")
|
||||
row = sub.row()
|
||||
row.itemR(curve, "front")
|
||||
row.itemR(curve, "back")
|
||||
|
||||
col.itemL(text="Textures:")
|
||||
# col.itemR(curve, "uv_orco")
|
||||
col.itemR(curve, "auto_texspace")
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="Resolution:")
|
||||
sub = col.column(align=True)
|
||||
sub.itemR(curve, "resolution_u", text="Preview U")
|
||||
sub.itemR(curve, "render_resolution_u", text="Render U")
|
||||
if is_curve:
|
||||
col.itemL(text="Twisting:")
|
||||
col.itemR(curve, "twist_mode", text="")
|
||||
col.itemR(curve, "twist_smooth", text="Smooth")
|
||||
if is_text:
|
||||
col.itemL(text="Display:")
|
||||
col.itemR(curve, "fast", text="Fast Editing")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
|
||||
if is_surf:
|
||||
sub = col.column(align=True)
|
||||
sub.itemL(text="")
|
||||
sub.itemR(curve, "resolution_v", text="Preview V")
|
||||
sub.itemR(curve, "render_resolution_v", text="Render V")
|
||||
|
||||
# XXX - put somewhere nicer.
|
||||
row = layout.row()
|
||||
row.itemR(curve, "twist_mode")
|
||||
row.itemR(curve, "twist_smooth") # XXX - may not be kept
|
||||
if is_curve or is_text:
|
||||
sub = col.column()
|
||||
sub.active = (curve.dimensions == '2D')
|
||||
sub.itemL(text="Caps:")
|
||||
sub.itemR(curve, "front")
|
||||
sub.itemR(curve, "back")
|
||||
|
||||
# col.itemL(text="Display:")
|
||||
# col.itemL(text="HANDLES")
|
||||
# col.itemL(text="NORMALS")
|
||||
# col.itemR(curve, "vertex_normal_flip")
|
||||
col.itemL(text="Textures:")
|
||||
# col.itemR(curve, "uv_orco")
|
||||
col.itemR(curve, "auto_texspace")
|
||||
|
||||
|
||||
class DATA_PT_geometry_curve(DataButtonsPanel):
|
||||
@ -125,6 +132,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
curve = context.curve
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -135,7 +143,8 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
|
||||
col.itemL(text="Taper Object:")
|
||||
col.itemR(curve, "taper_object", text="")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Bevel:")
|
||||
col.itemR(curve, "bevel_depth", text="Depth")
|
||||
col.itemR(curve, "bevel_resolution", text="Resolution")
|
||||
@ -155,17 +164,24 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
|
||||
layout = self.layout
|
||||
|
||||
curve = context.curve
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.active = curve.use_path
|
||||
|
||||
row = layout.row()
|
||||
layout.itemR(curve, "path_length", text="Frames")
|
||||
|
||||
if wide_ui:
|
||||
row.itemL()
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemR(curve, "path_length", text="Frames")
|
||||
col.itemR(curve, "use_path_follow")
|
||||
|
||||
col = split.column()
|
||||
col.itemR(curve, "use_stretch")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(curve, "use_radius")
|
||||
col.itemR(curve, "use_time_offset", text="Offset Children")
|
||||
|
||||
@ -229,7 +245,6 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
|
||||
sub.itemR(act_spline, "order_v", text="V")
|
||||
sub.itemR(act_spline, "resolution_v", text="V")
|
||||
|
||||
|
||||
if not is_surf:
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
@ -239,12 +254,127 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
|
||||
col.itemR(act_spline, "tilt_interpolation", text="Tilt")
|
||||
col.itemR(act_spline, "radius_interpolation", text="Radius")
|
||||
|
||||
split = layout.split()
|
||||
layout.itemR(act_spline, "smooth")
|
||||
|
||||
|
||||
class DATA_PT_font(DataButtonsPanel):
|
||||
bl_label = "Font"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object and context.object.type == 'TEXT' and context.curve)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
text = context.curve
|
||||
char = context.curve.edit_format
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if wide_ui:
|
||||
layout.itemR(text, "font")
|
||||
else:
|
||||
layout.itemR(text, "font", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemR(text, "text_size", text="Size")
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(act_spline, "smooth")
|
||||
col.itemR(text, "shear")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="Object Font:")
|
||||
col.itemR(text, "family", text="")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Text on Curve:")
|
||||
col.itemR(text, "text_on_curve", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Underline:")
|
||||
col.itemR(text, "ul_position", text="Position")
|
||||
col.itemR(text, "ul_height", text="Thickness")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Character:")
|
||||
col.itemR(char, "bold")
|
||||
col.itemR(char, "italic")
|
||||
col.itemR(char, "underline")
|
||||
# col.itemR(char, "style")
|
||||
# col.itemR(char, "wrap")
|
||||
|
||||
|
||||
class DATA_PT_paragraph(DataButtonsPanel):
|
||||
bl_label = "Paragraph"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object and context.object.type == 'TEXT' and context.curve)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
text = context.curve
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemL(text="Align:")
|
||||
if wide_ui:
|
||||
layout.itemR(text, "spacemode", expand=True)
|
||||
else:
|
||||
layout.itemR(text, "spacemode", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Spacing:")
|
||||
col.itemR(text, "spacing", text="Character")
|
||||
col.itemR(text, "word_spacing", text="Word")
|
||||
col.itemR(text, "line_dist", text="Line")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Offset:")
|
||||
col.itemR(text, "offset_x", text="X")
|
||||
col.itemR(text, "offset_y", text="Y")
|
||||
|
||||
|
||||
class DATA_PT_textboxes(DataButtonsPanel):
|
||||
bl_label = "Text Boxes"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object and context.object.type == 'TEXT' and context.curve)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
text = context.curve
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
for box in text.textboxes:
|
||||
split = layout.box().split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Dimensions:")
|
||||
col.itemR(box, "width", text="Width")
|
||||
col.itemR(box, "height", text="Height")
|
||||
|
||||
if wide_ui:
|
||||
col = split.column(align=True)
|
||||
col.itemL(text="Offset:")
|
||||
col.itemR(box, "x", text="X")
|
||||
col.itemR(box, "y", text="Y")
|
||||
|
||||
bpy.types.register(DATA_PT_context_curve)
|
||||
bpy.types.register(DATA_PT_shape_curve)
|
||||
bpy.types.register(DATA_PT_geometry_curve)
|
||||
bpy.types.register(DATA_PT_pathanim)
|
||||
bpy.types.register(DATA_PT_active_spline)
|
||||
bpy.types.register(DATA_PT_font)
|
||||
bpy.types.register(DATA_PT_paragraph)
|
||||
bpy.types.register(DATA_PT_textboxes)
|
||||
|
@ -19,6 +19,8 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
|
||||
class DataButtonsPanel(bpy.types.Panel):
|
||||
bl_space_type = 'PROPERTIES'
|
||||
@ -36,8 +38,13 @@ class DATA_PT_empty(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
ob = context.object
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
if wide_ui:
|
||||
layout.itemR(ob, "empty_draw_type", text="Display")
|
||||
else:
|
||||
layout.itemR(ob, "empty_draw_type", text="")
|
||||
|
||||
layout.itemR(ob, "empty_draw_type", text="Display")
|
||||
layout.itemR(ob, "empty_draw_size", text="Size")
|
||||
|
||||
bpy.types.register(DATA_PT_empty)
|
||||
|
@ -19,6 +19,8 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
|
||||
class DataButtonsPanel(bpy.types.Panel):
|
||||
bl_space_type = 'PROPERTIES'
|
||||
@ -46,15 +48,21 @@ class DATA_PT_context_lamp(DataButtonsPanel):
|
||||
ob = context.object
|
||||
lamp = context.lamp
|
||||
space = context.space_data
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split(percentage=0.65)
|
||||
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif lamp:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
if wide_ui:
|
||||
split = layout.split(percentage=0.65)
|
||||
if ob:
|
||||
split.template_ID(ob, "data")
|
||||
split.itemS()
|
||||
elif lamp:
|
||||
split.template_ID(space, "pin_id")
|
||||
split.itemS()
|
||||
else:
|
||||
if ob:
|
||||
layout.template_ID(ob, "data")
|
||||
elif lamp:
|
||||
layout.template_ID(space, "pin_id")
|
||||
|
||||
|
||||
class DATA_PT_lamp(DataButtonsPanel):
|
||||
@ -64,8 +72,12 @@ class DATA_PT_lamp(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
lamp = context.lamp
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(lamp, "type", expand=True)
|
||||
if wide_ui:
|
||||
layout.itemR(lamp, "type", expand=True)
|
||||
else:
|
||||
layout.itemR(lamp, "type", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -91,7 +103,8 @@ class DATA_PT_lamp(DataButtonsPanel):
|
||||
col.itemR(lamp, "distance")
|
||||
col.itemR(lamp, "gamma")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(lamp, "negative")
|
||||
col.itemR(lamp, "layer", text="This Layer Only")
|
||||
col.itemR(lamp, "specular")
|
||||
@ -109,6 +122,7 @@ class DATA_PT_sunsky(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
lamp = context.lamp.sky
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(lamp, "sky")
|
||||
|
||||
@ -130,7 +144,8 @@ class DATA_PT_sunsky(DataButtonsPanel):
|
||||
sub.row().itemR(lamp, "sky_color_space", expand=True)
|
||||
sub.itemR(lamp, "sky_exposure", text="Exposure")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.active = lamp.sky
|
||||
col.itemL(text="Horizon:")
|
||||
sub = col.column()
|
||||
@ -155,7 +170,8 @@ class DATA_PT_sunsky(DataButtonsPanel):
|
||||
col.itemR(lamp, "sun_intensity", text="Sun")
|
||||
col.itemR(lamp, "atmosphere_distance_factor", text="Distance")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.active = lamp.atmosphere
|
||||
col.itemL(text="Scattering:")
|
||||
sub = col.column(align=True)
|
||||
@ -174,8 +190,12 @@ class DATA_PT_shadow(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
lamp = context.lamp
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.itemR(lamp, "shadow_method", expand=True)
|
||||
if wide_ui:
|
||||
layout.itemR(lamp, "shadow_method", expand=True)
|
||||
else:
|
||||
layout.itemR(lamp, "shadow_method", text="")
|
||||
|
||||
if lamp.shadow_method != 'NOSHADOW':
|
||||
split = layout.split()
|
||||
@ -183,14 +203,18 @@ class DATA_PT_shadow(DataButtonsPanel):
|
||||
col = split.column()
|
||||
col.itemR(lamp, "shadow_color", text="")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(lamp, "shadow_layer", text="This Layer Only")
|
||||
col.itemR(lamp, "only_shadow")
|
||||
|
||||
if lamp.shadow_method == 'RAY_SHADOW':
|
||||
col = layout.column()
|
||||
col.itemL(text="Sampling:")
|
||||
col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True)
|
||||
if wide_ui:
|
||||
col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True)
|
||||
else:
|
||||
col.itemR(lamp, "shadow_ray_sampling_method", text="")
|
||||
|
||||
if lamp.type in ('POINT', 'SUN', 'SPOT'):
|
||||
split = layout.split()
|
||||
@ -201,13 +225,14 @@ class DATA_PT_shadow(DataButtonsPanel):
|
||||
col.itemR(lamp, "shadow_ray_samples", text="Samples")
|
||||
if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
|
||||
col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
|
||||
elif lamp.type == 'AREA':
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = split.column(align=True)
|
||||
|
||||
if lamp.shape == 'SQUARE':
|
||||
col.itemR(lamp, "shadow_ray_samples_x", text="Samples")
|
||||
elif lamp.shape == 'RECTANGLE':
|
||||
@ -216,16 +241,27 @@ class DATA_PT_shadow(DataButtonsPanel):
|
||||
|
||||
if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
|
||||
col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
|
||||
elif lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
|
||||
sub.itemR(lamp, "umbra")
|
||||
sub.itemR(lamp, "dither")
|
||||
sub.itemR(lamp, "jitter")
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(lamp, "umbra")
|
||||
col.itemR(lamp, "dither")
|
||||
col.itemR(lamp, "jitter")
|
||||
else:
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
|
||||
|
||||
elif lamp.shadow_method == 'BUFFER_SHADOW':
|
||||
col = layout.column()
|
||||
col.itemL(text="Buffer Type:")
|
||||
col.row().itemR(lamp, "shadow_buffer_type", expand=True)
|
||||
if wide_ui:
|
||||
col.row().itemR(lamp, "shadow_buffer_type", expand=True)
|
||||
else:
|
||||
col.row().itemR(lamp, "shadow_buffer_type", text="")
|
||||
|
||||
if lamp.shadow_buffer_type in ('REGULAR', 'HALFWAY', 'DEEP'):
|
||||
split = layout.split()
|
||||
@ -237,7 +273,8 @@ class DATA_PT_shadow(DataButtonsPanel):
|
||||
sub.itemR(lamp, "shadow_buffer_soft", text="Soft")
|
||||
sub.itemR(lamp, "shadow_buffer_bias", text="Bias")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemL(text="Sample Buffers:")
|
||||
col.itemR(lamp, "shadow_sample_buffers", text="")
|
||||
sub = col.column(align=True)
|
||||
@ -249,15 +286,18 @@ class DATA_PT_shadow(DataButtonsPanel):
|
||||
elif lamp.shadow_buffer_type == 'IRREGULAR':
|
||||
layout.itemR(lamp, "shadow_buffer_bias", text="Bias")
|
||||
|
||||
row = layout.row()
|
||||
row.itemR(lamp, "auto_clip_start", text="Autoclip Start")
|
||||
sub = row.row()
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemR(lamp, "auto_clip_start", text="Autoclip Start")
|
||||
sub = col.column()
|
||||
sub.active = not lamp.auto_clip_start
|
||||
sub.itemR(lamp, "shadow_buffer_clip_start", text="Clip Start")
|
||||
|
||||
row = layout.row()
|
||||
row.itemR(lamp, "auto_clip_end", text="Autoclip End")
|
||||
sub = row.row()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
col.itemR(lamp, "auto_clip_end", text="Autoclip End")
|
||||
sub = col.column()
|
||||
sub.active = not lamp.auto_clip_end
|
||||
sub.itemR(lamp, "shadow_buffer_clip_end", text=" Clip End")
|
||||
|
||||
@ -298,6 +338,7 @@ class DATA_PT_spot(DataButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
lamp = context.lamp
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -307,7 +348,10 @@ class DATA_PT_spot(DataButtonsPanel):
|
||||
sub.itemR(lamp, "spot_blend", text="Blend", slider=True)
|
||||
col.itemR(lamp, "square")
|
||||
|
||||
col = split.column()
|
||||
if wide_ui:
|
||||
col = split.column()
|
||||
else:
|
||||
col.itemS()
|
||||
col.itemR(lamp, "halo")
|
||||
sub = col.column(align=True)
|
||||
sub.active = lamp.halo
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user