Merging r42413 through r42441 form trunk into soc-2011-tomato

This commit is contained in:
Sergey Sharybin 2011-12-05 18:53:09 +00:00
commit f55f9e95db
48 changed files with 473 additions and 340 deletions

@ -33,7 +33,7 @@
#include <Eigen/QR> #include <Eigen/QR>
#include <Eigen/SVD> #include <Eigen/SVD>
#if _WIN32 || __APPLE__ #if _WIN32 || __APPLE__ || __FreeBSD__
void static sincos (double x, double *sinx, double *cosx) { void static sincos (double x, double *sinx, double *cosx) {
*sinx = sin(x); *sinx = sin(x);
*cosx = cos(x); *cosx = cos(x);

@ -24,7 +24,7 @@
#include <emmintrin.h> #include <emmintrin.h>
#endif #endif
#ifndef __APPLE__ #if !defined(__APPLE__) && !defined(__FreeBSD__)
// Needed for memalign on Linux and _aligned_alloc on Windows. // Needed for memalign on Linux and _aligned_alloc on Windows.
#include <malloc.h> #include <malloc.h>
#else #else
@ -50,6 +50,15 @@ void *aligned_malloc(int size, int alignment) {
// they work natively with SSE types with no further work. // they work natively with SSE types with no further work.
CHECK_EQ(alignment, 16); CHECK_EQ(alignment, 16);
return malloc(size); return malloc(size);
#elif __FreeBSD__
void *result;
if(posix_memalign(&result, alignment, size)) {
// non-zero means allocation error
// either no allocation or bad alignment value
return NULL;
}
return result;
#else // This is for Linux. #else // This is for Linux.
return memalign(alignment, size); return memalign(alignment, size);
#endif #endif

@ -4,6 +4,8 @@
/* Namespace for Google classes */ /* Namespace for Google classes */
#ifdef __APPLE__ #ifdef __APPLE__
#include "config_mac.h" #include "config_mac.h"
#elif __FreeBSD__
#include "config_freebsd.h"
#elif __MINGW32__ #elif __MINGW32__
#include "windows/config.h" #include "windows/config.h"
#elif __GNUC__ #elif __GNUC__

@ -0,0 +1,161 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Namespace for Google classes */
#define GOOGLE_NAMESPACE google
/* Define if you have the `dladdr' function */
/* #undef HAVE_DLADDR */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
/* Define if you have the `fcntl' function */
#define HAVE_FCNTL 1
/* Define to 1 if you have the <glob.h> header file. */
#define HAVE_GLOB_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1
/* Define to 1 if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* define if you have google gflags library */
#define HAVE_LIB_GFLAGS 1
/* define if you have google gmock library */
/* #undef HAVE_LIB_GMOCK */
/* define if you have google gtest library */
/* #undef HAVE_LIB_GTEST */
/* define if you have libunwind */
/* #undef HAVE_LIB_UNWIND */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* define if the compiler implements namespaces */
#define HAVE_NAMESPACES 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* define if the compiler implements pthread_rwlock_* */
#define HAVE_RWLOCK 1
/* Define if you have the `sigaltstack' function */
#define HAVE_SIGALTSTACK 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <syscall.h> header file. */
/* #undef HAVE_SYSCALL_H */
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/ucontext.h> header file. */
#define HAVE_SYS_UCONTEXT_H 1
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1
/* Define to 1 if you have the <ucontext.h> header file. */
#define HAVE_UCONTEXT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* define if the compiler supports using expression for operator */
#define HAVE_USING_OPERATOR 1
/* define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__ 1
/* define if your compiler has __builtin_expect */
#define HAVE___BUILTIN_EXPECT 1
/* define if your compiler has __sync_val_compare_and_swap */
/* #undef HAVE___SYNC_VAL_COMPARE_AND_SWAP */
/* Name of package */
#define PACKAGE "glog"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "opensource@google.com"
/* Define to the full name of this package. */
#define PACKAGE_NAME "glog"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "glog 0.3.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "glog"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.1"
/* How to access the PC from a struct ucontext */
/* #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP] */
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define to 1 if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
#define STDC_HEADERS 1
/* the namespace where STL code like vector<> is defined */
#define STL_NAMESPACE std
/* location of source code */
#define TEST_SRC_DIR "."
/* Version number of package */
#define VERSION "0.3.1"
/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {

@ -22,7 +22,7 @@ import bpy
from bpy.types import Operator from bpy.types import Operator
def randomize_selected(seed, delta, loc, rot, scale, scale_even): def randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min):
import random import random
from random import uniform from random import uniform
@ -62,20 +62,16 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even):
else: else:
org_sca_x, org_sca_y, org_sca_z = obj.scale org_sca_x, org_sca_y, org_sca_z = obj.scale
if scale_even: sca_x, sca_y, sca_z = uniform(-scale[0]+2, scale[0]), uniform(-scale[1]+2, scale[1]), uniform(-scale[2]+2, scale[2])
sca_x = sca_y = sca_z = uniform(scale[0], - scale[0])
uniform(0.0, 0.0), uniform(0.0, 0.0)
else:
sca_x, sca_y, sca_z = rand_vec(scale)
if scale_even: if scale_even:
aX = -(sca_x * org_sca_x) + org_sca_x aX = sca_x * org_sca_x
aY = -(sca_x * org_sca_y) + org_sca_y aY = sca_x * org_sca_y
aZ = -(sca_x * org_sca_z) + org_sca_z aZ = sca_x * org_sca_z
else: else:
aX = sca_x + org_sca_x aX = sca_x * org_sca_x
aY = sca_y + org_sca_y aY = sca_y * org_sca_y
aZ = sca_z + org_sca_z aZ = sca_z * org_sca_z
if delta: if delta:
obj.delta_scale = aX, aY, aZ obj.delta_scale = aX, aY, aZ
@ -85,7 +81,7 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even):
uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0) uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0)
from bpy.props import IntProperty, BoolProperty, FloatVectorProperty from bpy.props import IntProperty, BoolProperty, FloatProperty, FloatVectorProperty
class RandomizeLocRotSize(Operator): class RandomizeLocRotSize(Operator):
@ -98,7 +94,7 @@ class RandomizeLocRotSize(Operator):
name="Random Seed", name="Random Seed",
description="Seed value for the random generator", description="Seed value for the random generator",
min=0, min=0,
max=1000, max=10000,
default=0, default=0,
) )
use_delta = BoolProperty( use_delta = BoolProperty(
@ -157,7 +153,7 @@ class RandomizeLocRotSize(Operator):
description="Maximum scale randomization over each axis", description="Maximum scale randomization over each axis",
min=-100.0, min=-100.0,
max=100.0, max=100.0,
default=(0.0, 0.0, 0.0), default=(1.0, 1.0, 1.0),
subtype='TRANSLATION', subtype='TRANSLATION',
) )
@ -174,7 +170,8 @@ class RandomizeLocRotSize(Operator):
scale_even = self.scale_even scale_even = self.scale_even
#scale_min = self.scale_min #scale_min = self.scale_min
scale_min = 0
randomize_selected(seed, delta, loc, rot, scale, scale_even) randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min)
return {'FINISHED'} return {'FINISHED'}

@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines. * and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */ * Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 260 #define BLENDER_VERSION 260
#define BLENDER_SUBVERSION 6 #define BLENDER_SUBVERSION 7
#define BLENDER_MINVERSION 250 #define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0 #define BLENDER_MINSUBVERSION 0
@ -51,7 +51,7 @@ extern "C" {
/* can be left blank, otherwise a,b,c... etc with no quotes */ /* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR a #define BLENDER_VERSION_CHAR a
/* alpha/beta/rc/release, docs use this */ /* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE beta #define BLENDER_VERSION_CYCLE rc
extern char versionstr[]; /* from blender.c */ extern char versionstr[]; /* from blender.c */

@ -285,7 +285,8 @@ void CustomData_validate_layer_name(const struct CustomData *data, int type, cha
int CustomData_verify_versions(struct CustomData *data, int index); int CustomData_verify_versions(struct CustomData *data, int index);
/*BMesh specific customdata stuff*/ /*BMesh specific customdata stuff*/
void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata); void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata,
struct CustomData *ldata);
void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata, int total); void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata, int total);
void CustomData_bmesh_init_pool(struct CustomData *data, int allocsize); void CustomData_bmesh_init_pool(struct CustomData *data, int allocsize);

@ -109,15 +109,10 @@ typedef struct EffectorCache {
int flag; int flag;
} EffectorCache; } EffectorCache;
void free_effect(struct Effect *eff);
void free_effects(struct ListBase *lb);
struct Effect *copy_effect(struct Effect *eff); struct Effect *copy_effect(struct Effect *eff);
void copy_effects(struct ListBase *lbn, struct ListBase *lb); void copy_effects(struct ListBase *lbn, struct ListBase *lb);
void deselectall_eff(struct Object *ob); void deselectall_eff(struct Object *ob);
struct PartEff *give_parteff(struct Object *ob);
void free_partdeflect(struct PartDeflect *pd); void free_partdeflect(struct PartDeflect *pd);
struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights); struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights);
void pdEndEffectors(struct ListBase **effectors); void pdEndEffectors(struct ListBase **effectors);

@ -132,12 +132,6 @@ void create_vert_face_map(ListBase **map, IndexNode **mem, const struct MFace *m
void create_vert_edge_map(ListBase **map, IndexNode **mem, const struct MEdge *medge, void create_vert_edge_map(ListBase **map, IndexNode **mem, const struct MEdge *medge,
const int totvert, const int totedge); const int totvert, const int totedge);
/* Partial Mesh Visibility */
struct PartialVisibility *mesh_pmv_copy(struct PartialVisibility *);
void mesh_pmv_free(struct PartialVisibility *);
void mesh_pmv_revert(struct Mesh *me);
void mesh_pmv_off(struct Mesh *me);
/* functions for making menu's from customdata layers */ /* functions for making menu's from customdata layers */
int mesh_layers_menu_charlen(struct CustomData *data, int type); /* use this to work out how many chars to allocate */ int mesh_layers_menu_charlen(struct CustomData *data, int type); /* use this to work out how many chars to allocate */
void mesh_layers_menu_concat(struct CustomData *data, int type, char *str); void mesh_layers_menu_concat(struct CustomData *data, int type, char *str);

@ -36,6 +36,10 @@
#ifndef BKE_UTILDEFINES_H #ifndef BKE_UTILDEFINES_H
#define BKE_UTILDEFINES_H #define BKE_UTILDEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
/* these values need to be hardcoded in structs, dna does not recognize defines */ /* these values need to be hardcoded in structs, dna does not recognize defines */
/* also defined in DNA_space_types.h */ /* also defined in DNA_space_types.h */
#ifndef FILE_MAXDIR #ifndef FILE_MAXDIR
@ -81,6 +85,8 @@
/* bit-row */ /* bit-row */
#define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) ) #define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) )
#define BMEMSET(mem, val, size) {unsigned int _i; char *_c = (char*) mem; for (_i=0; _i<size; _i++) *_c++ = val;} #ifdef __cplusplus
}
#endif
#endif // BKE_UTILDEFINES_H #endif // BKE_UTILDEFINES_H

@ -2120,6 +2120,8 @@ void pchan_calc_mat(bPoseChannel *pchan)
pchan_to_mat4(pchan, pchan->chan_mat); pchan_to_mat4(pchan, pchan->chan_mat);
} }
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
/* NLA strip modifiers */ /* NLA strip modifiers */
static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseChannel *pchan) 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 */ /* calculate tail of posechannel */
void where_is_pose_bone_tail(bPoseChannel *pchan) void where_is_pose_bone_tail(bPoseChannel *pchan)
{ {
@ -2351,8 +2355,11 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti
} }
if(do_extra) { if(do_extra) {
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
/* do NLA strip modifiers - i.e. curve follow */ /* do NLA strip modifiers - i.e. curve follow */
do_strip_modifiers(scene, ob, bone, pchan); do_strip_modifiers(scene, ob, bone, pchan);
#endif
/* Do constraints */ /* Do constraints */
if (pchan->constraints.first) { if (pchan->constraints.first) {

@ -24,6 +24,7 @@
#include "BLI_utildefines.h" #include "BLI_utildefines.h"
#include "DNA_anim_types.h" #include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
#include "DNA_dynamicpaint_types.h" #include "DNA_dynamicpaint_types.h"
#include "DNA_group_types.h" /*GroupObject*/ #include "DNA_group_types.h" /*GroupObject*/
#include "DNA_material_types.h" #include "DNA_material_types.h"
@ -39,6 +40,7 @@
#include "BKE_bvhutils.h" /* bvh tree */ #include "BKE_bvhutils.h" /* bvh tree */
#include "BKE_blender.h" #include "BKE_blender.h"
#include "BKE_cdderivedmesh.h" #include "BKE_cdderivedmesh.h"
#include "BKE_constraint.h"
#include "BKE_context.h" #include "BKE_context.h"
#include "BKE_customdata.h" #include "BKE_customdata.h"
#include "BKE_colortools.h" #include "BKE_colortools.h"
@ -453,15 +455,35 @@ static void object_cacheIgnoreClear(Object *ob, int state)
static void subframe_updateObject(Scene *scene, Object *ob, int flags, float frame) static void subframe_updateObject(Scene *scene, Object *ob, int flags, float frame)
{ {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)modifiers_findByType(ob, eModifierType_DynamicPaint); DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)modifiers_findByType(ob, eModifierType_DynamicPaint);
bConstraint *con;
/* if other is dynamic paint canvas, dont update */ /* if other is dynamic paint canvas, dont update */
if (pmd && pmd->canvas) if (pmd && pmd->canvas)
return; return;
/* if object has parent, update it too */ /* if object has parents, update them too */
if ((flags & UPDATE_PARENTS) && ob->parent) subframe_updateObject(scene, ob->parent, 0, frame); if (flags & UPDATE_PARENTS) {
if ((flags & UPDATE_PARENTS) && ob->track) subframe_updateObject(scene, ob->track, 0, frame); if (ob->parent) subframe_updateObject(scene, ob->parent, 0, frame);
if (ob->track) subframe_updateObject(scene, ob->track, 0, frame);
/* also update constraint targets */
for (con = ob->constraints.first; con; con=con->next) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
if (cti && cti->get_constraint_targets) {
bConstraintTarget *ct;
cti->get_constraint_targets(con, &targets);
for (ct= targets.first; ct; ct= ct->next) {
if (ct->tar)
subframe_updateObject(scene, ct->tar, 0, frame);
}
/* free temp targets */
if (cti->flush_constraint_targets)
cti->flush_constraint_targets(con, &targets, 0);
}
}
}
/* for curve following objects, parented curve has to be updated too */ /* for curve following objects, parented curve has to be updated too */
if(ob->type==OB_CURVE) { if(ob->type==OB_CURVE) {
Curve *cu= ob->data; Curve *cu= ob->data;

@ -154,43 +154,6 @@ typedef struct VeNoCo {
/* ***************** PARTICLES ***************** */ /* ***************** 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 ------------------ */ /* -------------------------- Effectors ------------------ */
void free_partdeflect(PartDeflect *pd) void free_partdeflect(PartDeflect *pd)
{ {

@ -108,17 +108,20 @@ void unlink_group(Group *group)
} }
for(ob= bmain->object.first; ob; ob= ob->id.next) { for(ob= bmain->object.first; ob; ob= ob->id.next) {
bActionStrip *strip;
if(ob->dup_group==group) { if(ob->dup_group==group) {
ob->dup_group= NULL; ob->dup_group= NULL;
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
{
bActionStrip *strip;
/* duplicator strips use a group object, we remove it */ /* duplicator strips use a group object, we remove it */
for(strip= ob->nlastrips.first; strip; strip= strip->next) { for(strip= ob->nlastrips.first; strip; strip= strip->next) {
if(strip->object) if(strip->object)
strip->object= NULL; strip->object= NULL;
} }
} }
#endif
}
for(psys=ob->particlesystem.first; psys; psys=psys->next){ for(psys=ob->particlesystem.first; psys; psys=psys->next){
if(psys->part->dup_group==group) if(psys->part->dup_group==group)
@ -275,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; GroupObject *go;
// XXX: old animsys depreceated... #if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
if(parent->nlastrips.first) if(parent->nlastrips.first)
return 1; return 1;
#endif
for(go= group->gobject.first; go; go= go->next) for(go= group->gobject.first; go; go= go->next)
if(go->ob && go->ob->proxy) if(go->ob && go->ob->proxy)

@ -1319,18 +1319,22 @@ static void lib_indirect_test_id(ID *id, Library *lib)
if(GS(id->name)==ID_OB) { if(GS(id->name)==ID_OB) {
Object *ob= (Object *)id; Object *ob= (Object *)id;
bActionStrip *strip;
Mesh *me; Mesh *me;
int a; int a;
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
// XXX old animation system! -------------------------------------- // XXX old animation system! --------------------------------------
{
bActionStrip *strip;
for (strip=ob->nlastrips.first; strip; strip=strip->next){ for (strip=ob->nlastrips.first; strip; strip=strip->next){
LIBTAG(strip->object); LIBTAG(strip->object);
LIBTAG(strip->act); LIBTAG(strip->act);
LIBTAG(strip->ipo); LIBTAG(strip->ipo);
} }
}
// XXX: new animation system needs something like this? // XXX: new animation system needs something like this?
#endif
for(a=0; a<ob->totcol; a++) { for(a=0; a<ob->totcol; a++) {
LIBTAG(ob->mat[a]); LIBTAG(ob->mat[a]);

@ -113,23 +113,11 @@ void unlink_mesh(Mesh *me)
if(me->texcomesh) me->texcomesh= NULL; if(me->texcomesh) me->texcomesh= NULL;
} }
/* do not free mesh itself */ /* do not free mesh itself */
void free_mesh(Mesh *me) void free_mesh(Mesh *me)
{ {
unlink_mesh(me); unlink_mesh(me);
if(me->pv) {
if(me->pv->vert_map) MEM_freeN(me->pv->vert_map);
if(me->pv->edge_map) MEM_freeN(me->pv->edge_map);
if(me->pv->old_faces) MEM_freeN(me->pv->old_faces);
if(me->pv->old_edges) MEM_freeN(me->pv->old_edges);
me->totvert= me->pv->totvert;
me->totedge= me->pv->totedge;
me->totface= me->pv->totface;
MEM_freeN(me->pv);
}
CustomData_free(&me->vdata, me->totvert); CustomData_free(&me->vdata, me->totvert);
CustomData_free(&me->edata, me->totedge); CustomData_free(&me->edata, me->totedge);
CustomData_free(&me->fdata, me->totface); CustomData_free(&me->fdata, me->totface);
@ -230,7 +218,6 @@ Mesh *copy_mesh(Mesh *me)
men->mselect= NULL; men->mselect= NULL;
men->edit_mesh= NULL; men->edit_mesh= NULL;
men->pv= NULL; /* looks like this is no-longer supported but NULL just incase */
men->bb= MEM_dupallocN(men->bb); men->bb= MEM_dupallocN(men->bb);
@ -1456,72 +1443,6 @@ void create_vert_edge_map(ListBase **map, IndexNode **mem, const MEdge *medge, c
} }
} }
/* Partial Mesh Visibility */
PartialVisibility *mesh_pmv_copy(PartialVisibility *pmv)
{
PartialVisibility *n= MEM_dupallocN(pmv);
n->vert_map= MEM_dupallocN(pmv->vert_map);
n->edge_map= MEM_dupallocN(pmv->edge_map);
n->old_edges= MEM_dupallocN(pmv->old_edges);
n->old_faces= MEM_dupallocN(pmv->old_faces);
return n;
}
void mesh_pmv_free(PartialVisibility *pv)
{
MEM_freeN(pv->vert_map);
MEM_freeN(pv->edge_map);
MEM_freeN(pv->old_faces);
MEM_freeN(pv->old_edges);
MEM_freeN(pv);
}
void mesh_pmv_revert(Mesh *me)
{
if(me->pv) {
unsigned i;
MVert *nve, *old_verts;
/* Reorder vertices */
nve= me->mvert;
old_verts = MEM_mallocN(sizeof(MVert)*me->pv->totvert,"PMV revert verts");
for(i=0; i<me->pv->totvert; ++i)
old_verts[i]= nve[me->pv->vert_map[i]];
/* Restore verts, edges and faces */
CustomData_free_layer_active(&me->vdata, CD_MVERT, me->totvert);
CustomData_free_layer_active(&me->edata, CD_MEDGE, me->totedge);
CustomData_free_layer_active(&me->fdata, CD_MFACE, me->totface);
CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, old_verts, me->pv->totvert);
CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, me->pv->old_edges, me->pv->totedge);
CustomData_add_layer(&me->fdata, CD_MFACE, CD_ASSIGN, me->pv->old_faces, me->pv->totface);
mesh_update_customdata_pointers(me);
me->totvert= me->pv->totvert;
me->totedge= me->pv->totedge;
me->totface= me->pv->totface;
me->pv->old_edges= NULL;
me->pv->old_faces= NULL;
/* Free maps */
MEM_freeN(me->pv->edge_map);
me->pv->edge_map= NULL;
MEM_freeN(me->pv->vert_map);
me->pv->vert_map= NULL;
}
}
void mesh_pmv_off(Mesh *me)
{
if(me->pv) {
mesh_pmv_revert(me);
MEM_freeN(me->pv);
me->pv= NULL;
}
}
/* basic vertex data functions */ /* basic vertex data functions */
int minmax_mesh(Mesh *me, float min[3], float max[3]) int minmax_mesh(Mesh *me, float min[3], float max[3])
{ {

@ -481,10 +481,10 @@ static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
fVerts[2] = SET_INT_IN_POINTER(mf->v3); fVerts[2] = SET_INT_IN_POINTER(mf->v3);
fVerts[3] = SET_INT_IN_POINTER(mf->v4); fVerts[3] = SET_INT_IN_POINTER(mf->v4);
// this is very bad, means mesh is internally consistent. /* this is very bad, means mesh is internally inconsistent.
// it is not really possible to continue without modifying * it is not really possible to continue without modifying
// other parts of code significantly to handle missing faces. * other parts of code significantly to handle missing faces.
// since this really shouldn't even be possible we just bail. * since this really shouldn't even be possible we just bail.*/
if(ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), fVerts[3] ? 4 : 3, if(ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), fVerts[3] ? 4 : 3,
fVerts, &f) == eCCGError_InvalidValue) { fVerts, &f) == eCCGError_InvalidValue) {
static int hasGivenError = 0; static int hasGivenError = 0;

@ -39,7 +39,7 @@
#define BLI_MATH_BASE_INLINE_H #define BLI_MATH_BASE_INLINE_H
/* A few small defines. Keep'em local! */ /* A few small defines. Keep'em local! */
#define SMALL_NUMBER 1.e-8 #define SMALL_NUMBER 1.e-8f
MINLINE float sqrt3f(float f) MINLINE float sqrt3f(float f)
{ {
@ -106,7 +106,7 @@ MINLINE float interpf(float target, float origin, float fac)
* the distance gets very high, 180d would be inf, but this case isn't valid */ * the distance gets very high, 180d would be inf, but this case isn't valid */
MINLINE float shell_angle_to_dist(const float angle) MINLINE float shell_angle_to_dist(const float angle)
{ {
return (angle < (float)SMALL_NUMBER) ? 1.0f : fabsf(1.0f / cosf(angle)); return (angle < SMALL_NUMBER) ? 1.0f : fabsf(1.0f / cosf(angle));
} }
/* used for zoom values*/ /* used for zoom values*/

@ -109,7 +109,7 @@
#include "BKE_context.h" #include "BKE_context.h"
#include "BKE_curve.h" #include "BKE_curve.h"
#include "BKE_deform.h" #include "BKE_deform.h"
#include "BKE_effect.h" /* give_parteff */ #include "BKE_effect.h"
#include "BKE_fcurve.h" #include "BKE_fcurve.h"
#include "BKE_global.h" // for G #include "BKE_global.h" // for G
#include "BKE_group.h" #include "BKE_group.h"
@ -3718,22 +3718,13 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
mesh->adt= newdataadr(fd, mesh->adt); mesh->adt= newdataadr(fd, mesh->adt);
direct_link_animdata(fd, mesh->adt); direct_link_animdata(fd, mesh->adt);
/* Partial-mesh visibility (do this before using totvert, totface, or totedge!) */
mesh->pv= newdataadr(fd, mesh->pv);
if(mesh->pv) {
mesh->pv->vert_map= newdataadr(fd, mesh->pv->vert_map);
mesh->pv->edge_map= newdataadr(fd, mesh->pv->edge_map);
mesh->pv->old_faces= newdataadr(fd, mesh->pv->old_faces);
mesh->pv->old_edges= newdataadr(fd, mesh->pv->old_edges);
}
/* normally direct_link_dverts should be called in direct_link_customdata, /* normally direct_link_dverts should be called in direct_link_customdata,
but for backwards compat in do_versions to work we do it here */ but for backwards compat in do_versions to work we do it here */
direct_link_dverts(fd, mesh->pv ? mesh->pv->totvert : mesh->totvert, mesh->dvert); direct_link_dverts(fd, mesh->totvert, mesh->dvert);
direct_link_customdata(fd, &mesh->vdata, mesh->pv ? mesh->pv->totvert : mesh->totvert); direct_link_customdata(fd, &mesh->vdata, mesh->totvert);
direct_link_customdata(fd, &mesh->edata, mesh->pv ? mesh->pv->totedge : mesh->totedge); direct_link_customdata(fd, &mesh->edata, mesh->totedge);
direct_link_customdata(fd, &mesh->fdata, mesh->pv ? mesh->pv->totface : mesh->totface); direct_link_customdata(fd, &mesh->fdata, mesh->totface);
mesh->bb= NULL; mesh->bb= NULL;
mesh->mselect = NULL; mesh->mselect = NULL;
@ -3787,7 +3778,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
TFace *tf= mesh->tface; TFace *tf= mesh->tface;
unsigned int i; unsigned int i;
for (i=0; i< (mesh->pv ? mesh->pv->totface : mesh->totface); i++, tf++) { for (i=0; i< (mesh->totface); i++, tf++) {
SWITCH_INT(tf->col[0]); SWITCH_INT(tf->col[0]);
SWITCH_INT(tf->col[1]); SWITCH_INT(tf->col[1]);
SWITCH_INT(tf->col[2]); SWITCH_INT(tf->col[2]);
@ -7084,6 +7075,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) static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
{ {
MTex *mtex; MTex *mtex;
@ -7659,7 +7684,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Object *ob = main->object.first; Object *ob = main->object.first;
PartEff *paf; PartEff *paf;
while (ob) { while (ob) {
paf = give_parteff(ob); paf = do_version_give_parteff_245(ob);
if (paf) { if (paf) {
if (paf->staticstep == 0) { if (paf->staticstep == 0) {
paf->staticstep= 5; paf->staticstep= 5;
@ -8675,11 +8700,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
View3D *v3d= (View3D *)sl; View3D *v3d= (View3D *)sl;
if(v3d->twtype==0) v3d->twtype= V3D_MANIP_TRANSLATE; 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;
}
} }
} }
} }
@ -8868,7 +8888,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) {
if(paf->disp == 0) if(paf->disp == 0)
paf->disp = 100; paf->disp = 100;
@ -9876,7 +9896,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
} }
/* convert old particles to new system */ /* convert old particles to new system */
if((paf = give_parteff(ob))) { if((paf = do_version_give_parteff_245(ob))) {
ParticleSystem *psys; ParticleSystem *psys;
ModifierData *md; ModifierData *md;
ParticleSystemModifierData *psmd; ParticleSystemModifierData *psmd;
@ -9989,7 +10009,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
part->type = PART_FLUID; part->type = PART_FLUID;
} }
free_effects(&ob->effect); do_version_free_effects_245(&ob->effect);
printf("Old particle system converted to new system.\n"); printf("Old particle system converted to new system.\n");
} }
@ -12622,6 +12642,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
} }
} }
} }
/* sigh, this dscale vs dsize version patching was not done right, fix for fix,
* this intentionally checks an exact subversion, also note this was never in a release,
* at some point this could be removed. */
else if (main->versionfile == 260 && main->subversionfile == 6)
{
Object *ob;
for (ob= main->object.first; ob; ob= ob->id.next) {
if (is_zero_v3(ob->dscale)) {
fill_vn_fl(ob->dscale, 3, 1.0f);
}
}
}
/* put compatibility code here until next subversion bump */ /* put compatibility code here until next subversion bump */
{ {
@ -13444,7 +13476,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
expand_doit(fd, mainvar, ob->mat[a]); expand_doit(fd, mainvar, ob->mat[a]);
} }
paf = give_parteff(ob); paf = do_version_give_parteff_245(ob);
if (paf && paf->group) if (paf && paf->group)
expand_doit(fd, mainvar, paf->group); expand_doit(fd, mainvar, paf->group);

@ -1691,28 +1691,10 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat); writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat);
if(mesh->pv) {
write_customdata(wd, &mesh->id, mesh->pv->totvert, &mesh->vdata, -1, 0);
write_customdata(wd, &mesh->id, mesh->pv->totedge, &mesh->edata,
CD_MEDGE, mesh->totedge);
write_customdata(wd, &mesh->id, mesh->pv->totface, &mesh->fdata,
CD_MFACE, mesh->totface);
}
else {
write_customdata(wd, &mesh->id, mesh->totvert, &mesh->vdata, -1, 0); write_customdata(wd, &mesh->id, mesh->totvert, &mesh->vdata, -1, 0);
write_customdata(wd, &mesh->id, mesh->totedge, &mesh->edata, -1, 0); write_customdata(wd, &mesh->id, mesh->totedge, &mesh->edata, -1, 0);
write_customdata(wd, &mesh->id, mesh->totface, &mesh->fdata, -1, 0); write_customdata(wd, &mesh->id, mesh->totface, &mesh->fdata, -1, 0);
} }
/* PMV data */
if(mesh->pv) {
writestruct(wd, DATA, "PartialVisibility", 1, mesh->pv);
writedata(wd, DATA, sizeof(unsigned int)*mesh->pv->totvert, mesh->pv->vert_map);
writedata(wd, DATA, sizeof(int)*mesh->pv->totedge, mesh->pv->edge_map);
writestruct(wd, DATA, "MFace", mesh->pv->totface, mesh->pv->old_faces);
writestruct(wd, DATA, "MEdge", mesh->pv->totedge, mesh->pv->old_edges);
}
}
mesh= mesh->id.next; mesh= mesh->id.next;
} }
} }

@ -102,8 +102,11 @@ float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob,
void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode); void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode);
int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, float *loc, float *rot, int *enter_editmode, unsigned int *layer); int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op,
struct Object *ED_object_add_type(struct bContext *C, int type, float *loc, float *rot, int enter_editmode, unsigned int layer); float *loc, float *rot, int *enter_editmode, unsigned int *layer);
struct Object *ED_object_add_type(struct bContext *C, int type, float *loc,
float *rot, int enter_editmode, unsigned int layer);
void ED_object_single_users(struct Main *bmain, struct Scene *scene, int full); void ED_object_single_users(struct Main *bmain, struct Scene *scene, int full);
void ED_object_single_user(struct Scene *scene, struct Object *ob); void ED_object_single_user(struct Scene *scene, struct Object *ob);

@ -418,7 +418,7 @@ void MESH_OT_drop_named_image(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name= "Assign Image to UV Map"; 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"; ot->idname= "MESH_OT_drop_named_image";
/* api callbacks */ /* api callbacks */

@ -244,7 +244,8 @@ int ED_object_add_generic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
return op->type->exec(C, op); return op->type->exec(C, op);
} }
int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, float *rot, int *enter_editmode, unsigned int *layer) int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
float *rot, int *enter_editmode, unsigned int *layer)
{ {
View3D *v3d = CTX_wm_view3d(C); View3D *v3d = CTX_wm_view3d(C);
int a, layer_values[20]; int a, layer_values[20];
@ -305,7 +306,8 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, floa
/* for object add primitive operators */ /* for object add primitive operators */
/* do not call undo push in this function (users of this function have to) */ /* do not call undo push in this function (users of this function have to) */
Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot, int enter_editmode, unsigned int layer) Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot,
int enter_editmode, unsigned int layer)
{ {
Main *bmain= CTX_data_main(C); Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);

@ -439,9 +439,6 @@ void ED_object_enter_editmode(bContext *C, int flag)
ob->mode= OB_MODE_EDIT; ob->mode= OB_MODE_EDIT;
if(ob->type==OB_MESH) { if(ob->type==OB_MESH) {
Mesh *me= ob->data;
if(me->pv) mesh_pmv_off(me);
ok= 1; ok= 1;
scene->obedit= ob; // context sees this scene->obedit= ob; // context sees this

@ -456,7 +456,6 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to Shapes"); BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to Shapes");
return 0; return 0;
} }
mesh_pmv_off(me);
dm = mesh_create_derived_for_modifier(scene, ob, md); dm = mesh_create_derived_for_modifier(scene, ob, md);
if (!dm) { if (!dm) {
@ -506,8 +505,6 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
return 0; return 0;
} }
mesh_pmv_off(me);
/* Multires: ensure that recent sculpting is applied */ /* Multires: ensure that recent sculpting is applied */
if(md->type == eModifierType_Multires) if(md->type == eModifierType_Multires)
multires_force_update(ob); multires_force_update(ob);

@ -99,6 +99,7 @@ int ED_vgroup_object_is_edit_mode(Object *ob)
bDeformGroup *ED_vgroup_add_name(Object *ob, const char *name) bDeformGroup *ED_vgroup_add_name(Object *ob, const char *name)
{ {
bDeformGroup *defgroup; bDeformGroup *defgroup;
if(!ob || !OB_TYPE_SUPPORT_VGROUP(ob->type)) if(!ob || !OB_TYPE_SUPPORT_VGROUP(ob->type))
return NULL; return NULL;

@ -68,28 +68,20 @@
typedef struct ScreenshotData { typedef struct ScreenshotData {
unsigned int *dumprect; unsigned int *dumprect;
int dumpsx, dumpsy; int dumpsx, dumpsy;
rcti crop;
} ScreenshotData; } ScreenshotData;
/* get shot from frontbuffer */ /* get shot from frontbuffer */
static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy, int fscreen) static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy)
{ {
wmWindow *win= CTX_wm_window(C); wmWindow *win= CTX_wm_window(C);
ScrArea *curarea= CTX_wm_area(C);
int x=0, y=0; int x=0, y=0;
unsigned int *dumprect= NULL; unsigned int *dumprect= NULL;
if(fscreen) { /* full screen */
x= 0; x= 0;
y= 0; y= 0;
*dumpsx= win->sizex; *dumpsx= win->sizex;
*dumpsy= win->sizey; *dumpsy= win->sizey;
}
else {
x= curarea->totrct.xmin;
y= curarea->totrct.ymin;
*dumpsx= curarea->totrct.xmax-x;
*dumpsy= curarea->totrct.ymax-y;
}
if (*dumpsx && *dumpsy) { if (*dumpsx && *dumpsy) {
@ -109,14 +101,22 @@ static int screenshot_data_create(bContext *C, wmOperator *op)
unsigned int *dumprect; unsigned int *dumprect;
int dumpsx, dumpsy; int dumpsx, dumpsy;
dumprect= screenshot(C, &dumpsx, &dumpsy, RNA_boolean_get(op->ptr, "full")); /* do redraw so we don't show popups/menus */
WM_redraw_windows(C);
dumprect= screenshot(C, &dumpsx, &dumpsy);
if(dumprect) { if(dumprect) {
ScreenshotData *scd= MEM_callocN(sizeof(ScreenshotData), "screenshot"); ScreenshotData *scd= MEM_callocN(sizeof(ScreenshotData), "screenshot");
ScrArea *sa= CTX_wm_area(C);
scd->dumpsx= dumpsx; scd->dumpsx= dumpsx;
scd->dumpsy= dumpsy; scd->dumpsy= dumpsy;
scd->dumprect= dumprect; scd->dumprect= dumprect;
if(sa)
scd->crop= sa->totrct;
op->customdata= scd; op->customdata= scd;
return TRUE; return TRUE;
} }
else { else {
@ -137,6 +137,21 @@ static void screenshot_data_free(wmOperator *op)
} }
} }
static void screenshot_crop(ImBuf *ibuf, rcti crop)
{
unsigned int *to= ibuf->rect;
unsigned int *from= ibuf->rect + crop.ymin*ibuf->x + crop.xmin;
int y, cropw= crop.xmax - crop.xmin, croph = crop.ymax - crop.ymin;
if(cropw > 0 && croph > 0) {
for(y=0; y<croph; y++, to+=cropw, from+=ibuf->x)
memmove(to, from, sizeof(unsigned int)*cropw);
ibuf->x= cropw;
ibuf->y= croph;
}
}
static int screenshot_exec(bContext *C, wmOperator *op) static int screenshot_exec(bContext *C, wmOperator *op)
{ {
ScreenshotData *scd= op->customdata; ScreenshotData *scd= op->customdata;
@ -166,6 +181,10 @@ static int screenshot_exec(bContext *C, wmOperator *op)
ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0); ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0);
ibuf->rect= scd->dumprect; ibuf->rect= scd->dumprect;
/* crop to show only single editor */
if(!RNA_boolean_get(op->ptr, "full"))
screenshot_crop(ibuf, scd->crop);
BKE_write_ibuf(ibuf, path, &scene->r.im_format); BKE_write_ibuf(ibuf, path, &scene->r.im_format);
IMB_freeImBuf(ibuf); IMB_freeImBuf(ibuf);
@ -213,7 +232,6 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH); WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH);
prop= RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); prop= RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
RNA_def_property_flag(prop, PROP_HIDDEN); /* hide because once the file sel is displayed, the option no longer does anything */
} }
/* *************** screenshot movie job ************************* */ /* *************** screenshot movie job ************************* */

@ -929,7 +929,7 @@ void CLIP_OT_rebuild_proxy(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name= "Rebuild Proxy and Timecode Indices"; ot->name= "Rebuild Proxy and Timecode Indices";
ot->idname= "CLIP_OT_rebuild_proxy"; 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 */ /* api callbacks */
ot->exec= clip_rebuild_proxy_exec; ot->exec= clip_rebuild_proxy_exec;

@ -580,7 +580,6 @@ static SpaceLink *time_new(const bContext *C)
stime= MEM_callocN(sizeof(SpaceTime), "inittime"); stime= MEM_callocN(sizeof(SpaceTime), "inittime");
stime->spacetype= SPACE_TIME; stime->spacetype= SPACE_TIME;
stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN; // XXX: depreceated
stime->flag |= TIME_DRAWFRAMES; stime->flag |= TIME_DRAWFRAMES;
/* header */ /* header */

@ -2473,7 +2473,8 @@ static void draw_dm_bweights(Scene *scene, DerivedMesh *dm)
/* EditMesh drawing routines*/ /* EditMesh drawing routines*/
static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, DerivedMesh *cageDM, EditVert *eve_act) static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit,
DerivedMesh *cageDM, EditVert *eve_act)
{ {
ToolSettings *ts= scene->toolsettings; ToolSettings *ts= scene->toolsettings;
int sel; int sel;
@ -2530,7 +2531,9 @@ static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, Deriv
glPointSize(1.0); glPointSize(1.0);
} }
static void draw_em_fancy_edges(Scene *scene, View3D *v3d, Mesh *me, DerivedMesh *cageDM, short sel_only, EditEdge *eed_act) static void draw_em_fancy_edges(Scene *scene, View3D *v3d,
Mesh *me, DerivedMesh *cageDM, short sel_only,
EditEdge *eed_act)
{ {
ToolSettings *ts= scene->toolsettings; ToolSettings *ts= scene->toolsettings;
int pass; int pass;
@ -2588,7 +2591,8 @@ static void draw_em_fancy_edges(Scene *scene, View3D *v3d, Mesh *me, DerivedMesh
} }
} }
static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, EditMesh *em, UnitSettings *unit) static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d,
Object *ob, EditMesh *em, UnitSettings *unit)
{ {
Mesh *me= ob->data; Mesh *me= ob->data;
EditEdge *eed; EditEdge *eed;
@ -2801,7 +2805,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
finalDM->drawMappedFacesGLSL(finalDM, GPU_enable_material, finalDM->drawMappedFacesGLSL(finalDM, GPU_enable_material,
draw_em_fancy__setGLSLFaceOpts, NULL); draw_em_fancy__setGLSLFaceOpts, em);
GPU_disable_material(); GPU_disable_material();
glFrontFace(GL_CCW); glFrontFace(GL_CCW);
@ -2817,7 +2821,6 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
glEnable(GL_LIGHTING); glEnable(GL_LIGHTING);
glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, GPU_enable_material, NULL, NULL, 0); finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, GPU_enable_material, NULL, NULL, 0);
glFrontFace(GL_CCW); glFrontFace(GL_CCW);
@ -6904,7 +6907,8 @@ static void bbs_mesh_solid__drawCenter(void *UNUSED(userData), int index, float
} }
/* two options, facecolors or black */ /* two options, facecolors or black */
static void bbs_mesh_solid_EM(Scene *scene, View3D *v3d, Object *ob, DerivedMesh *dm, int facecol) static void bbs_mesh_solid_EM(Scene *scene, View3D *v3d,
Object *ob, DerivedMesh *dm, int facecol)
{ {
cpack(0); cpack(0);

@ -485,10 +485,12 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiBlockSetEmboss(block, UI_EMBOSS); uiBlockSetEmboss(block, UI_EMBOSS);
/* mode */ /* mode */
if(ob) if(ob) {
v3d->modeselect = ob->mode; v3d->modeselect = ob->mode;
else }
else {
v3d->modeselect = OB_MODE_OBJECT; v3d->modeselect = OB_MODE_OBJECT;
}
row= uiLayoutRow(layout, 1); row= uiLayoutRow(layout, 1);
uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) , uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) ,

@ -48,7 +48,6 @@ struct MSticky;
struct Mesh; struct Mesh;
struct OcInfo; struct OcInfo;
struct Multires; struct Multires;
struct PartialVisibility;
struct EditMesh; struct EditMesh;
struct AnimData; struct AnimData;
@ -100,7 +99,6 @@ typedef struct Mesh {
short totcol; short totcol;
struct Multires *mr DNA_DEPRECATED; /* 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; } Mesh;
/* deprecated by MTFace, only here for file reading */ /* deprecated by MTFace, only here for file reading */

@ -174,14 +174,6 @@ typedef struct Multires {
/** End Multires **/ /** End Multires **/
typedef struct PartialVisibility {
unsigned int *vert_map; /* vert_map[Old Index]= New Index */
int *edge_map; /* edge_map[Old Index]= New Index, -1= hidden */
MFace *old_faces;
MEdge *old_edges;
unsigned int totface, totedge, totvert, pad;
} PartialVisibility;
typedef struct MRecast{ typedef struct MRecast{
int i; int i;
} MRecast; } MRecast;

@ -135,7 +135,7 @@ typedef struct Object {
/* materials */ /* materials */
struct Material **mat; /* material slots */ struct Material **mat; /* material slots */
char *matbits; /* 1 if material linked to object */ char *matbits; /* a boolean field, with each byte 1 if corrusponding material is linked to object */
int totcol; /* copy of mesh or curve or meta */ int totcol; /* copy of mesh or curve or meta */
int actcol; /* currently selected material in the UI */ int actcol; /* currently selected material in the UI */

@ -378,12 +378,9 @@ typedef struct SpaceTime {
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase caches; ListBase caches;
int cache_display, pad;
int cache_display;
int flag; int flag;
int redraws DNA_DEPRECATED; /* redraws is deprecated... moved to screen */
} SpaceTime; } SpaceTime;
typedef struct SpaceNode { typedef struct SpaceNode {
@ -397,9 +394,8 @@ typedef struct SpaceNode {
View2D v2d DNA_DEPRECATED; /* 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... */ 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; float aspect;
void *curfont;
float xof, yof; /* offset for drawing the backdrop */ float xof, yof; /* offset for drawing the backdrop */
float zoom, padf; /* zoom for backdrop */ float zoom, padf; /* zoom for backdrop */

@ -336,7 +336,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "rot"); RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_range(prop, 0, M_PI*2); 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"); RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE); 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; PropertyRNA *prop;
static EnumPropertyItem prop_texture_coordinates_items[] = { static EnumPropertyItem prop_texture_coordinates_items[] = {
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates"}, {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
{TEXCO_VIEW, "VIEW", 0, "View", "Uses view coordinates for the texture coordinates"}, {TEXCO_VIEW, "VIEW", 0, "View", "Use view coordinates for the texture coordinates"},
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"}, {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LampTextureSlot", "TextureSlot"); 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); 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_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"); RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_map_specular", PROP_BOOLEAN, PROP_NONE); 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_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"); RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE); prop= RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE);

@ -138,6 +138,14 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
return NULL; /* only do basis metaball */ return NULL; /* only do basis metaball */
tmpmesh = add_mesh("Mesh"); tmpmesh = add_mesh("Mesh");
if(render) {
ListBase disp = {NULL, NULL};
makeDispListMBall_forRender(sce, ob, &disp);
mball_to_mesh(&disp, tmpmesh);
freedisplist(&disp);
}
else
mball_to_mesh(&ob->disp, tmpmesh); mball_to_mesh(&ob->disp, tmpmesh);
break; break;

@ -1233,18 +1233,18 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
PropertyRNA *prop; PropertyRNA *prop;
static EnumPropertyItem texco_items[] = { static EnumPropertyItem texco_items[] = {
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates"}, {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"}, {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
{TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates"}, {TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"},
{TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object"}, {TEXCO_ORCO, "ORCO", 0, "Generated", "Use 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_STRAND, "STRAND", 0, "Strand / Particle", "Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_mapping_items[] = { static EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly"}, {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
{MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector"}, {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
{MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis"}, {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
{MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis"}, {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Map with Z as central axis"},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_x_mapping_items[] = { 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); prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS); 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); prop= RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY); 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); 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_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_CLONE);
RNA_def_property_ui_text(prop, "Clone Map", 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 */ /* integers */

@ -387,7 +387,7 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE); prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, mouse_event_items); 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); 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); prop= RNA_def_property(srna, "target", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "targetName"); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "log", PROP_STRING, PROP_NONE); 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); prop= RNA_def_property(srna, "value_min", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "value"); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "value_max", PROP_STRING, PROP_NONE); prop= RNA_def_property(srna, "value_max", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "maxvalue"); 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); 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); prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "value"); 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); 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); 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_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); 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); 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_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); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE); 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); prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name"); 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); 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.) //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); prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "materialName"); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
/*//XXX either use a datablock look up to store the string name (material) /*//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_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "ma"); 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); prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name"); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE); prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, axis_items); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
//XXX TODO - use radians internally then change to PROP_ANGLE //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); prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000); 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); 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); prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "propname"); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE); prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "matname"); 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); RNA_def_property_update(prop, NC_LOGIC, NULL);
/* //XXX either use a datablock look up to store the string name (material) /* //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_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "ma"); 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); 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); prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axisflag"); RNA_def_property_enum_sdna(prop, NULL, "axisflag");
RNA_def_property_enum_items(prop, axis_items); 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); 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"); RNA_def_struct_sdna_from(srna, "bMessageSensor", "data");
prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE); 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); 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); prop= RNA_def_property(srna, "joystick_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "joyindex"); 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_range(prop, 0, SENS_JOY_MAXINDEX-1);
RNA_def_property_update(prop, NC_LOGIC, NULL); 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); 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_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); RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Button */ /* Button */
prop= RNA_def_property(srna, "button_number", PROP_INT, PROP_NONE); prop= RNA_def_property(srna, "button_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "button"); 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_range(prop, 0, 18);
RNA_def_property_update(prop, NC_LOGIC, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Axis */ /* Axis */
prop= RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE); prop= RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "axis"); 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_range(prop, 1, 8);
RNA_def_property_update(prop, NC_LOGIC, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE); prop= RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "precision"); 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_range(prop, 0, 32768);
RNA_def_property_update(prop, NC_LOGIC, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL);
@ -832,21 +832,21 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
/* Single Axis */ /* Single Axis */
prop= RNA_def_property(srna, "single_axis_number", PROP_INT, PROP_NONE); prop= RNA_def_property(srna, "single_axis_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "axis_single"); 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_range(prop, 1, 16);
RNA_def_property_update(prop, NC_LOGIC, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Hat */ /* Hat */
prop= RNA_def_property(srna, "hat_number", PROP_INT, PROP_NONE); prop= RNA_def_property(srna, "hat_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "hat"); 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_range(prop, 1, 2);
RNA_def_property_update(prop, NC_LOGIC, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "hat_direction", PROP_ENUM, PROP_NONE); prop= RNA_def_property(srna, "hat_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "hatf"); RNA_def_property_enum_sdna(prop, NULL, "hatf");
RNA_def_property_enum_items(prop, hat_direction_items); 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); 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); prop= RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fClamp"); RNA_def_property_float_sdna(prop, NULL, "fClamp");
RNA_def_property_range(prop, 0.0f, 1.0f); 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"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE); 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; PropertyRNA *prop;
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence"); 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"); RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);

@ -331,6 +331,9 @@ void WM_progress_clear(struct wmWindow *win);
void WM_console_toggle(struct bContext *C, short show); void WM_console_toggle(struct bContext *C, short show);
#endif #endif
/* Draw (for screenshot) */
void WM_redraw_windows(struct bContext *C);
/* debugging only, convenience function to write on crash */ /* debugging only, convenience function to write on crash */
int write_crash_blend(void); int write_crash_blend(void);

@ -835,3 +835,16 @@ void wm_draw_region_clear(wmWindow *win, ARegion *ar)
win->screen->do_draw= 1; win->screen->do_draw= 1;
} }
void WM_redraw_windows(bContext *C)
{
wmWindow *win_prev= CTX_wm_window(C);
ScrArea *area_prev= CTX_wm_area(C);
ARegion *ar_prev= CTX_wm_region(C);
wm_draw_update(C);
CTX_wm_window_set(C, win_prev);
CTX_wm_area_set(C, area_prev);
CTX_wm_region_set(C, ar_prev);
}