svn merge ^/trunk/blender -r42550:42564

This commit is contained in:
Campbell Barton
2011-12-11 01:06:43 +00:00
14 changed files with 72 additions and 62 deletions

View File

@@ -148,23 +148,23 @@ if(WIN32)
third_party/glog/src/vlog_is_on.cc
third_party/glog/src/windows/port.cc
third_party/glog/src/utilities.h
third_party/glog/src/stacktrace_generic-inl.h
third_party/glog/src/config.h
third_party/glog/src/stacktrace.h
third_party/glog/src/stacktrace_x86_64-inl.h
third_party/glog/src/base/googleinit.h
third_party/glog/src/base/mutex.h
third_party/glog/src/base/commandlineflags.h
third_party/glog/src/stacktrace_generic-inl.h
third_party/glog/src/stacktrace_libunwind-inl.h
third_party/glog/src/stacktrace_powerpc-inl.h
third_party/glog/src/stacktrace_x86-inl.h
third_party/glog/src/config.h
third_party/glog/src/stacktrace_libunwind-inl.h
third_party/glog/src/stacktrace_x86_64-inl.h
third_party/glog/src/utilities.h
third_party/glog/src/base/commandlineflags.h
third_party/glog/src/base/googleinit.h
third_party/glog/src/base/mutex.h
third_party/glog/src/windows/config.h
third_party/glog/src/windows/port.h
third_party/glog/src/windows/glog/log_severity.h
third_party/glog/src/windows/glog/logging.h
third_party/glog/src/windows/glog/raw_logging.h
third_party/glog/src/windows/glog/vlog_is_on.h
third_party/glog/src/windows/glog/logging.h
third_party/glog/src/windows/glog/log_severity.h
third_party/glog/src/windows/port.h
third_party/glog/src/windows/config.h
)
list(APPEND INC
@@ -184,7 +184,7 @@ if(WIN32)
string(REPLACE "${FLAG}" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
endforeach()
endif()
else(WIN32)
else()
list(APPEND SRC
third_party/glog/src/utilities.cc
third_party/glog/src/symbolize.cc
@@ -194,25 +194,26 @@ else(WIN32)
third_party/glog/src/demangle.cc
third_party/glog/src/raw_logging.cc
third_party/glog/src/utilities.h
third_party/glog/src/stacktrace_generic-inl.h
third_party/glog/src/config.h
third_party/glog/src/config_freebsd.h
third_party/glog/src/config_linux.h
third_party/glog/src/config_mac.h
third_party/glog/src/demangle.h
third_party/glog/src/stacktrace.h
third_party/glog/src/stacktrace_x86_64-inl.h
third_party/glog/src/symbolize.h
third_party/glog/src/base/googleinit.h
third_party/glog/src/base/mutex.h
third_party/glog/src/base/commandlineflags.h
third_party/glog/src/stacktrace_generic-inl.h
third_party/glog/src/stacktrace_libunwind-inl.h
third_party/glog/src/stacktrace_powerpc-inl.h
third_party/glog/src/stacktrace_x86-inl.h
third_party/glog/src/config.h
third_party/glog/src/demangle.h
third_party/glog/src/stacktrace_libunwind-inl.h
third_party/glog/src/stacktrace_x86_64-inl.h
third_party/glog/src/symbolize.h
third_party/glog/src/utilities.h
third_party/glog/src/base/commandlineflags.h
third_party/glog/src/base/googleinit.h
third_party/glog/src/base/mutex.h
third_party/glog/src/glog/log_severity.h
third_party/glog/src/glog/logging.h
third_party/glog/src/glog/raw_logging.h
third_party/glog/src/glog/vlog_is_on.h
third_party/glog/src/glog/logging.h
third_party/glog/src/glog/log_severity.h
third_party/glog/src/config_linux.h
)
list(APPEND INC
@@ -220,6 +221,9 @@ else(WIN32)
)
endif()
add_definitions(-DV3DLIB_ENABLE_SUITESPARSE -DGOOGLE_GLOG_DLL_DECL=)
add_definitions(
-DV3DLIB_ENABLE_SUITESPARSE
-DGOOGLE_GLOG_DLL_DECL=
)
blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}")

View File

@@ -546,6 +546,11 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
if tool == 'ROTATE':
row = col.row(align=True)
row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
if tool != 'SMOOTH':
col.separator()

View File

@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 260
#define BLENDER_SUBVERSION 7
#define BLENDER_SUBVERSION 8
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0

View File

@@ -384,6 +384,7 @@ void brush_reset_sculpt(Brush *br)
br->sub_col[1] = 1.000000;
break;
case SCULPT_TOOL_ROTATE:
br->alpha = 1.0;
break;
case SCULPT_TOOL_SMOOTH:
br->flag &= ~BRUSH_SPACE_ATTEN;

View File

@@ -12737,6 +12737,16 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 8))
{
Brush *brush;
for (brush= main->brush.first; brush; brush= brush->id.next) {
if (brush->sculpt_tool == SCULPT_TOOL_ROTATE)
brush->alpha= 1.0f;
}
}
/* put compatibility code here until next subversion bump */
{
/* nothing! */

View File

@@ -648,9 +648,11 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
return feather;
case SCULPT_TOOL_GRAB:
case SCULPT_TOOL_ROTATE:
return feather;
case SCULPT_TOOL_ROTATE:
return alpha*pressure*feather;
default:
return 0;
}
@@ -1502,13 +1504,20 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
float bstrength= ss->cache->bstrength;
float an[3];
int n;
float m[3][3];
float m[4][4], rot[4][4], lmat[4][4], ilmat[4][4];
static const int flip[8] = { 1, -1, -1, 1, -1, 1, 1, -1 };
float angle = ss->cache->vertex_rotation * flip[ss->cache->mirror_symmetry_pass];
calc_sculpt_normal(sd, ob, an, nodes, totnode);
axis_angle_to_mat3(m, an, angle);
unit_m4(m);
unit_m4(lmat);
copy_v3_v3(lmat[3], ss->cache->location);
invert_m4_m4(ilmat, lmat);
axis_angle_to_mat4(rot, an, angle);
mul_serie_m4(m, lmat, rot, ilmat, NULL, NULL, NULL, NULL, NULL);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
for(n=0; n<totnode; n++) {
@@ -1532,7 +1541,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist,
an, origno[vd.i], NULL);
mul_v3_m3v3(proxy[vd.i], m, origco[vd.i]);
mul_v3_m4v3(proxy[vd.i], m, origco[vd.i]);
sub_v3_v3(proxy[vd.i], origco[vd.i]);
mul_v3_fl(proxy[vd.i], fade);
@@ -3160,7 +3169,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, st
dx = cache->mouse[0] - cache->initial_mouse[0];
dy = cache->mouse[1] - cache->initial_mouse[1];
cache->vertex_rotation = -atan2(dx, dy);
cache->vertex_rotation = -atan2(dx, dy) * cache->bstrength;
sd->draw_anchored = 1;
copy_v2_v2(sd->anchored_initial_mouse, cache->initial_mouse);

View File

@@ -483,6 +483,7 @@ void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *tre
}
else {
*ntree= NULL;
*edittree= NULL;
if(treetype) *treetype= 0;
}
}

View File

@@ -255,7 +255,7 @@ typedef struct Curve {
#define CU_STRETCH 128
#define CU_OFFS_PATHDIST 256
#define CU_FAST 512 /* Font: no filling inside editmode */
#define CU_RETOPO 1024
/* #define CU_RETOPO 1024 */ /* DEPRECATED */
#define CU_DS_EXPAND 2048
#define CU_PATH_RADIUS 4096 /* make use of the path radius if this is enabled (default for new curves) */
#define CU_DEFORM_FILL 8192 /* fill 2d curve after deformation */

View File

@@ -118,7 +118,7 @@ typedef struct MSticky {
typedef struct MSelect {
int index;
int type;
int type; /* EDITVERT/EDITEDGE/EDITFACE */
} MSelect;
/*tesselation uv face data*/
@@ -221,11 +221,6 @@ typedef struct MRecast{
#define ME_SHARP (1<<9) /* only reason this flag remains a 'short' */
/* puno = vertexnormal (mface) */
/* render assumes flips to be ordered like this */
#define ME_FLIPV1 1
#define ME_FLIPV2 2
#define ME_FLIPV3 4
#define ME_FLIPV4 8
#define ME_PROJXY 16
#define ME_PROJXZ 32
#define ME_PROJYZ 64

View File

@@ -421,8 +421,8 @@ typedef struct SoftBody {
#define OB_SB_SELF 512
#define OB_SB_FACECOLL 1024
#define OB_SB_EDGECOLL 2048
#define OB_SB_COLLFINAL 4096 /* deprecated */
#define OB_SB_BIG_UI 8192
/* #define OB_SB_COLLFINAL 4096 */ /* deprecated */
/* #define OB_SB_BIG_UI 8192 */ /* deprecated */
#define OB_SB_AERO_ANGLE 16384
/* sb->solverflags */

View File

@@ -553,23 +553,6 @@ typedef struct SpaceClip {
#define BUTS_CONSTRAINT 13
#define BUTS_EFFECTS 14
/* sbuts->tab new (deprecated) */
#define TAB_SHADING_MAT 0
#define TAB_SHADING_TEX 1
#define TAB_SHADING_RAD 2
#define TAB_SHADING_WORLD 3
#define TAB_SHADING_LAMP 4
#define TAB_OBJECT_OBJECT 0
#define TAB_OBJECT_PHYSICS 1
#define TAB_OBJECT_PARTICLE 2
#define TAB_SCENE_RENDER 0
#define TAB_SCENE_WORLD 1
#define TAB_SCENE_ANIM 2
#define TAB_SCENE_SOUND 3
#define TAB_SCENE_SEQUENCER 4
/* buts->mainb new */
#define BCONTEXT_RENDER 0
#define BCONTEXT_SCENE 1
@@ -684,7 +667,7 @@ enum FileSortTypeE {
/* Selection Flags in filesel: struct direntry, unsigned char selflag */
#define ACTIVE_FILE (1<<1)
/* #define ACTIVE_FILE (1<<1) */ /* UNUSED */
#define HILITED_FILE (1<<2)
#define SELECTED_FILE (1<<3)
#define EDITING_FILE (1<<4)

View File

@@ -510,7 +510,7 @@ typedef struct ColorMapping {
#define MTEX_BLEND_SAT 11
#define MTEX_BLEND_VAL 12
#define MTEX_BLEND_COLOR 13
#define MTEX_NUM_BLENDTYPES 14
/* free for use */
#define MTEX_SOFT_LIGHT 15
#define MTEX_LIN_LIGHT 16

View File

@@ -572,7 +572,7 @@ void rna_Main_armatures_tag(Main *bmain, int value) { tag_main_lb(&bmain->armatu
void rna_Main_actions_tag(Main *bmain, int value) { tag_main_lb(&bmain->action, value); }
void rna_Main_particles_tag(Main *bmain, int value) { tag_main_lb(&bmain->particle, value); }
void rna_Main_gpencil_tag(Main *bmain, int value) { tag_main_lb(&bmain->gpencil, value); }
void rna_Main_movieclips_tag(Main *bmain, int value) { tag_main_lb(&bmain->text, value); }
void rna_Main_movieclips_tag(Main *bmain, int value) { tag_main_lb(&bmain->movieclip, value); }
static int rna_Main_cameras_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_CA); }
static int rna_Main_scenes_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SCE); }

View File

@@ -2073,6 +2073,8 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "dscale");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3);
RNA_def_property_float_array_default(prop, default_scale);
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");