svn merge ^/trunk/blender -r42372:42416
This commit is contained in:
commit
22a1ad61f9
|
@ -165,6 +165,11 @@ BF_BOOST_INC = '${BF_BOOST}/include'
|
|||
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_47 libboost_filesystem-vc90-mt-s-1_47 libboost_regex-vc90-mt-s-1_47 libboost_system-vc90-mt-s-1_47 libboost_thread-vc90-mt-s-1_47'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
|
||||
|
|
|
@ -154,6 +154,7 @@ WITH_BF_3DMOUSE = True
|
|||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
|
@ -169,6 +170,11 @@ BF_BOOST_INC = '${BF_BOOST}/include'
|
|||
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_47 libboost_filesystem-vc90-mt-s-1_47 libboost_regex-vc90-mt-s-1_47 libboost_system-vc90-mt-s-1_47 libboost_thread-vc90-mt-s-1_47'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2']
|
||||
|
|
|
@ -87,6 +87,7 @@ else:
|
|||
"gpu",
|
||||
"mathutils",
|
||||
"mathutils.geometry",
|
||||
"mathutils.noise",
|
||||
)
|
||||
|
||||
FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID") # allow
|
||||
|
@ -1190,6 +1191,8 @@ def rna2sphinx(BASEPATH):
|
|||
fw(" mathutils.rst\n\n")
|
||||
if "mathutils.geometry" not in EXCLUDE_MODULES:
|
||||
fw(" mathutils.geometry.rst\n\n")
|
||||
if "mathutils.noise" not in EXCLUDE_MODULES:
|
||||
fw(" mathutils.noise.rst\n\n")
|
||||
if "bgl" not in EXCLUDE_MODULES:
|
||||
fw(" bgl.rst\n\n")
|
||||
if "blf" not in EXCLUDE_MODULES:
|
||||
|
@ -1329,6 +1332,10 @@ def rna2sphinx(BASEPATH):
|
|||
import mathutils.geometry as module
|
||||
pymodule2sphinx(BASEPATH, "mathutils.geometry", module, "Geometry Utilities")
|
||||
|
||||
if "mathutils.noise" not in EXCLUDE_MODULES:
|
||||
import mathutils.noise as module
|
||||
pymodule2sphinx(BASEPATH, "mathutils.noise", module, "Noise Utilities")
|
||||
|
||||
if "blf" not in EXCLUDE_MODULES:
|
||||
import blf as module
|
||||
pymodule2sphinx(BASEPATH, "blf", module, "Font Drawing")
|
||||
|
|
|
@ -53,6 +53,8 @@ set(SRC
|
|||
libmv/image/array_nd.cc
|
||||
libmv/tracking/pyramid_region_tracker.cc
|
||||
libmv/tracking/sad.cc
|
||||
libmv/tracking/brute_region_tracker.cc
|
||||
libmv/tracking/hybrid_region_tracker.cc
|
||||
libmv/tracking/esm_region_tracker.cc
|
||||
libmv/tracking/trklt_region_tracker.cc
|
||||
libmv/tracking/klt_region_tracker.cc
|
||||
|
@ -100,6 +102,8 @@ set(SRC
|
|||
libmv/image/sample.h
|
||||
libmv/image/image.h
|
||||
libmv/tracking/region_tracker.h
|
||||
libmv/tracking/brute_region_tracker.h
|
||||
libmv/tracking/hybrid_region_tracker.h
|
||||
libmv/tracking/retrack_region_tracker.h
|
||||
libmv/tracking/sad.h
|
||||
libmv/tracking/pyramid_region_tracker.h
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#include "Math/v3d_optimization.h"
|
||||
|
||||
#include "libmv/tracking/esm_region_tracker.h"
|
||||
#include "libmv/tracking/brute_region_tracker.h"
|
||||
#include "libmv/tracking/hybrid_region_tracker.h"
|
||||
#include "libmv/tracking/klt_region_tracker.h"
|
||||
#include "libmv/tracking/trklt_region_tracker.h"
|
||||
#include "libmv/tracking/lmicklt_region_tracker.h"
|
||||
|
@ -109,18 +111,33 @@ void libmv_setLoggingVerbosity(int verbosity)
|
|||
|
||||
/* ************ RegionTracker ************ */
|
||||
|
||||
libmv_RegionTracker *libmv_regionTrackerNew(int max_iterations, int pyramid_level, int half_window_size)
|
||||
libmv_RegionTracker *libmv_pyramidRegionTrackerNew(int max_iterations, int pyramid_level, int half_window_size)
|
||||
{
|
||||
libmv::EsmRegionTracker *klt_region_tracker = new libmv::EsmRegionTracker;
|
||||
libmv::EsmRegionTracker *esm_region_tracker = new libmv::EsmRegionTracker;
|
||||
esm_region_tracker->half_window_size = half_window_size;
|
||||
esm_region_tracker->max_iterations = max_iterations;
|
||||
esm_region_tracker->min_determinant = 1e-4;
|
||||
|
||||
klt_region_tracker->half_window_size = half_window_size;
|
||||
klt_region_tracker->max_iterations = max_iterations;
|
||||
klt_region_tracker->min_determinant = 1e-4;
|
||||
libmv::PyramidRegionTracker *pyramid_region_tracker =
|
||||
new libmv::PyramidRegionTracker(esm_region_tracker, pyramid_level);
|
||||
|
||||
libmv::PyramidRegionTracker *region_tracker =
|
||||
new libmv::PyramidRegionTracker(klt_region_tracker, pyramid_level);
|
||||
return (libmv_RegionTracker *)pyramid_region_tracker;
|
||||
}
|
||||
|
||||
return (libmv_RegionTracker *)region_tracker;
|
||||
libmv_RegionTracker *libmv_hybridRegionTrackerNew(int max_iterations, int half_window_size)
|
||||
{
|
||||
libmv::EsmRegionTracker *esm_region_tracker = new libmv::EsmRegionTracker;
|
||||
esm_region_tracker->half_window_size = half_window_size;
|
||||
esm_region_tracker->max_iterations = max_iterations;
|
||||
esm_region_tracker->min_determinant = 1e-4;
|
||||
|
||||
libmv::BruteRegionTracker *brute_region_tracker = new libmv::BruteRegionTracker;
|
||||
brute_region_tracker->half_window_size = half_window_size;
|
||||
|
||||
libmv::HybridRegionTracker *hybrid_region_tracker =
|
||||
new libmv::HybridRegionTracker(brute_region_tracker, esm_region_tracker);
|
||||
|
||||
return (libmv_RegionTracker *)hybrid_region_tracker;
|
||||
}
|
||||
|
||||
static void floatBufToImage(const float *buf, int width, int height, libmv::FloatImage *image)
|
||||
|
|
|
@ -43,7 +43,8 @@ void libmv_startDebugLogging(void);
|
|||
void libmv_setLoggingVerbosity(int verbosity);
|
||||
|
||||
/* RegionTracker */
|
||||
struct libmv_RegionTracker *libmv_regionTrackerNew(int max_iterations, int pyramid_level, int half_window_size);
|
||||
struct libmv_RegionTracker *libmv_pyramidRegionTrackerNew(int max_iterations, int pyramid_level, int half_window_size);
|
||||
struct libmv_RegionTracker *libmv_hybridRegionTrackerNew(int max_iterations, int half_window_size);
|
||||
int libmv_regionTrackerTrack(struct libmv_RegionTracker *libmv_tracker, const float *ima1, const float *ima2,
|
||||
int width, int height, double x1, double y1, double *x2, double *y2);
|
||||
void libmv_regionTrackerDestroy(struct libmv_RegionTracker *libmv_tracker);
|
||||
|
|
|
@ -0,0 +1,331 @@
|
|||
// Copyright (c) 2011 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#include "libmv/tracking/brute_region_tracker.h"
|
||||
|
||||
#ifdef __SSE2__
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
#ifndef __APPLE__
|
||||
// Needed for memalign on Linux and _aligned_alloc on Windows.
|
||||
#ifdef FREE_WINDOWS
|
||||
/* make sure _aligned_malloc is included */
|
||||
#ifdef __MSVCRT_VERSION__
|
||||
#undef __MSVCRT_VERSION__
|
||||
#endif
|
||||
|
||||
#define __MSVCRT_VERSION__ 0x0700
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#else
|
||||
// Apple's malloc is 16-byte aligned, and does not have malloc.h, so include
|
||||
// stdilb instead.
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#include "libmv/image/image.h"
|
||||
#include "libmv/image/convolve.h"
|
||||
#include "libmv/image/sample.h"
|
||||
#include "libmv/logging/logging.h"
|
||||
|
||||
namespace libmv {
|
||||
namespace {
|
||||
|
||||
// TODO(keir): It's stupid that this is needed here. Push this somewhere else.
|
||||
void *aligned_malloc(int size, int alignment) {
|
||||
#ifdef _WIN32
|
||||
return _aligned_malloc(size, alignment);
|
||||
#elif __APPLE__
|
||||
// On Mac OS X, both the heap and the stack are guaranteed 16-byte aligned so
|
||||
// they work natively with SSE types with no further work.
|
||||
CHECK_EQ(alignment, 16);
|
||||
return malloc(size);
|
||||
#else // This is for Linux.
|
||||
return memalign(alignment, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
void aligned_free(void *ptr) {
|
||||
#ifdef _WIN32
|
||||
_aligned_free(ptr);
|
||||
#else
|
||||
free(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool RegionIsInBounds(const FloatImage &image1,
|
||||
double x, double y,
|
||||
int half_window_size) {
|
||||
// Check the minimum coordinates.
|
||||
int min_x = floor(x) - half_window_size - 1;
|
||||
int min_y = floor(y) - half_window_size - 1;
|
||||
if (min_x < 0.0 ||
|
||||
min_y < 0.0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check the maximum coordinates.
|
||||
int max_x = ceil(x) + half_window_size + 1;
|
||||
int max_y = ceil(y) + half_window_size + 1;
|
||||
if (max_x > image1.cols() ||
|
||||
max_y > image1.rows()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ok, we're good.
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
|
||||
// Compute the sub of absolute differences between the arrays "a" and "b".
|
||||
// The array "a" is assumed to be 16-byte aligned, while "b" is not. The
|
||||
// result is returned as the first and third elements of __m128i if
|
||||
// interpreted as a 4-element 32-bit integer array. The SAD is the sum of the
|
||||
// elements.
|
||||
//
|
||||
// The function requires size % 16 valid extra elements at the end of both "a"
|
||||
// and "b", since the SSE load instructionst will pull in memory past the end
|
||||
// of the arrays if their size is not a multiple of 16.
|
||||
inline static __m128i SumOfAbsoluteDifferencesContiguousSSE(
|
||||
const unsigned char *a, // aligned
|
||||
const unsigned char *b, // not aligned
|
||||
unsigned int size,
|
||||
__m128i sad) {
|
||||
// Do the bulk of the work as 16-way integer operations.
|
||||
for(unsigned int j = 0; j < size / 16; j++) {
|
||||
sad = _mm_add_epi32(sad, _mm_sad_epu8( _mm_load_si128 ((__m128i*)(a + 16 * j)),
|
||||
_mm_loadu_si128((__m128i*)(b + 16 * j))));
|
||||
}
|
||||
// Handle the trailing end.
|
||||
// TODO(keir): Benchmark to verify that the below SSE is a win compared to a
|
||||
// hand-rolled loop. It's not clear that the hand rolled loop would be slower
|
||||
// than the potential cache miss when loading the immediate table below.
|
||||
//
|
||||
// An alternative to this version is to take a packet of all 1's then do a
|
||||
// 128-bit shift. The issue is that the shift instruction needs an immediate
|
||||
// amount rather than a variable amount, so the branch instruction here must
|
||||
// remain. See _mm_srli_si128 and _mm_slli_si128.
|
||||
unsigned int remainder = size % 16u;
|
||||
if (remainder) {
|
||||
unsigned int j = size / 16;
|
||||
__m128i a_trail = _mm_load_si128 ((__m128i*)(a + 16 * j));
|
||||
__m128i b_trail = _mm_loadu_si128((__m128i*)(b + 16 * j));
|
||||
__m128i mask;
|
||||
switch (remainder) {
|
||||
#define X 0xff
|
||||
case 1: mask = _mm_setr_epi8(X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 2: mask = _mm_setr_epi8(X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 3: mask = _mm_setr_epi8(X, X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 4: mask = _mm_setr_epi8(X, X, X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 5: mask = _mm_setr_epi8(X, X, X, X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 6: mask = _mm_setr_epi8(X, X, X, X, X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 7: mask = _mm_setr_epi8(X, X, X, X, X, X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 8: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, 0, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 9: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, 0, 0, 0, 0, 0, 0, 0); break;
|
||||
case 10: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, X, 0, 0, 0, 0, 0, 0); break;
|
||||
case 11: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, X, X, 0, 0, 0, 0, 0); break;
|
||||
case 12: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, X, X, X, 0, 0, 0, 0); break;
|
||||
case 13: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, X, X, X, X, 0, 0, 0); break;
|
||||
case 14: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, X, X, X, X, X, 0, 0); break;
|
||||
case 15: mask = _mm_setr_epi8(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, 0); break;
|
||||
#undef X
|
||||
}
|
||||
sad = _mm_add_epi32(sad, _mm_sad_epu8(_mm_and_si128(mask, a_trail),
|
||||
_mm_and_si128(mask, b_trail)));
|
||||
}
|
||||
return sad;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Computes the sum of absolute differences between pattern and image. Pattern
|
||||
// must be 16-byte aligned, and the stride must be a multiple of 16. The image
|
||||
// does pointer does not have to be aligned.
|
||||
int SumOfAbsoluteDifferencesContiguousImage(
|
||||
const unsigned char *pattern,
|
||||
unsigned int pattern_width,
|
||||
unsigned int pattern_height,
|
||||
unsigned int pattern_stride,
|
||||
const unsigned char *image,
|
||||
unsigned int image_stride) {
|
||||
#ifdef __SSE2__
|
||||
// TODO(keir): Add interleaved accumulation, where accumulation is done into
|
||||
// two or more SSE registers that then get combined at the end. This reduces
|
||||
// instruction dependency; in Eigen's squared norm code, splitting the
|
||||
// accumulation produces a ~2x speedup. It's not clear it will help here,
|
||||
// where the number of SSE instructions in the inner loop is smaller.
|
||||
__m128i sad = _mm_setzero_si128();
|
||||
for (int r = 0; r < pattern_height; ++r) {
|
||||
sad = SumOfAbsoluteDifferencesContiguousSSE(&pattern[pattern_stride * r],
|
||||
&image[image_stride * r],
|
||||
pattern_width,
|
||||
sad);
|
||||
}
|
||||
return _mm_cvtsi128_si32(
|
||||
_mm_add_epi32(sad,
|
||||
_mm_shuffle_epi32(sad, _MM_SHUFFLE(3, 0, 1, 2))));
|
||||
#else
|
||||
int sad = 0;
|
||||
for (int r = 0; r < pattern_height; ++r) {
|
||||
for (int c = 0; c < pattern_width; ++c) {
|
||||
sad += abs(pattern[pattern_stride * r + c] - image[image_stride * r + c]);
|
||||
}
|
||||
}
|
||||
return sad;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Sample a region of size width, height centered at x,y in image, converting
|
||||
// from float to byte in the process. Samples from the first channel. Puts
|
||||
// result into *pattern.
|
||||
void SampleRectangularPattern(const FloatImage &image,
|
||||
double x, double y,
|
||||
int width,
|
||||
int height,
|
||||
int pattern_stride,
|
||||
unsigned char *pattern) {
|
||||
// There are two cases for width and height: even or odd. If it's odd, then
|
||||
// the bounds [-width / 2, width / 2] works as expected. However, for even,
|
||||
// this results in one extra access past the end. So use < instead of <= in
|
||||
// the loops below, but increase the end limit by one in the odd case.
|
||||
int end_width = (width / 2) + (width % 2);
|
||||
int end_height = (height / 2) + (height % 2);
|
||||
for (int r = -height / 2; r < end_height; ++r) {
|
||||
for (int c = -width / 2; c < end_width; ++c) {
|
||||
pattern[pattern_stride * (r + height / 2) + c + width / 2] =
|
||||
SampleLinear(image, y + r, x + c, 0) * 255.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns x rounded up to the nearest multiple of alignment.
|
||||
inline int PadToAlignment(int x, int alignment) {
|
||||
if (x % alignment != 0) {
|
||||
x += alignment - (x % alignment);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
// Sample a region centered at x,y in image with size extending by half_width
|
||||
// from x. Samples from the first channel. The resulting array is placed in
|
||||
// *pattern, and the stride, which will be a multiple of 16 if SSE is enabled,
|
||||
// is returned in *pattern_stride.
|
||||
//
|
||||
// NOTE: Caller must free *pattern with aligned_malloc() from above.
|
||||
void SampleSquarePattern(const FloatImage &image,
|
||||
double x, double y,
|
||||
int half_width,
|
||||
unsigned char **pattern,
|
||||
int *pattern_stride) {
|
||||
int width = 2 * half_width + 1;
|
||||
// Allocate an aligned block with padding on the end so each row of the
|
||||
// pattern starts on a 16-byte boundary.
|
||||
*pattern_stride = PadToAlignment(width, 16);
|
||||
int pattern_size_bytes = *pattern_stride * width;
|
||||
*pattern = static_cast<unsigned char *>(
|
||||
aligned_malloc(pattern_size_bytes, 16));
|
||||
SampleRectangularPattern(image, x, y, width, width,
|
||||
*pattern_stride,
|
||||
*pattern);
|
||||
}
|
||||
|
||||
// NOTE: Caller must free *image with aligned_malloc() from above.
|
||||
void FloatArrayToByteArrayWithPadding(const FloatImage &float_image,
|
||||
unsigned char **image,
|
||||
int *image_stride) {
|
||||
// Allocate enough so that accessing 16 elements past the end is fine.
|
||||
*image_stride = float_image.Width() + 16;
|
||||
*image = static_cast<unsigned char *>(
|
||||
aligned_malloc(*image_stride * float_image.Height(), 16));
|
||||
for (int i = 0; i < float_image.Height(); ++i) {
|
||||
for (int j = 0; j < float_image.Width(); ++j) {
|
||||
(*image)[*image_stride * i + j] =
|
||||
static_cast<unsigned char>(255.0 * float_image(i, j, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// TODO(keir): Compare the "sharpness" of the peak around the best pixel. It's
|
||||
// probably worth plotting a few examples to see what the histogram of SAD
|
||||
// values for every hypothesis looks like.
|
||||
//
|
||||
// TODO(keir): Priority queue for multiple hypothesis.
|
||||
bool BruteRegionTracker::Track(const FloatImage &image1,
|
||||
const FloatImage &image2,
|
||||
double x1, double y1,
|
||||
double *x2, double *y2) const {
|
||||
if (!RegionIsInBounds(image1, x1, y1, half_window_size)) {
|
||||
LG << "Fell out of image1's window with x1=" << x1 << ", y1=" << y1
|
||||
<< ", hw=" << half_window_size << ".";
|
||||
return false;
|
||||
}
|
||||
int pattern_width = 2 * half_window_size + 1;
|
||||
|
||||
Array3Df image_and_gradient1;
|
||||
Array3Df image_and_gradient2;
|
||||
BlurredImageAndDerivativesChannels(image1, 0.9, &image_and_gradient1);
|
||||
BlurredImageAndDerivativesChannels(image2, 0.9, &image_and_gradient2);
|
||||
|
||||
// Sample the pattern to get it aligned to an image grid.
|
||||
unsigned char *pattern;
|
||||
int pattern_stride;
|
||||
SampleSquarePattern(image_and_gradient1, x1, y1, half_window_size,
|
||||
&pattern,
|
||||
&pattern_stride);
|
||||
|
||||
// Convert the search area directly to bytes without sampling.
|
||||
unsigned char *search_area;
|
||||
int search_area_stride;
|
||||
FloatArrayToByteArrayWithPadding(image_and_gradient2, &search_area, &search_area_stride);
|
||||
|
||||
// Try all possible locations inside the search area. Yes, everywhere.
|
||||
int best_i, best_j, best_sad = INT_MAX;
|
||||
for (int i = 0; i < image2.Height() - pattern_width; ++i) {
|
||||
for (int j = 0; j < image2.Width() - pattern_width; ++j) {
|
||||
int sad = SumOfAbsoluteDifferencesContiguousImage(pattern,
|
||||
pattern_width,
|
||||
pattern_width,
|
||||
pattern_stride,
|
||||
search_area + search_area_stride * i + j,
|
||||
search_area_stride);
|
||||
if (sad < best_sad) {
|
||||
best_i = i;
|
||||
best_j = j;
|
||||
best_sad = sad;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aligned_free(pattern);
|
||||
aligned_free(search_area);
|
||||
|
||||
if (best_sad != INT_MAX) {
|
||||
*x2 = best_j + half_window_size;
|
||||
*y2 = best_i + half_window_size;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace libmv
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright (c) 2011 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#ifndef LIBMV_REGION_TRACKING_BRUTE_REGION_TRACKER_H_
|
||||
#define LIBMV_REGION_TRACKING_BRUTE_REGION_TRACKER_H_
|
||||
|
||||
#include "libmv/image/image.h"
|
||||
#include "libmv/tracking/region_tracker.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
struct BruteRegionTracker : public RegionTracker {
|
||||
BruteRegionTracker() : half_window_size(4) {}
|
||||
|
||||
virtual ~BruteRegionTracker() {}
|
||||
|
||||
// Tracker interface.
|
||||
virtual bool Track(const FloatImage &image1,
|
||||
const FloatImage &image2,
|
||||
double x1, double y1,
|
||||
double *x2, double *y2) const;
|
||||
|
||||
// No point in creating getters or setters.
|
||||
int half_window_size;
|
||||
};
|
||||
|
||||
} // namespace libmv
|
||||
|
||||
#endif // LIBMV_REGION_TRACKING_BRUTE_REGION_TRACKER_H_
|
|
@ -0,0 +1,67 @@
|
|||
// Copyright (c) 2011 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#include "libmv/tracking/hybrid_region_tracker.h"
|
||||
|
||||
#include "libmv/image/image.h"
|
||||
#include "libmv/image/convolve.h"
|
||||
#include "libmv/image/sample.h"
|
||||
#include "libmv/logging/logging.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
bool HybridRegionTracker::Track(const FloatImage &image1,
|
||||
const FloatImage &image2,
|
||||
double x1, double y1,
|
||||
double *x2, double *y2) const {
|
||||
double x2_coarse = *x2;
|
||||
double y2_coarse = *y2;
|
||||
if (!coarse_tracker_->Track(image1, image2, x1, y1, &x2_coarse, &y2_coarse)) {
|
||||
LG << "Coarse tracker failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
double x2_fine = x2_coarse;
|
||||
double y2_fine = y2_coarse;
|
||||
if (!fine_tracker_->Track(image1, image2, x1, y1, &x2_fine, &y2_fine)) {
|
||||
LG << "Fine tracker failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Calculate the shift done by the fine tracker.
|
||||
double dx2 = x2_coarse - x2_fine;
|
||||
double dy2 = y2_coarse - y2_fine;
|
||||
double fine_shift = sqrt(dx2 * dx2 + dy2 * dy2);
|
||||
|
||||
LG << "Refinement: dx=" << dx2 << " dy=" << dy2 << ", d=" << fine_shift;
|
||||
|
||||
// If the fine tracker shifted the window by more than a pixel, then
|
||||
// something bad probably happened and we should give up tracking.
|
||||
if (fine_shift < 2.0) {
|
||||
LG << "Refinement small enough; success.";
|
||||
*x2 = x2_fine;
|
||||
*y2 = y2_fine;
|
||||
return true;
|
||||
}
|
||||
LG << "Refinement was too big; failing.";
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace libmv
|
|
@ -0,0 +1,52 @@
|
|||
// Copyright (c) 2011 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#ifndef LIBMV_REGION_TRACKING_HYBRID_REGION_TRACKER_H_
|
||||
#define LIBMV_REGION_TRACKING_HYBRID_REGION_TRACKER_H_
|
||||
|
||||
#include "libmv/image/image.h"
|
||||
#include "libmv/base/scoped_ptr.h"
|
||||
#include "libmv/tracking/region_tracker.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
// TODO(keir): Documentation!
|
||||
class HybridRegionTracker : public RegionTracker {
|
||||
public:
|
||||
HybridRegionTracker(RegionTracker *coarse_tracker,
|
||||
RegionTracker *fine_tracker)
|
||||
: coarse_tracker_(coarse_tracker),
|
||||
fine_tracker_(fine_tracker) {}
|
||||
|
||||
virtual ~HybridRegionTracker() {}
|
||||
|
||||
// Tracker interface.
|
||||
virtual bool Track(const FloatImage &image1,
|
||||
const FloatImage &image2,
|
||||
double x1, double y1,
|
||||
double *x2, double *y2) const;
|
||||
|
||||
scoped_ptr<RegionTracker> coarse_tracker_;
|
||||
scoped_ptr<RegionTracker> fine_tracker_;
|
||||
};
|
||||
|
||||
} // namespace libmv
|
||||
|
||||
#endif // LIBMV_REGION_TRACKING_HYBRID_REGION_TRACKER_H_
|
|
@ -435,6 +435,9 @@ static void xml_read_shader_graph(const XMLReadState& state, Shader *shader, pug
|
|||
else if(string_iequals(node.name(), "add_closure")) {
|
||||
snode = new AddClosureNode();
|
||||
}
|
||||
else if(string_iequals(node.name(), "invert")) {
|
||||
snode = new InvertNode();
|
||||
}
|
||||
else if(string_iequals(node.name(), "mix")) {
|
||||
MixNode *mix = new MixNode();
|
||||
xml_read_enum(&mix->type, MixNode::type_enum, node, "type");
|
||||
|
@ -454,7 +457,7 @@ static void xml_read_shader_graph(const XMLReadState& state, Shader *shader, pug
|
|||
xml_read_ustring(&attr->attribute, node, "attribute");
|
||||
snode = attr;
|
||||
}
|
||||
else if(string_ieuals(node.name(), "camera")) {
|
||||
else if(string_iequals(node.name(), "camera")) {
|
||||
snode = new CameraNode();
|
||||
}
|
||||
else if(string_iequals(node.name(), "fresnel")) {
|
||||
|
|
|
@ -130,7 +130,6 @@ static ShaderNode *add_node(BL::BlendData b_data, ShaderGraph *graph, BL::Node *
|
|||
case BL::ShaderNode::type_CURVE_RGB: break;
|
||||
case BL::ShaderNode::type_CURVE_VEC: break;
|
||||
case BL::ShaderNode::type_GEOMETRY: break;
|
||||
case BL::ShaderNode::type_INVERT: break;
|
||||
case BL::ShaderNode::type_MATERIAL: break;
|
||||
case BL::ShaderNode::type_MATERIAL_EXT: break;
|
||||
case BL::ShaderNode::type_NORMAL: break;
|
||||
|
@ -158,6 +157,10 @@ static ShaderNode *add_node(BL::BlendData b_data, ShaderGraph *graph, BL::Node *
|
|||
node = new CameraNode();
|
||||
break;
|
||||
}
|
||||
case BL::ShaderNode::type_INVERT: {
|
||||
node = new InvertNode();
|
||||
break;
|
||||
}
|
||||
case BL::ShaderNode::type_MIX_RGB: {
|
||||
BL::ShaderNodeMixRGB b_mix_node(b_node);
|
||||
MixNode *mix = new MixNode();
|
||||
|
|
|
@ -63,6 +63,7 @@ set(SRC_SVM_HEADERS
|
|||
svm/svm_gradient.h
|
||||
svm/svm_hsv.h
|
||||
svm/svm_image.h
|
||||
svm/svm_invert.h
|
||||
svm/svm_light_path.h
|
||||
svm/svm_magic.h
|
||||
svm/svm_mapping.h
|
||||
|
|
|
@ -24,6 +24,7 @@ set(SRC_OSL
|
|||
node_glossy_bsdf.osl
|
||||
node_hsv.osl
|
||||
node_image_texture.osl
|
||||
node_invert.osl
|
||||
node_light_path.osl
|
||||
node_magic_texture.osl
|
||||
node_mapping.osl
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright 2011, Blender Foundation.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "stdosl.h"
|
||||
|
||||
shader node_invert(
|
||||
float Fac = 1.0,
|
||||
color ColorIn = color(0.8, 0.8, 0.8),
|
||||
output ColorOut = color(0.8, 0.8, 0.8)
|
||||
{
|
||||
color ColorInv = color(1.0) - ColorIn;
|
||||
ColorOut = mix(ColorIn, ColorInv, Fac);
|
||||
}
|
||||
|
|
@ -130,6 +130,7 @@ CCL_NAMESPACE_END
|
|||
#include "svm_geometry.h"
|
||||
#include "svm_hsv.h"
|
||||
#include "svm_image.h"
|
||||
#include "svm_invert.h"
|
||||
#include "svm_light_path.h"
|
||||
#include "svm_magic.h"
|
||||
#include "svm_mapping.h"
|
||||
|
@ -257,6 +258,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
|
|||
case NODE_VALUE_V:
|
||||
svm_node_value_v(kg, sd, stack, node.y, &offset);
|
||||
break;
|
||||
case NODE_INVERT:
|
||||
svm_node_invert(sd, stack, node.y, node.z, node.w);
|
||||
break;
|
||||
case NODE_MIX:
|
||||
svm_node_mix(kg, sd, stack, node.y, node.z, node.w, &offset);
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright 2011, Blender Foundation.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
__device float invert(float color, float factor)
|
||||
{
|
||||
return factor*(1.0f - color) + (1.0f - factor) * color;
|
||||
}
|
||||
|
||||
__device void svm_node_invert(ShaderData *sd, float *stack, uint in_fac, uint in_color, uint out_color)
|
||||
{
|
||||
float factor = stack_load_float(stack, in_fac);
|
||||
float3 color = stack_load_float3(stack, in_color);
|
||||
|
||||
color.x = invert(color.x, factor);
|
||||
color.y = invert(color.y, factor);
|
||||
color.z = invert(color.z, factor);
|
||||
|
||||
if (stack_valid(out_color))
|
||||
stack_store_float3(stack, out_color, color);
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
|
@ -83,7 +83,8 @@ typedef enum NodeType {
|
|||
NODE_SEPARATE_RGB = 5000,
|
||||
NODE_COMBINE_RGB = 5100,
|
||||
NODE_HSV = 5200,
|
||||
NODE_CAMERA = 5300
|
||||
NODE_CAMERA = 5300,
|
||||
NODE_INVERT = 5400
|
||||
} NodeType;
|
||||
|
||||
typedef enum NodeAttributeType {
|
||||
|
|
|
@ -1566,6 +1566,34 @@ void MixClosureNode::compile(OSLCompiler& compiler)
|
|||
compiler.add(this, "node_mix_closure");
|
||||
}
|
||||
|
||||
/* Invert */
|
||||
|
||||
InvertNode::InvertNode()
|
||||
: ShaderNode("invert")
|
||||
{
|
||||
add_input("Fac", SHADER_SOCKET_FLOAT, 1.0f);
|
||||
add_input("Color", SHADER_SOCKET_COLOR);
|
||||
add_output("Color", SHADER_SOCKET_COLOR);
|
||||
}
|
||||
|
||||
void InvertNode::compile(SVMCompiler& compiler)
|
||||
{
|
||||
ShaderInput *fac_in = input("Fac");
|
||||
ShaderInput *color_in = input("Color");
|
||||
ShaderOutput *color_out = output("Color");
|
||||
|
||||
compiler.stack_assign(fac_in);
|
||||
compiler.stack_assign(color_in);
|
||||
compiler.stack_assign(color_out);
|
||||
|
||||
compiler.add_node(NODE_INVERT, fac_in->stack_offset, color_in->stack_offset, color_out->stack_offset);
|
||||
}
|
||||
|
||||
void InvertNode::compile(OSLCompiler& compiler)
|
||||
{
|
||||
compiler.add(this, "node_invert");
|
||||
}
|
||||
|
||||
/* Mix */
|
||||
|
||||
MixNode::MixNode()
|
||||
|
|
|
@ -284,6 +284,11 @@ public:
|
|||
SHADER_NODE_CLASS(MixClosureNode)
|
||||
};
|
||||
|
||||
class InvertNode : public ShaderNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(InvertNode)
|
||||
};
|
||||
|
||||
class MixNode : public ShaderNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(MixNode)
|
||||
|
|
|
@ -19,12 +19,15 @@
|
|||
#ifndef __UTIL_BOUNDBOX_H__
|
||||
#define __UTIL_BOUNDBOX_H__
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "util_math.h"
|
||||
#include "util_transform.h"
|
||||
#include "util_types.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
class BoundBox
|
||||
|
|
|
@ -166,6 +166,10 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
|
|||
layout.template_preview(tex, parent=idblock, slot=slot)
|
||||
else:
|
||||
layout.template_preview(tex, slot=slot)
|
||||
|
||||
#Show Alpha Button for Brush Textures, see #29502
|
||||
if context.space_data.texture_context == 'BRUSH':
|
||||
layout.prop(tex, "use_preview_alpha")
|
||||
|
||||
|
||||
class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
|
||||
|
|
|
@ -129,7 +129,7 @@ class CLIP_PT_tools_marker(Panel):
|
|||
|
||||
if settings.default_tracker == 'KLT':
|
||||
col.prop(settings, "default_pyramid_levels")
|
||||
else:
|
||||
elif settings.default_tracker == 'SAD':
|
||||
col.prop(settings, "default_correlation_min")
|
||||
|
||||
col.separator()
|
||||
|
|
|
@ -38,6 +38,7 @@ set(SRC_DNA_INC
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_controller_types.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_curve_types.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_customdata_types.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_defs.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_documentation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_dynamicpaint_types.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_effect_types.h
|
||||
|
|
|
@ -109,15 +109,10 @@ typedef struct EffectorCache {
|
|||
int flag;
|
||||
} EffectorCache;
|
||||
|
||||
void free_effect(struct Effect *eff);
|
||||
void free_effects(struct ListBase *lb);
|
||||
struct Effect *copy_effect(struct Effect *eff);
|
||||
void copy_effects(struct ListBase *lbn, struct ListBase *lb);
|
||||
void deselectall_eff(struct Object *ob);
|
||||
|
||||
struct PartEff *give_parteff(struct Object *ob);
|
||||
|
||||
|
||||
void free_partdeflect(struct PartDeflect *pd);
|
||||
struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights);
|
||||
void pdEndEffectors(struct ListBase **effectors);
|
||||
|
|
|
@ -52,8 +52,10 @@ int group_is_animated(struct Object *parent, struct Group *group);
|
|||
|
||||
void group_tag_recalc(struct Group *group);
|
||||
void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
|
||||
#if 0 /* UNUSED */
|
||||
struct Object *group_get_member_with_action(struct Group *group, struct bAction *act);
|
||||
void group_relink_nla_objects(struct Object *ob);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ void object_tfm_restore(struct Object *ob, void *obtfm_pt);
|
|||
|
||||
typedef struct ObjectTfmProtectedChannels {
|
||||
float loc[3], dloc[3];
|
||||
float size[3], dsize[3];
|
||||
float size[3], dscale[3];
|
||||
float rot[3], drot[3];
|
||||
float quat[4], dquat[4];
|
||||
float rotAxis[3], drotAxis[3];
|
||||
|
|
|
@ -2120,6 +2120,8 @@ void pchan_calc_mat(bPoseChannel *pchan)
|
|||
pchan_to_mat4(pchan, pchan->chan_mat);
|
||||
}
|
||||
|
||||
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
|
||||
|
||||
/* NLA strip modifiers */
|
||||
static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseChannel *pchan)
|
||||
{
|
||||
|
@ -2242,6 +2244,8 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* calculate tail of posechannel */
|
||||
void where_is_pose_bone_tail(bPoseChannel *pchan)
|
||||
{
|
||||
|
@ -2351,9 +2355,12 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
|
|||
}
|
||||
|
||||
if(do_extra) {
|
||||
|
||||
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
|
||||
/* do NLA strip modifiers - i.e. curve follow */
|
||||
do_strip_modifiers(scene, ob, bone, pchan);
|
||||
|
||||
#endif
|
||||
|
||||
/* Do constraints */
|
||||
if (pchan->constraints.first) {
|
||||
bConstraintOb *cob;
|
||||
|
|
|
@ -154,43 +154,6 @@ typedef struct VeNoCo {
|
|||
|
||||
/* ***************** PARTICLES ***************** */
|
||||
|
||||
/* deprecated, only keep this for readfile.c */
|
||||
PartEff *give_parteff(Object *ob)
|
||||
{
|
||||
PartEff *paf;
|
||||
|
||||
paf= ob->effect.first;
|
||||
while(paf) {
|
||||
if(paf->type==EFF_PARTICLE) return paf;
|
||||
paf= paf->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void free_effect(Effect *eff)
|
||||
{
|
||||
PartEff *paf;
|
||||
|
||||
if(eff->type==EFF_PARTICLE) {
|
||||
paf= (PartEff *)eff;
|
||||
if(paf->keys) MEM_freeN(paf->keys);
|
||||
}
|
||||
MEM_freeN(eff);
|
||||
}
|
||||
|
||||
|
||||
void free_effects(ListBase *lb)
|
||||
{
|
||||
Effect *eff;
|
||||
|
||||
eff= lb->first;
|
||||
while(eff) {
|
||||
BLI_remlink(lb, eff);
|
||||
free_effect(eff);
|
||||
eff= lb->first;
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------- Effectors ------------------ */
|
||||
void free_partdeflect(PartDeflect *pd)
|
||||
{
|
||||
|
|
|
@ -108,23 +108,28 @@ void unlink_group(Group *group)
|
|||
}
|
||||
|
||||
for(ob= bmain->object.first; ob; ob= ob->id.next) {
|
||||
bActionStrip *strip;
|
||||
|
||||
if(ob->dup_group==group) {
|
||||
ob->dup_group= NULL;
|
||||
|
||||
/* duplicator strips use a group object, we remove it */
|
||||
for(strip= ob->nlastrips.first; strip; strip= strip->next) {
|
||||
if(strip->object)
|
||||
strip->object= NULL;
|
||||
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
|
||||
{
|
||||
bActionStrip *strip;
|
||||
/* duplicator strips use a group object, we remove it */
|
||||
for(strip= ob->nlastrips.first; strip; strip= strip->next) {
|
||||
if(strip->object)
|
||||
strip->object= NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
for(psys=ob->particlesystem.first; psys; psys=psys->next){
|
||||
if(psys->part->dup_group==group)
|
||||
psys->part->dup_group= NULL;
|
||||
#if 0 /* not used anymore, only keps for readfile.c, no need to account for this */
|
||||
if(psys->part->eff_group==group)
|
||||
psys->part->eff_group= NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,13 +278,14 @@ void group_tag_recalc(Group *group)
|
|||
}
|
||||
}
|
||||
|
||||
int group_is_animated(Object *parent, Group *group)
|
||||
int group_is_animated(Object *UNUSED(parent), Group *group)
|
||||
{
|
||||
GroupObject *go;
|
||||
|
||||
// XXX: old animsys depreceated...
|
||||
|
||||
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
|
||||
if(parent->nlastrips.first)
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
for(go= group->gobject.first; go; go= go->next)
|
||||
if(go->ob && go->ob->proxy)
|
||||
|
@ -381,6 +387,7 @@ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
Object *group_get_member_with_action(Group *group, bAction *act)
|
||||
{
|
||||
GroupObject *go;
|
||||
|
@ -432,3 +439,4 @@ void group_relink_nla_objects(Object *ob)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
/* since we have versioning code here */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_constraint_types.h"
|
||||
|
@ -73,6 +74,7 @@
|
|||
#include "BKE_nla.h"
|
||||
#include "BKE_sequencer.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
/* *************************************************** */
|
||||
/* Old-Data Freeing Tools */
|
||||
|
|
|
@ -462,7 +462,7 @@ void end_latt_deform(Object *ob)
|
|||
so we store in latmat transform from path coord inside object
|
||||
*/
|
||||
typedef struct {
|
||||
float dmin[3], dmax[3], dsize, dloc[3];
|
||||
float dmin[3], dmax[3], dscale, dloc[3];
|
||||
float curvespace[4][4], objectspace[4][4], objectspace3[3][3];
|
||||
int no_rot_axis;
|
||||
} CurveDeform;
|
||||
|
|
|
@ -1319,19 +1319,23 @@ static void lib_indirect_test_id(ID *id, Library *lib)
|
|||
|
||||
if(GS(id->name)==ID_OB) {
|
||||
Object *ob= (Object *)id;
|
||||
bActionStrip *strip;
|
||||
Mesh *me;
|
||||
|
||||
int a;
|
||||
|
||||
|
||||
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
|
||||
// XXX old animation system! --------------------------------------
|
||||
for (strip=ob->nlastrips.first; strip; strip=strip->next){
|
||||
LIBTAG(strip->object);
|
||||
LIBTAG(strip->act);
|
||||
LIBTAG(strip->ipo);
|
||||
{
|
||||
bActionStrip *strip;
|
||||
for (strip=ob->nlastrips.first; strip; strip=strip->next){
|
||||
LIBTAG(strip->object);
|
||||
LIBTAG(strip->act);
|
||||
LIBTAG(strip->ipo);
|
||||
}
|
||||
}
|
||||
// XXX: new animation system needs something like this?
|
||||
|
||||
#endif
|
||||
|
||||
for(a=0; a<ob->totcol; a++) {
|
||||
LIBTAG(ob->mat[a]);
|
||||
}
|
||||
|
|
|
@ -380,9 +380,7 @@ void unlink_mesh(Mesh *me)
|
|||
}
|
||||
|
||||
if(me->key) {
|
||||
me->key->id.us--;
|
||||
if (me->key->id.us == 0 && me->key->ipo )
|
||||
me->key->ipo->id.us--;
|
||||
me->key->id.us--;
|
||||
}
|
||||
me->key= NULL;
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
/* for reading old multires */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
|
|
@ -121,7 +121,7 @@ void clear_workob(Object *workob)
|
|||
memset(workob, 0, sizeof(Object));
|
||||
|
||||
workob->size[0]= workob->size[1]= workob->size[2]= 1.0f;
|
||||
workob->dsize[0]= workob->dsize[1]= workob->dsize[2]= 1.0f;
|
||||
workob->dscale[0]= workob->dscale[1]= workob->dscale[2]= 1.0f;
|
||||
workob->rotmode= ROT_MODE_EUL;
|
||||
}
|
||||
|
||||
|
@ -776,7 +776,7 @@ Object *add_only_object(int type, const char *name)
|
|||
ob->col[3]= 1.0;
|
||||
|
||||
ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
|
||||
ob->dsize[0]= ob->dsize[1]= ob->dsize[2]= 1.0;
|
||||
ob->dscale[0]= ob->dscale[1]= ob->dscale[2]= 1.0;
|
||||
|
||||
/* objects should default to having Euler XYZ rotations,
|
||||
* but rotations default to quaternions
|
||||
|
@ -1398,7 +1398,6 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
|
|||
ob->matbits= NULL;
|
||||
if ((target->totcol) && (target->mat) && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
|
||||
int i;
|
||||
ob->colbits = target->colbits;
|
||||
|
||||
ob->actcol= target->actcol;
|
||||
ob->totcol= target->totcol;
|
||||
|
@ -1444,7 +1443,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
|
|||
void object_scale_to_mat3(Object *ob, float mat[][3])
|
||||
{
|
||||
float vec[3];
|
||||
mul_v3_v3v3(vec, ob->size, ob->dsize);
|
||||
mul_v3_v3v3(vec, ob->size, ob->dscale);
|
||||
size_to_mat3( mat,vec);
|
||||
}
|
||||
|
||||
|
@ -1530,7 +1529,7 @@ void object_tfm_protected_backup(const Object *ob,
|
|||
TFMCPY3D(loc);
|
||||
TFMCPY3D(dloc);
|
||||
TFMCPY3D(size);
|
||||
TFMCPY3D(dsize);
|
||||
TFMCPY3D(dscale);
|
||||
TFMCPY3D(rot);
|
||||
TFMCPY3D(drot);
|
||||
TFMCPY4D(quat);
|
||||
|
@ -1560,7 +1559,7 @@ void object_tfm_protected_restore(Object *ob,
|
|||
|
||||
if (protectflag & (OB_LOCK_SCALEX<<i)) {
|
||||
ob->size[i]= obtfm->size[i];
|
||||
ob->dsize[i]= obtfm->dsize[i];
|
||||
ob->dscale[i]= obtfm->dscale[i];
|
||||
}
|
||||
|
||||
if (protectflag & (OB_LOCK_ROTX<<i)) {
|
||||
|
@ -1607,9 +1606,9 @@ void object_apply_mat4(Object *ob, float mat[][4], const short use_compat, const
|
|||
|
||||
sub_v3_v3(ob->loc, ob->dloc);
|
||||
|
||||
if (ob->dsize[0] != 0.0f) ob->size[0] /= ob->dsize[0];
|
||||
if (ob->dsize[1] != 0.0f) ob->size[1] /= ob->dsize[1];
|
||||
if (ob->dsize[2] != 0.0f) ob->size[2] /= ob->dsize[2];
|
||||
if (ob->dscale[0] != 0.0f) ob->size[0] /= ob->dscale[0];
|
||||
if (ob->dscale[1] != 0.0f) ob->size[1] /= ob->dscale[1];
|
||||
if (ob->dscale[2] != 0.0f) ob->size[2] /= ob->dscale[2];
|
||||
|
||||
/* object_mat3_to_rot handles delta rotations */
|
||||
}
|
||||
|
@ -2430,7 +2429,7 @@ void BKE_scene_foreach_display_point(
|
|||
/* copied from DNA_object_types.h */
|
||||
typedef struct ObTfmBack {
|
||||
float loc[3], dloc[3], orig[3];
|
||||
float size[3], dsize[3]; /* scale and delta scale */
|
||||
float size[3], dscale[3]; /* scale and delta scale */
|
||||
float rot[3], drot[3]; /* euler rotation */
|
||||
float quat[4], dquat[4]; /* quaternion rotation */
|
||||
float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
|
||||
|
@ -2448,7 +2447,7 @@ void *object_tfm_backup(Object *ob)
|
|||
copy_v3_v3(obtfm->dloc, ob->dloc);
|
||||
copy_v3_v3(obtfm->orig, ob->orig);
|
||||
copy_v3_v3(obtfm->size, ob->size);
|
||||
copy_v3_v3(obtfm->dsize, ob->dsize);
|
||||
copy_v3_v3(obtfm->dscale, ob->dscale);
|
||||
copy_v3_v3(obtfm->rot, ob->rot);
|
||||
copy_v3_v3(obtfm->drot, ob->drot);
|
||||
copy_qt_qt(obtfm->quat, ob->quat);
|
||||
|
@ -2472,7 +2471,7 @@ void object_tfm_restore(Object *ob, void *obtfm_pt)
|
|||
copy_v3_v3(ob->dloc, obtfm->dloc);
|
||||
copy_v3_v3(ob->orig, obtfm->orig);
|
||||
copy_v3_v3(ob->size, obtfm->size);
|
||||
copy_v3_v3(ob->dsize, obtfm->dsize);
|
||||
copy_v3_v3(ob->dscale, obtfm->dscale);
|
||||
copy_v3_v3(ob->rot, obtfm->rot);
|
||||
copy_v3_v3(ob->drot, obtfm->drot);
|
||||
copy_qt_qt(ob->quat, obtfm->quat);
|
||||
|
|
|
@ -394,10 +394,6 @@ Scene *add_scene(const char *name)
|
|||
sce->r.simplify_shadowsamples= 16;
|
||||
sce->r.simplify_aosss= 1.0f;
|
||||
|
||||
sce->r.cineonblack= 95;
|
||||
sce->r.cineonwhite= 685;
|
||||
sce->r.cineongamma= 1.7f;
|
||||
|
||||
sce->r.border.xmin= 0.0f;
|
||||
sce->r.border.ymin= 0.0f;
|
||||
sce->r.border.xmax= 1.0f;
|
||||
|
|
|
@ -479,17 +479,11 @@ void unlink_text(Main *bmain, Text *text)
|
|||
bScreen *scr;
|
||||
ScrArea *area;
|
||||
SpaceLink *sl;
|
||||
Scene *scene;
|
||||
Object *ob;
|
||||
bController *cont;
|
||||
bConstraint *con;
|
||||
short update;
|
||||
|
||||
/* dome */
|
||||
for(scene=bmain->scene.first; scene; scene=scene->id.next)
|
||||
if(scene->r.dometext == text)
|
||||
scene->r.dometext = NULL;
|
||||
|
||||
for(ob=bmain->object.first; ob; ob=ob->id.next) {
|
||||
/* game controllers */
|
||||
for(cont=ob->controllers.first; cont; cont=cont->next) {
|
||||
|
|
|
@ -128,17 +128,17 @@ void BKE_tracking_clamp_track(MovieTrackingTrack *track, int event)
|
|||
}
|
||||
else if(event==CLAMP_PAT_POS) {
|
||||
float dim[2];
|
||||
sub_v2_v2v2(dim, track->pat_max, pat_min);
|
||||
sub_v2_v2v2(dim, track->pat_max, track->pat_min);
|
||||
|
||||
for(a= 0; a<2; a++) {
|
||||
/* pattern shouldn't be moved outside of search */
|
||||
if(pat_min[a] < track->search_min[a]) {
|
||||
track->pat_min[a]= track->search_min[a] - (pat_min[a] - track->pat_min[a]);
|
||||
track->pat_max[a]= (pat_min[a] - track->pat_min[a])+dim[a];
|
||||
track->pat_max[a]= track->pat_min[a] + dim[a];
|
||||
}
|
||||
if(track->pat_max[a] > track->search_max[a]) {
|
||||
track->pat_max[a]= track->search_max[a] - (pat_max[a] - track->pat_max[a]);
|
||||
track->pat_min[a]= track->pat_max[a]-dim[a] - (pat_min[a] - track->pat_min[a]);
|
||||
track->pat_min[a]= track->pat_max[a] - dim[a];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,8 @@ MovieTrackingTrack *BKE_tracking_add_track(MovieTracking *tracking, float x, flo
|
|||
|
||||
BKE_tracking_insert_marker(track, &marker);
|
||||
|
||||
BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
|
||||
if(track->tracker == TRACKER_KLT)
|
||||
BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
|
||||
|
||||
BLI_addtail(&tracking->tracks, track);
|
||||
BKE_track_unique_name(tracking, track);
|
||||
|
@ -790,7 +791,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
|
|||
patx= (int)((track->pat_max[0]-track->pat_min[0])*width);
|
||||
paty= (int)((track->pat_max[1]-track->pat_min[1])*height);
|
||||
|
||||
if(track->tracker==TRACKER_KLT) {
|
||||
if(ELEM(track->tracker, TRACKER_KLT, TRACKER_HYBRID)) {
|
||||
float search_size_x= (track->search_max[0]-track->search_min[0])*width;
|
||||
float search_size_y= (track->search_max[1]-track->search_min[1])*height;
|
||||
float pattern_size_x= (track->pat_max[0]-track->pat_min[0])*width;
|
||||
|
@ -808,7 +809,10 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
|
|||
* than the search size */
|
||||
int level= MIN2(track->pyramid_levels, max_pyramid_levels);
|
||||
|
||||
track_context.region_tracker= libmv_regionTrackerNew(100, level, MAX2(wndx, wndy));
|
||||
if(track->tracker==TRACKER_KLT)
|
||||
track_context.region_tracker= libmv_pyramidRegionTrackerNew(100, level, MAX2(wndx, wndy));
|
||||
else
|
||||
track_context.region_tracker= libmv_hybridRegionTrackerNew(100, MAX2(wndx, wndy));
|
||||
}
|
||||
else if(track->tracker==TRACKER_SAD) {
|
||||
track_context.pattern_size= MAX2(patx, paty);
|
||||
|
@ -1180,7 +1184,7 @@ int BKE_tracking_next(MovieTrackingContext *context)
|
|||
marker->pos[1]<margin[1] || marker->pos[1]>1.0f-margin[1]) {
|
||||
onbound= 1;
|
||||
}
|
||||
else if(track->tracker==TRACKER_KLT) {
|
||||
else if(ELEM(track->tracker, TRACKER_KLT, TRACKER_HYBRID)) {
|
||||
float *patch_new;
|
||||
|
||||
if(need_readjust) {
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "DNA_image_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_movieclip_types.h"
|
||||
#include "DNA_object_fluidsim.h"
|
||||
#include "DNA_object_force.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
@ -542,6 +543,12 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
|
|||
}
|
||||
}
|
||||
break;
|
||||
case ID_MC:
|
||||
{
|
||||
MovieClip *clip= (MovieClip *)id;
|
||||
rewrite_path_fixed(clip->name, visit_cb, absbase, bpath_user_data);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Nothing to do for other IDs that don't contain file paths. */
|
||||
break;
|
||||
|
|
|
@ -1121,18 +1121,18 @@ void blend_m3_m3m3(float out[][3], float dst[][3], float src[][3], const float s
|
|||
{
|
||||
float srot[3][3], drot[3][3];
|
||||
float squat[4], dquat[4], fquat[4];
|
||||
float ssize[3], dsize[3], fsize[3];
|
||||
float sscale[3], dscale[3], fsize[3];
|
||||
float rmat[3][3], smat[3][3];
|
||||
|
||||
mat3_to_rot_size(drot, dsize, dst);
|
||||
mat3_to_rot_size(srot, ssize, src);
|
||||
mat3_to_rot_size(drot, dscale, dst);
|
||||
mat3_to_rot_size(srot, sscale, src);
|
||||
|
||||
mat3_to_quat(dquat, drot);
|
||||
mat3_to_quat(squat, srot);
|
||||
|
||||
/* do blending */
|
||||
interp_qt_qtqt(fquat, dquat, squat, srcweight);
|
||||
interp_v3_v3v3(fsize, dsize, ssize, srcweight);
|
||||
interp_v3_v3v3(fsize, dscale, sscale, srcweight);
|
||||
|
||||
/* compose new matrix */
|
||||
quat_to_mat3(rmat,fquat);
|
||||
|
@ -1145,10 +1145,10 @@ void blend_m4_m4m4(float out[][4], float dst[][4], float src[][4], const float s
|
|||
float sloc[3], dloc[3], floc[3];
|
||||
float srot[3][3], drot[3][3];
|
||||
float squat[4], dquat[4], fquat[4];
|
||||
float ssize[3], dsize[3], fsize[3];
|
||||
float sscale[3], dscale[3], fsize[3];
|
||||
|
||||
mat4_to_loc_rot_size(dloc, drot, dsize, dst);
|
||||
mat4_to_loc_rot_size(sloc, srot, ssize, src);
|
||||
mat4_to_loc_rot_size(dloc, drot, dscale, dst);
|
||||
mat4_to_loc_rot_size(sloc, srot, sscale, src);
|
||||
|
||||
mat3_to_quat(dquat, drot);
|
||||
mat3_to_quat(squat, srot);
|
||||
|
@ -1156,7 +1156,7 @@ void blend_m4_m4m4(float out[][4], float dst[][4], float src[][4], const float s
|
|||
/* do blending */
|
||||
interp_v3_v3v3(floc, dloc, sloc, srcweight);
|
||||
interp_qt_qtqt(fquat, dquat, squat, srcweight);
|
||||
interp_v3_v3v3(fsize, dsize, ssize, srcweight);
|
||||
interp_v3_v3v3(fsize, dscale, sscale, srcweight);
|
||||
|
||||
/* compose new matrix */
|
||||
loc_quat_size_to_mat4(out, floc, fquat, fsize);
|
||||
|
|
|
@ -48,6 +48,9 @@
|
|||
#include "BLI_winstuff.h"
|
||||
#endif
|
||||
|
||||
/* allow readfile to use deprecated functionality */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_actuator_types.h"
|
||||
|
@ -108,7 +111,7 @@
|
|||
#include "BKE_context.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_deform.h"
|
||||
#include "BKE_effect.h" /* give_parteff */
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_fcurve.h"
|
||||
#include "BKE_global.h" // for G
|
||||
#include "BKE_group.h"
|
||||
|
@ -7163,6 +7166,40 @@ static void do_versions_gpencil_2_50(Main *main, bScreen *screen)
|
|||
}
|
||||
}
|
||||
|
||||
/* deprecated, only keep this for readfile.c */
|
||||
static PartEff *do_version_give_parteff_245(Object *ob)
|
||||
{
|
||||
PartEff *paf;
|
||||
|
||||
paf= ob->effect.first;
|
||||
while(paf) {
|
||||
if(paf->type==EFF_PARTICLE) return paf;
|
||||
paf= paf->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
static void do_version_free_effect_245(Effect *eff)
|
||||
{
|
||||
PartEff *paf;
|
||||
|
||||
if(eff->type==EFF_PARTICLE) {
|
||||
paf= (PartEff *)eff;
|
||||
if(paf->keys) MEM_freeN(paf->keys);
|
||||
}
|
||||
MEM_freeN(eff);
|
||||
}
|
||||
static void do_version_free_effects_245(ListBase *lb)
|
||||
{
|
||||
Effect *eff;
|
||||
|
||||
eff= lb->first;
|
||||
while(eff) {
|
||||
BLI_remlink(lb, eff);
|
||||
do_version_free_effect_245(eff);
|
||||
eff= lb->first;
|
||||
}
|
||||
}
|
||||
|
||||
static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
|
||||
{
|
||||
MTex *mtex;
|
||||
|
@ -7738,7 +7775,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
Object *ob = main->object.first;
|
||||
PartEff *paf;
|
||||
while (ob) {
|
||||
paf = give_parteff(ob);
|
||||
paf = do_version_give_parteff_245(ob);
|
||||
if (paf) {
|
||||
if (paf->staticstep == 0) {
|
||||
paf->staticstep= 5;
|
||||
|
@ -8754,11 +8791,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
View3D *v3d= (View3D *)sl;
|
||||
if(v3d->twtype==0) v3d->twtype= V3D_MANIP_TRANSLATE;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_TIME) {
|
||||
SpaceTime *stime= (SpaceTime *)sl;
|
||||
if(stime->redraws==0)
|
||||
stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8947,7 +8979,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
}
|
||||
}
|
||||
|
||||
paf = give_parteff(ob);
|
||||
paf = do_version_give_parteff_245(ob);
|
||||
if (paf) {
|
||||
if(paf->disp == 0)
|
||||
paf->disp = 100;
|
||||
|
@ -9955,7 +9987,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
}
|
||||
|
||||
/* convert old particles to new system */
|
||||
if((paf = give_parteff(ob))) {
|
||||
if((paf = do_version_give_parteff_245(ob))) {
|
||||
ParticleSystem *psys;
|
||||
ModifierData *md;
|
||||
ParticleSystemModifierData *psmd;
|
||||
|
@ -10068,7 +10100,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
part->type = PART_FLUID;
|
||||
}
|
||||
|
||||
free_effects(&ob->effect);
|
||||
do_version_free_effects_245(&ob->effect);
|
||||
|
||||
printf("Old particle system converted to new system.\n");
|
||||
}
|
||||
|
@ -10482,13 +10514,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
wrld->maxphystep = 5;
|
||||
}
|
||||
}
|
||||
|
||||
if (main->versionfile < 249) {
|
||||
Scene *sce;
|
||||
for (sce= main->scene.first; sce; sce= sce->id.next)
|
||||
sce->r.renderer= 0;
|
||||
|
||||
}
|
||||
|
||||
// correct introduce of seed for wind force
|
||||
if (main->versionfile < 249 && main->subversionfile < 1) {
|
||||
|
@ -12699,10 +12724,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
if ( (ob->dsize[i] == 0.0f) || /* simple case, user never touched dsize */
|
||||
(ob->size[i] == 0.0f)) /* cant scale the dsize to give a non zero result, so fallback to 1.0f */
|
||||
{
|
||||
ob->dsize[i]= 1.0f;
|
||||
ob->dscale[i]= 1.0f;
|
||||
}
|
||||
else {
|
||||
ob->size[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
|
||||
ob->dscale[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13530,7 +13555,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
|
|||
expand_doit(fd, mainvar, ob->mat[a]);
|
||||
}
|
||||
|
||||
paf = give_parteff(ob);
|
||||
paf = do_version_give_parteff_245(ob);
|
||||
if (paf && paf->group)
|
||||
expand_doit(fd, mainvar, paf->group);
|
||||
|
||||
|
|
|
@ -703,7 +703,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
|
|||
dflag |= GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_IEDITHACK;
|
||||
}
|
||||
break;
|
||||
|
||||
#if 0 /* removed since 2.5x, needs to be added back */
|
||||
case SPACE_SEQ: /* sequence */
|
||||
{
|
||||
SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first;
|
||||
|
@ -728,7 +728,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
|
|||
dflag |= GP_DRAWDATA_ONLYI2D;
|
||||
}
|
||||
break;
|
||||
|
||||
#endif
|
||||
default: /* for spacetype not yet handled */
|
||||
offsx= 0;
|
||||
offsy= 0;
|
||||
|
|
|
@ -1223,7 +1223,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
|
|||
uiDefButS(block, ROW, B_MATPRV, IFACE_("World"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
|
||||
uiDefButS(block, ROW, B_MATPRV, IFACE_("Both"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
|
||||
|
||||
/* Alpha buton for texture preview */
|
||||
/* Alpha button for texture preview */
|
||||
if(*pr_texture!=TEX_PR_OTHER) {
|
||||
row = uiLayoutRow(layout, 0);
|
||||
uiItemR(row, &texture_ptr, "use_preview_alpha", 0, NULL, ICON_NONE);
|
||||
|
|
|
@ -601,7 +601,7 @@ void MESH_OT_drop_named_image(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name= "Assign Image to UV Map";
|
||||
ot->description= "Assigns Image to active UV Map, or creates a UV Map";
|
||||
ot->description= "Assign Image to active UV Map, or create an UV Map";
|
||||
ot->idname= "MESH_OT_drop_named_image";
|
||||
|
||||
|
||||
|
|
|
@ -548,7 +548,6 @@ int join_mesh_exec(bContext *C, wmOperator *op)
|
|||
MEM_freeN(matar);
|
||||
|
||||
ob->totcol= me->totcol= totcol;
|
||||
ob->colbits= 0;
|
||||
|
||||
if (matmap) MEM_freeN(matmap);
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "BLI_rand.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_meta_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
|
|
@ -1262,9 +1262,7 @@ static int test_bake_internal(bContext *C, ReportList *reports)
|
|||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
|
||||
if(scene->r.renderer!=R_INTERN) {
|
||||
BKE_report(reports, RPT_ERROR, "Bake only supported for Internal Renderer");
|
||||
} else if((scene->r.bake_flag & R_BAKE_TO_ACTIVE) && CTX_data_active_object(C)==NULL) {
|
||||
if((scene->r.bake_flag & R_BAKE_TO_ACTIVE) && CTX_data_active_object(C)==NULL) {
|
||||
BKE_report(reports, RPT_ERROR, "No active object");
|
||||
}
|
||||
else if(scene->r.bake_mode==RE_BAKE_AO && scene->world==NULL) {
|
||||
|
|
|
@ -1143,7 +1143,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
|
|||
}
|
||||
else if(event==3) { /* size */
|
||||
copy_v3_v3(base->object->size, ob->size);
|
||||
copy_v3_v3(base->object->dsize, ob->dsize);
|
||||
copy_v3_v3(base->object->dscale, ob->dscale);
|
||||
}
|
||||
else if(event==4) { /* drawtype */
|
||||
base->object->dt= ob->dt;
|
||||
|
|
|
@ -189,15 +189,15 @@ static void object_clear_scale(Object *ob)
|
|||
{
|
||||
/* clear scale factors which are not locked */
|
||||
if ((ob->protectflag & OB_LOCK_SCALEX)==0) {
|
||||
ob->dsize[0]= 1.0f;
|
||||
ob->dscale[0]= 1.0f;
|
||||
ob->size[0]= 1.0f;
|
||||
}
|
||||
if ((ob->protectflag & OB_LOCK_SCALEY)==0) {
|
||||
ob->dsize[1]= 1.0f;
|
||||
ob->dscale[1]= 1.0f;
|
||||
ob->size[1]= 1.0f;
|
||||
}
|
||||
if ((ob->protectflag & OB_LOCK_SCALEZ)==0) {
|
||||
ob->dsize[2]= 1.0f;
|
||||
ob->dscale[2]= 1.0f;
|
||||
ob->size[2]= 1.0f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -929,7 +929,7 @@ void CLIP_OT_rebuild_proxy(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name= "Rebuild Proxy and Timecode Indices";
|
||||
ot->idname= "CLIP_OT_rebuild_proxy";
|
||||
ot->description= "Rebuild all selected proxies and timecode indeces in the background";
|
||||
ot->description= "Rebuild all selected proxies and timecode indices in the background";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= clip_rebuild_proxy_exec;
|
||||
|
|
|
@ -1209,11 +1209,16 @@ static int track_count_markers(SpaceClip *sc, MovieClip *clip)
|
|||
{
|
||||
int tot= 0;
|
||||
MovieTrackingTrack *track;
|
||||
int framenr= sc->user.framenr;
|
||||
|
||||
track= clip->tracking.tracks.first;
|
||||
while(track) {
|
||||
if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0)
|
||||
tot++;
|
||||
if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
|
||||
MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, framenr);
|
||||
|
||||
if (!marker || (marker->flag&MARKER_DISABLED) == 0)
|
||||
tot++;
|
||||
}
|
||||
|
||||
track= track->next;
|
||||
}
|
||||
|
|
|
@ -237,7 +237,6 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
|
|||
if(set) {
|
||||
ob->actcol= te->index+1;
|
||||
ob->matbits[te->index]= 1; // make ob material active too
|
||||
ob->colbits |= (1<<te->index);
|
||||
}
|
||||
else {
|
||||
if(ob->actcol == te->index+1)
|
||||
|
@ -249,7 +248,6 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
|
|||
if(set) {
|
||||
ob->actcol= te->index+1;
|
||||
ob->matbits[te->index]= 0; // make obdata material active too
|
||||
ob->colbits &= ~(1<<te->index);
|
||||
}
|
||||
else {
|
||||
if(ob->actcol == te->index+1)
|
||||
|
|
|
@ -105,7 +105,6 @@ static SpaceLink *sequencer_new(const bContext *C)
|
|||
|
||||
sseq= MEM_callocN(sizeof(SpaceSeq), "initsequencer");
|
||||
sseq->spacetype= SPACE_SEQ;
|
||||
sseq->zoom= 4;
|
||||
sseq->chanshown = 0;
|
||||
sseq->view = SEQ_VIEW_SEQUENCE;
|
||||
sseq->mainb = SEQ_DRAW_IMG_IMBUF;
|
||||
|
|
|
@ -580,7 +580,6 @@ static SpaceLink *time_new(const bContext *C)
|
|||
stime= MEM_callocN(sizeof(SpaceTime), "inittime");
|
||||
|
||||
stime->spacetype= SPACE_TIME;
|
||||
stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN; // XXX: depreceated
|
||||
stime->flag |= TIME_DRAWFRAMES;
|
||||
|
||||
/* header */
|
||||
|
|
|
@ -133,7 +133,7 @@ typedef struct TransDataExtension {
|
|||
// float drotAngle; /* Initial object drotAngle, TODO: not yet implimented */
|
||||
// float drotAxis[3]; /* Initial object drotAxis, TODO: not yet implimented */
|
||||
float dquat[4]; /* Initial object dquat */
|
||||
float dsize[3]; /* Initial object dsize */
|
||||
float dscale[3]; /* Initial object dscale */
|
||||
float *rot; /* Rotation of the data to transform (Faculative) */
|
||||
float irot[3]; /* Initial rotation */
|
||||
float *quat; /* Rotation quaternion of the data to transform (Faculative) */
|
||||
|
|
|
@ -4443,7 +4443,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
|
|||
|
||||
td->ext->size = ob->size;
|
||||
copy_v3_v3(td->ext->isize, ob->size);
|
||||
copy_v3_v3(td->ext->dsize, ob->dsize);
|
||||
copy_v3_v3(td->ext->dscale, ob->dscale);
|
||||
|
||||
copy_v3_v3(td->center, ob->obmat[3]);
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
/*
|
||||
* allocimbuf.c
|
||||
*
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -47,8 +44,8 @@
|
|||
|
||||
#include "imbuf.h"
|
||||
|
||||
#include "MEM_CacheLimiterC-Api.h"
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "MEM_CacheLimiterC-Api.h"
|
||||
|
||||
void imb_freemipmapImBuf(ImBuf *ibuf)
|
||||
{
|
||||
|
|
|
@ -309,7 +309,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
|
|||
|
||||
if (img != NULL) {
|
||||
stat(path, &info);
|
||||
BLI_snprintf(mtime, sizeof(mtime), "%ld", info.st_mtime);
|
||||
BLI_snprintf(mtime, sizeof(mtime), "%ld", (long int)info.st_mtime);
|
||||
BLI_snprintf(cwidth, sizeof(cwidth), "%d", img->x);
|
||||
BLI_snprintf(cheight, sizeof(cheight), "%d", img->y);
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
|
|||
IMB_free_anim(anim);
|
||||
}
|
||||
stat(path, &info);
|
||||
BLI_snprintf(mtime, sizeof(mtime), "%ld", info.st_mtime);
|
||||
BLI_snprintf(mtime, sizeof(mtime), "%ld", (long int)info.st_mtime);
|
||||
}
|
||||
if (!img) return NULL;
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ typedef struct SpaceAction {
|
|||
|
||||
short blockhandler[8];
|
||||
|
||||
View2D v2d; /* depricated, copied to region */
|
||||
View2D v2d DNA_DEPRECATED; /* copied to region */
|
||||
|
||||
bAction *action; /* the currently active action */
|
||||
bDopeSheet ads; /* the currently active context (when not showing action) */
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -59,7 +61,7 @@ typedef struct Camera {
|
|||
The name was not changed so that no other files need to be modified */
|
||||
float YF_dofdist;
|
||||
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
|
||||
struct Object *dof_ob;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
|
@ -66,7 +67,7 @@ typedef struct bConstraint {
|
|||
float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/
|
||||
int pad;
|
||||
|
||||
struct Ipo *ipo; /* local influence ipo or driver */ // XXX depreceated for 2.5... old animation system hack
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* local influence ipo or driver */ /* old animation system, deprecated for 2.5 */
|
||||
|
||||
/* below are readonly fields that are set at runtime by the solver for use in the GE (only IK atm) */
|
||||
float lin_error; /* residual error on constraint expressed in blender unit*/
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_vec_types.h"
|
||||
#include "DNA_ID.h"
|
||||
|
@ -174,7 +175,7 @@ typedef struct Curve {
|
|||
EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */
|
||||
|
||||
struct Object *bevobj, *taperobj, *textoncurve;
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
Path *path;
|
||||
struct Key *key;
|
||||
struct Material **mat;
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* ***** 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.
|
||||
*
|
||||
* Contributor(s): Campbell Barton
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef DNA_DEFS_H
|
||||
#define DNA_DEFS_H
|
||||
|
||||
/** \file DNA_defs.h
|
||||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
/* makesdna ignores */
|
||||
#ifdef DNA_DEPRECATED_ALLOW
|
||||
/* allow use of deprecated items */
|
||||
# define DNA_DEPRECATED
|
||||
#else
|
||||
# ifndef DNA_DEPRECATED
|
||||
# ifdef __GNUC__
|
||||
# define DNA_DEPRECATED __attribute__ ((deprecated))
|
||||
# else
|
||||
/* TODO, msvc & others */
|
||||
# define DNA_DEPRECATED
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* DNA_DEFS_H */
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_ID.h"
|
||||
|
||||
|
@ -64,10 +65,10 @@ typedef struct Key {
|
|||
KeyBlock *refkey;
|
||||
char elemstr[32];
|
||||
int elemsize;
|
||||
float curval;
|
||||
float curval DNA_DEPRECATED;
|
||||
|
||||
ListBase block;
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
|
||||
ID *from;
|
||||
|
||||
|
@ -98,4 +99,3 @@ typedef struct Key {
|
|||
#define KEYBLOCK_LOCKED (1<<2)
|
||||
#define KEYBLOCK_MISSING (1<<3) /*temporary flag*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#ifndef MAX_MTEX
|
||||
|
@ -97,7 +98,7 @@ typedef struct Lamp {
|
|||
short sky_colorspace;
|
||||
char pad4[6];
|
||||
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct MTex *mtex[18]; /* MAX_MTEX */
|
||||
short pr_texture, use_nodes;
|
||||
char pad6[4];
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
|
||||
struct AnimData;
|
||||
|
@ -60,7 +61,7 @@ typedef struct Lattice {
|
|||
|
||||
struct BPoint *def;
|
||||
|
||||
struct Ipo *ipo; /* XXX: depreceated... old animation system */
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct Key *key;
|
||||
|
||||
struct MDeformVert *dvert;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
|
@ -150,7 +151,7 @@ typedef struct Material {
|
|||
|
||||
struct MTex *mtex[18]; /* MAX_MTEX */
|
||||
struct bNodeTree *nodetree;
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct Group *group; /* light group */
|
||||
struct PreviewImage * preview;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_customdata_types.h"
|
||||
|
@ -62,7 +63,7 @@ typedef struct Mesh {
|
|||
|
||||
struct BoundBox *bb;
|
||||
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct Key *key;
|
||||
struct Material **mat;
|
||||
|
||||
|
@ -109,13 +110,13 @@ typedef struct Mesh {
|
|||
short texflag, drawflag;
|
||||
short smoothresh, flag;
|
||||
|
||||
short subdiv, subdivr;
|
||||
char subsurftype; /* only kept for backwards compat, not used anymore */
|
||||
short subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED;
|
||||
char subsurftype DNA_DEPRECATED; /* only kept for backwards compat, not used anymore */
|
||||
char editflag;
|
||||
|
||||
short totcol;
|
||||
|
||||
struct Multires *mr; /* deprecated multiresolution modeling data, only keep for loading old files */
|
||||
struct Multires *mr DNA_DEPRECATED; /* deprecated multiresolution modeling data, only keep for loading old files */
|
||||
struct PartialVisibility *pv;
|
||||
} Mesh;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ typedef struct MetaBall {
|
|||
ListBase elems;
|
||||
ListBase disp;
|
||||
ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
|
||||
struct Ipo *ipo; // XXX... depreceated (old animation system)
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
|
||||
/* material of the mother ball will define the material used of all others */
|
||||
struct Material **mat;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
|
||||
|
@ -241,7 +242,7 @@ typedef struct ArrayModifierData {
|
|||
typedef struct MirrorModifierData {
|
||||
ModifierData modifier;
|
||||
|
||||
short axis; /* deprecated, use flag instead */
|
||||
short axis DNA_DEPRECATED; /* deprecated, use flag instead */
|
||||
short flag;
|
||||
float tolerance;
|
||||
struct Object *mirror_ob;
|
||||
|
|
|
@ -91,7 +91,7 @@ typedef struct bNodeSocket {
|
|||
|
||||
/* internal data to retrieve relations and groups */
|
||||
int own_index; /* group socket identifiers, to find matching pairs after reading files */
|
||||
int to_index; /* XXX deprecated, only used for restoring old group node links */
|
||||
int to_index DNA_DEPRECATED; /* XXX deprecated, only used for restoring old group node links */
|
||||
struct bNodeSocket *groupsock;
|
||||
|
||||
struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
* \brief Object is a sort of wrapper for general info.
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_action_types.h" /* bAnimVizSettings */
|
||||
|
@ -110,10 +111,10 @@ typedef struct Object {
|
|||
/* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
|
||||
/* proxy_from is set in target back to the proxy. */
|
||||
struct Object *proxy, *proxy_group, *proxy_from;
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
/* struct Path *path; */
|
||||
struct BoundBox *bb;
|
||||
struct bAction *action; // XXX depreceated... old animation system
|
||||
struct bAction *action DNA_DEPRECATED; // XXX depreceated... old animation system
|
||||
struct bAction *poselib;
|
||||
struct bPose *pose; /* pose data, armature objects only */
|
||||
void *data; /* pointer to objects data - an 'ID' or NULL */
|
||||
|
@ -123,8 +124,8 @@ typedef struct Object {
|
|||
bAnimVizSettings avs; /* settings for visualisation of object-transform animation */
|
||||
bMotionPath *mpath; /* motion path cache for this object */
|
||||
|
||||
ListBase constraintChannels; // XXX depreceated... old animation system
|
||||
ListBase effect; // XXX depreceated... keep for readfile
|
||||
ListBase constraintChannels DNA_DEPRECATED; // XXX depreceated... old animation system
|
||||
ListBase effect DNA_DEPRECATED; // XXX depreceated... keep for readfile
|
||||
ListBase disp; /* list of DispList, used by lattice, metaballs curve & surfaces */
|
||||
ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */
|
||||
ListBase modifiers; /* list of ModifierData structures */
|
||||
|
@ -140,7 +141,9 @@ typedef struct Object {
|
|||
|
||||
/* rot en drot have to be together! (transform('r' en 's')) */
|
||||
float loc[3], dloc[3], orig[3];
|
||||
float size[3], dsize[3]; /* scale and delta scale */
|
||||
float size[3]; /* scale infact */
|
||||
float dsize[3] DNA_DEPRECATED ; /* DEPRECATED, 2.60 and older only */
|
||||
float dscale[3]; /* ack!, changing */
|
||||
float rot[3], drot[3]; /* euler rotation */
|
||||
float quat[4], dquat[4]; /* quaternion rotation */
|
||||
float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
|
||||
|
@ -158,8 +161,10 @@ typedef struct Object {
|
|||
|
||||
unsigned int lay; /* copy of Base's layer in the scene */
|
||||
|
||||
int pad6;
|
||||
|
||||
short flag; /* copy of Base */
|
||||
short colbits; /* deprecated */
|
||||
short colbits DNA_DEPRECATED; /* deprecated */
|
||||
|
||||
short transflag, protectflag; /* transformation settings and transform locks */
|
||||
short trackflag, upflag;
|
||||
|
@ -229,8 +234,8 @@ typedef struct Object {
|
|||
float anisotropicFriction[3];
|
||||
|
||||
ListBase constraints; /* object constraints */
|
||||
ListBase nlastrips; // XXX depreceated... old animation system
|
||||
ListBase hooks; // XXX depreceated... old animation system
|
||||
ListBase nlastrips DNA_DEPRECATED; // XXX depreceated... old animation system
|
||||
ListBase hooks DNA_DEPRECATED; // XXX depreceated... old animation system
|
||||
ListBase particlesystem; /* particle systems */
|
||||
|
||||
struct PartDeflect *pd; /* particle deflector/attractor/collision data */
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_boid_types.h"
|
||||
|
||||
|
@ -225,10 +226,10 @@ typedef struct ParticleSettings {
|
|||
|
||||
struct Group *dup_group;
|
||||
struct ListBase dupliweights;
|
||||
struct Group *eff_group; // deprecated
|
||||
struct Group *eff_group DNA_DEPRECATED; // deprecated
|
||||
struct Object *dup_ob;
|
||||
struct Object *bb_ob;
|
||||
struct Ipo *ipo; // xxx depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct PartDeflect *pd;
|
||||
struct PartDeflect *pd2;
|
||||
} ParticleSettings;
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
|
||||
// XXX, temp feature - campbell
|
||||
#define DURIAN_CAMERA_SWITCH
|
||||
|
||||
|
@ -331,11 +333,11 @@ typedef struct RenderData {
|
|||
/** For UR edge rendering: give the edges this color */
|
||||
float edgeR, edgeG, edgeB;
|
||||
|
||||
short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
|
||||
short depth, attrib; /* standalone player */ // XXX deprecated since 2.5
|
||||
short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED, freqplay DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5
|
||||
short depth DNA_DEPRECATED, attrib DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5
|
||||
int frame_step; /* frames to jump during render/playback */
|
||||
|
||||
short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
|
||||
short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5
|
||||
|
||||
short dimensionspreset; /* for the dimensions presets menu */
|
||||
|
||||
|
@ -360,7 +362,7 @@ typedef struct RenderData {
|
|||
*/
|
||||
short yparts;
|
||||
|
||||
short planes, imtype, subimtype, quality; /*deprecated!*/
|
||||
short planes DNA_DEPRECATED, imtype DNA_DEPRECATED, subimtype DNA_DEPRECATED, quality DNA_DEPRECATED; /*deprecated!*/
|
||||
|
||||
/**
|
||||
* Render to image editor, fullscreen or to new window.
|
||||
|
@ -387,8 +389,7 @@ typedef struct RenderData {
|
|||
*/
|
||||
short raytrace_structure;
|
||||
|
||||
/* renderer (deprecated) */
|
||||
short renderer;
|
||||
short pad1;
|
||||
|
||||
/* octree resolution */
|
||||
short ocres;
|
||||
|
@ -434,7 +435,7 @@ typedef struct RenderData {
|
|||
/* color management settings - color profiles, gamma correction, etc */
|
||||
int color_mgt_flag;
|
||||
|
||||
/** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
|
||||
/** post-production settings. deprecated, but here for upwards compat (initialized to 1) */
|
||||
float postgamma, posthue, postsat;
|
||||
|
||||
/* Dither noise intensity */
|
||||
|
@ -473,19 +474,19 @@ typedef struct RenderData {
|
|||
float simplify_aosss;
|
||||
|
||||
/* cineon */
|
||||
short cineonwhite, cineonblack; /*deprecated*/
|
||||
float cineongamma; /*deprecated*/
|
||||
short cineonwhite DNA_DEPRECATED, cineonblack DNA_DEPRECATED; /*deprecated*/
|
||||
float cineongamma DNA_DEPRECATED; /*deprecated*/
|
||||
|
||||
/* jpeg2000 */
|
||||
short jp2_preset, jp2_depth; /*deprecated*/
|
||||
short jp2_preset DNA_DEPRECATED, jp2_depth DNA_DEPRECATED; /*deprecated*/
|
||||
int rpad3;
|
||||
|
||||
/* Dome variables */ // XXX deprecated since 2.5
|
||||
short domeres, domemode; // XXX deprecated since 2.5
|
||||
short domeangle, dometilt; // XXX deprecated since 2.5
|
||||
float domeresbuf; // XXX deprecated since 2.5
|
||||
float pad2; // XXX deprecated since 2.5
|
||||
struct Text *dometext; // XXX deprecated since 2.5
|
||||
short domeres DNA_DEPRECATED, domemode DNA_DEPRECATED; // XXX deprecated since 2.5
|
||||
short domeangle DNA_DEPRECATED, dometilt DNA_DEPRECATED; // XXX deprecated since 2.5
|
||||
float domeresbuf DNA_DEPRECATED; // XXX deprecated since 2.5
|
||||
float pad2;
|
||||
struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5
|
||||
|
||||
/* render engine */
|
||||
char engine[32];
|
||||
|
@ -744,7 +745,7 @@ typedef struct VPaint {
|
|||
|
||||
#define VP_NORMALS 8
|
||||
#define VP_SPRAY 16
|
||||
// #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
|
||||
// #define VP_MIRROR_X 32 // deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
|
||||
#define VP_ONLYVGROUP 128
|
||||
|
||||
|
||||
|
@ -956,7 +957,7 @@ typedef struct Scene {
|
|||
ListBase keyingsets; /* KeyingSets for the given frame */
|
||||
|
||||
/* Game Settings */
|
||||
struct GameFraming framing; // XXX deprecated since 2.5
|
||||
struct GameFraming framing DNA_DEPRECATED; // XXX deprecated since 2.5
|
||||
struct GameData gm;
|
||||
|
||||
/* Units */
|
||||
|
@ -1034,10 +1035,6 @@ typedef struct Scene {
|
|||
#define R_FILTER_MITCH 6
|
||||
#define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
|
||||
|
||||
/* yafray: renderer flag (not only exclusive to yafray) */
|
||||
#define R_INTERN 0
|
||||
#define R_YAFRAY 1
|
||||
|
||||
/* raytrace structure */
|
||||
#define R_RAYSTRUCTURE_AUTO 0
|
||||
#define R_RAYSTRUCTURE_OCTREE 1
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
* \author nzc
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_vec_types.h"
|
||||
|
||||
|
@ -142,7 +143,7 @@ typedef struct Sequence {
|
|||
|
||||
Strip *strip;
|
||||
|
||||
struct Ipo *ipo; // xxx depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct Scene *scene;
|
||||
struct Object *scene_camera; /* override scene camera */
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
* \author nzc
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_color_types.h" /* for Histogram */
|
||||
#include "DNA_vec_types.h"
|
||||
|
@ -76,17 +77,17 @@ typedef struct SpaceLink {
|
|||
struct SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale; /* XXX depricate this */
|
||||
short blockhandler[8]; /* XXX depricate this */
|
||||
float blockscale DNA_DEPRECATED; /* XXX make deprecated */
|
||||
short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
|
||||
} SpaceLink;
|
||||
|
||||
typedef struct SpaceInfo {
|
||||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8]; /* XXX depricate this */
|
||||
short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
|
||||
|
||||
char rpt_mask;
|
||||
char pad[7];
|
||||
|
@ -107,10 +108,10 @@ typedef struct SpaceIpo {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
|
||||
struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
|
||||
|
||||
|
@ -128,13 +129,13 @@ typedef struct SpaceButs {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
struct RenderInfo *ri;
|
||||
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
|
||||
short mainb, mainbo, mainbuser; /* context tabs */
|
||||
short re_align, align; /* align for panels */
|
||||
|
@ -153,19 +154,19 @@ typedef struct SpaceSeq {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
|
||||
float xof, yof; /* deprecated: offset for drawing the image preview */
|
||||
float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
|
||||
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
|
||||
short render_size;
|
||||
short chanshown;
|
||||
short zebra;
|
||||
int flag;
|
||||
float zoom; /* deprecated, handled by View2D now */
|
||||
float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
|
||||
int view; /* see SEQ_VIEW_* below */
|
||||
int pad;
|
||||
|
||||
|
@ -232,11 +233,11 @@ typedef struct SpaceOops {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
|
||||
ListBase tree;
|
||||
struct TreeStore *treestore;
|
||||
|
@ -283,25 +284,25 @@ typedef struct SpaceNla {
|
|||
struct SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
short autosnap; /* this uses the same settings as autosnap for Action Editor */
|
||||
short flag;
|
||||
int pad;
|
||||
|
||||
struct bDopeSheet *ads;
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
} SpaceNla;
|
||||
|
||||
typedef struct SpaceText {
|
||||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
struct Text *text;
|
||||
|
||||
|
@ -352,7 +353,7 @@ typedef struct SpaceScript {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
struct Script *script;
|
||||
|
||||
short flags, menunr;
|
||||
|
@ -372,31 +373,29 @@ typedef struct SpaceTime {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
|
||||
ListBase caches;
|
||||
int cache_display, pad;
|
||||
|
||||
int flag, redraws; /* redraws is deprecated... moved to screen */
|
||||
|
||||
|
||||
int cache_display;
|
||||
int flag;
|
||||
} SpaceTime;
|
||||
|
||||
typedef struct SpaceNode {
|
||||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
View2D v2d; /* deprecated, copied to region */
|
||||
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
|
||||
|
||||
struct ID *id, *from; /* context, no need to save in file? well... pinning... */
|
||||
short flag, menunr; /* menunr: browse id block in header */
|
||||
short flag, pad1; /* menunr: browse id block in header */
|
||||
float aspect;
|
||||
void *curfont;
|
||||
|
||||
float xof, yof; /* offset for drawing the backdrop */
|
||||
float zoom, padf; /* zoom for backdrop */
|
||||
|
@ -433,9 +432,9 @@ typedef struct SpaceLogic {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale;
|
||||
float blockscale DNA_DEPRECATED;
|
||||
|
||||
short blockhandler[8];
|
||||
short blockhandler[8] DNA_DEPRECATED;
|
||||
|
||||
short flag, scaflag;
|
||||
int pad;
|
||||
|
@ -467,9 +466,9 @@ typedef struct SpaceConsole {
|
|||
SpaceLink *next, *prev;
|
||||
ListBase regionbase; /* storage of regions for inactive spaces */
|
||||
int spacetype;
|
||||
float blockscale; // XXX are these needed?
|
||||
float blockscale DNA_DEPRECATED; // XXX are these needed?
|
||||
|
||||
short blockhandler[8]; // XXX are these needed?
|
||||
short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
|
||||
|
||||
/* space vars */
|
||||
int lheight, pad;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
* \author nzc
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_image_types.h" /* ImageUser */
|
||||
|
||||
|
@ -263,7 +264,7 @@ typedef struct Tex {
|
|||
struct ImageUser iuser;
|
||||
|
||||
struct bNodeTree *nodetree;
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct Image *ima;
|
||||
struct PluginTex *plugin;
|
||||
struct ColorBand *coba;
|
||||
|
|
|
@ -211,6 +211,7 @@ enum {
|
|||
/* MovieTrackingTrack->tracker */
|
||||
#define TRACKER_KLT 0
|
||||
#define TRACKER_SAD 1
|
||||
#define TRACKER_HYBRID 2
|
||||
|
||||
/* MovieTrackingTrack->adjframes */
|
||||
#define TRACK_MATCH_KEYFRAME 0
|
||||
|
|
|
@ -356,7 +356,7 @@ typedef struct UserDef {
|
|||
struct ListBase themes;
|
||||
struct ListBase uifonts;
|
||||
struct ListBase uistyles;
|
||||
struct ListBase keymaps; /* deprecated in favor of user_keymaps */
|
||||
struct ListBase keymaps DNA_DEPRECATED; /* deprecated in favor of user_keymaps */
|
||||
struct ListBase user_keymaps;
|
||||
struct ListBase addons;
|
||||
char keyconfigstr[64];
|
||||
|
|
|
@ -55,6 +55,7 @@ struct wmTimer;
|
|||
#define far clipend
|
||||
#endif
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_image_types.h"
|
||||
#include "DNA_movieclip_types.h"
|
||||
|
@ -150,8 +151,9 @@ typedef struct View3D {
|
|||
int spacetype;
|
||||
float blockscale;
|
||||
short blockhandler[8];
|
||||
|
||||
float viewquat[4], dist; /* XXX depricated */
|
||||
|
||||
float viewquat[4] DNA_DEPRECATED;
|
||||
float dist DNA_DEPRECATED;
|
||||
|
||||
float bundle_size; /* size of bundles in reconstructed data */
|
||||
short bundle_drawtype; /* display style for bundle */
|
||||
|
@ -160,13 +162,13 @@ typedef struct View3D {
|
|||
|
||||
unsigned int lay_used; /* used while drawing */
|
||||
|
||||
short persp; /* XXX depricated */
|
||||
short view; /* XXX depricated */
|
||||
short persp DNA_DEPRECATED;
|
||||
short view DNA_DEPRECATED;
|
||||
|
||||
struct Object *camera, *ob_centre;
|
||||
|
||||
struct ListBase bgpicbase;
|
||||
struct BGpic *bgpic; /* deprecated, use bgpicbase, only kept for do_versions(...) */
|
||||
struct BGpic *bgpic DNA_DEPRECATED; /* deprecated, use bgpicbase, only kept for do_versions(...) */
|
||||
|
||||
struct View3D *localvd; /* allocated backup of its self while in localview */
|
||||
|
||||
|
@ -185,7 +187,7 @@ typedef struct View3D {
|
|||
|
||||
float lens, grid;
|
||||
float near, far;
|
||||
float ofs[3]; /* XXX deprecated */
|
||||
float ofs[3] DNA_DEPRECATED; /* XXX deprecated */
|
||||
float cursor[3];
|
||||
|
||||
short modeselect;
|
||||
|
@ -208,8 +210,8 @@ typedef struct View3D {
|
|||
|
||||
void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */
|
||||
|
||||
/* XXX depricated? */
|
||||
struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */
|
||||
/* XXX deprecated? */
|
||||
struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */
|
||||
|
||||
} View3D;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#include "DNA_defs.h"
|
||||
#include "DNA_ID.h"
|
||||
|
||||
struct AnimData;
|
||||
|
@ -96,7 +97,7 @@ typedef struct World {
|
|||
|
||||
float misi, miststa, mistdist, misthi;
|
||||
|
||||
float starr, starg, starb, stark; /* Deprecated */
|
||||
float starr DNA_DEPRECATED, starg DNA_DEPRECATED, starb DNA_DEPRECATED, stark DNA_DEPRECATED; /* Deprecated */
|
||||
float starsize, starmindist;
|
||||
float stardist, starcolnoise;
|
||||
|
||||
|
@ -119,7 +120,7 @@ typedef struct World {
|
|||
float *aosphere, *aotables;
|
||||
|
||||
|
||||
struct Ipo *ipo; // XXX depreceated... old animation system
|
||||
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
|
||||
struct MTex *mtex[18]; /* MAX_MTEX */
|
||||
short pr_texture, use_nodes, pad[2];
|
||||
|
||||
|
|
|
@ -475,6 +475,13 @@ static int preprocess_include(char *maindata, int len)
|
|||
if(comment);
|
||||
else if( cp[0]==' ' && cp[1]==' ' );
|
||||
else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers with a space */
|
||||
|
||||
/* skip special keywords */
|
||||
else if (strncmp("DNA_DEPRECATED", cp, 14)==0) {
|
||||
/* single values are skipped already, so decrement 1 less */
|
||||
a -= 13;
|
||||
cp += 13;
|
||||
}
|
||||
else {
|
||||
md[0]= cp[0];
|
||||
md++;
|
||||
|
|
|
@ -336,7 +336,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
|
|||
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "rot");
|
||||
RNA_def_property_range(prop, 0, M_PI*2);
|
||||
RNA_def_property_ui_text(prop, "Angle", "Defines brush texture rotation");
|
||||
RNA_def_property_ui_text(prop, "Angle", "Brush texture rotation");
|
||||
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
||||
|
||||
prop= RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE);
|
||||
|
|
|
@ -172,9 +172,9 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
|
|||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem prop_texture_coordinates_items[] = {
|
||||
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates"},
|
||||
{TEXCO_VIEW, "VIEW", 0, "View", "Uses view coordinates for the texture coordinates"},
|
||||
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"},
|
||||
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
|
||||
{TEXCO_VIEW, "VIEW", 0, "View", "Use view coordinates for the texture coordinates"},
|
||||
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
srna= RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
|
||||
|
|
|
@ -480,12 +480,12 @@ static void rna_def_material_mtex(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "use_map_diffuse", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REF);
|
||||
RNA_def_property_ui_text(prop, "Diffuse", "The texture to affects the value of the materials diffuse reflectivity");
|
||||
RNA_def_property_ui_text(prop, "Diffuse", "The texture affects the value of diffuse reflectivity");
|
||||
RNA_def_property_update(prop, 0, "rna_Material_update");
|
||||
|
||||
prop= RNA_def_property(srna, "use_map_specular", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SPEC);
|
||||
RNA_def_property_ui_text(prop, "Specular", "The texture to affects the value of specular reflectivity");
|
||||
RNA_def_property_ui_text(prop, "Specular", "The texture affects the value of specular reflectivity");
|
||||
RNA_def_property_update(prop, 0, "rna_Material_update");
|
||||
|
||||
prop= RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE);
|
||||
|
|
|
@ -2072,7 +2072,7 @@ static void rna_def_object(BlenderRNA *brna)
|
|||
#endif
|
||||
|
||||
prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
|
||||
RNA_def_property_float_sdna(prop, NULL, "dsize");
|
||||
RNA_def_property_float_sdna(prop, NULL, "dscale");
|
||||
RNA_def_property_ui_text(prop, "Delta Scale", "Extra scaling added to the scale of the object");
|
||||
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
|
||||
|
||||
|
|
|
@ -1233,18 +1233,18 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
|
|||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem texco_items[] = {
|
||||
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates"},
|
||||
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"},
|
||||
{TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates"},
|
||||
{TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object"},
|
||||
{TEXCO_STRAND, "STRAND", 0, "Strand / Particle", "Uses normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
|
||||
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
|
||||
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
|
||||
{TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"},
|
||||
{TEXCO_ORCO, "ORCO", 0, "Generated", "Use the original undeformed coordinates of the object"},
|
||||
{TEXCO_STRAND, "STRAND", 0, "Strand / Particle", "Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem prop_mapping_items[] = {
|
||||
{MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly"},
|
||||
{MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector"},
|
||||
{MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis"},
|
||||
{MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis"},
|
||||
{MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
|
||||
{MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
|
||||
{MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
|
||||
{MTEX_SPHERE, "SPHERE", 0, "Sphere", "Map with Z as central axis"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem prop_x_mapping_items[] = {
|
||||
|
|
|
@ -304,7 +304,7 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS);
|
||||
RNA_def_property_ui_text(prop, "Normals", "Applies the vertex normal before painting");
|
||||
RNA_def_property_ui_text(prop, "Normals", "Apply the vertex normal before painting");
|
||||
|
||||
prop= RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY);
|
||||
|
@ -348,7 +348,7 @@ static void rna_def_image_paint(BlenderRNA *brna)
|
|||
prop= RNA_def_property(srna, "use_clone_layer", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_CLONE);
|
||||
RNA_def_property_ui_text(prop, "Clone Map",
|
||||
"Use another UV map as clone source, otherwise use 3D the cursor as the source");
|
||||
"Use another UV map as clone source, otherwise use the 3D cursor as the source");
|
||||
|
||||
/* integers */
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
|
|||
prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type");
|
||||
RNA_def_property_enum_items(prop, mouse_event_items);
|
||||
RNA_def_property_ui_text(prop, "Mouse Event", "Specify the type of event this mouse sensor should trigger on");
|
||||
RNA_def_property_ui_text(prop, "Mouse Event", "Type of event this mouse sensor should trigger on");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "target", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "targetName");
|
||||
RNA_def_property_ui_text(prop, "Target", "Property that receive the keystrokes in case a string is logged");
|
||||
RNA_def_property_ui_text(prop, "Target", "Property that receives the keystrokes in case a string is logged");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "log", PROP_STRING, PROP_NONE);
|
||||
|
@ -490,12 +490,12 @@ static void rna_def_property_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "value_min", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "value");
|
||||
RNA_def_property_ui_text(prop, "Minimum Value", "Specify minimum value in Interval type");
|
||||
RNA_def_property_ui_text(prop, "Minimum Value", "Minimum value in Interval type");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "value_max", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "maxvalue");
|
||||
RNA_def_property_ui_text(prop, "Maximum Value", "Specify maximum value in Interval type");
|
||||
RNA_def_property_ui_text(prop, "Maximum Value", "Maximum value in Interval type");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,7 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "value");
|
||||
RNA_def_property_ui_text(prop, "Compare Value", "Specify value to be used in comparison");
|
||||
RNA_def_property_ui_text(prop, "Compare Value", "Value to be used in comparison");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -574,7 +574,7 @@ static void rna_def_delay_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "use_repeat", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_DELAY_REPEAT);
|
||||
RNA_def_property_ui_text(prop, "Repeat", "Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics");
|
||||
RNA_def_property_ui_text(prop, "Repeat", "Toggle repeat option (if selected, the sensor restarts after Delay+Duration logic tics)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", SENS_COLLISION_PULSE);
|
||||
RNA_def_property_ui_text(prop, "Pulse", "Changes to the set of colliding objects generates pulse");
|
||||
RNA_def_property_ui_text(prop, "Pulse", "Change to the set of colliding objects generates pulse");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE);
|
||||
|
@ -599,13 +599,13 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||
RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
//XXX to make a setFunction to create a lookup with all materials in Blend File (not only this object mat.)
|
||||
prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "materialName");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
/*//XXX either use a datablock look up to store the string name (material)
|
||||
|
@ -614,7 +614,7 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
|
|||
RNA_def_property_struct_type(prop, "Material");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "ma");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -637,12 +637,12 @@ static void rna_def_radar_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||
RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, axis_items);
|
||||
RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the radar cone is cast");
|
||||
RNA_def_property_ui_text(prop, "Axis", "Along which axis the radar cone is cast");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
//XXX TODO - use radians internally then change to PROP_ANGLE
|
||||
|
@ -669,7 +669,7 @@ static void rna_def_random_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 0, 1000);
|
||||
RNA_def_property_ui_text(prop, "Seed", "Initial seed of the generator. (Choose 0 for not random)");
|
||||
RNA_def_property_ui_text(prop, "Seed", "Initial seed of the generator (choose 0 for not random)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -703,12 +703,12 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "propname");
|
||||
RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "matname");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
/* //XXX either use a datablock look up to store the string name (material)
|
||||
|
@ -717,7 +717,7 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
|
|||
RNA_def_property_struct_type(prop, "Material");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "ma");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material (blank = all objects)");
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
|
||||
*/
|
||||
|
||||
prop= RNA_def_property(srna, "use_x_ray", PROP_BOOLEAN, PROP_NONE);
|
||||
|
@ -733,7 +733,7 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
|
|||
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "axisflag");
|
||||
RNA_def_property_enum_items(prop, axis_items);
|
||||
RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the ray is cast");
|
||||
RNA_def_property_ui_text(prop, "Axis", "Along which axis the ray is cast");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -747,7 +747,7 @@ static void rna_def_message_sensor(BlenderRNA *brna)
|
|||
RNA_def_struct_sdna_from(srna, "bMessageSensor", "data");
|
||||
|
||||
prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop, "Subject", "Optional subject filter: only accept messages with this subject, or empty for all");
|
||||
RNA_def_property_ui_text(prop, "Subject", "Optional subject filter: only accept messages with this subject, or empty to accept all");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
@ -788,7 +788,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "joystick_index", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "joyindex");
|
||||
RNA_def_property_ui_text(prop, "Index", "Specify which joystick to use");
|
||||
RNA_def_property_ui_text(prop, "Index", "Which joystick to use");
|
||||
RNA_def_property_range(prop, 0, SENS_JOY_MAXINDEX-1);
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
|
@ -800,26 +800,26 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
|
|||
|
||||
prop= RNA_def_property(srna, "use_all_events", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_JOY_ANY_EVENT);
|
||||
RNA_def_property_ui_text(prop, "All Events", "Triggered by all events on this joysticks current type (axis/button/hat)");
|
||||
RNA_def_property_ui_text(prop, "All Events", "Triggered by all events on this joystick's current type (axis/button/hat)");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
/* Button */
|
||||
prop= RNA_def_property(srna, "button_number", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "button");
|
||||
RNA_def_property_ui_text(prop, "Button Number", "Specify which button to use");
|
||||
RNA_def_property_ui_text(prop, "Button Number", "Which button to use");
|
||||
RNA_def_property_range(prop, 0, 18);
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
/* Axis */
|
||||
prop= RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "axis");
|
||||
RNA_def_property_ui_text(prop, "Axis Number", "Specify which axis pair to use, 1 is usually the main direction input");
|
||||
RNA_def_property_ui_text(prop, "Axis Number", "Which axis pair to use, 1 is usually the main direction input");
|
||||
RNA_def_property_range(prop, 1, 8);
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "precision");
|
||||
RNA_def_property_ui_text(prop, "Axis Threshold", "Specify the precision of the axis");
|
||||
RNA_def_property_ui_text(prop, "Axis Threshold", "Precision of the axis");
|
||||
RNA_def_property_range(prop, 0, 32768);
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
|
@ -832,21 +832,21 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
|
|||
/* Single Axis */
|
||||
prop= RNA_def_property(srna, "single_axis_number", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "axis_single");
|
||||
RNA_def_property_ui_text(prop, "Axis Number", "Specify a single axis (verticle/horizontal/other) to detect");
|
||||
RNA_def_property_ui_text(prop, "Axis Number", "Single axis (vertical/horizontal/other) to detect");
|
||||
RNA_def_property_range(prop, 1, 16);
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
/* Hat */
|
||||
prop= RNA_def_property(srna, "hat_number", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "hat");
|
||||
RNA_def_property_ui_text(prop, "Hat Number", "Specify which hat to use");
|
||||
RNA_def_property_ui_text(prop, "Hat Number", "Which hat to use");
|
||||
RNA_def_property_range(prop, 1, 2);
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "hat_direction", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "hatf");
|
||||
RNA_def_property_enum_items(prop, hat_direction_items);
|
||||
RNA_def_property_ui_text(prop, "Hat Direction", "Specify hat direction");
|
||||
RNA_def_property_ui_text(prop, "Hat Direction", "Hat direction");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1618,7 +1618,7 @@ static void rna_def_glow(BlenderRNA *brna)
|
|||
prop= RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "fClamp");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Clamp", "rightness limit of intensity");
|
||||
RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
|
||||
|
||||
prop= RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
|
||||
|
@ -1722,7 +1722,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
|
|||
PropertyRNA *prop;
|
||||
|
||||
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
|
||||
RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single g");
|
||||
RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color");
|
||||
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
|
||||
|
||||
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
|
||||
|
|
|
@ -269,6 +269,7 @@ static MovieTrackingMarker *rna_trackingTrack_marker_find_frame(MovieTrackingTra
|
|||
static EnumPropertyItem tracker_items[] = {
|
||||
{TRACKER_KLT, "KLT", 0, "KLT", "Kanade–Lucas–Tomasi tracker which works with most of video clips, a bit slower than SAD"},
|
||||
{TRACKER_SAD, "SAD", 0, "SAD", "Sum of Absolute Differences tracker which can be used when KLT tracker fails"},
|
||||
{TRACKER_HYBRID, "Hybrid", 0, "Hybrid", "A hybrid tracker that uses SAD for rough tracking, KLT for refinement."},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem pattern_match_items[] = {
|
||||
|
|
|
@ -63,7 +63,6 @@ static void copyData(ModifierData *md, ModifierData *target)
|
|||
MirrorModifierData *mmd = (MirrorModifierData*) md;
|
||||
MirrorModifierData *tmmd = (MirrorModifierData*) target;
|
||||
|
||||
tmmd->axis = mmd->axis;
|
||||
tmmd->flag = mmd->flag;
|
||||
tmmd->tolerance = mmd->tolerance;
|
||||
tmmd->mirror_ob = mmd->mirror_ob;
|
||||
|
|
|
@ -77,7 +77,7 @@ void register_node_type_sh_invert(bNodeTreeType *ttype)
|
|||
static bNodeType ntype;
|
||||
|
||||
node_type_base(ttype, &ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_compatibility(&ntype, NODE_OLD_SHADING);
|
||||
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
|
||||
node_type_socket_templates(&ntype, sh_node_invert_in, sh_node_invert_out);
|
||||
node_type_size(&ntype, 90, 80, 100);
|
||||
node_type_exec(&ntype, node_shader_exec_invert);
|
||||
|
|
|
@ -1718,7 +1718,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
|
|||
sd.adapt_angle = cosf(DEG2RADF((float)part->adapt_angle));
|
||||
}
|
||||
|
||||
if(re->r.renderer==R_INTERN && part->draw&PART_DRAW_REN_STRAND) {
|
||||
if (part->draw & PART_DRAW_REN_STRAND) {
|
||||
strandbuf= RE_addStrandBuffer(obr, (totpart+totchild)*(path_nbr+1));
|
||||
strandbuf->ma= ma;
|
||||
strandbuf->lay= ob->lay;
|
||||
|
@ -2391,7 +2391,7 @@ static void do_displacement(Render *re, ObjectRen *obr, float mat[][4], float im
|
|||
/* Object Size with parenting */
|
||||
obt=obr->ob;
|
||||
while(obt){
|
||||
mul_v3_v3v3(temp, obt->size, obt->dsize);
|
||||
mul_v3_v3v3(temp, obt->size, obt->dscale);
|
||||
scale[0]*=temp[0]; scale[1]*=temp[1]; scale[2]*=temp[2];
|
||||
obt=obt->parent;
|
||||
}
|
||||
|
@ -3872,8 +3872,9 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
|
|||
}
|
||||
}
|
||||
}
|
||||
/* yafray: shadow flag should not be cleared, only used with internal renderer */
|
||||
if (re->r.renderer==R_INTERN) {
|
||||
|
||||
/* old code checked for internal render (aka not yafray) */
|
||||
{
|
||||
/* to make sure we can check ray shadow easily in the render code */
|
||||
if(lar->mode & LA_SHAD_RAY) {
|
||||
if( (re->r.mode & R_RAYTRACE)==0)
|
||||
|
@ -5109,10 +5110,9 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
|
|||
|
||||
/* SHADOW BUFFER */
|
||||
threaded_makeshadowbufs(re);
|
||||
|
||||
/* yafray: 'direct' radiosity, environment maps and raytree init not needed for yafray render */
|
||||
/* although radio mode could be useful at some point, later */
|
||||
if (re->r.renderer==R_INTERN) {
|
||||
|
||||
/* old code checked for internal render (aka not yafray) */
|
||||
{
|
||||
/* raytree */
|
||||
if(!re->test_break(re->tbh)) {
|
||||
if(re->r.mode & R_RAYTRACE) {
|
||||
|
@ -5137,14 +5137,12 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
|
|||
/* Occlusion */
|
||||
if((re->wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT|WO_INDIRECT_LIGHT)) && !re->test_break(re->tbh))
|
||||
if(re->wrld.ao_gather_method == WO_AOGATHER_APPROX)
|
||||
if(re->r.renderer==R_INTERN)
|
||||
if(re->r.mode & R_SHADOW)
|
||||
make_occ_tree(re);
|
||||
if(re->r.mode & R_SHADOW)
|
||||
make_occ_tree(re);
|
||||
|
||||
/* SSS */
|
||||
if((re->r.mode & R_SSS) && !re->test_break(re->tbh))
|
||||
if(re->r.renderer==R_INTERN)
|
||||
make_sss_tree(re);
|
||||
make_sss_tree(re);
|
||||
|
||||
if(!re->test_break(re->tbh))
|
||||
if(re->r.mode & R_RAYTRACE)
|
||||
|
|
|
@ -2832,12 +2832,6 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r
|
|||
BKE_report(reports, RPT_ERROR, "All RenderLayers are disabled");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* renderer */
|
||||
if(!ELEM(scene->r.renderer, R_INTERN, R_YAFRAY)) {
|
||||
BKE_report(reports, RPT_ERROR, "Unknown render engine set");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue