Merge with trunk r40991

This commit is contained in:
Miika Hamalainen 2011-10-13 21:43:02 +00:00
commit 8be3249537
257 changed files with 4499 additions and 3616 deletions

View File

@ -145,6 +145,9 @@ help:
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo ""
@echo "Documentation Targets"
@echo " * doc_py - generate sphinx python api docs"
@echo ""
# -----------------------------------------------------------------------------
# Packages
@ -222,6 +225,17 @@ check_sparse:
cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
# -----------------------------------------------------------------------------
# Documentation
#
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py:
$(BUILD_DIR)/bin/blender --background --factory-startup --python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -n -b html sphinx-in sphinx-out
@echo "docs written into: 'doc/python_api/sphinx-out/index.html'"
clean:
$(MAKE) -C $(BUILD_DIR) clean

View File

@ -30,6 +30,7 @@
# Then read all SConscripts and build
#
# TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
# TODO: cleanup CCFLAGS / CPPFLAGS use, often both are set when we only need one.
import platform as pltfrm
@ -283,26 +284,21 @@ if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
else:
if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
env['CXXFLAGS'].append('-openmp')
else:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
env.Append(CXXFLAGS=['-fopenmp'])
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(CFLAGS=['-DUSE_QTKIT'])
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
#check for additional debug libnames
@ -334,23 +330,19 @@ if 'blendernogame' in B.targets:
# disable elbeem (fluidsim) compilation?
if env['BF_NO_ELBEEM'] == 1:
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if btools.ENDIAN == "big":
env['CPPFLAGS'].append('-D__BIG_ENDIAN__')
env['CXXFLAGS'].append('-D__BIG_ENDIAN__')
env['CCFLAGS'].append('-D__BIG_ENDIAN__')
else:
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
env['CXXFLAGS'].append('-D__LITTLE_ENDIAN__')
env['CCFLAGS'].append('-D__LITTLE_ENDIAN__')
# TODO, make optional
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CXXFLAGS'].append('-DWITH_AUDASPACE')
env['CCFLAGS'].append('-DWITH_AUDASPACE')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir

View File

@ -89,6 +89,9 @@ BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32'
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
# JACK
WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']

View File

@ -80,6 +80,9 @@ WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/home/sources/staticlibs/spnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32'
# JACK
WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']

View File

@ -80,6 +80,9 @@ WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/home/sources/staticlibs/spnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64'
# JACK
WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']

View File

@ -89,6 +89,9 @@ BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64'
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
# JACK
WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']

View File

@ -53,10 +53,11 @@ SET(_opencollada_FIND_COMPONENTS
)
# Fedora openCOLLADA package links these statically
# note that order is important here ot it wont link
SET(_opencollada_FIND_STATIC_COMPONENTS
UTF
ftoa
buffer
ftoa
UTF
)
SET(_opencollada_SEARCH_DIRS

View File

@ -12,10 +12,12 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen
# map the version a -> 1
# not to be confused with blender's internal subversions
if [ "$blender_version_char" ]; then
blender_version=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
else
blender_version_full=${blender_version}
fi
blender_ver_string=$blender_version+svn$blender_revision
blender_ver_string=$blender_version+svn$blender_version_full
pkgname=blender-snapshot
pkgver=$blender_ver_string
@ -61,5 +63,8 @@ build() {
package() {
cd $srcdir/build
make DESTDIR="$pkgdir" install
python -m compileall $pkgdir/usr/share/blender
python -m compileall \
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
$pkgdir/usr/share/blender/$blender_version/scripts/addons
}

View File

@ -11,7 +11,7 @@ $Id$
3. Obtaining Dependencies
4. Deciding on a Build Environment
5. Configuring the build for the first time
6. Configuring the build after CVS updates
6. Configuring the build after SVN updates
7. Specify alternate Python library versions and locations
@ -36,7 +36,7 @@ $Id$
http://www.blender.org/cms/Getting_Dependencies.135.0.html that you
have all dependencies needed for building Blender. Note that for
windows many of these dependencies already come in the lib/windows
module from CVS.
module from SVN.
4. Deciding on a Build Environment
----------------------------------
@ -47,8 +47,8 @@ $Id$
have been successfully used to generate build files for the following
environments:
1. Microsoft Visual Studio 2005. There is a free version available
at http://msdn.microsoft.com/vstudio/express/visualc/.
1. Microsoft Visual Studio 2008. There is a free version available
at http://http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
2. Xcode on Mac OSX
@ -65,7 +65,7 @@ $Id$
with different Blender configurations (Audio/NoAudio, GameEngine/NoGameEngine etc.)
while maintaining a clean source tree. It also makes it possible to generate files
for different build systems on the same source tree. This also has benefits for
general CVS management for the developer as patches and submit logs are much cleaner.
general SVN management for the developer as patches and submit logs are much cleaner.
Create a directory outside the blender source tree where you would like to build
Blender (from now on called $BLENDERBUILD). On the commandline you can then run
@ -78,27 +78,27 @@ $Id$
% cd $BLENDERBUILD
% cmake
...
...
--version [file] = Show program name/version banner and exit.
...
...
--version [file] = Show program name/version banner and exit.
Generators
Generators
The following generators are available on this platform:
KDevelop3 = Generates KDevelop 3 project files.
Unix Makefiles = Generates standard UNIX makefiles.
Xcode = Generate XCode project files.
The following generators are available on this platform:
KDevelop3 = Generates KDevelop 3 project files.
Unix Makefiles = Generates standard UNIX makefiles.
Xcode = Generate XCode project files.
% cmake -G Xcode $BLENDERSOURCE
...
...
-- Configuring blender
-- Configuring blenderplayer
-- Configuring done
-- Generating done
-- Build files have been written to: $BLENDERBUILD
...
...
-- Configuring blender
-- Configuring blenderplayer
-- Configuring done
-- Generating done
-- Build files have been written to: $BLENDERBUILD
This will generate the build files with default values. Specific features can
be enabled or disabled by running the ccmake "GUI" from $BLENDERBUILD as follows:
@ -114,15 +114,15 @@ $Id$
It is also possible to use the commandline of 'cmake' to override certain
of these settings.
6. Configuring the build after CVS updates
6. Configuring the build after SVN updates
------------------------------------------
The $BLENDERBUILD directory maintains a file called CMakeCache.txt which
remembers the initial run's settings for subsequent generation runs. After
every CVS update it may be a good idea to rerun the generation before building
every SVN update it may be a good idea to rerun the generation before building
Blender again. Just rerun the original 'cmake' run to do this, the settings
will be remembered. For the example above the following will do after every
'cvs up':
'svn up':
% cmake -G Xcode $BLENDERSOURCE
@ -132,9 +132,9 @@ $Id$
The commandline can be used to override detected/default settings, e.g:
On Unix:
cmake -D PYTHON_LIBRARY=/usr/local/lib/python3.1/config/libpython3.1.so -D PYTHON_INCLUDE_DIRS=/usr/local/include/python3.1 -G "Unix Makefiles" ../blender
cmake -D PYTHON_LIBRARY=/usr/local/lib/python3.2/config/libpython3.2.so -D PYTHON_INCLUDE_DIR=/usr/local/include/python3.2 ../blender
On Macs:
cmake -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1 -G Xcode ../blender
cmake -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 -G Xcode ../blender
Mote that this should only be needed once per build directory generation because it will keep the overrides in CMakeCache.txt for subsequent runs.
@ -153,4 +153,3 @@ $Id$
on the various platforms.
/Jacques Beaurain (jbinto)

View File

@ -189,6 +189,6 @@ $Id$
need changes elsewhere in the system, as it is handled automatically
with the central library repository.
Enjoy the new system!
Enjoy the new system!!
/Nathan Letwory (jesterKing)

View File

@ -1082,3 +1082,401 @@ Moved
* **use_halo** -> :class:`bpy.types.Material.game_settings.face_orientation`
* **use_shadow_cast** -> :class:`bpy.types.Material.game_settings.face_orientation`
.. Automatically Generated, 2.59 -> r40804!
bpy.types.RenderSettings
------------------------
Added
^^^^^
* :class:`bpy.types.RenderSettings.ffmpeg_audio_channels`
bpy.types.DriverTarget
----------------------
Added
^^^^^
* :class:`bpy.types.DriverTarget.transform_space`
Removed
^^^^^^^
* **use_local_space_transform**
bpy.types.Sound
---------------
Added
^^^^^
* :class:`bpy.types.Sound.factory`
* :class:`bpy.types.Sound.use_mono`
bpy.types.Camera
----------------
Added
^^^^^
* :class:`bpy.types.Camera.view_frame`
bpy.types.Scene
---------------
Added
^^^^^
* :class:`bpy.types.Scene.audio_volume`
bpy.types.KeyingSet
-------------------
Added
^^^^^
* :class:`bpy.types.KeyingSet.refresh`
bpy.types.Armature
------------------
Added
^^^^^
* :class:`bpy.types.Armature.deform_method`
bpy.types.GameObjectSettings
----------------------------
Added
^^^^^
* :class:`bpy.types.GameObjectSettings.obstacle_radius`
* :class:`bpy.types.GameObjectSettings.use_obstacle_create`
bpy.types.BlendData
-------------------
Added
^^^^^
* :class:`bpy.types.BlendData.speakers`
bpy.types.SolidifyModifier
--------------------------
Added
^^^^^
* :class:`bpy.types.SolidifyModifier.thickness_vertex_group`
bpy.types.ThemeGraphEditor
--------------------------
Added
^^^^^
* :class:`bpy.types.ThemeGraphEditor.handle_auto_clamped`
* :class:`bpy.types.ThemeGraphEditor.handle_sel_auto_clamped`
bpy.types.CompositorNodeIDMask
------------------------------
Added
^^^^^
* :class:`bpy.types.CompositorNodeIDMask.use_smooth_mask`
bpy.types.Node
--------------
Added
^^^^^
* :class:`bpy.types.Node.parent`
bpy.types.Texture
-----------------
Added
^^^^^
* :class:`bpy.types.Texture.evaluate`
bpy.types.UILayout
------------------
Added
^^^^^
* :class:`bpy.types.UILayout.template_keymap_item_properties`
bpy.types.ToolSettings
----------------------
Added
^^^^^
* :class:`bpy.types.ToolSettings.use_multipaint`
bpy.types.UserPreferencesInput
------------------------------
Added
^^^^^
* :class:`bpy.types.UserPreferencesInput.ndof_panx_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_pany_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_panz_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_roll_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_rotate_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_tilt_invert_axis`
bpy.types.LockedTrackConstraint
-------------------------------
Added
^^^^^
* :class:`bpy.types.LockedTrackConstraint.head_tail`
bpy.types.SpaceGraphEditor
--------------------------
Moved
^^^^^
* use_fancy_drawing -> :class:`bpy.types.SpaceGraphEditor.use_beauty_drawing`
bpy.types.ParticleSystem
------------------------
Added
^^^^^
* :class:`bpy.types.ParticleSystem.dt_frac`
bpy.types.Mesh
--------------
Added
^^^^^
* :class:`bpy.types.Mesh.use_paint_mask_vertex`
bpy.types.FCurve
----------------
Removed
^^^^^^^
* **use_auto_handle_clamp**
bpy.types.DampedTrackConstraint
-------------------------------
Added
^^^^^
* :class:`bpy.types.DampedTrackConstraint.head_tail`
bpy.types.ImageTexture
----------------------
Added
^^^^^
* :class:`bpy.types.ImageTexture.use_derivative_map`
bpy.types.SoundSequence
-----------------------
Added
^^^^^
* :class:`bpy.types.SoundSequence.pan`
* :class:`bpy.types.SoundSequence.pitch`
Removed
^^^^^^^
* **attenuation**
bpy.types.FModifier
-------------------
Added
^^^^^
* :class:`bpy.types.FModifier.blend_in`
* :class:`bpy.types.FModifier.blend_out`
* :class:`bpy.types.FModifier.frame_end`
* :class:`bpy.types.FModifier.frame_start`
* :class:`bpy.types.FModifier.influence`
* :class:`bpy.types.FModifier.use_influence`
* :class:`bpy.types.FModifier.use_restricted_range`
bpy.types.EnvironmentMap
------------------------
Added
^^^^^
* :class:`bpy.types.EnvironmentMap.clear`
* :class:`bpy.types.EnvironmentMap.is_valid`
* :class:`bpy.types.EnvironmentMap.save`
bpy.types.UserPreferencesSystem
-------------------------------
Added
^^^^^
* :class:`bpy.types.UserPreferencesSystem.use_translate_interface`
Removed
^^^^^^^
* **use_translate_buttons**
* **use_translate_toolbox**
bpy.types.LimitDistanceConstraint
---------------------------------
Added
^^^^^
* :class:`bpy.types.LimitDistanceConstraint.head_tail`
* :class:`bpy.types.LimitDistanceConstraint.use_transform_limit`
bpy.types.MovieSequence
-----------------------
Added
^^^^^
* :class:`bpy.types.MovieSequence.stream_index`
bpy.types.Material
------------------
Added
^^^^^
* :class:`bpy.types.Material.game_settings`
bpy.types.Object
----------------
Added
^^^^^
* :class:`bpy.types.Object.matrix_parent_inverse`
bpy.types.SequenceProxy
-----------------------
Added
^^^^^
* :class:`bpy.types.SequenceProxy.build_100`
* :class:`bpy.types.SequenceProxy.build_25`
* :class:`bpy.types.SequenceProxy.build_50`
* :class:`bpy.types.SequenceProxy.build_75`
* :class:`bpy.types.SequenceProxy.build_free_run`
* :class:`bpy.types.SequenceProxy.build_free_run_rec_date`
* :class:`bpy.types.SequenceProxy.build_record_run`
* :class:`bpy.types.SequenceProxy.quality`
* :class:`bpy.types.SequenceProxy.timecode`
bpy.types.Sequence
------------------
Added
^^^^^
* :class:`bpy.types.Sequence.waveform`
bpy.types.DopeSheet
-------------------
Added
^^^^^
* :class:`bpy.types.DopeSheet.show_datablock_filters`
* :class:`bpy.types.DopeSheet.show_speakers`
bpy.types.ActionActuator
------------------------
Added
^^^^^
* :class:`bpy.types.ActionActuator.apply_to_children`
* :class:`bpy.types.ActionActuator.layer`
* :class:`bpy.types.ActionActuator.layer_weight`
* :class:`bpy.types.ActionActuator.use_additive`
* :class:`bpy.types.ActionActuator.use_force`
* :class:`bpy.types.ActionActuator.use_local`
bpy.types.VertexGroup
---------------------
Added
^^^^^
* :class:`bpy.types.VertexGroup.lock_weight`
bpy.types.ThemeView3D
---------------------
Added
^^^^^
* :class:`bpy.types.ThemeView3D.speaker`
bpy.types.Image
---------------
Added
^^^^^
* :class:`bpy.types.Image.pack`
* :class:`bpy.types.Image.unpack`
bpy.types.Curve
---------------
Added
^^^^^
* :class:`bpy.types.Curve.fill_mode`
Removed
^^^^^^^
* **use_fill_back**
* **use_fill_front**
bpy.types.ParticleSettings
--------------------------
Added
^^^^^
* :class:`bpy.types.ParticleSettings.adaptive_subframes`
* :class:`bpy.types.ParticleSettings.courant_target`
bpy.types.SceneGameData
-----------------------
Added
^^^^^
* :class:`bpy.types.SceneGameData.level_height`
* :class:`bpy.types.SceneGameData.obstacle_simulation`
* :class:`bpy.types.SceneGameData.recast_data`
* :class:`bpy.types.SceneGameData.restrict_animation_updates`
* :class:`bpy.types.SceneGameData.show_obstacle_simulation`

View File

@ -1,7 +1,10 @@
GPU functions (gpu)
===================
.. module:: gpu
This module provides access to materials GLSL shaders.
*****
Intro
*****
@ -16,7 +19,6 @@ and in the game engine.
are are closely related to Blender's internal GLSL code and may change if the GLSL code
is modified (e.g. new uniform type).
.. module:: gpu
*********
Constants

View File

@ -83,6 +83,7 @@ else:
"aud",
"bgl",
"blf",
"gpu",
"mathutils",
"mathutils.geometry",
)
@ -1042,7 +1043,9 @@ def rna2sphinx(BASEPATH):
fw("html_theme = 'blender-org'\n")
fw("html_theme_path = ['../']\n")
fw("html_favicon = 'favicon.ico'\n")
# copied with the theme, exclude else we get an error [#28873]
fw("html_favicon = 'favicon.ico'\n")
# not helpful since the source us generated, adds to upload size.
fw("html_copy_source = False\n")
fw("\n")
@ -1120,6 +1123,8 @@ def rna2sphinx(BASEPATH):
fw(" bgl.rst\n\n")
if "blf" not in EXCLUDE_MODULES:
fw(" blf.rst\n\n")
if "gpu" not in EXCLUDE_MODULES:
fw(" gpu.rst\n\n")
if "aud" not in EXCLUDE_MODULES:
fw(" aud.rst\n\n")
if "bpy_extras" not in EXCLUDE_MODULES:
@ -1260,6 +1265,13 @@ def rna2sphinx(BASEPATH):
import shutil
shutil.copy2(os.path.join(BASEPATH, "..", "rst", "bgl.rst"), BASEPATH)
if "gpu" not in EXCLUDE_MODULES:
#import gpu as module
#pymodule2sphinx(BASEPATH, "gpu", module, "GPU Shader Module")
#del module
import shutil
shutil.copy2(os.path.join(BASEPATH, "..", "rst", "gpu.rst"), BASEPATH)
if "aud" not in EXCLUDE_MODULES:
import aud as module
pymodule2sphinx(BASEPATH, "aud", module, "Audio System")

View File

@ -1094,9 +1094,11 @@ int AUD_readSound(AUD_Sound* sound, sample_t* buffer, int length, int samples_pe
specs.specs = reader->getSpecs();
int len;
float samplejump = specs.rate / samples_per_second;
float min, max, power;
float min, max, power, overallmax;
bool eos;
overallmax = 0;
for(int i = 0; i < length; i++)
{
len = floor(samplejump * (i+1)) - floor(samplejump * i);
@ -1121,6 +1123,11 @@ int AUD_readSound(AUD_Sound* sound, sample_t* buffer, int length, int samples_pe
buffer[i * 3 + 1] = max;
buffer[i * 3 + 2] = sqrt(power) / len;
if(overallmax < max)
overallmax = max;
if(overallmax < -min)
overallmax = -min;
if(eos)
{
length = i;
@ -1128,6 +1135,14 @@ int AUD_readSound(AUD_Sound* sound, sample_t* buffer, int length, int samples_pe
}
}
if(overallmax > 1.0f)
{
for(int i = 0; i < length * 3; i++)
{
buffer[i] /= overallmax;
}
}
return length;
}

View File

@ -37,18 +37,18 @@
class CTR_Link {
public:
CTR_Link(
CTR_Link(
) ;
CTR_Link(
CTR_Link(
CTR_Link *next,
CTR_Link *prev
) ;
CTR_Link *
getNext(
) const ;
CTR_Link *
getPrev(
) const ;
@ -76,14 +76,14 @@ public:
) ;
private:
CTR_Link *m_next;
CTR_Link *m_prev;
CTR_Link *m_next;
CTR_Link *m_prev;
};
class CTR_List {
public:
CTR_List(
CTR_List(
) ;
CTR_Link *
@ -103,10 +103,10 @@ public:
addTail(
CTR_Link *link
) ;
private:
CTR_Link m_head;
CTR_Link m_tail;
CTR_Link m_head;
CTR_Link m_tail;
};
#endif

View File

@ -37,24 +37,24 @@
template <class Key, class Value>
class CTR_Map {
private:
struct Entry {
Entry (Entry *next, Key key, Value value) :
m_next(next),
m_key(key),
m_value(value) {}
struct Entry {
Entry (Entry *next, Key key, Value value) :
m_next(next),
m_key(key),
m_value(value) {}
Entry *m_next;
Key m_key;
Value m_value;
};
Entry *m_next;
Key m_key;
Value m_value;
};
public:
CTR_Map(int num_buckets = 100) : m_num_buckets(num_buckets) {
m_buckets = new Entry *[num_buckets];
for (int i = 0; i < num_buckets; ++i) {
m_buckets[i] = 0;
}
}
CTR_Map(int num_buckets = 100) : m_num_buckets(num_buckets) {
m_buckets = new Entry *[num_buckets];
for (int i = 0; i < num_buckets; ++i) {
m_buckets[i] = 0;
}
}
CTR_Map(const CTR_Map& map)
{
@ -68,114 +68,114 @@ public:
insert(entry->m_key, entry->m_value);
}
}
int size() {
int count=0;
for (int i=0;i<m_num_buckets;i++)
{
Entry* bucket = m_buckets[i];
while(bucket)
{
bucket = bucket->m_next;
count++;
}
}
return count;
}
Value* at(int index) {
int count=0;
for (int i=0;i<m_num_buckets;i++)
{
Entry* bucket = m_buckets[i];
while(bucket)
{
if (count==index)
{
return &bucket->m_value;
}
bucket = bucket->m_next;
count++;
}
}
return 0;
}
Key* getKey(int index) {
int count=0;
for (int i=0;i<m_num_buckets;i++)
{
Entry* bucket = m_buckets[i];
while(bucket)
{
if (count==index)
{
return &bucket->m_key;
}
bucket = bucket->m_next;
count++;
}
}
return 0;
}
void clear() {
for (int i = 0; i < m_num_buckets; ++i) {
Entry *entry_ptr = m_buckets[i];
while (entry_ptr != 0) {
Entry *tmp_ptr = entry_ptr->m_next;
delete entry_ptr;
entry_ptr = tmp_ptr;
}
m_buckets[i] = 0;
}
}
~CTR_Map() {
clear();
delete [] m_buckets;
}
void insert(const Key& key, const Value& value) {
Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets];
while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) {
entry_ptr = entry_ptr->m_next;
}
if (entry_ptr != 0) {
entry_ptr->m_value = value;
}
else {
Entry **bucket = &m_buckets[key.hash() % m_num_buckets];
*bucket = new Entry(*bucket, key, value);
}
}
int size() {
int count=0;
for (int i=0;i<m_num_buckets;i++)
{
Entry* bucket = m_buckets[i];
while(bucket)
{
bucket = bucket->m_next;
count++;
}
}
return count;
}
void remove(const Key& key) {
Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets];
while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) {
entry_ptr = &(*entry_ptr)->m_next;
}
if (*entry_ptr != 0) {
Entry *tmp_ptr = (*entry_ptr)->m_next;
delete *entry_ptr;
*entry_ptr = tmp_ptr;
}
}
Value* at(int index) {
int count=0;
for (int i=0;i<m_num_buckets;i++)
{
Entry* bucket = m_buckets[i];
while(bucket)
{
if (count==index)
{
return &bucket->m_value;
}
bucket = bucket->m_next;
count++;
}
}
return 0;
}
Key* getKey(int index) {
int count=0;
for (int i=0;i<m_num_buckets;i++)
{
Entry* bucket = m_buckets[i];
while(bucket)
{
if (count==index)
{
return &bucket->m_key;
}
bucket = bucket->m_next;
count++;
}
}
return 0;
}
void clear() {
for (int i = 0; i < m_num_buckets; ++i) {
Entry *entry_ptr = m_buckets[i];
while (entry_ptr != 0) {
Entry *tmp_ptr = entry_ptr->m_next;
delete entry_ptr;
entry_ptr = tmp_ptr;
}
m_buckets[i] = 0;
}
}
~CTR_Map() {
clear();
delete [] m_buckets;
}
void insert(const Key& key, const Value& value) {
Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets];
while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) {
entry_ptr = entry_ptr->m_next;
}
if (entry_ptr != 0) {
entry_ptr->m_value = value;
}
else {
Entry **bucket = &m_buckets[key.hash() % m_num_buckets];
*bucket = new Entry(*bucket, key, value);
}
}
void remove(const Key& key) {
Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets];
while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) {
entry_ptr = &(*entry_ptr)->m_next;
}
if (*entry_ptr != 0) {
Entry *tmp_ptr = (*entry_ptr)->m_next;
delete *entry_ptr;
*entry_ptr = tmp_ptr;
}
}
Value *operator[](Key key) {
Entry *bucket = m_buckets[key.hash() % m_num_buckets];
while ((bucket != 0) && !(key == bucket->m_key)) {
bucket = bucket->m_next;
}
return bucket != 0 ? &bucket->m_value : 0;
}
Value *operator[](Key key) {
Entry *bucket = m_buckets[key.hash() % m_num_buckets];
while ((bucket != 0) && !(key == bucket->m_key)) {
bucket = bucket->m_next;
}
return bucket != 0 ? &bucket->m_value : 0;
}
private:
int m_num_buckets;
Entry **m_buckets;
int m_num_buckets;
Entry **m_buckets;
};
#endif

View File

@ -96,14 +96,14 @@ typedef enum {
} GHOST_TFireTimeConstant;
typedef enum {
GHOST_kModifierKeyLeftShift = 0,
GHOST_kModifierKeyRightShift,
GHOST_kModifierKeyLeftAlt,
GHOST_kModifierKeyRightAlt,
GHOST_kModifierKeyLeftControl,
GHOST_kModifierKeyRightControl,
GHOST_kModifierKeyOS,
GHOST_kModifierKeyNumMasks
GHOST_kModifierKeyLeftShift = 0,
GHOST_kModifierKeyRightShift,
GHOST_kModifierKeyLeftAlt,
GHOST_kModifierKeyRightAlt,
GHOST_kModifierKeyLeftControl,
GHOST_kModifierKeyRightControl,
GHOST_kModifierKeyOS,
GHOST_kModifierKeyNumMasks
} GHOST_TModifierKeyMask;

View File

@ -34,7 +34,12 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f
sources.remove('intern' + os.sep + f + 'SDL.cpp')
except ValueError:
pass
defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option
## removing because scons does not support system installation
## if this is used for blender.org builds it means our distrobution
## will find any locally installed blender and double up its script path.
## So until this is supported properly as with CMake,
## just dont use the PREFIX.
# defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option
defs += ['WITH_X11_XINPUT'] # XXX, make an option
elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
@ -103,7 +108,7 @@ if window_system in ('win32-vc', 'win64-vc'):
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15]) #, cc_compileflags=env['CCFLAGS'].append('/WX') )
elif env['WITH_GHOST_COCOA']: # always use Apple-gcc-4.2 for objC language, for gnu-compilers do not support it fully yet
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/gcc-4.2' )
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/g++-4.2' )
print "GHOST COCOA WILL BE COMPILED WITH APPLE GCC"
else:

View File

@ -44,35 +44,35 @@
* @date May 15, 2001
*/
struct GHOST_Buttons {
/**
* Constructor.
*/
GHOST_Buttons();
/**
* Constructor.
*/
GHOST_Buttons();
virtual ~GHOST_Buttons();
/**
* Returns the state of a single button.
* @param mask. Key button to return.
* @return The state of the button (pressed == true).
*/
virtual bool get(GHOST_TButtonMask mask) const;
/**
* Updates the state of a single button.
* @param mask. Button state to update.
* @param down. The new state of the button.
*/
virtual void set(GHOST_TButtonMask mask, bool down);
/**
* Sets the state of all buttons to up.
*/
virtual void clear();
GHOST_TUns8 m_ButtonLeft : 1;
GHOST_TUns8 m_ButtonMiddle : 1;
GHOST_TUns8 m_ButtonRight : 1;
/**
* Returns the state of a single button.
* @param mask. Key button to return.
* @return The state of the button (pressed == true).
*/
virtual bool get(GHOST_TButtonMask mask) const;
/**
* Updates the state of a single button.
* @param mask. Button state to update.
* @param down. The new state of the button.
*/
virtual void set(GHOST_TButtonMask mask, bool down);
/**
* Sets the state of all buttons to up.
*/
virtual void clear();
GHOST_TUns8 m_ButtonLeft : 1;
GHOST_TUns8 m_ButtonMiddle : 1;
GHOST_TUns8 m_ButtonRight : 1;
};
#endif // _GHOST_BUTTONS_H_

View File

@ -44,10 +44,10 @@
*/
struct GHOST_ModifierKeys
{
/**
* Constructor.
*/
GHOST_ModifierKeys();
/**
* Constructor.
*/
GHOST_ModifierKeys();
virtual ~GHOST_ModifierKeys();
@ -58,25 +58,25 @@ struct GHOST_ModifierKeys
*/
static GHOST_TKey getModifierKeyCode(GHOST_TModifierKeyMask mask);
/**
* Returns the state of a single modifier key.
* @param mask. Key state to return.
* @return The state of the key (pressed == true).
*/
virtual bool get(GHOST_TModifierKeyMask mask) const;
/**
* Updates the state of a single modifier key.
* @param mask. Key state to update.
* @param down. The new state of the key.
*/
virtual void set(GHOST_TModifierKeyMask mask, bool down);
/**
* Sets the state of all modifier keys to up.
*/
virtual void clear();
/**
* Returns the state of a single modifier key.
* @param mask. Key state to return.
* @return The state of the key (pressed == true).
*/
virtual bool get(GHOST_TModifierKeyMask mask) const;
/**
* Updates the state of a single modifier key.
* @param mask. Key state to update.
* @param down. The new state of the key.
*/
virtual void set(GHOST_TModifierKeyMask mask, bool down);
/**
* Sets the state of all modifier keys to up.
*/
virtual void clear();
/**
* Determines whether to modifier key states are equal.
@ -84,21 +84,21 @@ struct GHOST_ModifierKeys
* @return Indication of equality.
*/
virtual bool equals(const GHOST_ModifierKeys& keys) const;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_LeftShift : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightShift : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_LeftAlt : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightAlt : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_LeftControl : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightControl : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_OS : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_LeftShift : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightShift : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_LeftAlt : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightAlt : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_LeftControl : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_RightControl : 1;
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_OS : 1;
};
#endif // _GHOST_MODIFIER_KEYS_H_

View File

@ -55,16 +55,16 @@ class GHOST_EventWindow;
*/
class GHOST_SystemCarbon : public GHOST_System {
public:
/**
* Constructor.
*/
GHOST_SystemCarbon();
/**
* Destructor.
*/
~GHOST_SystemCarbon();
/**
* Constructor.
*/
GHOST_SystemCarbon();
/**
* Destructor.
*/
~GHOST_SystemCarbon();
/***************************************************************************************
** Time(r) functionality
***************************************************************************************/
@ -211,54 +211,54 @@ protected:
virtual GHOST_TSuccess exit();
/**
* Handles a tablet event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleTabletEvent(EventRef event);
/**
* Handles a mouse event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleMouseEvent(EventRef event);
/**
* Handles a tablet event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleTabletEvent(EventRef event);
/**
* Handles a mouse event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleMouseEvent(EventRef event);
/**
* Handles a key event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleKeyEvent(EventRef event);
/**
* Handles a key event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleKeyEvent(EventRef event);
/**
* Handles a window event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleWindowEvent(EventRef event);
/**
* Handles a window event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
OSStatus handleWindowEvent(EventRef event);
/**
* Handles all basic Mac application stuff for a mouse down event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
bool handleMouseDown(EventRef event);
/**
* Handles all basic Mac application stuff for a mouse down event.
* @param event A Mac event.
* @return Indication whether the event was handled.
*/
bool handleMouseDown(EventRef event);
/**
* Handles a Mac menu command.
* @param menuResult A Mac menu/item identifier.
* @return Indication whether the event was handled.
*/
bool handleMenuCommand(GHOST_TInt32 menuResult);
/* callback for blender generated events */
// static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
/**
* Handles a Mac menu command.
* @param menuResult A Mac menu/item identifier.
* @return Indication whether the event was handled.
*/
bool handleMenuCommand(GHOST_TInt32 menuResult);
/* callback for blender generated events */
// static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
/**
* Callback for Carbon when it has events.
*/
/**
* Callback for Carbon when it has events.
*/
static OSStatus sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
/** Apple Event Handlers */
@ -267,23 +267,23 @@ protected:
static OSErr sAEHandlerPrintDocs(const AppleEvent *event, AppleEvent *reply, SInt32 refCon);
static OSErr sAEHandlerQuit(const AppleEvent *event, AppleEvent *reply, SInt32 refCon);
/**
* Callback for Mac Timer tasks that expire.
* @param tmTask Pointer to the timer task that expired.
*/
//static void s_timerCallback(TMTaskPtr tmTask);
/** Event handler reference. */
EventHandlerRef m_handler;
/**
* Callback for Mac Timer tasks that expire.
* @param tmTask Pointer to the timer task that expired.
*/
//static void s_timerCallback(TMTaskPtr tmTask);
/** Event handler reference. */
EventHandlerRef m_handler;
/** Start time at initialization. */
GHOST_TUns64 m_start_time;
/** State of the modifiers. */
UInt32 m_modifierMask;
/** State of the modifiers. */
UInt32 m_modifierMask;
/** Ignores window size messages (when window is dragged). */
bool m_ignoreWindowSizedMessages;
/** Ignores window size messages (when window is dragged). */
bool m_ignoreWindowSizedMessages;
};
#endif // _GHOST_SYSTEM_CARBON_H_

View File

@ -52,16 +52,16 @@ class GHOST_WindowCocoa;
class GHOST_SystemCocoa : public GHOST_System {
public:
/**
* Constructor.
*/
GHOST_SystemCocoa();
/**
* Destructor.
*/
~GHOST_SystemCocoa();
/**
* Constructor.
*/
GHOST_SystemCocoa();
/**
* Destructor.
*/
~GHOST_SystemCocoa();
/***************************************************************************************
** Time(r) functionality
***************************************************************************************/
@ -92,7 +92,7 @@ public:
/**
* Create a new window.
* The new window is added to the list of windows managed.
* The new window is added to the list of windows managed.
* Never explicitly delete the window, use disposeWindow() instead.
* @param title The name of the window (displayed in the title bar of the window if the OS supports it).
* @param left The coordinate of the left edge of the window.
@ -107,17 +107,17 @@ public:
* @return The new window (or 0 if creation failed).
*/
virtual GHOST_IWindow* createWindow(
const STR_String& title,
GHOST_TInt32 left,
GHOST_TInt32 top,
GHOST_TUns32 width,
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
const bool stereoVisual = false,
const GHOST_TUns16 numOfAASamples = 0,
const GHOST_TEmbedderWindowID parentWindow = 0
);
const STR_String& title,
GHOST_TInt32 left,
GHOST_TInt32 top,
GHOST_TUns32 width,
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
const bool stereoVisual = false,
const GHOST_TUns16 numOfAASamples = 0,
const GHOST_TEmbedderWindowID parentWindow = 0
);
/***************************************************************************************
** Event management functionality
@ -140,19 +140,19 @@ public:
* Handle Cocoa openFile event
* Display confirmation request panel if changes performed since last save
*/
bool handleOpenDocumentRequest(void *filepathStr);
bool handleOpenDocumentRequest(void *filepathStr);
/**
* Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
* @param eventType The type of drag'n'drop event
* Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
* @param eventType The type of drag'n'drop event
* @param draggedObjectType The type object concerned (currently array of file names, string, TIFF image)
* @param mouseX x mouse coordinate (in cocoa base window coordinates)
* @param mouseY y mouse coordinate
* @param window The window on which the event occurred
* @return Indication whether the event was handled.
*/
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
/***************************************************************************************
** Cursor management functionality
@ -207,18 +207,18 @@ public:
virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
/**
* Handles a window event. Called by GHOST_WindowCocoa window delegate
* @param eventType The type of window event
* Handles a window event. Called by GHOST_WindowCocoa window delegate
* @param eventType The type of window event
* @param window The window on which the event occurred
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
/**
* Handles the Cocoa event telling the application has become active (again)
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleApplicationBecomeActiveEvent();
* Handles the Cocoa event telling the application has become active (again)
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleApplicationBecomeActiveEvent();
/**
* External objects should call this when they send an event outside processEvents.
@ -239,28 +239,28 @@ protected:
*/
virtual GHOST_TSuccess init();
/**
* Handles a tablet event.
* @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @param eventType The type of the event. It needs to be passed separately as it can be either directly in the event type, or as a subtype if combined with a mouse button event
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType);
/**
* Handles a mouse event.
* @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleMouseEvent(void *eventPtr);
* Handles a tablet event.
* @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @param eventType The type of the event. It needs to be passed separately as it can be either directly in the event type, or as a subtype if combined with a mouse button event
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType);
/**
* Handles a mouse event.
* @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleMouseEvent(void *eventPtr);
/**
* Handles a key event.
* @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleKeyEvent(void *eventPtr);
/**
* Handles a key event.
* @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleKeyEvent(void *eventPtr);
/**
* Performs the actual cursor position update (location in screen coordinates).
* @param x The x-coordinate of the cursor.
@ -281,11 +281,11 @@ protected:
/** Mouse buttons state */
GHOST_TUns32 m_pressedMouseButtons;
/** State of the modifiers. */
GHOST_TUns32 m_modifierMask;
/** State of the modifiers. */
GHOST_TUns32 m_modifierMask;
/** Ignores window size messages (when window is dragged). */
bool m_ignoreWindowSizedMessages;
/** Ignores window size messages (when window is dragged). */
bool m_ignoreWindowSizedMessages;
/** Stores the mouse cursor delta due to setting a new cursor position
* Needed because cocoa event delta cursor move takes setCursorPosition changes too.

View File

@ -50,16 +50,16 @@
*/
class GHOST_SystemPathsCarbon : public GHOST_SystemPaths {
public:
/**
* Constructor.
*/
GHOST_SystemPathsCarbon();
/**
* Destructor.
*/
~GHOST_SystemPathsCarbon();
/**
* Constructor.
*/
GHOST_SystemPathsCarbon();
/**
* Destructor.
*/
~GHOST_SystemPathsCarbon();
/**
* Determine the base dir in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, not including versioning.
@ -78,12 +78,12 @@ public:
* Determine the directory of the current binary
* @return Unsigned char string pointing to the binary dir
*/
virtual const GHOST_TUns8* getBinaryDir() const;
virtual const GHOST_TUns8* getBinaryDir() const;
/**
* Add the file to the operating system most recently used files
*/
void addToSystemRecentFiles(const char* filename) const;
void addToSystemRecentFiles(const char* filename) const;
};
#endif // _GHOST_SYSTEM_CARBON_H_

View File

@ -44,15 +44,15 @@
class GHOST_SystemPathsCocoa : public GHOST_SystemPaths {
public:
/**
* Constructor.
*/
GHOST_SystemPathsCocoa();
/**
* Destructor.
*/
~GHOST_SystemPathsCocoa();
/**
* Constructor.
*/
GHOST_SystemPathsCocoa();
/**
* Destructor.
*/
~GHOST_SystemPathsCocoa();
/**
* Determine the base dir in which shared resources are located. It will first try to use

View File

@ -21,25 +21,25 @@
#define __ITaskbarList_INTERFACE_DEFINED__
extern "C" {const GUID CLSID_TaskbarList = {0x56FDF344, 0xFD6D, 0x11D0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90} };
const GUID IID_ITaskbarList = {0x56FDF342, 0xFD6D, 0x11D0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90} }; }
class ITaskbarList : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE HrInit (void) = 0;
virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd) = 0;
};
class ITaskbarList : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE HrInit (void) = 0;
virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd) = 0;
};
#endif /* ITaskbarList */
#ifndef __ITaskbarList2_INTERFACE_DEFINED__
#define __ITaskbarList2_INTERFACE_DEFINED__
extern "C" {const GUID IID_ITaskbarList2 = {0x602D4995, 0xB13A, 0x429b, {0xA6, 0x6E, 0x19, 0x35, 0xE4, 0x4F, 0x43, 0x17} }; }
class ITaskbarList2 : public ITaskbarList
{
public:
virtual HRESULT STDMETHODCALLTYPE MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) = 0;
};
class ITaskbarList2 : public ITaskbarList
{
public:
virtual HRESULT STDMETHODCALLTYPE MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) = 0;
};
#endif /* ITaskbarList2 */
#ifndef __ITaskbarList3_INTERFACE_DEFINED__
@ -51,9 +51,9 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA
#define THBN_CLICKED 0x1800
extern "C" {const GUID IID_ITaskList3 = { 0xEA1AFB91, 0x9E28, 0x4B86, {0x90, 0xE9, 0x9E, 0x9F, 0x8A, 0x5E, 0xEF, 0xAF} };}
class ITaskbarList3 : public ITaskbarList2
{
public:
class ITaskbarList3 : public ITaskbarList2
{
public:
virtual HRESULT STDMETHODCALLTYPE SetProgressValue (HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) = 0;
virtual HRESULT STDMETHODCALLTYPE SetProgressState (HWND hwnd, TBPFLAG tbpFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterTab (HWND hwndTab, HWND hwndMDI) = 0;
@ -62,11 +62,11 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA
virtual HRESULT STDMETHODCALLTYPE SetTabActive (HWND hwndTab, HWND hwndMDI, DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons (HWND hwnd, UINT cButtons, THUMBBUTTON * pButton) = 0;
virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons (HWND hwnd, UINT cButtons, THUMBBUTTON * pButton) = 0;
virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList (HWND hwnd, HIMAGELIST himl) = 0;
virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList (HWND hwnd, HIMAGELIST himl) = 0;
virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon (HWND hwnd, HICON hIcon, LPCWSTR pszDescription) = 0;
virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip (HWND hwnd, LPCWSTR pszTip) = 0;
virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip (HWND hwnd, RECT *prcClip) = 0;
};
};
#endif /* ITaskbarList3 */
#endif /*GHOST_TASKBARWIN32_H_*/

View File

@ -339,11 +339,11 @@ protected:
/** Number of samples used in anti-aliasing, set to 0 if no AA **/
GHOST_TUns16 m_numOfAASamples;
/** Full-screen width */
GHOST_TUns32 m_fullScreenWidth;
/** Full-screen height */
GHOST_TUns32 m_fullScreenHeight;
/** Full-screen width */
GHOST_TUns32 m_fullScreenWidth;
/** Full-screen height */
GHOST_TUns32 m_fullScreenHeight;
};

View File

@ -200,12 +200,12 @@ public:
virtual GHOST_TSuccess activateDrawingContext();
virtual void loadCursor(bool visible, GHOST_TStandardCursor cursor) const;
/**
* Returns the dirty state of the window when in full-screen mode.
* @return Whether it is dirty.
*/
virtual bool getFullScreenDirty();
/**
* Returns the dirty state of the window when in full-screen mode.
* @return Whether it is dirty.
*/
virtual bool getFullScreenDirty();
/* accessor for fullscreen window */
virtual void setMac_windowState(short value);
@ -257,24 +257,24 @@ protected:
int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color);
virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY);
/**
* Converts a string object to a Mac Pascal string.
* @param in The string object to be converted.
* @param out The converted string.
*/
virtual void gen2mac(const STR_String& in, Str255 out) const;
/**
* Converts a Mac Pascal string to a string object.
* @param in The string to be converted.
* @param out The converted string object.
*/
virtual void mac2gen(const Str255 in, STR_String& out) const;
/**
* Converts a string object to a Mac Pascal string.
* @param in The string object to be converted.
* @param out The converted string.
*/
virtual void gen2mac(const STR_String& in, Str255 out) const;
/**
* Converts a Mac Pascal string to a string object.
* @param in The string to be converted.
* @param out The converted string object.
*/
virtual void mac2gen(const Str255 in, STR_String& out) const;
WindowRef m_windowRef;
CGrafPtr m_grafPtr;
AGLContext m_aglCtx;
WindowRef m_windowRef;
CGrafPtr m_grafPtr;
AGLContext m_aglCtx;
/** The first created OpenGL context (for sharing display lists) */
static AGLContext s_firstaglCtx;
@ -282,9 +282,9 @@ protected:
Cursor* m_customCursor;
GHOST_TabletData m_tablet;
/** When running in full-screen this tells whether to refresh the window. */
bool m_fullScreenDirty;
/** When running in full-screen this tells whether to refresh the window. */
bool m_fullScreenDirty;
/** specific MacOs X full screen window setting as we use partially system mechanism
values : 0 not maximizable default
@ -295,17 +295,17 @@ protected:
in order to be unified with GHOST fullscreen/maximised settings
(lukep)
**/
**/
short mac_windowState;
/**
* The width/height of the size rectangle in the lower right corner of a
* Mac/Carbon window. This is also the height of the gutter area.
*/
/**
* The width/height of the size rectangle in the lower right corner of a
* Mac/Carbon window. This is also the height of the gutter area.
*/
#ifdef GHOST_DRAW_CARBON_GUTTER
static const GHOST_TInt32 s_sizeRectSize;
static const GHOST_TInt32 s_sizeRectSize;
#endif // GHOST_DRAW_CARBON_GUTTER
};

View File

@ -190,16 +190,16 @@ static void gearGL(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GL
static void drawGearGL(int id)
{
static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 1.0f };
static GLfloat ared[4] = { 0.8f, 0.1f, 0.0f, 1.0f };
static GLfloat agreen[4] = { 0.0f, 0.8f, 0.2f, 1.0f };
static GLfloat ablue[4] = { 0.2f, 0.2f, 1.0f, 1.0f };
static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 1.0f };
static GLfloat ared[4] = { 0.8f, 0.1f, 0.0f, 1.0f };
static GLfloat agreen[4] = { 0.0f, 0.8f, 0.2f, 1.0f };
static GLfloat ablue[4] = { 0.2f, 0.2f, 1.0f, 1.0f };
glLightfv(GL_LIGHT0, GL_POSITION, pos);
glEnable(GL_CULL_FACE);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_DEPTH_TEST);
glLightfv(GL_LIGHT0, GL_POSITION, pos);
glEnable(GL_CULL_FACE);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_DEPTH_TEST);
switch (id)
{
@ -218,40 +218,40 @@ static void drawGearGL(int id)
default:
break;
}
glEnable(GL_NORMALIZE);
glEnable(GL_NORMALIZE);
}
static void drawGL(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glPushMatrix();
glRotatef(view_rotx, 1.0, 0.0, 0.0);
glRotatef(view_roty, 0.0, 1.0, 0.0);
glRotatef(view_rotz, 0.0, 0.0, 1.0);
glRotatef(view_rotx, 1.0, 0.0, 0.0);
glRotatef(view_roty, 0.0, 1.0, 0.0);
glRotatef(view_rotz, 0.0, 0.0, 1.0);
glPushMatrix();
glTranslatef(-3.0, -2.0, 0.0);
glRotatef(fAngle, 0.0, 0.0, 1.0);
drawGearGL(1);
glPopMatrix();
glPushMatrix();
glTranslatef(-3.0, -2.0, 0.0);
glRotatef(fAngle, 0.0, 0.0, 1.0);
drawGearGL(1);
glPopMatrix();
glPushMatrix();
glTranslatef(3.1f, -2.0f, 0.0f);
glRotatef((float)(-2.0*fAngle-9.0), 0.0, 0.0, 1.0);
drawGearGL(2);
glPopMatrix();
glPushMatrix();
glTranslatef(3.1f, -2.0f, 0.0f);
glRotatef((float)(-2.0*fAngle-9.0), 0.0, 0.0, 1.0);
drawGearGL(2);
glPopMatrix();
glPushMatrix();
glTranslatef(-3.1f, 2.2f, -1.8f);
glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
glRotatef((float)(2.0*fAngle-2.0), 0.0, 0.0, 1.0);
drawGearGL(3);
glPopMatrix();
glPushMatrix();
glTranslatef(-3.1f, 2.2f, -1.8f);
glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
glRotatef((float)(2.0*fAngle-2.0), 0.0, 0.0, 1.0);
drawGearGL(3);
glPopMatrix();
glPopMatrix();
glPopMatrix();
}
@ -260,21 +260,21 @@ static void setViewPortGL(GHOST_WindowHandle hWindow)
GHOST_RectangleHandle hRect = NULL;
GLfloat w, h;
GHOST_ActivateWindowDrawingContext(hWindow);
hRect = GHOST_GetClientBounds(hWindow);
GHOST_ActivateWindowDrawingContext(hWindow);
hRect = GHOST_GetClientBounds(hWindow);
w = (float)GHOST_GetWidthRectangle(hRect) / (float)GHOST_GetHeightRectangle(hRect);
h = 1.0;
w = (float)GHOST_GetWidthRectangle(hRect) / (float)GHOST_GetHeightRectangle(hRect);
h = 1.0;
glViewport(0, 0, GHOST_GetWidthRectangle(hRect), GHOST_GetHeightRectangle(hRect));
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-w, w, -h, h, 5.0, 60.0);
glFrustum(-w, w, -h, h, 5.0, 60.0);
/* glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); */
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -40.0);
glTranslatef(0.0, 0.0, -40.0);
glClearColor(.2f,0.0f,0.0f,0.0f);
glClear(GL_COLOR_BUFFER_BIT);
@ -541,8 +541,8 @@ int main(int argc, char** argv)
static void gearsTimerProc(GHOST_TimerTaskHandle hTask, GHOST_TUns64 time)
{
GHOST_WindowHandle hWindow = NULL;
fAngle += 2.0;
view_roty += 1.0;
fAngle += 2.0;
view_roty += 1.0;
hWindow = (GHOST_WindowHandle)GHOST_GetTimerTaskUserData(hTask);
if (GHOST_GetFullScreen(shSystem))
{

View File

@ -166,13 +166,13 @@ typedef struct
tbool bOrient;
} STSpace;
int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn);
tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
const SMikkTSpaceContext * pContext);
static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn);
static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
const SMikkTSpaceContext * pContext);
static int MakeIndex(const int iFace, const int iVert)
{
@ -216,14 +216,14 @@ static STSpace AvgTSpace(const STSpace * pTS0, const STSpace * pTS1)
SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index);
SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index);
SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index);
static SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index);
static SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index);
static SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index);
// degen triangles
void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris);
void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris);
static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris);
static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris);
tbool genTangSpaceDefault(const SMikkTSpaceContext * pContext)
@ -450,11 +450,11 @@ NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
return iIndex<g_iCells?iIndex:(g_iCells-1);
}
void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in);
void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries);
void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in);
static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries);
static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
// Generate bounding box
@ -579,7 +579,7 @@ void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpa
free(piHashOffsets);
}
void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in)
static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in)
{
// make bbox
int c=0, l=0, channel=0;
@ -689,7 +689,7 @@ void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikk
}
}
void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries)
static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries)
{
// this can be optimized further using a tree structure or more hashing.
int e=0;
@ -724,7 +724,7 @@ void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pCont
}
}
void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int iNumUniqueVerts = 0, t=0, i=0;
for(t=0; t<iNrTrianglesIn; t++)
@ -767,7 +767,7 @@ void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikk
}
}
int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int iTSpacesOffs = 0, f=0, t=0;
int iDstTriIndex = 0;
@ -878,7 +878,7 @@ int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[],
return iTSpacesOffs;
}
SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index)
static SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index)
{
int iF, iI;
SVec3 res; float pos[3];
@ -888,7 +888,7 @@ SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index)
return res;
}
SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index)
static SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index)
{
int iF, iI;
SVec3 res; float norm[3];
@ -898,7 +898,7 @@ SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index)
return res;
}
SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index)
static SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index)
{
int iF, iI;
SVec3 res; float texc[2];
@ -920,8 +920,8 @@ typedef union
int array[3];
} SEdge;
void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn);
void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn);
static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn);
static void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn);
// returns the texture area times 2
static float CalcTexArea(const SMikkTSpaceContext * pContext, const int indices[])
@ -940,7 +940,7 @@ static float CalcTexArea(const SMikkTSpaceContext * pContext, const int indices[
return fSignedAreaSTx2<0 ? (-fSignedAreaSTx2) : fSignedAreaSTx2;
}
void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int f=0, i=0, t=0;
// pTriInfos[f].iFlag is cleared in GenerateInitialVerticesIndexList() which is called before this function.
@ -1062,10 +1062,10 @@ void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpac
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[], const int iMyTriIndex, SGroup * pGroup);
void AddTriToGroup(SGroup * pGroup, const int iTriIndex);
static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[], const int iMyTriIndex, SGroup * pGroup);
static void AddTriToGroup(SGroup * pGroup, const int iTriIndex);
int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn)
static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn)
{
const int iNrMaxGroups = iNrTrianglesIn*3;
int iNrActiveGroups = 0;
@ -1126,13 +1126,13 @@ int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTriangle
return iNrActiveGroups;
}
void AddTriToGroup(SGroup * pGroup, const int iTriIndex)
static void AddTriToGroup(SGroup * pGroup, const int iTriIndex)
{
pGroup->pFaceIndices[pGroup->iNrFaces] = iTriIndex;
++pGroup->iNrFaces;
}
tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
const int iMyTriIndex, SGroup * pGroup)
{
STriInfo * pMyTriInfo = &psTriInfos[iMyTriIndex];
@ -1187,13 +1187,13 @@ tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2);
void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed);
STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[], const SMikkTSpaceContext * pContext, const int iVertexRepresentitive);
static tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2);
static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed);
static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[], const SMikkTSpaceContext * pContext, const int iVertexRepresentitive);
tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
const SMikkTSpaceContext * pContext)
static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
const SMikkTSpaceContext * pContext)
{
STSpace * pSubGroupTspace = NULL;
SSubGroup * pUniSubGroups = NULL;
@ -1361,8 +1361,8 @@ tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGro
return TTRUE;
}
STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[],
const SMikkTSpaceContext * pContext, const int iVertexRepresentitive)
static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[],
const SMikkTSpaceContext * pContext, const int iVertexRepresentitive)
{
STSpace res;
float fAngleSum = 0;
@ -1435,7 +1435,7 @@ STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[]
return res;
}
tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
static tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
{
tbool bStillSame=TTRUE;
int i=0;
@ -1448,7 +1448,7 @@ tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
return bStillSame;
}
void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed)
static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed)
{
int iL, iR, n, index, iMid, iTmp;
@ -1492,10 +1492,10 @@ void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed);
void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in);
static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed);
static void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in);
void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn)
static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn)
{
// build array of edges
unsigned int uSeed = INTERNAL_RND_SORT_SEED; // could replace with a random seed?
@ -1590,7 +1590,7 @@ void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriLis
}
}
void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn)
static void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn)
{
int f=0, i=0;
for(f=0; f<iNrTrianglesIn; f++)
@ -1639,7 +1639,7 @@ void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int
}
}
void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed)
static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed)
{
unsigned int t;
int iL, iR, n, index, iMid;
@ -1696,7 +1696,7 @@ void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channe
}
// resolve ordering and edge number
void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in)
static void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in)
{
*edgenum_out = -1;
@ -1730,7 +1730,7 @@ void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[],
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Degenerate triangles ////////////////////////////////////
void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris)
static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris)
{
int iNextGoodTriangleSearchIndex=-1;
tbool bStillFindingGoodOnes;
@ -1813,7 +1813,7 @@ void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrian
assert(iNrTrianglesIn == t);
}
void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris)
static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris)
{
int t=0, i=0;
// deal with degenerate triangles

View File

@ -95,11 +95,11 @@ public:
STR_String& Format(const char *fmt, ...); // Set formatted text to string
STR_String& FormatAdd(const char *fmt, ...); // Add formatted text to string
inline void Clear() { Len = pData[0] = 0; }
inline const STR_String & Reverse()
{
for (int i1=0, i2=Len-1; i1<i2; i1++, i2--)
swap(pData[i1], pData[i2]); return *this;
}
inline const STR_String & Reverse()
{
for (int i1=0, i2=Len-1; i1<i2; i1++, i2--)
swap(pData[i1], pData[i2]); return *this;
}
// Properties
bool IsUpper() const;

View File

@ -192,27 +192,7 @@ source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/makesrna/intern/rna_world.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_operators.c

View File

@ -6,7 +6,7 @@ I'll try briefly explain how translation works and how to update translation fil
1. How it works
---------------
This folder contains source files for translation system. This source files have
This folder contains source files for translation system. These source files have
got .po extension and they've got pretty simple syntax:
msgid "some message id"
@ -16,9 +16,9 @@ This means when string "some message id" is used as operator name, tooltip, menu
and so it'll be displayed on the screen as "translation for this message".
Pretty simple.
This source files are pre-compiled into ../relese/bin/.blender/locale/<language>/LC_MESSAGES/blender.mo,
so they aren't getting compiled every time Blender is compiling to same some time and prevent
failure on systems which doesn't have needed tools for compiling .po files.
This source files are pre-compiled into ../release/bin/.blender/locale/<language>/LC_MESSAGES/blender.mo,
so they aren't getting compiled every time Blender is compiling to save some time and prevent
failure on systems which don't have needed tools for compiling .po files.
2. How to update translations
-----------------------------
@ -32,7 +32,7 @@ msgid "some message id"
msgstr "translation for this message"
it means translation used to exist for this message, but message was changed, so translation
also have to be updated (it's easier to make new translation based on previos translation).
also have to be updated (it's easier to make new translation based on previous translation).
When translation was updated, remove line with '#, fuzzy' and it'll work.
If there's no message in .po file you want to translate, probably .po file should be updated.
@ -46,7 +46,7 @@ Use the following steps for this:
- Run update_po.py script to merge all .po files with blender.pot (so all .po files
will contain all msgid-s declared in blender.pot) or update_po.py <language> to
update only needed .po file(s) to save time when you're busy with translation.
But before ocmmit all .po files better be updated.
But before commit all .po files better be updated.
When you've finished with translation, you should re-compile .po file into .mo file.
It's also pretty simple: just run update_mo.py script to recompile all languages or
@ -54,7 +54,7 @@ just update_mo.py <language> to re-compile only needed language(s).
NOTE: msgfmt, msgmerge and xgettext tools should be available in your PATH.
This steps to update template, translation files and compile them can be made in "batch" mode
These steps to update template, translation files and compile them can be made in "batch" mode
using GNUMakefile:
make -f GNUMakefile translations
@ -65,7 +65,7 @@ NOTE: Blender has to be compiled using GNUMakefile first.
3. Note for Windows users
-------------------------
You can find compiled builds of gettext in the lib folder under "binaries\gettext\" for both windows and win64.
In order to run the scripts you will need to replace the location of the GETTEXT_..._EXeCUTABLE.
In order to run the scripts you will need to replace the location of the GETTEXT_..._EXECUTABLE.
For example in update_pot.py:
-GETTEXT_XGETTEXT_EXECUTABLE = "xgettext"
@ -77,5 +77,5 @@ For example in update_pot.py:
- check_po.py: this script checks if all messages declared in blender.pot exists in.po files
and that no extra messages are declared in .po files
- clean_po.py: this script removes all commented messages which aren't required by .pot file anymore.
- merge_po.py: this scripts accepts two files as arguments and copies translations from second file
- merge_po.py: this script accepts two files as arguments and copies translations from second file
into first file.

View File

@ -17,7 +17,7 @@
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>
# <pep8-80 compliant>
# Write out messages.txt from blender
@ -36,6 +36,72 @@ COMMENT_PREFIX = "#~ "
def dump_messages_rna(messages):
import bpy
def classBlackList():
blacklist_rna_class = [
# core classes
"Context", "Event", "Function", "UILayout",
"BlendData",
# registerable classes
"Panel", "Menu", "Header", "RenderEngine",
"Operator", "OperatorMacro", "Macro",
"KeyingSetInfo", "UnknownType",
# window classes
"WindowManager", "Window"
]
# ---------------------------------------------------------------------
# Collect internal operators
# extend with all internal operators
# note that this uses internal api introspection functions
# all possible operator names
op_names = list(sorted(set(
[cls.bl_rna.identifier for cls in
bpy.types.OperatorProperties.__subclasses__()] +
[cls.bl_rna.identifier for cls in
bpy.types.Operator.__subclasses__()] +
[cls.bl_rna.identifier for cls in
bpy.types.OperatorMacro.__subclasses__()]
)))
get_inatance = __import__("_bpy").ops.get_instance
path_resolve = type(bpy.context).__base__.path_resolve
for idname in op_names:
op = get_inatance(idname)
if 'INTERNAL' in path_resolve(op, "bl_options"):
blacklist_rna_class.append(idname)
# ---------------------------------------------------------------------
# Collect builtin classes we dont need to doc
blacklist_rna_class.append("Property")
blacklist_rna_class.extend(
[cls.__name__ for cls in
bpy.types.Property.__subclasses__()])
# ---------------------------------------------------------------------
# Collect classes which are attached to collections, these are api
# access only.
collection_props = set()
for cls_id in dir(bpy.types):
cls = getattr(bpy.types, cls_id)
for prop in cls.bl_rna.properties:
if prop.type == 'COLLECTION':
prop_cls = prop.srna
if prop_cls is not None:
collection_props.add(prop_cls.identifier)
blacklist_rna_class.extend(sorted(collection_props))
return blacklist_rna_class
blacklist_rna_class = classBlackList()
def filterRNA(bl_rna):
id = bl_rna.identifier
if id in blacklist_rna_class:
print(" skipping", id)
return True
return False
# -------------------------------------------------------------------------
# Function definitions
@ -57,8 +123,10 @@ def dump_messages_rna(messages):
continue
msgsrc = "bpy.types.%s.%s" % (bl_rna.identifier, prop.identifier)
messages.setdefault(prop.name, []).append(msgsrc)
messages.setdefault(prop.description, []).append(msgsrc)
if prop.name and prop.name != prop.identifier:
messages.setdefault(prop.name, []).append(msgsrc)
if prop.description:
messages.setdefault(prop.description, []).append(msgsrc)
if isinstance(prop, bpy.types.EnumProperty):
for item in prop.enum_items:
@ -66,10 +134,17 @@ def dump_messages_rna(messages):
prop.identifier,
item.identifier,
)
messages.setdefault(item.name, []).append(msgsrc)
messages.setdefault(item.description, []).append(msgsrc)
# Here identifier and name can be the same!
if item.name: # and item.name != item.identifier:
messages.setdefault(item.name, []).append(msgsrc)
if item.description:
messages.setdefault(item.description, []).append(msgsrc)
def walkRNA(bl_rna):
if filterRNA(bl_rna):
return
msgsrc = "bpy.types.%s" % bl_rna.identifier
if bl_rna.name and bl_rna.name != bl_rna.identifier:

View File

@ -27,6 +27,7 @@ op_poll = ops_module.poll
op_call = ops_module.call
op_as_string = ops_module.as_string
op_get_rna = ops_module.get_rna
op_get_instance = ops_module.get_instance
class BPyOps(object):
@ -184,11 +185,13 @@ class BPyOpsSubModOp(object):
return ret
def get_rna(self):
'''
currently only used for 'bl_rna'
'''
"""Internal function for introspection"""
return op_get_rna(self.idname())
def get_instance(self):
"""Internal function for introspection"""
return op_get_instance(self.idname())
def __repr__(self): # useful display, repr(op)
import bpy
idname = self.idname()

View File

@ -40,7 +40,7 @@ import bpy as _bpy
import os as _os
def abspath(path, start=None):
def abspath(path, start=None, library=None):
"""
Returns the absolute path relative to the current blend file
using the "//" prefix.
@ -48,8 +48,13 @@ def abspath(path, start=None):
:arg start: Relative to this path,
when not set the current filename is used.
:type start: string
:arg library: The library this path is from. This is only included for
convenience, when the library is not None its path replaces *start*.
:type library: :class:`bpy.types.Library`
"""
if path.startswith("//"):
if library:
start = abspath(_os.path.dirname(library.filepath))
return _os.path.join(_os.path.dirname(_bpy.data.filepath)
if start is None else start,
path[2:],
@ -263,7 +268,7 @@ def module_names(path, recursive=False):
def basename(path):
"""
Equivalent to os.path.basename, but skips a "//" suffix.
Equivalent to os.path.basename, but skips a "//" prefix.
Use for Windows compatibility.
"""

View File

@ -350,6 +350,7 @@ def path_reference(filepath,
mode='AUTO',
copy_subdir="",
copy_set=None,
library=None,
):
"""
Return a filepath relative to a destination directory, for use with
@ -372,12 +373,15 @@ def path_reference(filepath,
:arg copy_set: collect from/to pairs when mode='COPY',
pass to *path_reference_copy* when exportign is done.
:type copy_set: set
:arg library: The library this path is relative to.
:type library: :class:`bpy.types.Library` or None
:return: the new filepath.
:rtype: string
"""
import os
is_relative = filepath.startswith("//")
filepath_abs = os.path.normpath(bpy.path.abspath(filepath, base_src))
filepath_abs = bpy.path.abspath(filepath, base_src, library)
filepath_abs = os.path.normpath(filepath_abs)
if mode in {'ABSOLUTE', 'RELATIVE', 'STRIP'}:
pass
@ -385,13 +389,12 @@ def path_reference(filepath,
mode = 'RELATIVE' if is_relative else 'ABSOLUTE'
elif mode == 'AUTO':
mode = ('RELATIVE'
if bpy.path.is_subdir(filepath, base_dst)
if bpy.path.is_subdir(filepath_abs, base_dst)
else 'ABSOLUTE')
elif mode == 'COPY':
subdir_abs = os.path.normpath(base_dst)
if copy_subdir:
subdir_abs = os.path.join(os.path.normpath(base_dst), copy_subdir)
else:
subdir_abs = os.path.normpath(base_dst)
subdir_abs = os.path.join(subdir_abs, copy_subdir)
filepath_cpy = os.path.join(subdir_abs, os.path.basename(filepath))

View File

@ -69,8 +69,6 @@ class EditExternally(Operator):
self.report({'ERROR'}, "Image path not set")
return {'CANCELLED'}
filepath = os.path.normpath(bpy.path.abspath(filepath))
if not os.path.exists(filepath):
self.report({'ERROR'},
"Image path %r not found, image may be packed or "
@ -93,15 +91,16 @@ class EditExternally(Operator):
return {'FINISHED'}
def invoke(self, context, event):
import os
try:
filepath = context.space_data.image.filepath
except:
import traceback
traceback.print_exc()
self.report({'ERROR'}, "Image not found on disk")
image = context.space_data.image
except AttributeError:
self.report({'ERROR'}, "Context incorrect, image not found")
return {'CANCELLED'}
self.filepath = filepath
filepath = bpy.path.abspath(image.filepath, library=image.library)
self.filepath = os.path.normpath(filepath)
self.execute(context)
return {'FINISHED'}

View File

@ -140,7 +140,7 @@ def align_objects(align_x,
for obj, bb_world in objs:
if bb_quality:
if bb_quality and obj.type == 'MESH':
GBB = GlobalBB_HQ(obj)
else:
GBB = GlobalBB_LQ(bb_world)
@ -204,7 +204,7 @@ def align_objects(align_x,
matrix_world = obj.matrix_world.copy()
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
if bb_quality:
if bb_quality and obj.type == 'MESH':
GBB = GlobalBB_HQ(obj)
else:
GBB = GlobalBB_LQ(bb_world)

View File

@ -462,10 +462,10 @@ class QuickFluid(Operator):
if self.style == 'INFLOW':
mod.settings.type = 'INFLOW'
mod.settings.inflow_velocity = self.initial_velocity.copy()
mod.settings.inflow_velocity = self.initial_velocity
else:
mod.settings.type = 'FLUID'
mod.settings.initial_velocity = self.initial_velocity.copy()
mod.settings.initial_velocity = self.initial_velocity
obj.hide_render = not self.show_flows
if not self.show_flows:

View File

@ -259,10 +259,11 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
if not is_surf:
split = layout.split()
col = split.column()
col.active = (curve.dimensions == '3D')
col.label(text="Interpolation:")
col.prop(act_spline, "tilt_interpolation", text="Tilt")
colsub = col.column()
colsub.active = (curve.dimensions == '3D')
colsub.prop(act_spline, "tilt_interpolation", text="Tilt")
col.prop(act_spline, "radius_interpolation", text="Radius")
layout.prop(act_spline, "use_smooth")

View File

@ -382,10 +382,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.label(text="Mirror Object:")
col.prop(md, "mirror_object", text="")
def NAVMESH(self, layout, ob, md):
layout.operator("mesh.assign_navpolygon")
layout.operator("mesh.assign_new_navpolygon")
def MULTIRES(self, layout, ob, md):
layout.row().prop(md, "subdivision_type", expand=True)

View File

@ -47,8 +47,9 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
layout.prop(game, "physics_type")
layout.separator()
#if game.physics_type == 'DYNAMIC':
if game.physics_type in {'DYNAMIC', 'RIGID_BODY'}:
physics_type = game.physics_type
if physics_type in {'DYNAMIC', 'RIGID_BODY'}:
split = layout.split()
col = split.column()
@ -108,7 +109,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col.prop(game, "lock_rotation_y", text="Y")
col.prop(game, "lock_rotation_z", text="Z")
elif game.physics_type == 'SOFT_BODY':
elif physics_type == 'SOFT_BODY':
col = layout.column()
col.prop(game, "use_actor")
col.prop(game, "use_ghost")
@ -143,7 +144,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody)
sub.prop(soft, "cluster_iterations", text="Iterations")
elif game.physics_type == 'STATIC':
elif physics_type == 'STATIC':
col = layout.column()
col.prop(game, "use_actor")
col.prop(game, "use_ghost")
@ -164,9 +165,18 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
subsub.active = game.use_anisotropic_friction
subsub.prop(game, "friction_coefficients", text="", slider=True)
elif game.physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
elif physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
layout.prop(ob, "hide_render", text="Invisible")
elif physics_type == 'NAVMESH':
layout.operator("mesh.navmesh_face_copy")
layout.operator("mesh.navmesh_face_add")
layout.separator()
layout.operator("mesh.navmesh_reset")
layout.operator("mesh.navmesh_clear")
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
bl_label = "Collision Bounds"
@ -412,7 +422,7 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
rd = context.scene.game_settings.recast_data
layout.operator("mesh.create_navmesh", text='Build navigation mesh')
layout.operator("mesh.navmesh_make", text='Build navigation mesh')
col = layout.column()
col.label(text="Rasterization:")
@ -429,8 +439,8 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
col.prop(rd, "agent_radius", text="Radius")
col = split.column()
col.prop(rd, "max_slope")
col.prop(rd, "max_climb")
col.prop(rd, "slope_max")
col.prop(rd, "climb_max")
col = layout.column()
col.label(text="Region:")

View File

@ -60,7 +60,6 @@ class SEQUENCER_HT_header(Header):
layout.separator()
layout.operator("sequencer.refresh_all")
layout.template_running_jobs()
elif st.view_type == 'SEQUENCER_PREVIEW':
layout.separator()
layout.operator("sequencer.refresh_all")
@ -76,6 +75,8 @@ class SEQUENCER_HT_header(Header):
row.prop(ed, "overlay_frame", text="")
row.prop(ed, "overlay_lock", text="", icon='LOCKED')
layout.template_running_jobs()
class SEQUENCER_MT_view_toggle(Menu):
bl_label = "View Type"

View File

@ -121,19 +121,6 @@ class InputKeyMapPanel:
for entry in children:
self.draw_entry(display_keymaps, entry, col, level + 1)
@staticmethod
def draw_kmi_properties(box, properties, title=None):
box.separator()
if title:
box.label(text=title)
flow = box.column_flow(columns=2)
for pname, value in properties.bl_rna.properties.items():
if pname != "rna_type" and not properties.is_property_hidden(pname):
if isinstance(value, OperatorProperties):
InputKeyMapPanel.draw_kmi_properties(box, value, title=pname)
else:
flow.prop(properties, pname)
def draw_kmi(self, display_keymaps, kc, km, kmi, layout, level):
map_type = kmi.map_type
@ -218,9 +205,7 @@ class InputKeyMapPanel:
subrow.prop(kmi, "key_modifier", text="", event=True)
# Operator properties
props = kmi.properties
if props is not None:
InputKeyMapPanel.draw_kmi_properties(box, props)
box.template_keymap_item_properties(kmi)
# Modal key maps attached to this operator
if not km.is_modal:

View File

@ -721,11 +721,14 @@ class VIEW3D_MT_object(Menu):
layout.separator()
layout.menu("VIEW3D_MT_object_quick_effects")
layout.separator()
layout.menu("VIEW3D_MT_object_game")
layout.separator()
layout.operator("object.join_uvs")
layout.operator("object.join")
layout.separator()
@ -879,8 +882,8 @@ class VIEW3D_MT_object_parent(Menu):
def draw(self, context):
layout = self.layout
layout.operator("object.parent_set", text="Set")
layout.operator("object.parent_clear", text="Clear")
layout.operator_menu_enum("object.parent_set", "type", text="Set")
layout.operator_menu_enum("object.parent_clear", "type", text="Clear")
class VIEW3D_MT_object_track(Menu):
@ -889,8 +892,8 @@ class VIEW3D_MT_object_track(Menu):
def draw(self, context):
layout = self.layout
layout.operator("object.track_set", text="Set")
layout.operator("object.track_clear", text="Clear")
layout.operator_menu_enum("object.track_set", "type", text="Set")
layout.operator_menu_enum("object.track_clear", "type", text="Clear")
class VIEW3D_MT_object_group(Menu):
@ -919,6 +922,18 @@ class VIEW3D_MT_object_constraints(Menu):
layout.operator("object.constraints_clear")
class VIEW3D_MT_object_quick_effects(Menu):
bl_label = "Quick Effects"
def draw(self, context):
layout = self.layout
layout.operator("object.quick_fur")
layout.operator("object.quick_explode")
layout.operator("object.quick_smoke")
layout.operator("object.quick_fluid")
class VIEW3D_MT_object_showhide(Menu):
bl_label = "Show/Hide"
@ -968,6 +983,7 @@ class VIEW3D_MT_make_links(Menu):
layout.operator_enum("object.make_links_data", "type") # inline
layout.operator("object.join_uvs") # stupid place to add this!
class VIEW3D_MT_object_game(Menu):
bl_label = "Game"

View File

@ -484,16 +484,18 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
# XXX This needs a check if psys is editable.
if context.particle_edit_object:
tool = settings.tool
# XXX Select Particle System
layout.column().prop(settings, "tool", expand=True)
if settings.tool != 'NONE':
if tool != 'NONE':
col = layout.column()
col.prop(brush, "size", slider=True)
if settings.tool != 'ADD':
if tool != 'ADD':
col.prop(brush, "strength", slider=True)
if settings.tool == 'ADD':
if tool == 'ADD':
col.prop(brush, "count")
col = layout.column()
col.prop(settings, "use_default_interpolate")
@ -501,15 +503,16 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
sub.active = settings.use_default_interpolate
sub.prop(brush, "steps", slider=True)
sub.prop(settings, "default_key_count", slider=True)
elif settings.tool == 'LENGTH':
elif tool == 'LENGTH':
layout.prop(brush, "length_mode", expand=True)
elif settings.tool == 'PUFF':
elif tool == 'PUFF':
layout.prop(brush, "puff_mode", expand=True)
layout.prop(brush, "use_puff_volume")
# Sculpt Mode #
elif context.sculpt_object and brush:
tool = brush.sculpt_tool
col = layout.column()
@ -526,12 +529,12 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
row.prop(brush, "use_pressure_size", toggle=True, text="")
if brush.sculpt_tool not in {'SNAKE_HOOK', 'GRAB', 'ROTATE'}:
if tool not in {'SNAKE_HOOK', 'GRAB', 'ROTATE'}:
col.separator()
row = col.row(align=True)
if brush.use_space and brush.sculpt_tool not in {'SMOOTH'}:
if brush.use_space and tool != 'SMOOTH':
if brush.use_space_atten:
row.prop(brush, "use_space_atten", toggle=True, text="", icon='LOCKED')
else:
@ -540,26 +543,26 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
if brush.sculpt_tool not in {'SMOOTH'}:
if tool != 'SMOOTH':
col.separator()
row = col.row(align=True)
row.prop(brush, "auto_smooth_factor", slider=True)
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
if brush.sculpt_tool in {'GRAB', 'SNAKE_HOOK'}:
if tool in {'GRAB', 'SNAKE_HOOK'}:
col.separator()
row = col.row(align=True)
row.prop(brush, "normal_weight", slider=True)
if brush.sculpt_tool in {'CREASE', 'BLOB'}:
if tool in {'CREASE', 'BLOB'}:
col.separator()
row = col.row(align=True)
row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
if brush.sculpt_tool not in {'PINCH', 'INFLATE', 'SMOOTH'}:
if tool not in {'PINCH', 'INFLATE', 'SMOOTH'}:
row = col.row(align=True)
col.separator()
@ -571,8 +574,8 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
row.prop(brush, "sculpt_plane", text="")
#if brush.sculpt_tool in {'CLAY', 'CLAY_TUBES', 'FLATTEN', 'FILL', 'SCRAPE'}:
if brush.sculpt_tool in {'CLAY', 'FLATTEN', 'FILL', 'SCRAPE'}:
#if tool in {'CLAY', 'CLAY_TUBES', 'FLATTEN', 'FILL', 'SCRAPE'}:
if tool in {'CLAY', 'FLATTEN', 'FILL', 'SCRAPE'}:
row = col.row(align=True)
row.prop(brush, "plane_offset", slider=True)
row.prop(brush, "use_offset_pressure", text="")
@ -585,7 +588,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
row.active = brush.use_plane_trim
row.prop(brush, "plane_trim", slider=True, text="Distance")
if brush.sculpt_tool == 'LAYER':
if tool == 'LAYER':
row = col.row()
row.prop(brush, "height", slider=True, text="Height")
@ -597,12 +600,12 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
col.separator()
col.row().prop(brush, "direction", expand=True)
if brush.sculpt_tool in {'DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY'}:
if tool in {'DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY'}:
col.separator()
col.prop(brush, "use_accumulate")
if brush.sculpt_tool == 'LAYER':
if tool == 'LAYER':
col.separator()
ob = context.sculpt_object

View File

@ -353,14 +353,26 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
# custom properties
def doCustomProps(ksi, ks, bone):
prop_type_compat = {bpy.types.BooleanProperty,
bpy.types.IntProperty,
bpy.types.FloatProperty}
# go over all custom properties for bone
for prop, val in bone.items():
for prop in bone.keys():
# ignore special "_RNA_UI" used for UI editing
if prop == "_RNA_UI":
continue
# for now, just add all of 'em
ksi.addProp(ks, bone, '["%s"]' % (prop))
prop_rna = type(bone).bl_rna.properties.get(prop, None)
if prop_rna is None:
prop_path = '["%s"]' % prop
if bone.path_resolve(prop_path, False).rna_type in prop_type_compat:
ksi.addProp(ks, bone, prop_path)
elif prop_rna.is_animatable:
ksi.addProp(ks, bone, prop)
###############################

View File

@ -94,6 +94,7 @@ static const char *locales[] = {
"greek", "el_GR",
"korean", "ko_KR",
"nepali", "ne_NP",
"persian", "fa_PE",
};
void BLF_lang_init(void)

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,5 +1,4 @@
/*
*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,31 +1,31 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file BKE_cdderivedmesh.h
* \ingroup bke

View File

@ -1,31 +1,31 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file BKE_customdata.h
* \ingroup bke

View File

@ -1,5 +1,5 @@
/*
$Id$
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*

View File

@ -46,6 +46,7 @@ struct Curve;
struct objfnt;
struct TmpFont;
struct CharInfo;
struct Main;
struct chartrans {
float xof, yof;
@ -77,10 +78,10 @@ void BKE_font_register_builtin(void *mem, int size);
void free_vfont(struct VFont *sc);
void free_ttfont(void);
struct VFont *get_builtin_font(void);
struct VFont *load_vfont(const char *name);
struct VFont *load_vfont(struct Main *bmain, const char *name);
struct TmpFont *vfont_find_tmpfont(struct VFont *vfont);
struct chartrans *BKE_text_to_curve(struct Scene *scene, struct Object *ob, int mode);
struct chartrans *BKE_text_to_curve(struct Main *bmain, struct Scene *scene, struct Object *ob, int mode);
int BKE_font_getselection(struct Object *ob, int *start, int *end);

View File

@ -1,32 +1,31 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006-2007 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006-2007 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef BKE_ICONS_H
#define BKE_ICONS_H

View File

@ -1,6 +1,4 @@
/*
* blenlib/BKE_mesh.h (mar-2001 nzc)
*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -24,7 +22,7 @@
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
* Contributor(s): (mar-2001 nzc)
*
* ***** END GPL LICENSE BLOCK *****
*/
@ -161,6 +159,8 @@ int BKE_mesh_validate_dm(struct DerivedMesh *dm);
void BKE_mesh_calc_edges(struct Mesh *mesh, int update);
void BKE_mesh_ensure_navmesh(struct Mesh *me);
#ifdef __cplusplus
}
#endif

View File

@ -1,31 +1,31 @@
/**
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* 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 LICENSE BLOCK *****
*/
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* 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 LICENSE BLOCK *****
*/
#ifndef BKE_NAVMESH_CONVERSION_H
#define BKE_NAVMESH_CONVERSION_H

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -45,7 +45,7 @@ struct ReportList;
struct VFont;
/* pack */
struct PackedFile *newPackedFile(struct ReportList *reports, const char *filename);
struct PackedFile *newPackedFile(struct ReportList *reports, const char *filename, const char *relabase);
struct PackedFile *newPackedFileMemory(void *mem, int memlen);
void packAll(struct Main *bmain, struct ReportList *reports);

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,30 +1,31 @@
/*
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Campbell Barton <ideasman42@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Campbell Barton <ideasman42@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef BKE_POINTCACHE_H
#define BKE_POINTCACHE_H

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,5 @@
/* $Id$
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*

View File

@ -1,4 +1,4 @@
/*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,4 +1,5 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -354,12 +354,14 @@ endif()
if(WITH_GAMEENGINE)
list(APPEND INC_SYS
../../../extern/recastnavigation
../../../extern/recastnavigation
)
list(APPEND SRC
intern/navmesh_conversion.c
BKE_navmesh_conversion.h
)
add_definitions(-DWITH_GAMEENGINE)
endif()
## Warnings as errors, this is too strict!

View File

@ -1,7 +1,8 @@
/* $Id$ */
/** \file blender/blenkernel/intern/CCGSubSurf.c
* \ingroup bke
*/
/* $Id$ */
#include <stdlib.h>
#include <string.h>

View File

@ -1,7 +1,8 @@
/* $Id$ */
/** \file blender/blenkernel/intern/CCGSubSurf.h
* \ingroup bke
*/
/* $Id$ */
typedef void* CCGMeshHDL;
typedef void* CCGVertHDL;

View File

@ -62,6 +62,11 @@
#include "BKE_multires.h"
#include "BKE_armature.h"
#ifdef WITH_GAMEENGINE
#include "BKE_navmesh_conversion.h"
static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm);
#endif
#include "BLO_sys_types.h" // for intptr_t support
#include "GL/glew.h"
@ -691,9 +696,11 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
else {
const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
if (shade_type != shade_prev) {
glShadeModel((shade_prev= shade_type));
if(poly_prev != GL_ZERO) glEnd();
glShadeModel((shade_prev= shade_type)); /* same as below but switch shading */
glBegin((poly_prev= poly_type));
}
if(poly_type != poly_prev) {
else if(poly_type != poly_prev) {
if(poly_prev != GL_ZERO) glEnd();
glBegin((poly_prev= poly_type));
}
@ -756,9 +763,11 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
else {
const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
if (shade_type != shade_prev) {
glShadeModel((shade_prev= shade_type));
if(poly_prev != GL_ZERO) glEnd();
glShadeModel((shade_prev= shade_type)); /* same as below but switch shading */
glBegin((poly_prev= poly_type));
}
if(poly_type != poly_prev) {
else if(poly_type != poly_prev) {
if(poly_prev != GL_ZERO) glEnd();
glBegin((poly_prev= poly_type));
}
@ -2110,6 +2119,18 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
add_orco_dm(ob, NULL, *deform_r, NULL, CD_ORCO);
}
#ifdef WITH_GAMEENGINE
/* NavMesh - this is a hack but saves having a NavMesh modifier */
if ((ob->gameflag & OB_NAVMESH) && (finaldm->type == DM_TYPE_CDDM)) {
DerivedMesh *tdm;
tdm= navmesh_dm_createNavMeshForVisualization(finaldm);
if (finaldm != tdm) {
finaldm->release(finaldm);
finaldm= tdm;
}
}
#endif /* WITH_GAMEENGINE */
*final_r = finaldm;
if(orcodm)
@ -2944,3 +2965,170 @@ void DM_set_object_boundbox(Object *ob, DerivedMesh *dm)
boundbox_set_from_min_max(ob->bb, min, max);
}
/* --- NAVMESH (begin) --- */
#ifdef WITH_GAMEENGINE
BM_INLINE int navmesh_bit(int a, int b)
{
return (a & (1 << b)) >> b;
}
BM_INLINE void navmesh_intToCol(int i, float col[3])
{
int r = navmesh_bit(i, 0) + navmesh_bit(i, 3) * 2 + 1;
int g = navmesh_bit(i, 1) + navmesh_bit(i, 4) * 2 + 1;
int b = navmesh_bit(i, 2) + navmesh_bit(i, 5) * 2 + 1;
col[0] = 1 - r*63.0f/255.0f;
col[1] = 1 - g*63.0f/255.0f;
col[2] = 1 - b*63.0f/255.0f;
}
static void navmesh_drawColored(DerivedMesh *dm)
{
int a, glmode;
MVert *mvert = (MVert *)CustomData_get_layer(&dm->vertData, CD_MVERT);
MFace *mface = (MFace *)CustomData_get_layer(&dm->faceData, CD_MFACE);
int *polygonIdx = (int *)CustomData_get_layer(&dm->faceData, CD_RECAST);
float col[3];
if (!polygonIdx)
return;
/*
//UI_ThemeColor(TH_WIRE);
glDisable(GL_LIGHTING);
glLineWidth(2.0);
dm->drawEdges(dm, 0, 1);
glLineWidth(1.0);
glEnable(GL_LIGHTING);*/
glDisable(GL_LIGHTING);
/* if(GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */
DEBUG_VBO( "Using legacy code. drawNavMeshColored\n" );
//glShadeModel(GL_SMOOTH);
glBegin(glmode = GL_QUADS);
for(a = 0; a < dm->numFaceData; a++, mface++) {
int new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
int pi = polygonIdx[a];
if (pi <= 0) {
zero_v3(col);
}
else {
navmesh_intToCol(pi, col);
}
if(new_glmode != glmode) {
glEnd();
glBegin(glmode = new_glmode);
}
glColor3fv(col);
glVertex3fv(mvert[mface->v1].co);
glVertex3fv(mvert[mface->v2].co);
glVertex3fv(mvert[mface->v3].co);
if(mface->v4) {
glVertex3fv(mvert[mface->v4].co);
}
}
glEnd();
}
glEnable(GL_LIGHTING);
}
static void navmesh_DM_drawFacesTex(DerivedMesh *dm, int (*setDrawOptions)(MTFace *tface, int has_mcol, int matnr))
{
(void) setDrawOptions;
navmesh_drawColored(dm);
}
static void navmesh_DM_drawFacesSolid(DerivedMesh *dm,
float (*partial_redraw_planes)[4],
int UNUSED(fast), int (*setMaterial)(int, void *attribs))
{
(void) partial_redraw_planes;
(void) setMaterial;
//drawFacesSolid_original(dm, partial_redraw_planes, fast, setMaterial);
navmesh_drawColored(dm);
}
static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm)
{
DerivedMesh *result;
int maxFaces = dm->getNumFaces(dm);
int *recastData;
int vertsPerPoly=0, nverts=0, ndtris=0, npolys=0;
float* verts=NULL;
unsigned short *dtris=NULL, *dmeshes=NULL, *polys=NULL;
int *dtrisToPolysMap=NULL, *dtrisToTrisMap=NULL, *trisToFacesMap=NULL;
int res;
result = CDDM_copy(dm);
if (!CustomData_has_layer(&result->faceData, CD_RECAST)) {
int *sourceRecastData = (int*)CustomData_get_layer(&dm->faceData, CD_RECAST);
if (sourceRecastData) {
CustomData_add_layer_named(&result->faceData, CD_RECAST, CD_DUPLICATE,
sourceRecastData, maxFaces, "recastData");
}
}
recastData = (int*)CustomData_get_layer(&result->faceData, CD_RECAST);
/* note: This is not good design! - really should not be doing this */
result->drawFacesTex = navmesh_DM_drawFacesTex;
result->drawFacesSolid = navmesh_DM_drawFacesSolid;
/* process mesh */
res = buildNavMeshDataByDerivedMesh(dm, &vertsPerPoly, &nverts, &verts, &ndtris, &dtris,
&npolys, &dmeshes, &polys, &dtrisToPolysMap, &dtrisToTrisMap,
&trisToFacesMap);
if (res) {
size_t polyIdx;
/* invalidate concave polygon */
for (polyIdx=0; polyIdx<(size_t)npolys; polyIdx++) {
unsigned short* poly = &polys[polyIdx*2*vertsPerPoly];
if (!polyIsConvex(poly, vertsPerPoly, verts)) {
/* set negative polygon idx to all faces */
unsigned short *dmesh = &dmeshes[4*polyIdx];
unsigned short tbase = dmesh[2];
unsigned short tnum = dmesh[3];
unsigned short ti;
for (ti=0; ti<tnum; ti++) {
unsigned short triidx = dtrisToTrisMap[tbase+ti];
unsigned short faceidx = trisToFacesMap[triidx];
if (recastData[faceidx] > 0) {
recastData[faceidx] = -recastData[faceidx];
}
}
}
}
}
else {
printf("Error during creation polygon infos\n");
}
/* clean up */
if (verts!=NULL)
MEM_freeN(verts);
if (dtris!=NULL)
MEM_freeN(dtris);
if (dmeshes!=NULL)
MEM_freeN(dmeshes);
if (polys!=NULL)
MEM_freeN(polys);
if (dtrisToPolysMap!=NULL)
MEM_freeN(dtrisToPolysMap);
if (dtrisToTrisMap!=NULL)
MEM_freeN(dtrisToTrisMap);
if (trisToFacesMap!=NULL)
MEM_freeN(trisToFacesMap);
return result;
}
#endif /* WITH_GAMEENGINE */
/* --- NAVMESH (end) --- */

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@ -1514,7 +1516,7 @@ static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, i
/* in par the family name is stored, use this to find the other objects */
chartransdata= BKE_text_to_curve(scene, par, FO_DUPLI);
chartransdata= BKE_text_to_curve(G.main, scene, par, FO_DUPLI);
if(chartransdata==NULL) return;
cu= par->data;

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,7 +1,4 @@
/* blender.c jan 94 MIXED MODEL
*
* common help functions and data
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,8 +1,4 @@
/*
* bmfont.c
*
* 04-10-2000 frank
*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -26,7 +22,7 @@
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
* Contributor(s): 04-10-2000 frank.
*
* ***** END GPL LICENSE BLOCK *****
*

View File

@ -1,6 +1,4 @@
/* boids.c
*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,5 +1,4 @@
/*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,5 +1,4 @@
/*
*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,41 +1,41 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*
* Implementation of CDDerivedMesh.
*
* BKE_cdderivedmesh.h contains the function prototypes for this file.
*
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*
* Implementation of CDDerivedMesh.
*
* BKE_cdderivedmesh.h contains the function prototypes for this file.
*
*/
/** \file blender/blenkernel/intern/cdderivedmesh.c
* \ingroup bke
*/
#include "GL/glew.h"
#include "BLI_blenlib.h"
@ -756,9 +756,10 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
unsigned char *colors = MEM_mallocN(dm->getNumFaces(dm)*4*3*sizeof(unsigned char), "cdDM_drawFacesTex_common");
for( i=0; i < dm->getNumFaces(dm); i++ ) {
for( j=0; j < 4; j++ ) {
colors[i*12+j*3] = col[i*4+j].r;
/* bgr -> rgb is intentional (and stupid), but how its stored internally */
colors[i*12+j*3] = col[i*4+j].b;
colors[i*12+j*3+1] = col[i*4+j].g;
colors[i*12+j*3+2] = col[i*4+j].b;
colors[i*12+j*3+2] = col[i*4+j].r;
}
}
GPU_color3_upload(dm,colors);

View File

@ -1,4 +1,4 @@
/*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -419,12 +419,10 @@ static void calchandle_curvemap(BezTriple *bezt, BezTriple *prev, BezTriple *nex
}
if(bezt->h1==HD_VECT) { /* vector */
mul_v2_fl(dvec_a, 1.0f/3.0f);
sub_v2_v2v2(p2-3, p2, dvec_a);
madd_v2_v2v2fl(p2-3, p2, dvec_a, -1.0f/3.0f);
}
if(bezt->h2==HD_VECT) {
mul_v2_fl(dvec_b, 1.0f/3.0f);
sub_v2_v2v2(p2+3, p2, dvec_b);
madd_v2_v2v2fl(p2+3, p2, dvec_b, 1.0f/3.0f);
}
}

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,7 +1,4 @@
/* curve.c
*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -2595,12 +2592,10 @@ void calchandleNurb(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
}
if(bezt->h1==HD_VECT) { /* vector */
mul_v3_fl(dvec_a, 1.0f/3.0f);
sub_v3_v3v3(p2-3, p2, dvec_a);
madd_v3_v3v3fl(p2-3, p2, dvec_a, -1.0f/3.0f);
}
if(bezt->h2==HD_VECT) {
mul_v3_fl(dvec_b, 1.0f/3.0f);
sub_v3_v3v3(p2+3, p2, dvec_b);
madd_v3_v3v3fl(p2+3, p2, dvec_b, 1.0f/3.0f);
}
len_b= len_v3v3(p2, p2+3);

View File

@ -1,36 +1,36 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*
* Implementation of CustomData.
*
* BKE_customdata.h contains the function prototypes for this file.
*
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Ben Batt <benbatt@gmail.com>
*
* ***** END GPL LICENSE BLOCK *****
*
* Implementation of CustomData.
*
* BKE_customdata.h contains the function prototypes for this file.
*
*/
/** \file blender/blenkernel/intern/customdata.c
* \ingroup bke
@ -2402,10 +2402,8 @@ int CustomData_verify_versions(struct CustomData *data, int index)
static void customdata_external_filename(char filename[FILE_MAX], ID *id, CustomDataExternal *external)
{
char *path = (id->lib)? id->lib->filepath: G.main->name;
BLI_strncpy(filename, external->filename, FILE_MAX);
BLI_path_abs(filename, path);
BLI_path_abs(filename, ID_BLEND_PATH(G.main, id));
}
void CustomData_external_reload(CustomData *data, ID *UNUSED(id), CustomDataMask mask, int totelem)

View File

@ -1,9 +1,4 @@
/* deform.c June 2001
*
* support for deformation groups
*
* Reevan McKay
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -27,7 +22,7 @@
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
* Contributor(s): Reevan McKay
*
* ***** END GPL LICENSE BLOCK *****
*/

View File

@ -1,6 +1,4 @@
/* displist.c
*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -1207,7 +1205,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
if(cu->path) free_path(cu->path);
cu->path= NULL;
if(ob->type==OB_FONT) BKE_text_to_curve(scene, ob, 0);
if(ob->type==OB_FONT) BKE_text_to_curve(G.main, scene, ob, 0);
if(!forOrco) curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);

View File

@ -1,6 +1,4 @@
/* effect.c
*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,6 +1,4 @@
/* font.c
*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -284,7 +282,7 @@ struct TmpFont *vfont_find_tmpfont(VFont *vfont)
return tmpfnt;
}
static VFontData *vfont_get_data(VFont *vfont)
static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
{
struct TmpFont *tmpfnt = NULL;
PackedFile *tpf;
@ -319,11 +317,11 @@ static VFontData *vfont_get_data(VFont *vfont)
BLI_addtail(&ttfdata, tmpfnt);
}
} else {
pf= newPackedFile(NULL, vfont->name);
pf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
if(!tmpfnt)
{
tpf= newPackedFile(NULL, vfont->name);
tpf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
// Add temporary packed file to globals
tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
@ -351,7 +349,7 @@ static VFontData *vfont_get_data(VFont *vfont)
return vfont->data;
}
VFont *load_vfont(const char *name)
VFont *load_vfont(Main *bmain, const char *name)
{
char filename[FILE_MAXFILE];
VFont *vfont= NULL;
@ -371,8 +369,8 @@ VFont *load_vfont(const char *name)
BLI_strncpy(dir, name, sizeof(dir));
BLI_splitdirstring(dir, filename);
pf= newPackedFile(NULL, name);
tpf= newPackedFile(NULL, name);
pf= newPackedFile(NULL, name, bmain->name);
tpf= newPackedFile(NULL, name, bmain->name);
is_builtin= 0;
}
@ -382,7 +380,7 @@ VFont *load_vfont(const char *name)
vfd= BLI_vfontdata_from_freetypefont(pf);
if (vfd) {
vfont = alloc_libblock(&G.main->vfont, ID_VF, filename);
vfont = alloc_libblock(&bmain->vfont, ID_VF, filename);
vfont->data = vfd;
/* if there's a font name, use it for the ID name */
@ -439,7 +437,7 @@ VFont *get_builtin_font(void)
if (strcmp(vf->name, FO_BUILTIN_NAME)==0)
return vf;
return load_vfont(FO_BUILTIN_NAME);
return load_vfont(G.main, FO_BUILTIN_NAME);
}
static VChar *find_vfont_char(VFontData *vfd, intptr_t character)
@ -500,7 +498,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
}
static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float ofsx, float ofsy, float rot, int charidx)
static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo *info, float ofsx, float ofsy, float rot, int charidx)
{
BezTriple *bezt1, *bezt2;
Nurb *nu1 = NULL, *nu2 = NULL;
@ -509,7 +507,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
VChar *che = NULL;
int i;
vfd= vfont_get_data(which_vfont(cu, info));
vfd= vfont_get_data(bmain, which_vfont(cu, info));
if (!vfd) return;
/*
@ -548,7 +546,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
nu2->knotsu = nu2->knotsv = NULL;
nu2->flag= CU_SMOOTH;
nu2->charidx = charidx;
if (info->mat_nr) {
if (info->mat_nr > 0) {
nu2->mat_nr= info->mat_nr-1;
}
else {
@ -662,7 +660,7 @@ static float char_width(Curve *cu, VChar *che, CharInfo *info)
}
}
struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int mode)
{
VFont *vfont, *oldvfont;
VFontData *vfd= NULL;
@ -714,7 +712,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if (cu->tb==NULL)
cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "TextBox compat");
vfd= vfont_get_data(vfont);
vfd= vfont_get_data(bmain, vfont);
/* The VFont Data can not be found */
if(!vfd) {
@ -792,7 +790,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
}
if (vfont != oldvfont) {
vfd= vfont_get_data(vfont);
vfd= vfont_get_data(bmain, vfont);
oldvfont = vfont;
}
@ -1157,7 +1155,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
}
// We do not want to see any character for \n or \r
if(cha != '\n' && cha != '\r')
buildchar(cu, cha, info, ct->xof, ct->yof, ct->rot, i);
buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i);
if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) {
float ulwidth, uloverlap= 0.0f;

View File

@ -1,4 +1,6 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@ -182,8 +184,8 @@ bGPDlayer *gpencil_layer_addnew (bGPdata *gpd)
gpl->thickness = 3;
/* auto-name */
sprintf(gpl->info, "GP_Layer");
BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info[0]), sizeof(gpl->info));
strcpy(gpl->info, "GP_Layer");
BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
/* make this one the active one */
gpencil_layer_setactive(gpd, gpl);

View File

@ -1,32 +1,32 @@
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006-2007 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*
*/
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2006-2007 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*
*/
/** \file blender/blenkernel/intern/icons.c
* \ingroup bke

View File

@ -1,5 +1,4 @@
/* image.c
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@ -1480,7 +1479,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
/* try to repack file */
if(ima->packedfile) {
PackedFile *pf;
pf = newPackedFile(NULL, ima->name);
pf = newPackedFile(NULL, ima->name, ID_BLEND_PATH(G.main, &ima->id));
if (pf) {
freePackedFile(ima->packedfile);
ima->packedfile = pf;
@ -1653,10 +1652,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
BLI_stringdec(name, head, tail, &numlen);
BLI_stringenc(name, head, tail, numlen, frame);
if(ima->id.lib)
BLI_path_abs(name, ima->id.lib->filepath);
else
BLI_path_abs(name, G.main->name);
BLI_path_abs(name, ID_BLEND_PATH(G.main, &ima->id));
flag= IB_rect|IB_multilayer;
if(ima->flag & IMA_DO_PREMUL)
@ -1768,11 +1764,8 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
char str[FILE_MAX];
BLI_strncpy(str, ima->name, FILE_MAX);
if(ima->id.lib)
BLI_path_abs(str, ima->id.lib->filepath);
else
BLI_path_abs(str, G.main->name);
BLI_path_abs(str, ID_BLEND_PATH(G.main, &ima->id));
/* FIXME: make several stream accessible in image editor, too*/
ima->anim = openanim(str, IB_rect, 0);
@ -1834,10 +1827,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* get the right string */
BLI_strncpy(str, ima->name, sizeof(str));
if(ima->id.lib)
BLI_path_abs(str, ima->id.lib->filepath);
else
BLI_path_abs(str, G.main->name);
BLI_path_abs(str, ID_BLEND_PATH(G.main, &ima->id));
/* read ibuf */
ibuf = IMB_loadiffname(str, flag);
@ -1860,7 +1850,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* make packed file for autopack */
if ((ima->packedfile == NULL) && (G.fileflags & G_AUTOPACK))
ima->packedfile = newPackedFile(NULL, str);
ima->packedfile = newPackedFile(NULL, str, ID_BLEND_PATH(G.main, &ima->id));
}
}
else

View File

@ -1,5 +1,4 @@
/* image_gen.c
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

View File

@ -1,4 +1,6 @@
/*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or

View File

@ -1,7 +1,4 @@
/* key.c
*
*
/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****

Some files were not shown because too many files have changed in this diff Show More