2004-01-06 12:28:31 +00:00
|
|
|
/* $Id$
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
|
* ***** BEGIN GPL/BL DUAL 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. The Blender
|
|
|
|
|
* Foundation also sells licenses for use in proprietary software under
|
|
|
|
|
* the Blender License. See http://www.blender.org/BL/ for information
|
|
|
|
|
* about this.
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
#ifndef BLENDEF_H
|
|
|
|
|
#define BLENDEF_H
|
|
|
|
|
|
|
|
|
|
|
2003-05-22 11:11:56 +00:00
|
|
|
/* **************** MAX ********************* */
|
|
|
|
|
|
2006-02-05 19:36:32 +00:00
|
|
|
#define MAXFRAME 300000
|
|
|
|
|
#define MAXFRAMEF 300000.0f
|
2005-03-31 18:49:52 +00:00
|
|
|
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
|
|
|
#define MINFRAME 1
|
|
|
|
|
#define MINFRAMEF 1.0
|
|
|
|
|
|
2003-05-22 11:11:56 +00:00
|
|
|
/* max length material array, 16 because of bits in matfrom */
|
2004-12-16 14:42:10 +00:00
|
|
|
#define MAXPICKBUF 10000
|
2003-05-22 11:11:56 +00:00
|
|
|
#define MAXSEQ 32
|
2006-12-20 17:57:56 +00:00
|
|
|
|
2003-05-22 11:11:56 +00:00
|
|
|
/* in buttons.c */
|
|
|
|
|
#define MAX_EFFECT 20
|
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
#ifndef MAXFLOAT
|
|
|
|
|
#define MAXFLOAT ((float)3.40282347e+38)
|
|
|
|
|
#endif
|
|
|
|
|
|
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
|
|
|
/* also fill in structs itself, dna cannot handle defines, duplicate with utildefines.h still */
|
|
|
|
|
#ifndef FILE_MAXDIR
|
2007-06-28 15:57:54 +00:00
|
|
|
#define FILE_MAXDIR 160
|
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
|
|
|
#define FILE_MAXFILE 80
|
|
|
|
|
#endif
|
2004-07-11 13:17:03 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
|
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
|
|
|
#include <float.h>
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
|
|
|
/* **************** GENERAL ********************* */
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
// return values
|
|
|
|
|
|
|
|
|
|
#define RET_OK 0
|
|
|
|
|
#define RET_ERROR 1
|
|
|
|
|
#define RET_CANCEL 2
|
|
|
|
|
#define RET_YES (1 == 1)
|
|
|
|
|
#define RET_NO (1 == 0)
|
|
|
|
|
|
2002-10-29 21:55:52 +00:00
|
|
|
#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
|
2002-10-12 11:37:38 +00:00
|
|
|
/* big endian */
|
|
|
|
|
#define MAKE_ID2(c, d) ( (c)<<8 | (d) )
|
|
|
|
|
#define MOST_SIG_BYTE 0
|
|
|
|
|
#define BBIG_ENDIAN
|
|
|
|
|
#else
|
|
|
|
|
/* little endian */
|
|
|
|
|
#define MAKE_ID2(c, d) ( (d)<<8 | (c) )
|
|
|
|
|
#define MOST_SIG_BYTE 1
|
|
|
|
|
#define BLITTLE_ENDIAN
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define SELECT 1
|
2007-06-14 14:36:27 +00:00
|
|
|
#define HIDDEN 1
|
|
|
|
|
#define FIRST 1
|
2002-10-12 11:37:38 +00:00
|
|
|
#define ACTIVE 2
|
2006-08-20 15:22:56 +00:00
|
|
|
/*#ifdef WITH_VERSE*/
|
|
|
|
|
#define VERSE 3
|
|
|
|
|
/*#endif*/
|
2005-11-19 10:55:07 +00:00
|
|
|
#define DESELECT 0
|
2002-10-12 11:37:38 +00:00
|
|
|
#define NOT_YET 0
|
2007-06-14 14:36:27 +00:00
|
|
|
#define VISIBLE 0
|
|
|
|
|
#define LAST 0
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2007-04-22 22:08:19 +00:00
|
|
|
#define TESTBASE(base) ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
|
|
|
|
|
#define TESTBASELIB(base) ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
|
2007-04-25 02:20:55 +00:00
|
|
|
#define BASE_SELECTABLE(base) ((base->lay & G.vd->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
|
2002-10-12 11:37:38 +00:00
|
|
|
#define FIRSTBASE G.scene->base.first
|
|
|
|
|
#define LASTBASE G.scene->base.last
|
|
|
|
|
#define BASACT (G.scene->basact)
|
|
|
|
|
#define OBACT (BASACT? BASACT->object: 0)
|
|
|
|
|
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
|
|
|
|
|
#define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
|
|
|
|
|
#define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
|
|
|
|
|
#define CFRA (G.scene->r.cfra)
|
|
|
|
|
#define F_CFRA ((float)(G.scene->r.cfra))
|
|
|
|
|
#define SFRA (G.scene->r.sfra)
|
|
|
|
|
#define EFRA (G.scene->r.efra)
|
2007-03-19 07:32:36 +00:00
|
|
|
#define PSFRA ((G.scene->r.psfra != 0)? (G.scene->r.psfra): (G.scene->r.sfra))
|
|
|
|
|
#define PEFRA ((G.scene->r.psfra != 0)? (G.scene->r.pefra): (G.scene->r.efra))
|
== Core ==
This adds fractional FPS support to blender and should finally
make NTSC work correctly.
NTSC has an FPS of 30.0/1.001 which is approximately 29.97 FPS.
Therefore, it is not enough to simply make frs_sec a float, since
you can't represent this accurately enough.
I added a seperate variable frs_sec_base and FPS is now
frs_sec / frs_sec_base.
I changed all the places, where frs_sec was used to my best knowledge.
For convenience sake, I added several macros, that should make life
easier in the future:
FRA2TIME(a) : convert frame number to a double precision time in seconds
TIME2FRA(a) : the same in the opposite direction
FPS : return current FPS as a double precision number
(last resort)
This closes bug #6715
Standard framerates not supported / breaks sync -- 23.967 29.967 etc.
https://projects.blender.org/tracker/?func=detail&aid=6715&group_id=9&atid=125
Please give this heavy testing with NTSC files, quicktime in/export
and the python interface.
Errors are most probably only spotted on longer timelines, so that is
also important.
The patch was tested by Troy Sobotka and me, so it most probably should
work out of the box, but wider testing is important, since errors are
very subtle.
Enjoy!
2007-10-21 15:42:08 +00:00
|
|
|
#define FRA2TIME(a) ((((double) G.scene->r.frs_sec_base) * (a)) / G.scene->r.frs_sec)
|
|
|
|
|
#define TIME2FRA(a) ((((double) G.scene->r.frs_sec) * (a)) / G.scene->r.frs_sec_base)
|
|
|
|
|
#define FPS (((double) G.scene->r.frs_sec) / G.scene->r.frs_sec_base)
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
#define ISPOIN(a, b, c) ( (a->b) && (a->c) )
|
|
|
|
|
#define ISPOIN3(a, b, c, d) ( (a->b) && (a->c) && (a->d) )
|
|
|
|
|
#define ISPOIN4(a, b, c, d, e) ( (a->b) && (a->c) && (a->d) && (a->e) )
|
|
|
|
|
|
2007-12-03 23:26:45 +00:00
|
|
|
#define BEZSELECTED(bezt) (((bezt)->f1 & SELECT) || ((bezt)->f2 & SELECT) || ((bezt)->f3 & SELECT))
|
2007-12-01 23:25:00 +00:00
|
|
|
/* for curve objects in editmode that can have hidden handles - may use for IPO's later */
|
2007-12-03 23:26:45 +00:00
|
|
|
#define BEZSELECTED_HIDDENHANDLES(bezt) ((G.f & G_HIDDENHANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt))
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* psfont */
|
|
|
|
|
#define FNT_PDRAW 1
|
|
|
|
|
#define FNT_HAEBERLI 2
|
|
|
|
|
|
|
|
|
|
/* getbutton */
|
|
|
|
|
|
|
|
|
|
/* do_global_buttons(event) */
|
|
|
|
|
|
2004-11-19 22:44:06 +00:00
|
|
|
// (first event)
|
|
|
|
|
#define B_LOCAL_ALONE 20
|
|
|
|
|
|
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_ACTLOCAL 24 /* __NLA */
|
|
|
|
|
#define B_ACTALONE 25 /* __NLA */
|
|
|
|
|
#define B_ARMLOCAL 26 /* __NLA */
|
|
|
|
|
#define B_ARMALONE 27 /* __NLA */
|
|
|
|
|
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_WORLDLOCAL 28
|
|
|
|
|
#define B_WORLDALONE 29
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_LATTLOCAL 30
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_MBALLLOCAL 31
|
|
|
|
|
#define B_CAMERALOCAL 32
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_OBLOCAL 33
|
|
|
|
|
#define B_IPOLOCAL 34
|
|
|
|
|
#define B_LAMPLOCAL 35
|
|
|
|
|
#define B_MATLOCAL 36
|
|
|
|
|
#define B_TEXLOCAL 37
|
|
|
|
|
#define B_MESHLOCAL 38
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_CURVELOCAL 39
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
#define B_LATTALONE 40
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_MBALLALONE 41
|
|
|
|
|
#define B_CAMERAALONE 42
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_OBALONE 43
|
|
|
|
|
#define B_IPOALONE 44
|
|
|
|
|
#define B_LAMPALONE 45
|
|
|
|
|
#define B_MATALONE 46
|
|
|
|
|
#define B_TEXALONE 47
|
|
|
|
|
#define B_MESHALONE 48
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_CURVEALONE 49
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
|
|
|
|
2003-04-30 13:22:26 +00:00
|
|
|
/* EVENT < 50: alones en locals */
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_KEEPDATA 60
|
2003-04-28 11:17:21 +00:00
|
|
|
#define B_CONSOLETOG 61
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_DRAWINFO 62
|
2003-04-28 11:17:21 +00:00
|
|
|
#define B_REDRCURW3D 63
|
2003-05-03 12:17:11 +00:00
|
|
|
#define B_FLIPINFOMENU 64
|
2003-05-08 16:24:58 +00:00
|
|
|
#define B_FLIPFULLSCREEN 65
|
Patch #3365, Toolbox from Tuhopuu
Patch prvovided by Guillermo, code was - afaik - from Rob Haarsma.
This changes the toolbox (space menu) to have the first level aligned
vertically. Works much easier that way, and since the items open either
left or right, it doesn't flip order of the contents for it either.
To allow people to test (and to compare) it's a user menu setting (in
View & Controls, "Plain menus"). I've turned this on by default though,
since I propose to not have it a user setting. User setting can be
removed later.
Fixed two bugs in patch:
- if saved in user settings, first time usage of this toolbox opened in
wrong location
- Button for "plain menus" was writing a short in an int
(causing this new menu not to work for big endian systems)
As a bonus I've added the long wanted hotkey support for opening and
closing sublevels of pulldowns with arrow keys!
I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).
I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
(like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
bottom for top headers. We can expect the UI is configured consistantly
for headers, so in general the menus will appear consistant as well.
Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.
If people like to check this themselves; uncomment the lines in the top
of the function uiBlockFlipOrder() in src/interface.c
2005-11-19 15:16:34 +00:00
|
|
|
#define B_PLAINMENUS 66
|
2003-04-28 11:17:21 +00:00
|
|
|
|
2003-01-30 13:19:26 +00:00
|
|
|
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_GLRESLIMITCHANGED 69
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_SHOWSPLASH 70
|
|
|
|
|
#define B_RESETAUTOSAVE 71
|
|
|
|
|
#define B_SOUNDTOGGLE 72
|
|
|
|
|
#define B_MIPMAPCHANGED 73
|
|
|
|
|
#define B_CONSTRAINTBROWSE 74 /* __NLA */
|
|
|
|
|
#define B_ACTIONDELETE 75 /* __NLA */
|
|
|
|
|
#define B_ACTIONBROWSE 76 /* __NLA */
|
|
|
|
|
#define B_IMAGEDELETE 77
|
|
|
|
|
#define B_LTEXBROWSE 78
|
|
|
|
|
#define B_MESHBROWSE 79
|
|
|
|
|
#define B_EXTEXBROWSE 80
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_LOADTEMP 81
|
|
|
|
|
#define B_MATDELETE 82
|
|
|
|
|
#define B_TEXDELETE 83
|
|
|
|
|
#define B_IPODELETE 84
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_WORLDDELETE 85
|
|
|
|
|
#define B_WTEXBROWSE 86
|
|
|
|
|
#define B_WORLDBROWSE 87
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_IPOBROWSE 88
|
|
|
|
|
#define B_NEWFRAME 89
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_LAMPBROWSE 90
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_MATBROWSE 91
|
|
|
|
|
#define B_TEXBROWSE 92
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_EDITBROWSE 93
|
|
|
|
|
#define B_AUTOTEXNAME 94
|
|
|
|
|
#define B_AUTOMATNAME 95
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_MATLOCK 96
|
|
|
|
|
#define B_IDNAME 97
|
|
|
|
|
#define B_NEWSPACE 98
|
|
|
|
|
#define B_FULL 99
|
|
|
|
|
#define B_REDR 100
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/* VIEW3D: 100 */
|
|
|
|
|
#define B_HOME 101
|
|
|
|
|
#define B_LAY 102
|
2003-04-30 13:22:26 +00:00
|
|
|
/* watch: codes 102-132 in in use for layers */
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_AUTOKEY 139
|
|
|
|
|
#define B_SCENELOCK 140
|
|
|
|
|
#define B_LOCALVIEW 141
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_U_CAPSLOCK 142
|
2005-07-23 18:52:31 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_VIEWBUT 146
|
|
|
|
|
#define B_PERSP 147
|
|
|
|
|
#define B_PROPTOOL 148
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_VIEWRENDER 149
|
|
|
|
|
#define B_STARTGAME 150
|
2005-07-23 18:52:31 +00:00
|
|
|
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_MODESELECT 156
|
2004-07-18 15:57:33 +00:00
|
|
|
#define B_AROUND 157
|
EditMesh refactory + undo recode
The changelog is very long... it's on the web too:
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
EditMesh refactor notes (user)
**** New selection modes
When entering Edit Mode for a Mesh, you now have the choice for three selection modes. These are shown as icons in the 3D header (hotkey is being searched for!).
- Vertex Select
Select vertices as usual, fully compatible with how previous version work
- Edge Select
Vertices are not drawn anymore, and selections happen by default on the edges. It is a true edge select, meaning that you can select three out of four edges in a face, without automatic having the 4th edge selected.
- Face Select
Instead of vertices, now selection 'points' are drawn in the face centers. Selected faces also get a colored outline, like for edges. This also is true face select, for each face individual regardless selection status of its vertices or edges.
While holding SHIFT, and press a selection mode, you can also combine the above choices. Now selection becomes mixed, and will behave as expected.
For example; in Edge+Face select mode, selecting the 4 edges of a face will select the face too.
The selection modes and optional drawing modes (like transparant faces, normals, or solid drawing) all work together. All of Blender's mesh editing tools now react to the correct selection mode as well.
Most noticeable it's in:
**** Extrude
Extruding in Edge or Face Select mode allows much more precise control over what's extruded and what should be excluded. Try for example a checker pattern selection, and extrude it.
New is the fixed translation when faces are extruded. This always follows the (averaged) face normal(s) of the old face(s), enabling much easier working in 3D views . A single 'G' (Grab) or 'R' (Rotate) or 'S' (Scale) will change transform modus as usual.
**** Other things to note
- Hiding edges/faces will also behave different based on Select Mode.
- while editing, normals of faces are updated always now
- Border select (BKEY) has 2 different rules for edges; when one edge is fully inside of the border, it will only select edges that are fully inside. Otherwise it selects each edge intersecting with the border.
- in face mode, adding vertices, edges or a circle is invisible...
- "Add monkey" now works as a normal primitive (rotated and on 3d cursor)
- Mesh undo was fully recoded, hopefully solving issues now with Vertex Keys and Groups
- Going in and out of editmode was fully recoded. Especially on larger models you'll notice substantial speed gain.
**** Todo
Add 'FaceSelect mode' functionality in EditMode, including zbuffered selection, display and editing of UV texture.
EditMesh refactor notes (coder)
**** Usage of flags in general
The "->f" flags are reserved for the editmesh.c and editmesh_lib.c core functions. Actually only selection status is there now.
The "->f1" and "->f2" flags are free to use. They're available in vertex/edge/face structs. Since they're free, check carefully when calling other functions that use these flags... for example extrude() or subdivide() use them.
**** Selection flags
EditVert: eve->f & SELECT
EditEdge: eed->f & SELECT
EditFace: efa->f & SELECT
- Selection is only possible when not-hidden!
- Selection flags are always up-to-date, BUT:
if selection mode >= SELECT_EDGE vertex selection flags can be incorrect
if selection mode == SELECT_FACE vertex/edge selection flags can be incorrect
This because of shared vertices or edges.
- use for selecting vertices:
eve->f &= SELECT
- use for selecting edges always:
void EM_select_edge(eed, 1) // 1 = select, 0 = deselect
- use for selecting faces always:
void EM_select_face(efa, 1) // 1 = select, 0 = deselect
- To set the 'f' flags in all of the data:
void EM_set_flag_all(int flag);
void EM_clear_flag_all(int flag);
- the old faceselectedOR() and faceselectedAND() are still there, but only
to be used for evaluating its vertices
**** Code hints for handling selection
If the selectmode is 'face'; vertex or edge selections need to be flushed upward. Same is true for 'edge' selection mode. This means that you'll have to keep track of all selections while coding... selecting the four vertices in a face doesn't automatically select the face anymore.
However, by using the above calls, at least selections flush downward (to vertex level). You then can call:
void EM_selectmode_flush(void);
Which flushes selections back upward, based on the selectmode setting. This function does the following:
- if selectmode 'vertex': select edges/faces based on its selected vertices
- if selectmode 'edge': select faces based its selected edges
This works fine in nice controlled situations.
However, only changing the vertex selections then still doesn't select a face in face mode! If you really can't avoid only working with vertex selections, you can use this call:
void EM_select_flush(void);
Now selection is flushed upward regardless current selectmode. That can be destructive for special cases however, like checkerboard selected faces. So use this only when you know everything else was deselected (or deselect it). Example: adding primitives.
**** Hide flags
EditVert: eve->h
EditEdge: eed->h
EditFace: efa->h
- all hide flags are always up-to-date
- hidden vertices/edges/faces are always deselected. so when you operate on selection only, there's no need to check for hide flag.
**** Unified undo for editmode
New file: editmode_undo.h
A pretty nice function pointer handler style undo. Just code three functions, and your undo will fly! The c file has a good reference.
Also note that the old undo system has been replaced. It currently uses minimal dependencies on Meshes themselves (no abuse of going in/out editmode), and is restricted nicely to editmode functions.
**** Going in/out editmode
As speedup now all vertices/faces/edges are allocated in three big chunks. In vertices/faces/edges now tags are set to denote such data cannot be freed.
ALso the hashtable (lookup) for edges uses no mallocs at all anymore, but is part of the EditEdge itself.
2004-09-23 20:52:51 +00:00
|
|
|
#define B_SEL_VERT 158
|
|
|
|
|
#define B_SEL_EDGE 159
|
|
|
|
|
#define B_SEL_FACE 160
|
2005-03-27 18:17:48 +00:00
|
|
|
#define B_MAN_TRANS 161
|
|
|
|
|
#define B_MAN_ROT 162
|
|
|
|
|
#define B_MAN_SCALE 163
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 22:09:57 +00:00
|
|
|
#define B_SEL_PATH 166
|
|
|
|
|
#define B_SEL_POINT 167
|
|
|
|
|
#define B_SEL_END 168
|
=== Custom Transform Orientation ===
Custom Orientations can be added with Ctrl-Shift-C (hotkey suggestions are welcomed), this adds and select the new alignment. Custom Orientations can also be added, deleted, selected from the Transform Orientations panel (View -> Transform Orientations). Standard orientations (global, local, normal, view) can also be selected from this panel.
If you plan on using only a single custom orientation and don't really need a list, I suggest you use the hotkey as it adds and selects at the same time.
Custom Orientations are save in the scene and are selected per 3D view (like normal orientation).
Adding from an object, the orientation is a normalized version of the object's orientation.
Adding from mesh data, a single element (vertex, edge, face) must be selected in its respective selection mode. Vertex orientation Z-axis is based on the normal, edge Z-axis on the edge itself (X-axis is on the XoY plane when possible, Y-axis is perpendicular to the rest). Face orientation Z-axis is the face normal, X-axis is perpendicular to the first edge, Y-axis is perpendicular to the rest.
(More logical orientations can be suggested).
I plan to add: 2 vertice (connected or not) => edge orientation , 3 vertice = face orientation
Differences from the patch:
- orientations no longer link back to the object they came from, everything is copy on creation.
- orientations are overwritten based on name (if you add an orientation with the same name as one that already exists, it overwrites the old one)
2008-01-13 18:24:09 +00:00
|
|
|
#define B_MAN_MODE 169
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* IPO: 200 */
|
|
|
|
|
#define B_IPOHOME 201
|
|
|
|
|
#define B_IPOBORDER 202
|
|
|
|
|
#define B_IPOCOPY 203
|
|
|
|
|
#define B_IPOPASTE 204
|
|
|
|
|
#define B_IPOCONT 205
|
|
|
|
|
#define B_IPOEXTRAP 206
|
|
|
|
|
#define B_IPOCYCLIC 207
|
|
|
|
|
#define B_IPOMAIN 208
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_IPOSHOWKEY 209
|
|
|
|
|
#define B_IPOCYCLICX 210
|
2002-10-12 11:37:38 +00:00
|
|
|
/* warn: also used for oops and seq */
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_VIEW2DZOOM 211
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_IPOPIN 212
|
2005-10-10 18:05:30 +00:00
|
|
|
#define B_IPO_ACTION_OB 213
|
|
|
|
|
#define B_IPO_ACTION_KEY 214
|
2007-08-20 17:50:04 +00:00
|
|
|
#define B_IPOVIEWCENTER 215
|
2007-09-04 07:26:25 +00:00
|
|
|
#define B_IPOVIEWALL 216
|
2007-11-28 12:11:06 +00:00
|
|
|
#define B_IPOREDRAW 217
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* OOPS: 250 */
|
|
|
|
|
#define B_OOPSHOME 251
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_OOPSBORDER 252
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_NEWOOPS 253
|
2005-12-16 13:50:45 +00:00
|
|
|
#define B_OOPSVIEWSEL 254
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* INFO: 300 */
|
2003-04-30 13:22:26 +00:00
|
|
|
/* watch: also in filesel.c and editobject.c */
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_INFOSCR 301
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_INFODELSCR 302
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_INFOSCE 304
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_INFODELSCE 305
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_FILEMENU 306
|
|
|
|
|
#define B_PACKFILE 307
|
|
|
|
|
|
2003-04-28 11:17:21 +00:00
|
|
|
#define B_CONSOLEOUT 308
|
|
|
|
|
#define B_CONSOLENUMLINES 309
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_USERPREF 310
|
2003-04-28 11:17:21 +00:00
|
|
|
#define B_LOADUIFONT 311
|
|
|
|
|
#define B_SETLANGUAGE 312
|
|
|
|
|
#define B_SETFONTSIZE 313
|
|
|
|
|
#define B_SETENCODING 314
|
|
|
|
|
#define B_SETTRANSBUTS 315
|
2003-05-03 12:17:11 +00:00
|
|
|
#define B_DOLANGUIFONT 316
|
2004-11-08 15:46:57 +00:00
|
|
|
#define B_RESTOREFONT 317
|
2005-01-19 13:53:43 +00:00
|
|
|
#define B_USETEXTUREFONT 318
|
2003-04-28 11:17:21 +00:00
|
|
|
|
2004-11-08 15:46:57 +00:00
|
|
|
#define B_UITHEMECHANGED 320
|
|
|
|
|
#define B_UITHEMECOLORMOD 321
|
|
|
|
|
#define B_UITHEMERESET 322
|
|
|
|
|
#define B_UITHEMEIMPORT 323
|
|
|
|
|
#define B_UITHEMEEXPORT 324
|
2003-10-04 20:35:50 +00:00
|
|
|
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_MEMCACHELIMIT 325
|
2007-10-31 13:56:07 +00:00
|
|
|
#define B_WPAINT_RANGE 326
|
2006-02-05 19:36:32 +00:00
|
|
|
|
2003-04-28 11:17:21 +00:00
|
|
|
/* Definitions for the fileselect buttons in user prefs */
|
2003-10-04 20:35:50 +00:00
|
|
|
#define B_FONTDIRFILESEL 330
|
|
|
|
|
#define B_TEXTUDIRFILESEL 331
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_PLUGTEXDIRFILESEL 332
|
|
|
|
|
#define B_PLUGSEQDIRFILESEL 333
|
|
|
|
|
#define B_RENDERDIRFILESEL 334
|
|
|
|
|
#define B_PYTHONDIRFILESEL 335
|
2003-10-04 20:35:50 +00:00
|
|
|
#define B_SOUNDDIRFILESEL 336
|
|
|
|
|
#define B_TEMPDIRFILESEL 337
|
2004-01-06 12:28:31 +00:00
|
|
|
/* yafray: for exportdir select */
|
|
|
|
|
#define B_YAFRAYDIRFILESEL 338
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_PYMENUEVAL 339 /* re-eval scripts registration in menus */
|
2003-04-28 11:17:21 +00:00
|
|
|
/* END Definitions for the fileselect buttons in user prefs */
|
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
/* IMAGE: 350 */
|
|
|
|
|
#define B_SIMAGEHOME 351
|
|
|
|
|
#define B_SIMABROWSE 352
|
|
|
|
|
#define B_SIMAGELOAD 353
|
reworked how tile functions, seperated image and tile setting functions/events and made tile work with image pinning.
changed how image replace works,
it used to load a new image and then assign that image to all faces in meshes active UV layer.
without replacing images in textures or images on inactive UV layers
now it simply changes the filename of the existing image and reloads the contense.
This is different in some other subtle ways,
1) replace used to use an existing image if it was available,
this could be confusing because when I replaced with an image I didnt like, but had alredy applied to objects in some other scene, replacing again would alter the images from models unintentionally.
2) since replace used to load a new image, it would load with a new name. at the moment the name is left unchanged,
This is better when dealing with linked libraries. because when replacing a images, anything linking to that texture gets broken. since imaged can get automatically named strings longer then its possible to enter into the user interface, you could wind up with some really annoying cases where it wasnt possible to type in the original name again.
Since this replace effects everything usiung the image, we may want to have 2 replace functions, "Replace Globaly" and "Replace in Mesh"
2007-09-19 16:28:52 +00:00
|
|
|
#define B_SIMA_REDR_IMA_3D 354
|
|
|
|
|
#define B_SIMAGETILE 355
|
2007-09-19 10:54:49 +00:00
|
|
|
#define B_BE_SQUARE 356
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_TWINANIM 357
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_SIMAGEREPLACE 358
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_CLIP_UV 359
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_SIMAGELOAD1 360
|
|
|
|
|
#define B_SIMAGEREPLACE1 361
|
|
|
|
|
#define B_SIMAGEPAINTTOOL 362
|
|
|
|
|
#define B_SIMAPACKIMA 363
|
|
|
|
|
#define B_SIMAGESAVE 364
|
2005-09-16 20:17:09 +00:00
|
|
|
#define B_SIMACLONEBROWSE 365
|
|
|
|
|
#define B_SIMACLONEDELETE 366
|
2005-10-22 22:50:09 +00:00
|
|
|
#define B_SIMANOTHING 368
|
2006-01-09 23:52:51 +00:00
|
|
|
#define B_SIMACURVES 369
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_SIMARANGE 370
|
2006-01-11 14:20:35 +00:00
|
|
|
#define B_SIMA_USE_ALPHA 371
|
|
|
|
|
#define B_SIMA_SHOW_ALPHA 372
|
|
|
|
|
#define B_SIMA_SHOW_ZBUF 373
|
2006-07-28 00:56:35 +00:00
|
|
|
#define B_SIMABRUSHBROWSE 374
|
|
|
|
|
#define B_SIMABRUSHDELETE 375
|
|
|
|
|
#define B_SIMABRUSHLOCAL 376
|
|
|
|
|
#define B_SIMABRUSHCHANGE 377
|
2006-07-31 15:53:03 +00:00
|
|
|
#define B_SIMABTEXBROWSE 378
|
|
|
|
|
#define B_SIMABTEXDELETE 379
|
2006-12-20 17:57:56 +00:00
|
|
|
#define B_SIMARELOAD 380
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_SIMANAME 381
|
|
|
|
|
#define B_SIMAMULTI 382
|
2006-12-20 17:57:56 +00:00
|
|
|
#define B_TRANS_IMAGE 383
|
2007-09-15 10:43:13 +00:00
|
|
|
#define B_CURSOR_IMAGE 384
|
|
|
|
|
#define B_SIMA_REPACK 385
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_SIMA_PLAY 386
|
2007-09-15 10:43:13 +00:00
|
|
|
#define B_SIMA_RECORD 387
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_SIMAPIN 388
|
2007-09-19 10:54:49 +00:00
|
|
|
#define B_SIMA3DVIEWDRAW 389
|
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* BUTS: 400 */
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_BUTSHOME 401
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_BUTSPREVIEW 402
|
2007-09-18 13:10:17 +00:00
|
|
|
#define B_MATCOPY 403
|
|
|
|
|
#define B_MATPASTE 404
|
|
|
|
|
#define B_MESHTYPE 405
|
Area lights and more...
- New lamp type added "Area". This uses the radiosity formula (Stoke) to
calculate the amount of energy which is received from a plane. Result
is very nice local light, which nicely spreads out.
- Area lamps have a 'gamma' option to control the light spread
- Area lamp builtin sizes: square, rect, cube & box. Only first 2 are
implemented. Set a type, and define area size
- Button area size won't affect the amount of energy. But scaling the lamp
in 3d window will do. This is to cover the case when you scale an entire
scene, the light then will remain identical
If you just want to change area lamp size, use buttons when you dont want
to make the scene too bright or too dark
- Since area lights realistically are sensitive for distance (quadratic), the
effect it has is quickly too much, or too less. For this the "Dist" value
in Lamp can be used. Set it at Dist=10 to have reasonable light on distance
10 Blender units (assumed you didnt scale lamp object).
- I tried square sized specularity, but this looked totally weird. Not
committed
- Plan is to extend area light with 3d dimensions, boxes and cubes.
- Note that area light is one-sided, towards negative Z. I need to design
a nice drawing method for it.
Area Shadow
- Since there are a lot of variables associated with soft shadow, they now
only are available for Area lights. Allowing spot & normal lamp to have
soft shadow is possible though, but will require a reorganisation of the
Lamp buttons. Is a point of research & feedback still.
- Apart from area size, you now can individually set amount of samples in
X and Y direction (for area lamp type 'Rect'). For box type area lamp,
this will become 3 dimensions
- Area shadows have four options:
"Clip circle" : only uses a circular shape of samples, gives smoother
results
"Dither" : use a 2x2 dither mask
"Jitter" : applys a pseudo-random offset to samples
"Umbra" : extra emphasis on area that's fully in shadow.
Raytrace speedup
- improved filling in faces in Octree. Large faces occupied too many nodes
- added a coherence check; rays fired sequentially that begin and end in
same octree nodes, and that don't intersect, are quickly rejected
- rendering shadow scenes benefits from this 20-40%. My statue test monkey
file now renders in 19 seconds (was 30).
Plus:
- adjusted specular max to 511, and made sure Blinn spec has again this
incredible small spec size
- for UI rounded theme: the color "button" displayed RGB color too dark
- fixed countall() function, to also include Subsurf totals
- removed setting the 'near' clipping for pressing dot-key numpad
- when you press the buttons-window icon for 'Shading Context' the context
automaticilly switches as with F5 hotkey
Please be warned that this is not a release... settings in files might not
work as it did, nor guaranteed to work when we do a release. :)
2003-12-29 16:52:51 +00:00
|
|
|
#define B_CONTEXT_SWITCH 406
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* IMASEL: 450 */
|
2007-09-02 17:25:03 +00:00
|
|
|
/* in imasel.h - not any more - elubie */
|
|
|
|
|
#define B_SORTIMASELLIST 451
|
|
|
|
|
#define B_RELOADIMASELDIR 452
|
|
|
|
|
#define B_FILTERIMASELDIR 453
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* TEXT: 500 */
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_TEXTBROWSE 501
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_TEXTALONE 502
|
|
|
|
|
#define B_TEXTLOCAL 503
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_TEXTDELETE 504
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_TEXTFONT 505
|
|
|
|
|
#define B_TEXTSTORE 506
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_TEXTLINENUM 507
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
|
|
|
#define B_TAB_NUMBERS 508
|
|
|
|
|
#define B_SYNTAX 509
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2003-12-14 01:18:09 +00:00
|
|
|
/* SCRIPT: 525 */
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_SCRIPTBROWSE 526
|
|
|
|
|
#define B_SCRIPT2PREV 527
|
2003-12-14 01:18:09 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
/* FILE: 550 */
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_SORTFILELIST 551
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_RELOADDIR 552
|
|
|
|
|
|
|
|
|
|
/* SEQUENCE: 600 */
|
|
|
|
|
#define B_SEQHOME 601
|
|
|
|
|
#define B_SEQCLEAR 602
|
|
|
|
|
|
|
|
|
|
/* SOUND: 650 */
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_SOUNDBROWSE 651
|
|
|
|
|
#define B_SOUNDBROWSE2 652
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_SOUNDHOME 653
|
2003-05-22 11:11:56 +00:00
|
|
|
#define B_PACKSOUND 654
|
2002-10-12 11:37:38 +00:00
|
|
|
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
|
|
|
/* ACTION: 701 - 750 */
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_ACTHOME 701
|
|
|
|
|
#define B_ACTCOPY 702
|
|
|
|
|
#define B_ACTPASTE 703
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_ACTPASTEFLIP 704
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_ACTCYCLIC 705
|
|
|
|
|
#define B_ACTCONT 706
|
|
|
|
|
#define B_ACTMAIN 707
|
|
|
|
|
#define B_ACTPIN 708
|
|
|
|
|
#define B_ACTBAKE 709
|
== Action Editor - Copy and Paste Tools ==
Now it is possible to do Copy+Paste in the Action Editor, like in the IPO Editor. There are two new buttons in the Action Editor header for this, using the familiar icons.
* To copy...
Select the keyframes you wish to copy, and the channels that they occur in (except for ShapeKey mode, where it is not possible to select channels). Click copy button.
* To paste...
Place the current frame where you want the first of the keyframes from the buffer is to be pasted. Select all channels you wish the keyframes to be pasted into. Click paste button.
Currently, keyframes are only pasted into 'compatible' curves (i.e. LocX keyframes can only go to LocX, and so on). This may change after user feedback, if this is found to be too restrictive.
== Code Changes ==
I've made a few changes which allow this code to be nicer.
* renamed insert_vert_ipo to insert_vert_icu, as that represents its actual purpose better (and changed all occurrences I could find)
* created a new function, insert_bezt_icu, which does the actual inserting of provided BezTriple data to a given IpoCurve
* recoded insert_vert_icu to use this new function, and also the IPO-Editor keyframe pasting (i.e. pasting in Editmode)
2007-09-17 11:41:12 +00:00
|
|
|
#define B_ACTCOPYKEYS 710
|
|
|
|
|
#define B_ACTPASTEKEYS 711
|
2002-10-12 11:37:38 +00:00
|
|
|
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
|
|
|
/* TIME: 751 - 800 */
|
|
|
|
|
#define B_TL_REW 751
|
|
|
|
|
#define B_TL_PLAY 752
|
|
|
|
|
#define B_TL_FF 753
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_TL_PREVKEY 754
|
|
|
|
|
#define B_TL_NEXTKEY 755
|
2005-05-11 20:01:42 +00:00
|
|
|
#define B_TL_STOP 756
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_TL_PREVIEWON 757
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2005-12-18 13:46:01 +00:00
|
|
|
/* NLA: 801-850 */
|
2002-10-12 11:37:38 +00:00
|
|
|
#define B_NLAHOME 801
|
|
|
|
|
|
2005-12-18 13:46:01 +00:00
|
|
|
/* NODE: 851-900 */
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_NODEHOME 851
|
Christmas coding work!
********* Node editor work:
- To enable Nodes for Materials, you have to set the "Use Nodes"
button, in the new Material buttons "Nodes" Panel or in header
of the Node editor. Doing this will disable Material-Layers.
- Nodes now execute materials ("shaders"), but still only using the
previewrender code.
- Nodes have (optional) previews for rendered images.
- Node headers allow to hide buttons and/or preview image
- Nodes can be dragged larger/smaller (right-bottom corner)
- Nodes can be hidden (minimized) with hotkey H
- CTRL+click on an Input Socket gives a popup with default values.
- Changing Material/Texture or Mix node will adjust Node title.
- Click-drag outside of a Node changes cursor to "Knife' and allows to
draw a rect where to cut Links.
- Added new node types RGBtoBW, Texture, In/Output, ColorRamp
- Material Nodes have options to ouput diffuse or specular, or to use
a negative normal. The input socket 'Normal' will force the material
to use that normal, otherwise it uses the normal from the Material
that has the node tree.
- When drawing a link between two not-matching sockets, Blender inserts
a converting node (now only for value/rgb combos)
- When drawing a link to an input socket that's already in use, the
old link will either disappear or flip to another unused socket.
- A click on a Material Node will activate it, and show all its settings
in the Material Buttons. Active Material Nodes draw the material icon
in red.
- A click on any node will show its options in the Node Panel in the
Material buttons.
- Multiple Output Nodes can be used, to sample contents of a tree, but
only one Output is the real one, which is indicated in a different
color and red material icon.
- Added ThemeColors for node types
- ALT+C will convert existing Material-Layers to Node... this currently
only adds the material/mix nodes and connects them. Dunno if this is
worth a lot of coding work to make perfect?
- Press C to call another "Solve order", which will show all possible
cyclic conflicts (if there are).
- Technical: nodes now use "Type" structs which define the
structure of nodes and in/output sockets. The Type structs store all
fixed info, callbacks, and allow to reconstruct saved Nodes to match
what is required by Blender.
- Defining (new) nodes now is as simple as filling in a fixed
Type struct, plus code some callbacks. A doc will be made!
- Node preview images are by default float
********* Icon drawing:
- Cleanup of how old icons were implemented in new system, making
them 16x16 too, correctly centered *and* scaled.
- Made drawing Icons use float coordinates
- Moved BIF_calcpreview_image() into interface_icons.c, renamed it
icon_from_image(). Removed a lot of unneeded Imbuf magic here! :)
- Skipped scaling and imbuf copying when icons are OK size
********* Preview render:
- Huge cleanup of code....
- renaming BIF_xxx calls that only were used internally
- BIF_previewrender() now accepts an argument for rendering method,
so it supports icons, buttonwindow previewrender and node editor
- Only a single BIF_preview_changed() call now exists, supporting all
signals as needed for buttos and node editor
********* More stuff:
- glutil.c, glaDrawPixelsSafe() and glaDrawPixelsTex() now accept format
argument for GL_FLOAT rects
- Made the ColorBand become a built-in button for interface.c
Was a load of cleanup work in buttons_shading.c...
- removed a load of unneeded glBlendFunc() calls
- Fixed bug in calculating text length for buttons (ancient!)
2005-12-28 15:42:51 +00:00
|
|
|
#define B_NODE_USEMAT 852
|
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
2006-01-23 22:05:47 +00:00
|
|
|
#define B_NODE_USESCENE 853
|
2005-12-18 13:46:01 +00:00
|
|
|
|
|
|
|
|
/* FREE 901 - 999 */
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#define B_NOP -1
|
|
|
|
|
|
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
/* editbutflag */
|
|
|
|
|
#define B_CLOCKWISE 1
|
|
|
|
|
#define B_KEEPORIG 2
|
|
|
|
|
#define B_BEAUTY 4
|
|
|
|
|
#define B_SMOOTH 8
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_BEAUTY_SHORT 16
|
2005-09-02 16:31:03 +00:00
|
|
|
#define B_AUTOFGON 32
|
2003-10-04 20:35:50 +00:00
|
|
|
#define B_KNIFE 0x80
|
2007-06-28 15:57:54 +00:00
|
|
|
#define B_PERCENTSUBD 0x40
|
|
|
|
|
#define B_MESH_X_MIRROR 0x100
|
|
|
|
|
#define B_JOINTRIA_UV 0x200
|
|
|
|
|
#define B_JOINTRIA_VCOL 0X400
|
|
|
|
|
#define B_JOINTRIA_SHARP 0X800
|
|
|
|
|
#define B_JOINTRIA_MAT 0X1000
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
|
/* DISPLAYMODE */
|
New feature! (Well, replacement for the exisiting cumbersome "DispView")
Next to the "DispWindow" there are now two new choices:
- Display render output to Image Editor
- Display render output to Screen-sized Image Editor
Both options won't open a 2nd window anymore, which makes work quite more
smooth even, especially because 'focus' isn't lost. Further it fits in the
'single window UI' paradigm of Blender. Should have been done 10 years ago!
Lastly it might bypass issues with X11... having 2 windows with opengl
context is not always stable in Linux.
This option uses an identical trick as for the Compositor viewer, using an
Image block with a fixed name ("Render Result").
The flow, when invoking a Render, goes as follows:
- first it checks if there's an Image Editor visible displaying the "Render
Result", if so then it uses that area-window.
(Use this option for dual-monitor setups for example, a render will always
go to the same location then)
- else it checks if there's an Image Editor open in general, it then
assigns that window the "Render Result" Image.
- else: it searches for the largest Area in the screen, and turns that into
a temporal Image Editor showing render output.
After a render, an ESC will push back the former view, if the Area type has
changed.
Same rules apply for the "Full Screen" option. Here an ESC will always go
back to the regular Screen, and restore Area type if required.
While rendering, the queue for the renderwindow isn't handled yet, so you can
not zoom (nor get full redraws), as for the regular render window.
Existing conflicts:
- in FaceSelect mode, the Image editor enforces to display the face texture
after rendering again.
- when using an Image window for compositing, you'll lose the Viewer output
on a render.
Implementation note:
While rendering updates, nothing is drawn in frontbuffer anymore. That's
good news for b0rked OpenGL drivers (and faster). However, for the few
OpenGL cards that don't do a "swap copy" but a "swap exchange" you get
issues... has to be worked on. I'm afraid we have to drop frontbuffer
drawing altogether.
Other fixes:
- Hotkeys NumPad 1, 2, 4, 8 will set zoom levels (was half coded only?)
Use SHIFT to zoom out (smaller).
- Rendering Tile updates still had draw errors on edges of tiles, in OSA
only. (Caused by commit 4 days ago)
2006-06-12 14:39:08 +00:00
|
|
|
#define R_DISPLAYIMAGE 0
|
2002-10-12 11:37:38 +00:00
|
|
|
#define R_DISPLAYWIN 1
|
New feature! (Well, replacement for the exisiting cumbersome "DispView")
Next to the "DispWindow" there are now two new choices:
- Display render output to Image Editor
- Display render output to Screen-sized Image Editor
Both options won't open a 2nd window anymore, which makes work quite more
smooth even, especially because 'focus' isn't lost. Further it fits in the
'single window UI' paradigm of Blender. Should have been done 10 years ago!
Lastly it might bypass issues with X11... having 2 windows with opengl
context is not always stable in Linux.
This option uses an identical trick as for the Compositor viewer, using an
Image block with a fixed name ("Render Result").
The flow, when invoking a Render, goes as follows:
- first it checks if there's an Image Editor visible displaying the "Render
Result", if so then it uses that area-window.
(Use this option for dual-monitor setups for example, a render will always
go to the same location then)
- else it checks if there's an Image Editor open in general, it then
assigns that window the "Render Result" Image.
- else: it searches for the largest Area in the screen, and turns that into
a temporal Image Editor showing render output.
After a render, an ESC will push back the former view, if the Area type has
changed.
Same rules apply for the "Full Screen" option. Here an ESC will always go
back to the regular Screen, and restore Area type if required.
While rendering, the queue for the renderwindow isn't handled yet, so you can
not zoom (nor get full redraws), as for the regular render window.
Existing conflicts:
- in FaceSelect mode, the Image editor enforces to display the face texture
after rendering again.
- when using an Image window for compositing, you'll lose the Viewer output
on a render.
Implementation note:
While rendering updates, nothing is drawn in frontbuffer anymore. That's
good news for b0rked OpenGL drivers (and faster). However, for the few
OpenGL cards that don't do a "swap copy" but a "swap exchange" you get
issues... has to be worked on. I'm afraid we have to drop frontbuffer
drawing altogether.
Other fixes:
- Hotkeys NumPad 1, 2, 4, 8 will set zoom levels (was half coded only?)
Use SHIFT to zoom out (smaller).
- Rendering Tile updates still had draw errors on edges of tiles, in OSA
only. (Caused by commit 4 days ago)
2006-06-12 14:39:08 +00:00
|
|
|
#define R_DISPLAYSCREEN 2
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2007-06-28 15:57:54 +00:00
|
|
|
/* Gvp.flag and Gwp.flag */
|
2005-08-03 18:48:22 +00:00
|
|
|
#define VP_COLINDEX 1
|
|
|
|
|
#define VP_AREA 2
|
|
|
|
|
#define VP_SOFT 4
|
|
|
|
|
#define VP_NORMALS 8
|
Weight Paint & Vertex Paint goodies;
- New: "Spray" is an option now. This used to be the only available vertex
painting method, while holding the mousebutton and move mouse, it keeps
applying (adding, blending) the color.
Disabling "Spray" will give more a 'paint' effect, only applying the
maximum what you indicated to be painting.
- Weight Paint now offers all options Vertex Paint has. This includes "Add",
"Mult", "Sub", and "Filter". And of course the "Spray", which is default
off btw.
Since Weight Paint might need totally different settings, they are stored
separate from Vertex Paint options.
- Renamed the weird "Area" and "Soft" options into something that tells what
it actually does (Even tooltips were wrong).
Area -> "All Faces", option to have all Faces inside the brush being
painted on. Disabling this only paints on the face under the cursor.
Soft -> "Vertex Dist", option that uses distances from cursor to vertex
to calculate the effect. Disable it to only paint per-face.
If someone knows better names... go ahead! :)
- New WeightPaint option in the Panel: "Clear", which removes reference
to this deform group from all vertices.
- Removed code that deleted 'deform vertices' from Mesh on exit editmode,
when vertexgroups were empty. This just worked against you... you could
not paint on empty groups.
- Made Weight Paint painting much nicer. The way it applied values was very
harsh without good transitions. Mainly because it didn't use the
"Vertex Dist" option, but also because it applied colors 3 or 4 times per
vertex (tria/quad).
- Weight Paint undo now restores on a 2nd Undo.
- Vertex Paint Panel button "Clear" didn't work even.
2005-08-16 19:37:36 +00:00
|
|
|
#define VP_SPRAY 16
|
New: X-axis mirror weightpainting.
- Set the button in Paint Panel, Edit buttons context
- It assumes the mesh to be near-perfectly mirrored. Current threshold is
set to 0.0001 (maximum difference allowed).
In order to evaluate proper mirroring, a new option will be added in
Mesh editmode later.
- When the flipped group doesn't exist yet, it creates the group
- Of course this doesn't work for mirror modifier!
New: Select/activate flipped bone or vertex group
- Press SHIFT+F in PoseMode or WeightPaint mode to get the flipped bone.
Is especially to see while painting if the mirror copying works OK.
New: "Apply Envelope to VertexGroup" uses X-mirror option too.
Todo; check on mirror vertex painting, and mirror Mesh editmode....
The implementation is based on a 8x8x8 Octree, where vertex locations are
stored. Vertices on the threshold boundary of an Octree node are filled in
the neighbour nodes as well, ensuring that the lookup works with threshold.
The current size of the Octree gives good speedup, even for 128k vertices
it only needs 256 lookup cycles per checked vertex.
Same code could be used for the bevel tool for example.
src/meshtools.c:
int mesh_octree_table(Object *ob, float *co, char mode)
- mode 's' or 'e' is "start octree" or "end octree"
- mode 'u' is "use", it then returns an index nr of the found vertex.
(return -1 if not found)
2005-10-22 14:05:25 +00:00
|
|
|
#define VP_MIRROR_X 32
|
2006-06-29 13:46:39 +00:00
|
|
|
#define VP_HARD 64
|
2007-06-28 15:57:54 +00:00
|
|
|
#define VP_ONLYVGROUP 128
|
2005-08-03 18:48:22 +00:00
|
|
|
|
2007-04-22 22:08:19 +00:00
|
|
|
/* Error messages */
|
|
|
|
|
#define ERROR_LIBDATA_MESSAGE "Can't edit external libdata"
|
|
|
|
|
|
2007-10-22 20:24:26 +00:00
|
|
|
#define MAX_RENDER_PASS 100
|
2007-04-22 22:08:19 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
#endif
|