Merged changes in the trunk up to revision 45431.

This commit is contained in:
2012-04-06 03:37:27 +00:00
84 changed files with 2075 additions and 1775 deletions
+35 -11
View File
@@ -1,4 +1,4 @@
.TH "BLENDER" "1" "December 10, 2011" "Blender Blender 2\&.60 (sub 7)"
.TH "BLENDER" "1" "April 05, 2012" "Blender Blender 2\&.62 (sub 3)"
.SH NAME
blender \- a 3D modelling and rendering package
@@ -15,7 +15,7 @@ Use Blender to create TV commercials, to make technical visualizations, business
http://www.blender.org
.SH OPTIONS
Blender 2.60 (sub 7)
Blender 2.62 (sub 3)
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
@@ -133,9 +133,17 @@ Use amount of <threads> for rendering in background
.SS "Animation Playback Options:"
.TP
.B \-a or \-\-render\-anim
.B \-a <options> <file(s)>
.br
Render frames from start to end (inclusive)
Playback <file(s)>, only operates this way when not running in background.
.br
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
.br
\-m Read from disk (Don't buffer)
.br
\-f <fps> <fps\-base> Specify FPS to start with
.br
\-j <frame> Set frame step to <frame>
.br
.IP
@@ -206,6 +214,12 @@ Turn debugging on
Enable floating point exceptions
.br
.TP
.B \-\-debug\-ffmpeg
.br
Enable debug messages from FFmpeg library
.br
.IP
.TP
@@ -331,17 +345,27 @@ Print this help text and exit (windows only)
.br
.TP
.B \-a <options> <file(s)>
.B \-\-debug\-python
.br
Playback <file(s)>, only operates this way when not running in background.
Enable debug messages for python
.br
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
.TP
.B \-\-debug\-events
.br
\-m Read from disk (Don't buffer)
Enable debug messages for the event system
.br
\-f <fps> <fps\-base> Specify FPS to start with
.TP
.B \-\-debug\-wm
.br
\-j <frame> Set frame step to <frame>
Enable debug messages for the window manager
.br
.TP
.B \-\-debug\-all
.br
Enable all debug messages (excludes libmv)
.br
.TP
@@ -378,7 +402,7 @@ Arguments are executed in the order they are given. eg
\fIBLENDER_USER_CONFIG\fR Directory for user configuration files.
\fIBLENDER_USER_SCRIPTS\fR Directory for user scripts.
\fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts.
\fIBLENDER_USER_DAT`AFILES\fR Directory for user data files (icons, translations, ..).
\fIDirectory\fR for user data files (icons, translations, ..).
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
@@ -174,6 +174,13 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
default=0,
)
cls.sample_clamp = FloatProperty(
name="Clamp",
description="If non-zero, the maximum value for a sample, higher values will be scaled down to avoid too much noise and slow convergence at the cost of accuracy.",
min=0.0, max=1e8,
default=0.0,
)
cls.debug_tile_size = IntProperty(
name="Tile Size",
description="",
+2 -1
View File
@@ -67,6 +67,7 @@ class CyclesRender_PT_integrator(CyclesButtonsPanel, Panel):
sub.prop(cscene, "samples", text="Render")
sub.prop(cscene, "preview_samples", text="Preview")
sub.prop(cscene, "seed")
sub.prop(cscene, "sample_clamp")
sub = col.column(align=True)
sub.label("Transparency:")
@@ -727,7 +728,7 @@ class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
row = layout.row()
row.column().prop(mapping, "location")
row.column().prop(mapping, "translation")
row.column().prop(mapping, "rotation")
row.column().prop(mapping, "scale")
+2 -2
View File
@@ -80,7 +80,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping)
if(!b_mapping)
return;
mapping->translation = get_float3(b_mapping.location());
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
@@ -94,7 +94,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_map
if(!b_mapping)
return;
mapping->translation = get_float3(b_mapping.location());
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
}
+2
View File
@@ -157,6 +157,8 @@ void BlenderSync::sync_integrator()
integrator->layer_flag = render_layer.layer;
integrator->sample_clamp = get_float(cscene, "sample_clamp");
if(integrator->modified(previntegrator))
integrator->tag_update(scene);
}
+1 -1
View File
@@ -300,7 +300,7 @@ public:
/* full shading only on NVIDIA cards at the moment */
if(platform_name == "NVIDIA CUDA")
build_options += "-D__KERNEL_SHADING__ -D__MULTI_CLOSURE__ -cl-nv-maxrregcount=24 -cl-nv-verbose ";
build_options += "-D__MULTI_CLOSURE__ -cl-nv-maxrregcount=24 -cl-nv-verbose ";
if(platform_name == "Apple" || platform_name == "AMD Accelerated Parallel Processing")
build_options += " -D__CL_NO_FLOAT3__ ";
+44
View File
@@ -294,5 +294,49 @@ __device_inline float3 path_radiance_sum(PathRadiance *L)
#endif
}
__device_inline void path_radiance_clamp(PathRadiance *L, float3 *L_sum, float clamp)
{
float sum = fabsf(L_sum->x) + fabsf(L_sum->y) + fabsf(L_sum->z);
if(!isfinite(sum)) {
/* invalid value, reject */
*L_sum = make_float3(0.0f, 0.0f, 0.0f);
#ifdef __PASSES__
if(L->use_light_pass) {
L->direct_diffuse = make_float3(0.0f, 0.0f, 0.0f);
L->direct_glossy = make_float3(0.0f, 0.0f, 0.0f);
L->direct_transmission = make_float3(0.0f, 0.0f, 0.0f);
L->indirect_diffuse = make_float3(0.0f, 0.0f, 0.0f);
L->indirect_glossy = make_float3(0.0f, 0.0f, 0.0f);
L->indirect_transmission = make_float3(0.0f, 0.0f, 0.0f);
L->emission = make_float3(0.0f, 0.0f, 0.0f);
}
#endif
}
else if(sum > clamp) {
/* value to high, scale down */
float scale = clamp/sum;
*L_sum *= scale;
#ifdef __PASSES__
if(L->use_light_pass) {
L->direct_diffuse *= scale;
L->direct_glossy *= scale;
L->direct_transmission *= scale;
L->indirect_diffuse *= scale;
L->indirect_glossy *= scale;
L->indirect_transmission *= scale;
L->emission *= scale;
}
#endif
}
}
CCL_NAMESPACE_END
+4
View File
@@ -396,6 +396,10 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
float3 L_sum = path_radiance_sum(&L);
#ifdef __CLAMP_SAMPLE__
path_radiance_clamp(&L, &L_sum, kernel_data.integrator.sample_clamp);
#endif
kernel_write_light_passes(kg, buffer, &L, sample);
return make_float4(L_sum.x, L_sum.y, L_sum.z, 1.0f - L_transparent);
+8 -2
View File
@@ -45,7 +45,7 @@ CCL_NAMESPACE_BEGIN
#endif
#ifdef __KERNEL_OPENCL__
//#define __KERNEL_SHADING__
#define __KERNEL_SHADING__
//#define __KERNEL_ADV_SHADING__
#endif
@@ -60,6 +60,7 @@ CCL_NAMESPACE_BEGIN
#define __RAY_DIFFERENTIALS__
#define __CAMERA_CLIPPING__
#define __INTERSECTION_REFINE__
#define __CLAMP_SAMPLE__
#ifdef __KERNEL_SHADING__
#define __SVM__
@@ -521,7 +522,12 @@ typedef struct KernelIntegrator {
/* render layer */
int layer_flag;
int pad1, pad2;
/* clamp */
float sample_clamp;
/* padding */
int pad;
} KernelIntegrator;
typedef struct KernelBVH {
+5 -1
View File
@@ -43,6 +43,7 @@ Integrator::Integrator()
no_caustics = false;
seed = 0;
layer_flag = ~0;
sample_clamp = 0.0f;
need_update = true;
}
@@ -85,6 +86,8 @@ void Integrator::device_update(Device *device, DeviceScene *dscene)
kintegrator->use_ambient_occlusion =
((dscene->data.film.pass_flag & PASS_AO) || dscene->data.background.ao_factor != 0.0f);
kintegrator->sample_clamp = (sample_clamp == 0.0f)? FLT_MAX: sample_clamp*3.0f;
/* sobol directions table */
int dimensions = PRNG_BASE_NUM + (max_bounce + transparent_max_bounce + 2)*PRNG_BOUNCE_NUM;
@@ -117,7 +120,8 @@ bool Integrator::modified(const Integrator& integrator)
transparent_shadows == integrator.transparent_shadows &&
no_caustics == integrator.no_caustics &&
layer_flag == integrator.layer_flag &&
seed == integrator.seed);
seed == integrator.seed &&
sample_clamp == integrator.sample_clamp);
}
void Integrator::tag_update(Scene *scene)
+2
View File
@@ -45,6 +45,8 @@ public:
int seed;
int layer_flag;
float sample_clamp;
bool need_update;
Integrator();
+4 -4
View File
@@ -164,7 +164,7 @@ void Session::run_gpu()
paused_time = 0.0;
if(!params.background)
progress.set_start_time(start_time - paused_time);
progress.set_start_time(start_time + paused_time);
while(!progress.get_cancel()) {
/* advance to next tile */
@@ -191,7 +191,7 @@ void Session::run_gpu()
paused_time += time_dt() - pause_start;
if(!params.background)
progress.set_start_time(start_time - paused_time);
progress.set_start_time(start_time + paused_time);
update_status_time(pause, no_tiles);
progress.set_update();
@@ -340,7 +340,7 @@ void Session::run_cpu()
paused_time += time_dt() - pause_start;
if(!params.background)
progress.set_start_time(start_time - paused_time);
progress.set_start_time(start_time + paused_time);
update_status_time(pause, no_tiles);
progress.set_update();
@@ -473,7 +473,7 @@ void Session::reset_(BufferParams& buffer_params, int samples)
sample = 0;
if(!params.background)
progress.set_start_time(start_time - paused_time);
progress.set_start_time(start_time + paused_time);
}
void Session::reset(BufferParams& buffer_params, int samples)
+1
View File
@@ -64,6 +64,7 @@ CCL_NAMESPACE_BEGIN
#define copysignf(x, y) ((float)_copysign(x, y))
#define hypotf(x, y) _hypotf(x, y)
#define isnan(x) _isnan(x)
#define isfinite(x) _finite(x)
#endif
#endif
Binary file not shown.
@@ -11,6 +11,7 @@
bone_pose="#50c8ff"
bone_solid="#c8c8c8"
bundle_solid="#c8c8c8"
camera="#000000"
camera_path="#5a5a5a"
frame_current="#60c040"
edge_crease="#cc0099"
@@ -19,6 +20,7 @@
edge_select="#ffa000"
edge_sharp="#ff2020"
edge_facesel="#6b6b6b"
empty="#000000"
face="#73828f12"
extra_face_angle="#00c900"
extra_face_area="#fff000"
@@ -404,6 +406,7 @@
</properties>
<sequence_editor>
<ThemeSequenceEditor audio_strip="#2e8f8f"
movieclip_strip="#20208f"
frame_current="#2f5f23"
draw_action="#50c8ff"
effect_strip="#a9547c"
@@ -412,8 +415,8 @@
keyframe="#ff8500"
meta_strip="#6d9183"
movie_strip="#516987"
movieclip_strip="#20208f"
plugin_strip="#7e7e50"
preview_back="#000000"
scene_strip="#4e983e"
transition_strip="#a25f6f"
window_sliders="#a0a0a0">
@@ -688,6 +691,18 @@
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tool>
<wcol_tooltip>
<ThemeWidgetColors inner="#191919e6"
inner_sel="#2d2d2de6"
item="#646464ff"
outline="#000000"
shadedown="-20"
shadetop="25"
show_shaded="FALSE"
text="#ffffff"
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tooltip>
</ThemeUserInterface>
</user_interface>
<user_preferences>
@@ -11,6 +11,7 @@
bone_pose="#50c8ff"
bone_solid="#c8c8c8"
bundle_solid="#c8c8c8"
camera="#000000"
camera_path="#000000"
frame_current="#60c040"
edge_crease="#cc0099"
@@ -19,6 +20,7 @@
edge_select="#cece38"
edge_sharp="#ff2020"
edge_facesel="#4b4b4b"
empty="#000000"
face="#0032961e"
extra_face_angle="#000080"
extra_face_area="#002000"
@@ -155,10 +157,10 @@
</dopesheet_editor>
<file_browser>
<ThemeFileBrowser active_file="#828282"
active_file_text="#fafafa"
active_file_text="#ffffff"
scroll_handle="#7f7070"
scrollbar="#a0a0a0"
selected_file="#7f7f7f"
selected_file="#a0a0d0"
tiles="#b4b4b4">
<space>
<ThemeSpaceGeneric header="#b4b4b4"
@@ -171,7 +173,7 @@
text="#000000"
text_hi="#0f0f0f"
title="#000000"
back="#b4b4b4">
back="#808080">
</ThemeSpaceGeneric>
</space>
<space_list>
@@ -260,7 +262,7 @@
text="#000000"
text_hi="#ffffff"
title="#000000"
back="#757575">
back="#353535">
</ThemeSpaceGeneric>
</space>
</ThemeImageEditor>
@@ -379,7 +381,7 @@
text="#000000"
text_hi="#ffffff"
title="#000000"
back="#b4b4b4">
back="#999999">
</ThemeSpaceGeneric>
</space>
</ThemeOutliner>
@@ -404,6 +406,7 @@
</properties>
<sequence_editor>
<ThemeSequenceEditor audio_strip="#2e8f8f"
movieclip_strip="#20208f"
frame_current="#60c040"
draw_action="#50c8ff"
effect_strip="#a9547c"
@@ -412,8 +415,8 @@
keyframe="#ff8500"
meta_strip="#6d9183"
movie_strip="#516987"
movieclip_strip="#20208f"
plugin_strip="#7e7e50"
preview_back="#000000"
scene_strip="#4e983e"
transition_strip="#a25f6f"
window_sliders="#a0a0a0">
@@ -688,6 +691,18 @@
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tool>
<wcol_tooltip>
<ThemeWidgetColors inner="#ffffddff"
inner_sel="#2d2d2de6"
item="#646464ff"
outline="#000000"
shadedown="-20"
shadetop="25"
show_shaded="FALSE"
text="#000000"
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tooltip>
</ThemeUserInterface>
</user_interface>
<user_preferences>
@@ -11,6 +11,7 @@
bone_pose="#50c8ff"
bone_solid="#c8c8c8"
bundle_solid="#c8c8c8"
camera="#000000"
camera_path="#000000"
frame_current="#60c040"
edge_crease="#cc0099"
@@ -19,6 +20,7 @@
edge_select="#cb7027"
edge_sharp="#00ffff"
edge_facesel="#4b4b4b"
empty="#000000"
face="#00000036"
extra_face_angle="#000080"
extra_face_area="#002000"
@@ -404,6 +406,7 @@
</properties>
<sequence_editor>
<ThemeSequenceEditor audio_strip="#2e8f8f"
movieclip_strip="#20208f"
frame_current="#60c040"
draw_action="#50c8ff"
effect_strip="#a9547c"
@@ -412,8 +415,8 @@
keyframe="#ff8500"
meta_strip="#6d9183"
movie_strip="#516987"
movieclip_strip="#20208f"
plugin_strip="#7e7e50"
preview_back="#000000"
scene_strip="#4e983e"
transition_strip="#a25f6f"
window_sliders="#a0a0a0">
@@ -688,6 +691,18 @@
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tool>
<wcol_tooltip>
<ThemeWidgetColors inner="#191919e6"
inner_sel="#2d2d2de6"
item="#646464ff"
outline="#000000"
shadedown="-20"
shadetop="25"
show_shaded="FALSE"
text="#ffffff"
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tooltip>
</ThemeUserInterface>
</user_interface>
<user_preferences>
@@ -11,6 +11,7 @@
bone_pose="#50c8ff"
bone_solid="#c8c8c8"
bundle_solid="#c8c8c8"
camera="#000000"
camera_path="#000000"
frame_current="#60c040"
edge_crease="#cc0099"
@@ -19,6 +20,7 @@
edge_select="#1151ce"
edge_sharp="#ff2020"
edge_facesel="#4b4b4b"
empty="#000000"
face="#affff418"
extra_face_angle="#00008a"
extra_face_area="#002000"
@@ -404,6 +406,7 @@
</properties>
<sequence_editor>
<ThemeSequenceEditor audio_strip="#2e8f8f"
movieclip_strip="#20208f"
frame_current="#60c040"
draw_action="#50c8ff"
effect_strip="#a9547c"
@@ -412,8 +415,8 @@
keyframe="#ff8500"
meta_strip="#6d9183"
movie_strip="#516987"
movieclip_strip="#20208f"
plugin_strip="#7e7e50"
preview_back="#000000"
scene_strip="#4e983e"
transition_strip="#a25f6f"
window_sliders="#a0a0a0">
@@ -688,6 +691,18 @@
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tool>
<wcol_tooltip>
<ThemeWidgetColors inner="#191919e6"
inner_sel="#2d2d2de6"
item="#646464ff"
outline="#000000"
shadedown="-20"
shadetop="25"
show_shaded="FALSE"
text="#ffffff"
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tooltip>
</ThemeUserInterface>
</user_interface>
<user_preferences>
@@ -11,6 +11,7 @@
bone_pose="#50c8ff"
bone_solid="#c8c8c8"
bundle_solid="#c8c8c8"
camera="#000000"
camera_path="#000000"
frame_current="#60c040"
edge_crease="#ce33b8"
@@ -19,6 +20,7 @@
edge_select="#f68d46"
edge_sharp="#ff4c00"
edge_facesel="#4b4b4b"
empty="#000000"
face="#75757512"
extra_face_angle="#002000"
extra_face_area="#0059ee"
@@ -404,6 +406,7 @@
</properties>
<sequence_editor>
<ThemeSequenceEditor audio_strip="#2e8f8f"
movieclip_strip="#20208f"
frame_current="#c06e11"
draw_action="#50c8ff"
effect_strip="#a9547c"
@@ -412,8 +415,8 @@
keyframe="#f47421"
meta_strip="#6d9183"
movie_strip="#516987"
movieclip_strip="#20208f"
plugin_strip="#7e7e50"
preview_back="#000000"
scene_strip="#4e983e"
transition_strip="#a25f6f"
window_sliders="#a0a0a0">
@@ -688,6 +691,18 @@
text_sel="#f47421">
</ThemeWidgetColors>
</wcol_tool>
<wcol_tooltip>
<ThemeWidgetColors inner="#191919e6"
inner_sel="#2d2d2de6"
item="#646464ff"
outline="#000000"
shadedown="-20"
shadetop="25"
show_shaded="FALSE"
text="#ffffff"
text_sel="#ffffff">
</ThemeWidgetColors>
</wcol_tooltip>
</ThemeUserInterface>
</user_interface>
<user_preferences>
@@ -289,7 +289,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
row.prop(itasc, "damping_max", text="Damp", slider=True)
row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
from .properties_animviz import (
from bl_ui.properties_animviz import (
MotionPathButtonsPanel,
OnionSkinButtonsPanel,
)
@@ -93,7 +93,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
col.label(text="Twisting:")
col.prop(curve, "twist_mode", text="")
col.prop(curve, "twist_smooth", text="Smooth")
if is_text:
elif is_text:
col.label(text="Display:")
col.prop(curve, "use_fast_edit", text="Fast Editing")
@@ -116,9 +116,9 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
if is_curve:
col.label(text="Path / Curve-Deform:")
sub = col.column()
rowsub = sub.row()
rowsub.prop(curve, "use_radius")
rowsub.prop(curve, "use_stretch")
subsub = sub.row()
subsub.prop(curve, "use_radius")
subsub.prop(curve, "use_stretch")
sub.prop(curve, "use_deform_bounds")
@@ -322,10 +322,10 @@ class DATA_PT_font(CurveButtonsPanel, Panel):
split = layout.split()
col = split.column()
colsub = col.column(align=True)
colsub.label(text="Underline:")
colsub.prop(text, "underline_position", text="Position")
colsub.prop(text, "underline_height", text="Thickness")
sub = col.column(align=True)
sub.label(text="Underline:")
sub.prop(text, "underline_position", text="Position")
sub.prop(text, "underline_height", text="Thickness")
col = split.column()
col.label(text="Character:")
@@ -233,7 +233,10 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
sub.prop(ob, "use_shape_key_edit_mode", text="")
sub = row.row()
sub.operator("object.shape_key_clear", icon='X', text="")
if key.use_relative:
sub.operator("object.shape_key_clear", icon='X', text="")
else:
sub.operator("object.shape_key_retime", icon='RECOVER_LAST', text="")
row = layout.row()
row.prop(kb, "name")
@@ -259,8 +262,9 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
col.prop_search(kb, "relative_key", key, "key_blocks", text="")
else:
row = layout.row()
row = layout.column()
row.active = enable_edit_value
row.prop(key, "eval_time")
row.prop(key, "slurph")
@@ -283,7 +283,7 @@ class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
row.prop(ob, "slow_parent_offset", text="Offset")
from .properties_animviz import (
from bl_ui.properties_animviz import (
MotionPathButtonsPanel,
OnionSkinButtonsPanel,
)
@@ -21,7 +21,7 @@ import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
from .properties_physics_common import (
from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
basic_force_field_settings_ui,
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Menu, Panel
from .properties_physics_common import (
from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
@@ -17,11 +17,10 @@
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
from bpy.types import Panel
from .properties_physics_common import (
from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from .properties_physics_common import (
from bl_ui.properties_physics_common import (
basic_force_field_settings_ui,
basic_force_field_falloff_ui,
)
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from .properties_physics_common import (
from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from .properties_physics_common import (
from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
@@ -52,7 +52,7 @@ class TEXTURE_MT_envmap_specials(Menu):
layout.operator("texture.envmap_clear", icon='FILE_REFRESH')
layout.operator("texture.envmap_clear_all", icon='FILE_REFRESH')
from .properties_material import active_node_mat
from bl_ui.properties_material import active_node_mat
def context_tex_datablock(context):
@@ -210,7 +210,7 @@ class DOPESHEET_MT_marker(Menu):
def draw(self, context):
layout = self.layout
from .space_time import marker_menu_generic
from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout)
st = context.space_data
+2 -2
View File
@@ -26,7 +26,7 @@ class GRAPH_HT_header(Header):
bl_space_type = 'GRAPH_EDITOR'
def draw(self, context):
from .space_dopesheet import dopesheet_filter
from bl_ui.space_dopesheet import dopesheet_filter
layout = self.layout
@@ -144,7 +144,7 @@ class GRAPH_MT_marker(Menu):
def draw(self, context):
layout = self.layout
from .space_time import marker_menu_generic
from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout)
# TODO: pose markers for action edit mode only?
+1 -1
View File
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
from .properties_paint_common import UnifiedPaintPanel
from bl_ui.properties_paint_common import UnifiedPaintPanel
class ImagePaintPanel(UnifiedPaintPanel):
+1 -1
View File
@@ -362,7 +362,7 @@ class INFO_MT_help(Menu):
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-262/'
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-263/'
layout.separator()
+2 -2
View File
@@ -26,7 +26,7 @@ class NLA_HT_header(Header):
bl_space_type = 'NLA_EDITOR'
def draw(self, context):
from .space_dopesheet import dopesheet_filter
from bl_ui.space_dopesheet import dopesheet_filter
layout = self.layout
@@ -104,7 +104,7 @@ class NLA_MT_marker(Menu):
def draw(self, context):
layout = self.layout
from .space_time import marker_menu_generic
from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout)
@@ -162,7 +162,7 @@ class SEQUENCER_MT_marker(Menu):
def draw(self, context):
layout = self.layout
from .space_time import marker_menu_generic
from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout)
@@ -845,7 +845,7 @@ class USERPREF_PT_file(Panel):
col.prop(system, "use_tabs_as_spaces")
from .space_userpref_keymap import InputKeyMapPanel
from bl_ui.space_userpref_keymap import InputKeyMapPanel
class USERPREF_MT_ndof_settings(Menu):
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
from .properties_paint_common import UnifiedPaintPanel
from bl_ui.properties_paint_common import UnifiedPaintPanel
class VIEW3D_HT_header(Header):
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel
from .properties_paint_common import UnifiedPaintPanel
from bl_ui.properties_paint_common import UnifiedPaintPanel
class View3DPanel():
@@ -144,7 +144,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="Remove:")
col.operator("mesh.delete")
col.menu("VIEW3D_MT_edit_mesh_delete")
col.operator("mesh.merge")
col.operator("mesh.remove_doubles")
+10 -10
View File
@@ -12,18 +12,18 @@
</style>
</head>
<body>
<p class="title"><b>Blender 2.62</b></p>
<p class="title"><b>Blender 2.63</b></p>
<p><br></p>
<p class="header"><b>About</b></p>
<p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and FreeBSD and has a large world-wide community.</p>
<p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows and FreeBSD and has a large world-wide community.</p>
<p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
<p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
<p><br></p>
<p class="header"><b>2.62</b></p>
<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.62. This release is the third official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features again.<a href="http://www.blender.org/development/release-logs/blender-262/">More information about this release</a>.</p>
<p class="header"><b>2.63</b></p>
<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.63. This release is the fourth official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features. <a href="http://www.blender.org/development/release-logs/blender-263/">More information about this release</a>.</p>
<p><br></p>
<p class="header"><b>Bugs</b></p>
<p class="body">Although Blender 2.62 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. If it wasnt reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
<p class="body">Although Blender 2.63 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. If it wasnt reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
<p><br></p>
<p class="header"><b>Package Contents</b></p>
<p class="body">The downloaded Blender package includes:</p>
@@ -33,23 +33,23 @@
<p><br></p>
<p class="header"><b>Installation</b></p>
<p class="body"><b>Windows: </b>The download .zip contains a Blender folder. You may put this anywhere on your hard drive. To launch Blender, double-click on Blender.exe.</p>
<p class="body"><b>Linux, FreeBSD, Solaris: </b>Unpack the archive, Then run the Blender executable.</p>
<p class="body"><b>Linux, FreeBSD: </b>Unpack the archive, Then run the Blender executable.</p>
<p class="body"><b>Mac OS X: </b>The downloaded package includes blender.app. Optionally copy this to your Applications folder, and add it to the dock by dragging it from there to the dock.</p>
<p></p>
<p class="body"><b>Installing Addons (all systems)</b> Addons can be installed from the user preferences addons section, download an addon as a .py or .zip file, then press the "Install Addon" button and select the file to install it.</p>
<p><br></p>
<p class="header"><b>Getting Started</b></p>
<p class="body">When opening Blender, youll see large 3D view in the center, a Toolbar on the left, a Properties area and an Outliner area on the right and a Timeline at the bottom.</p>
<p class="body">When opening Blender, youll see large 3D view in the center, a Toolbar on the left, a Properties editor and an Outliner on the right and a Timeline at the bottom.</p>
<p class="body">Orbit around in the 3D view by holding the middle mouse button and dragging. Alternatively, hold the alt key and drag the left mouse button. Additionally, hold Shift to pan the view and Ctrl to zoom.</p>
<p class="body">Select objects using the right mouse button. With the object selected, perform actions by clicking any of the tool buttons on the left, or make changes to its properties by altering any of the setting on the right.</p>
<p class="body">For more information on how to use Blender, <a href="http://www.blender.org/education-help/">watch tutorials</a> or <a href="http://wiki.blender.org/index.php/Doc:Manual">read the manual</a>.</p>
<p class="body">For more information on how to use Blender, <a href="http://www.blender.org/education-help/">watch tutorials</a> or <a href="http://wiki.blender.org/index.php/Doc:2.6/Manual">read the manual</a>.</p>
<p><br></p>
<p class="header"><b>Links</b></p>
<p class="body">Users:</p>
<p class="body"> General information <a href="http://www.blender.org">www.blender.org</a> <br>
Full release log <a href="http://www.blender.org/development/release-logs/blender-262/">www.blender.org/development/release-logs/blender-262/</a><br>
Full release log <a href="http://www.blender.org/development/release-logs/blender-263/">www.blender.org/development/release-logs/blender-263/</a><br>
Tutorials <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a> <br>
Manual <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
Manual <a href="http://wiki.blender.org/index.php/Doc:2.6/Manual">wiki.blender.org/index.php/Doc:2.6/Manual</a><br>
User Forum <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
IRC <a href="irc://irc.freenode.net/#blenderchat">#blenderchat</a> or <a href="irc://irc.freenode.net/#blender">#blender</a> on irc.freenode.net<br>
</p>
@@ -105,6 +105,7 @@ static const char *locales[] = {
"indonesian", "id_ID",
"serbian (latin)", "sr_RS@latin",
"kyrgyz", "ky_KG",
"turkish", "tr_TR",
};
void BLF_lang_init(void)
@@ -867,7 +867,7 @@ DO_INLINE int get_bin_float(float f)
return bin;
}
DO_INLINE void save_sample_line(Scopes *scopes, const int idx, const float fx, float *rgb, float *ycc)
DO_INLINE void save_sample_line(Scopes *scopes, const int idx, const float fx, const float rgb[3], const float ycc[3])
{
float yuv[3];
@@ -2251,8 +2251,11 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest,
const LayerTypeInfo *typeInfo;
int dest_i, src_i;
if (!*dest_block)
if (!*dest_block) {
CustomData_bmesh_alloc_block(dest, dest_block);
if (*dest_block)
memset(*dest_block, 0, dest->totsize);
}
/* copies a layer at a time */
dest_i = 0;
+74 -118
View File
@@ -1106,36 +1106,26 @@ static float *get_weights_array(Object *ob, char *vgroup)
static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int tot)
{
KeyBlock *k[4], *actkb= ob_get_keyblock(ob);
float cfra, ctime, t[4], delta;
int a, flag = 0, step;
if (key->slurph && key->type!=KEY_RELATIVE ) {
delta= key->slurph;
delta/= tot;
step= 1;
if (tot>100 && slurph_opt) {
step= tot/50;
delta*= step;
float t[4];
int flag = 0;
if (key->slurph && key->type != KEY_RELATIVE) {
const float ctime_scaled = key->ctime / 100.0f;
float delta = (float)key->slurph / tot;
float cfra = (float)scene->r.cfra;
int step, a;
if (tot > 100 && slurph_opt) {
step = tot / 50;
delta *= step;
/* in do_key and cp_key the case a>tot is handled */
}
cfra= (float)scene->r.cfra;
else {
step = 1;
}
for (a=0; a<tot; a+=step, cfra+= delta) {
ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if (calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
CLAMP(ctime, 0.0, 1.0);
}
#endif // XXX old animation system
// XXX for now... since speed curve cannot be directly ported yet
ctime /= 100.0f;
CLAMP(ctime, 0.0f, 1.0f); // XXX for compat, we use this, but this clamping was confusing
flag= setkeys(ctime, &key->block, k, t, 0);
flag = setkeys(ctime_scaled, &key->block, k, t, 0);
if (flag==0)
do_key(a, a+step, tot, (char *)out, key, actkb, k, t, KEY_MODE_DUMMY);
@@ -1146,9 +1136,11 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
else {
if (key->type==KEY_RELATIVE) {
KeyBlock *kb;
for (kb= key->block.first; kb; kb= kb->next)
float f = 0.0;
for (kb= key->block.first; kb; kb= kb->next, f += 0.1f) {
kb->weights= get_weights_array(ob, kb->vgroup);
// kb->pos = f;
}
do_rel_key(0, tot, tot, (char *)out, key, actkb, KEY_MODE_DUMMY);
@@ -1158,19 +1150,9 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
}
}
else {
ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if (calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
CLAMP(ctime, 0.0, 1.0);
}
#endif // XXX old animation system
// XXX for now... since speed curve cannot be directly ported yet
ctime /= 100.0f;
CLAMP(ctime, 0.0f, 1.0f); // XXX for compat, we use this, but this clamping was confusing
flag= setkeys(ctime, &key->block, k, t, 0);
const float ctime_scaled = key->ctime / 100.0f;
flag = setkeys(ctime_scaled, &key->block, k, t, 0);
if (flag==0)
do_key(0, tot, tot, (char *)out, key, actkb, k, t, KEY_MODE_DUMMY);
@@ -1199,7 +1181,7 @@ static void do_cu_key(Curve *cu, Key *key, KeyBlock *actkb, KeyBlock **k, float
}
}
static void do_rel_cu_key(Curve *cu, Key *key, KeyBlock *actkb, float UNUSED(ctime), char *out, const int tot)
static void do_rel_cu_key(Curve *cu, Key *key, KeyBlock *actkb, char *out, const int tot)
{
Nurb *nu;
int a, step;
@@ -1222,50 +1204,54 @@ static void do_curve_key(Scene *scene, Object *ob, Key *key, char *out, const in
{
Curve *cu= ob->data;
KeyBlock *k[4], *actkb= ob_get_keyblock(ob);
float cfra, ctime, t[4], delta;
int a, flag = 0, step = 0;
float t[4];
int flag = 0;
if (key->slurph && key->type!=KEY_RELATIVE) {
if (key->slurph && key->type != KEY_RELATIVE) {
const float ctime_scaled = key->ctime / 100.0f;
float delta = (float)key->slurph / tot;
float cfra = (float)scene->r.cfra;
Nurb *nu;
int mode=0, i= 0, remain= 0, estep=0, count=0;
int i = 0, remain = 0;
int step, a;
delta= (float)key->slurph / tot;
step= 1;
if (tot>100 && slurph_opt) {
step= tot/50;
delta*= step;
if (tot > 100 && slurph_opt) {
step = tot / 50;
delta *= step;
/* in do_key and cp_key the case a>tot has been handled */
}
cfra= (float)scene->r.cfra;
else {
step = 1;
}
for (nu=cu->nurb.first; nu; nu=nu->next) {
int estep, mode;
if (nu->bp) {
mode= KEY_MODE_BPOINT;
estep= nu->pntsu*nu->pntsv;
mode = KEY_MODE_BPOINT;
estep = nu->pntsu * nu->pntsv;
}
else if (nu->bezt) {
mode= KEY_MODE_BEZTRIPLE;
estep= 3*nu->pntsu;
mode = KEY_MODE_BEZTRIPLE;
estep = 3 * nu->pntsu;
}
else {
mode = 0;
estep = 0;
}
else
step= 0;
a= 0;
a = 0;
while (a < estep) {
int count;
if (remain <= 0) {
cfra+= delta;
ctime= BKE_curframe(scene);
ctime /= 100.0f;
CLAMP(ctime, 0.0f, 1.0f); // XXX for compat, we use this, but this clamping was confusing
flag= setkeys(ctime, &key->block, k, t, 0);
flag = setkeys(ctime_scaled, &key->block, k, t, 0);
remain= step;
}
count= MIN2(remain, estep);
count = MIN2(remain, estep);
if (mode == KEY_MODE_BEZTRIPLE) {
count += 3 - count % 3;
}
@@ -1282,22 +1268,14 @@ static void do_curve_key(Scene *scene, Object *ob, Key *key, char *out, const in
}
}
else {
ctime= BKE_curframe(scene);
if (key->type==KEY_RELATIVE) {
do_rel_cu_key(cu, cu->key, actkb, ctime, out, tot);
do_rel_cu_key(cu, cu->key, actkb, out, tot);
}
else {
#if 0 // XXX old animation system
if (calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
CLAMP(ctime, 0.0, 1.0);
}
#endif // XXX old animation system
flag= setkeys(ctime, &key->block, k, t, 0);
const float ctime_scaled = key->ctime / 100.0f;
flag = setkeys(ctime_scaled, &key->block, k, t, 0);
if (flag==0) do_cu_key(cu, key, actkb, k, t, out, tot);
else cp_cu_key(cu, key, actkb, k[2], 0, tot, out, tot);
}
@@ -1308,26 +1286,17 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
{
Lattice *lt= ob->data;
KeyBlock *k[4], *actkb= ob_get_keyblock(ob);
float delta, cfra, ctime, t[4];
int a, flag;
float t[4];
int flag;
if (key->slurph) {
delta= key->slurph;
delta/= (float)tot;
cfra= (float)scene->r.cfra;
if (key->slurph && key->type != KEY_RELATIVE) {
const float ctime_scaled = key->ctime / 100.0f;
float delta = (float)key->slurph / tot;
float cfra = (float)scene->r.cfra;
int a;
for (a=0; a<tot; a++, cfra+= delta) {
ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if (calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
CLAMP(ctime, 0.0, 1.0);
}
#endif // XXX old animation system
flag= setkeys(ctime, &key->block, k, t, 0);
flag = setkeys(ctime_scaled, &key->block, k, t, 0);
if (flag==0)
do_key(a, a+1, tot, out, key, actkb, k, t, KEY_MODE_DUMMY);
@@ -1350,16 +1319,9 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
}
}
else {
ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if (calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
CLAMP(ctime, 0.0, 1.0);
}
#endif // XXX old animation system
const float ctime_scaled = key->ctime / 100.0f;
flag= setkeys(ctime, &key->block, k, t, 0);
flag = setkeys(ctime_scaled, &key->block, k, t, 0);
if (flag==0)
do_key(0, tot, tot, (char *)out, key, actkb, k, t, KEY_MODE_DUMMY);
@@ -1446,7 +1408,7 @@ float *do_ob_key(Scene *scene, Object *ob)
else {
/* do shapekey local drivers */
float ctime= (float)scene->r.cfra; // XXX this needs to be checked
BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
if (ob->type==OB_MESH) do_mesh_key(scene, ob, key, out, tot);
@@ -1512,18 +1474,12 @@ KeyBlock *add_keyblock(Key *key, const char *name)
kb->slidermax= 1.0f;
// XXX kb->pos is the confusing old horizontal-line RVK crap in old IPO Editor...
if (key->type == KEY_RELATIVE)
if (key->type == KEY_RELATIVE) {
kb->pos= curpos + 0.1f;
}
else {
#if 0 // XXX old animation system
curpos= BKE_curframe(scene);
if (calc_ipo_spec(key->ipo, KEY_SPEED, &curpos)==0) {
curpos /= 100.0;
}
kb->pos= curpos;
kb->pos = key->ctime / 100.0f;
sort_keys(key);
#endif // XXX old animation system
}
return kb;
}
+24 -10
View File
@@ -866,7 +866,7 @@ static int disk_is_flagged(BMVert *v, int flag)
* \note this is a generic, flexible join faces function,
* almost everything uses this, including #BM_faces_join_pair
*/
BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const short do_del)
{
BMFace *f, *newf;
#ifdef USE_BMESH_HOLES
@@ -924,18 +924,24 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
/* don't remove an edge it makes up the side of another face
* else this will remove the face as well - campbell */
if (BM_edge_face_count(l_iter->e) <= 2) {
BLI_array_append(deledges, l_iter->e);
if (do_del) {
BLI_array_append(deledges, l_iter->e);
}
BM_ELEM_API_FLAG_ENABLE(l_iter->e, _FLAG_JF);
}
}
else {
if (d1 && !BM_ELEM_API_FLAG_TEST(l_iter->e->v1, _FLAG_JF)) {
BLI_array_append(delverts, l_iter->e->v1);
if (do_del) {
BLI_array_append(delverts, l_iter->e->v1);
}
BM_ELEM_API_FLAG_ENABLE(l_iter->e->v1, _FLAG_JF);
}
if (d2 && !BM_ELEM_API_FLAG_TEST(l_iter->e->v2, _FLAG_JF)) {
BLI_array_append(delverts, l_iter->e->v2);
if (do_del) {
BLI_array_append(delverts, l_iter->e->v2);
}
BM_ELEM_API_FLAG_ENABLE(l_iter->e->v2, _FLAG_JF);
}
}
@@ -1019,13 +1025,21 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
} while ((l_iter = l_iter->next) != l_first);
}
/* delete old geometr */
for (i = 0; i < BLI_array_count(deledges); i++) {
BM_edge_kill(bm, deledges[i]);
}
/* delete old geometry */
if (do_del) {
for (i = 0; i < BLI_array_count(deledges); i++) {
BM_edge_kill(bm, deledges[i]);
}
for (i = 0; i < BLI_array_count(delverts); i++) {
BM_vert_kill(bm, delverts[i]);
for (i = 0; i < BLI_array_count(delverts); i++) {
BM_vert_kill(bm, delverts[i]);
}
}
else {
/* otherwise we get both old and new faces */
for (i = 0; i < totface; i++) {
BM_face_kill(bm, faces[i]);
}
}
BLI_array_free(edges);
+1 -1
View File
@@ -48,7 +48,7 @@ int bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_
int bmesh_loop_reverse(BMesh *bm, BMFace *f);
BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface);
BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const short do_del);
int BM_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len,
BMEdge **e_in, int e_in_len);
+24 -3
View File
@@ -65,7 +65,25 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
int *keyi;
int totuv, i, j;
/* free custom data */
/* this isnt needed in most cases but do just incase */
CustomData_free(&bm->vdata, bm->totvert);
CustomData_free(&bm->edata, bm->totedge);
CustomData_free(&bm->ldata, bm->totloop);
CustomData_free(&bm->pdata, bm->totface);
if (!me || !me->totvert) {
if (me) { /*no verts? still copy customdata layout*/
CustomData_copy(&me->vdata, &bm->vdata, CD_MASK_BMESH, CD_ASSIGN, 0);
CustomData_copy(&me->edata, &bm->edata, CD_MASK_BMESH, CD_ASSIGN, 0);
CustomData_copy(&me->ldata, &bm->ldata, CD_MASK_BMESH, CD_ASSIGN, 0);
CustomData_copy(&me->pdata, &bm->pdata, CD_MASK_BMESH, CD_ASSIGN, 0);
CustomData_bmesh_init_pool(&bm->vdata, me->totvert, BM_VERT);
CustomData_bmesh_init_pool(&bm->edata, me->totedge, BM_EDGE);
CustomData_bmesh_init_pool(&bm->ldata, me->totloop, BM_LOOP);
CustomData_bmesh_init_pool(&bm->pdata, me->totpoly, BM_FACE);
}
return; /* sanity check */
}
@@ -99,7 +117,7 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
actkey = NULL;
}
if (actkey && actkey->totelem == me->totvert) {
if (me->key) {
CustomData_add_layer(&bm->vdata, CD_SHAPE_KEYINDEX, CD_ASSIGN, NULL, 0);
/* check if we need to generate unique ids for the shapekeys.
@@ -117,8 +135,11 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
}
}
keyco = actkey->data;
bm->shapenr = act_key_nr;
if (actkey && actkey->totelem == me->totvert) {
keyco = actkey->data;
bm->shapenr = act_key_nr;
}
for (i = 0, block = me->key->block.first; block; block = block->next, i++) {
CustomData_add_layer_named(&bm->vdata, CD_SHAPEKEY,
CD_ASSIGN, NULL, 0, block->name);
+7 -7
View File
@@ -153,7 +153,7 @@ int BM_disk_dissolve(BMesh *bm, BMVert *v)
f = e->l->f;
f2 = e->l->radial_next->f;
if (f != f2 && !BM_faces_join_pair(bm, f, f2, e)) {
if (f != f2 && !BM_faces_join_pair(bm, f, f2, e, TRUE)) {
return FALSE;
}
@@ -170,7 +170,7 @@ int BM_disk_dissolve(BMesh *bm, BMVert *v)
f = NULL;
len = bmesh_radial_length(e->l);
if (len == 2 && (e != baseedge) && (e != keepedge)) {
f = BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, e);
f = BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, e, TRUE);
/* return if couldn't join faces in manifold
* conditions */
//!disabled for testing why bad things happen
@@ -200,7 +200,7 @@ int BM_disk_dissolve(BMesh *bm, BMVert *v)
if (f != f2) {
/* join two remaining face */
if (!BM_faces_join_pair(bm, f, f2, e)) {
if (!BM_faces_join_pair(bm, f, f2, e, TRUE)) {
return FALSE;
}
}
@@ -224,7 +224,7 @@ int BM_disk_dissolve(BMesh *bm, BMVert *v)
*
* \return pointer to the combined face
*/
BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e)
BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e, const short do_del)
{
BMLoop *l1, *l2;
BMEdge *jed = NULL;
@@ -260,7 +260,7 @@ BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e)
bmesh_loop_reverse(bm, f2);
}
f1 = BM_faces_join(bm, faces, 2);
f1 = BM_faces_join(bm, faces, 2, do_del);
return f1;
}
@@ -526,7 +526,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac,
}
if (BLI_array_count(faces) >= 2) {
BMFace *f2 = BM_faces_join(bm, faces, BLI_array_count(faces));
BMFace *f2 = BM_faces_join(bm, faces, BLI_array_count(faces), TRUE);
if (f2) {
BMLoop *nl = NULL;
if (BM_face_split(bm, f2, tv, tv2, &nl, NULL, FALSE)) {
@@ -1057,7 +1057,7 @@ BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const short ccw, const short check_
f_hflag_prev_2 = l2->f->head.hflag;
/* don't delete the edge, manually remove the egde after so we can copy its attributes */
f = BM_faces_join_pair(bm, l1->f, l2->f, NULL);
f = BM_faces_join_pair(bm, l1->f, l2->f, NULL, TRUE);
if (f == NULL) {
return NULL;
+1 -1
View File
@@ -33,7 +33,7 @@ int BM_vert_dissolve(BMesh *bm, BMVert *v);
int BM_disk_dissolve(BMesh *bm, BMVert *v);
BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e);
BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e, const short do_del);
BMEdge *BM_verts_connect(BMesh *bm, BMVert *v1, BMVert *v2, BMFace **r_f);
+68 -18
View File
@@ -147,7 +147,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
while (faces[tot])
tot++;
f = BM_faces_join(bm, faces, tot);
f = BM_faces_join(bm, faces, tot, TRUE);
if (!f) {
BMO_error_raise(bm, op, BMERR_DISSOLVEFACES_FAILED,
"Could not create merged face");
@@ -210,7 +210,9 @@ void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
BMO_elem_flag_enable(bm, e->v1, VERT_MARK);
BMO_elem_flag_enable(bm, e->v2, VERT_MARK);
BM_faces_join_pair(bm, fa, fb, e);
/* BMESH_TODO - check on delaying edge removal since we may end up removing more then
* one edge, and later referene a removed edge */
BM_faces_join_pair(bm, fa, fb, e, TRUE);
}
}
@@ -263,7 +265,10 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
if (BM_edge_face_pair(e, &fa, &fb)) {
/* join faces */
BM_faces_join_pair(bm, fa, fb, e);
/* BMESH_TODO - check on delaying edge removal since we may end up removing more then
* one edge, and later referene a removed edge */
BM_faces_join_pair(bm, fa, fb, e, TRUE);
}
}
@@ -467,7 +472,29 @@ void dummy_exec(BMesh *bm, BMOperator *op)
#endif
/**/
/* Limited Dissolve */
#define UNIT_TO_ANGLE DEG2RADF(90.0)
#define ANGLE_TO_UNIT (1.0 / UNIT_TO_ANGLE)
/* multiply vertex edge angle by face angle
* this means we are not left with sharp corners between _almost_ planer faces
* convert angles [0-PI/2] -> [0-1], multiply together, then convert back to radians. */
float bm_vert_edge_face_angle(BMVert *v)
{
const float angle = BM_vert_edge_angle(v);
/*note: could be either edge, it doesnt matter */
if (v->e && BM_edge_is_manifold(v->e)) {
return ((angle * ANGLE_TO_UNIT) * (BM_edge_face_angle(v->e) * ANGLE_TO_UNIT)) * UNIT_TO_ANGLE;
}
else {
return angle;
}
}
#undef UNIT_TO_ANGLE
#undef ANGLE_TO_UNIT
typedef struct DissolveElemWeight {
BMHeader *ele;
float weight;
@@ -500,14 +527,10 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
const float angle = BM_edge_face_angle(e);
if (angle < angle_limit) {
weight_elems[i].ele = (BMHeader *)e;
weight_elems[i].weight = angle;
tot_found++;
}
else {
weight_elems[i].ele = NULL;
weight_elems[i].weight = angle_max;
}
weight_elems[i].ele = (BMHeader *)e;
weight_elems[i].weight = angle;
}
if (tot_found != 0) {
@@ -515,24 +538,44 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
for (i = 0; i < tot_found; i++) {
BMEdge *e = (BMEdge *)weight_elems[i].ele;
/* check twice because cumulative effect could dissolve over angle limit */
if (BM_edge_face_angle(e) < angle_limit) {
if (/* may have become non-manifold */
BM_edge_is_manifold(e) &&
/* check twice because cumulative effect could dissolve over angle limit */
(BM_edge_face_angle(e) < angle_limit))
{
BMFace *nf = BM_faces_join_pair(bm, e->l->f,
e->l->radial_next->f,
e); /* join faces */
e,
FALSE); /* join faces */
/* there may be some errors, we don't mind, just move on */
if (nf == NULL) {
if (nf) {
BM_face_normal_update(bm, nf);
}
else {
BMO_error_clear(bm);
}
}
}
/* remove all edges/verts left behind from dissolving */
for (i = 0; i < einput->len; i++) {
BMEdge *e = (BMEdge *)weight_elems[i].ele;
if (BM_edge_is_wire(e)) {
BMVert *v1 = e->v1;
BMVert *v2 = e->v2;
BM_edge_kill(bm, e);
if (v1->e == NULL) BM_vert_kill(bm, v1);
if (v2->e == NULL) BM_vert_kill(bm, v2);
}
}
}
/* --- second verts --- */
for (i = 0, tot_found = 0; i < vinput->len; i++) {
BMVert *v = ((BMVert **)vinput->data.p)[i];
const float angle = BM_vert_edge_angle(v);
const float angle = bm_vert_edge_face_angle(v);
if (angle < angle_limit) {
weight_elems[i].ele = (BMHeader *)v;
@@ -550,9 +593,16 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
for (i = 0; i < tot_found; i++) {
BMVert *v = (BMVert *)weight_elems[i].ele;
/* check twice because cumulative effect could dissolve over angle limit */
if (BM_vert_edge_angle(v) < angle_limit) {
BM_vert_collapse_edge(bm, v->e, v, TRUE); /* join edges */
if (/* topology changes may cause this to be un-collapsable */
(BM_vert_edge_count(v) == 2) &&
/* check twice because cumulative effect could dissolve over angle limit */
bm_vert_edge_face_angle(v) < angle_limit)
{
BMEdge *ne = BM_vert_collapse_edge(bm, v->e, v, TRUE); /* join edges */
if (ne && ne->l) {
BM_edge_normals_update(bm, ne);
}
}
}
}
@@ -333,7 +333,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
BM_edge_face_pair(e, &f1, &f2); /* checked above */
BM_faces_join_pair(bm, f1, f2, e);
BM_faces_join_pair(bm, f1, f2, e, TRUE);
}
BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
@@ -365,7 +365,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
continue;
}
BM_faces_join_pair(bm, f1, f2, e);
BM_faces_join_pair(bm, f1, f2, e, TRUE);
}
}
@@ -420,12 +420,12 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
dia *= 200.0f;
for (a = 1; a < subdiv; a++) {
if (subdiv > 1) {
BMOperator bmop;
BMO_op_initf(bm, &bmop,
"esubd edges=%fe smooth=%f numcuts=%i gridfill=%b beauty=%i",
EDGE_MARK, dia, 1, TRUE, B_SPHERE);
EDGE_MARK, dia, (1 << (subdiv-1)) - 1, TRUE, B_SPHERE);
BMO_op_exec(bm, &bmop);
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_VERT, VERT_MARK);
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_EDGE, EDGE_MARK);
+1 -1
View File
@@ -988,7 +988,7 @@ static BMesh *BME_bevel_mesh(BMesh *bm, float value, int UNUSED(res), int option
/* get rid of beveled edge */
BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
if (BMO_elem_flag_test(bm, e, BME_BEVEL_BEVEL) && BMO_elem_flag_test(bm, e, BME_BEVEL_ORIG)) {
BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, e);
BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, e, TRUE);
}
}
+5 -1
View File
@@ -1217,6 +1217,8 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
void POSE_OT_paste (wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Paste Pose";
ot->idname = "POSE_OT_paste";
@@ -1230,7 +1232,9 @@ void POSE_OT_paste (wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
prop = RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
RNA_def_boolean(ot->srna, "selected_mask", FALSE, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
}
@@ -66,7 +66,7 @@ void UI_icon_draw_preview_aspect(float x, float y, int icon_id, float aspect);
void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspect, int size);
void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, const float rgb[3]);
void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha);
void UI_icons_free(void);
void UI_icons_free_drawinfo(void *drawinfo);
@@ -858,7 +858,7 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIco
prv_img->w[size], prv_img->h[size]);
}
static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, unsigned int *rect, float alpha, float *rgb, short is_preview)
static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, unsigned int *rect, float alpha, const float rgb[3], short is_preview)
{
ImBuf *ima = NULL;
@@ -911,7 +911,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
}
}
static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int UNUSED(iw), int ih, float alpha, float *rgb)
static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int UNUSED(iw), int ih, float alpha, const float rgb[3])
{
float x1, x2, y1, y2;
@@ -954,7 +954,7 @@ static int get_draw_size(enum eIconSizes size)
return 0;
}
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview)
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, const float rgb[3], enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview)
{
bTheme *btheme = UI_GetTheme();
Icon *icon = NULL;
@@ -1147,7 +1147,7 @@ void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alph
icon_draw_at_size(x, y, icon_id, aspect, alpha, ICON_SIZE_ICON, 0);
}
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb)
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, const float rgb[3])
{
int draw_size = get_draw_size(ICON_SIZE_ICON);
icon_draw_size(x, y, icon_id, aspect, 1.0f, rgb, ICON_SIZE_ICON, draw_size, FALSE, FALSE);
@@ -1845,7 +1845,7 @@ void ui_set_but_hsv(uiBut *but)
}
/* also used by small picker, be careful with name checks below... */
static void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
static void ui_update_block_buts_rgb(uiBlock *block, const float rgb[3])
{
uiBut *bt;
float *hsv = ui_block_hsv_get(block);
@@ -2051,7 +2051,7 @@ static void square_picker(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, in
/* a HS circle, V slider, rgb/hsv/hex sliders */
static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyRNA *prop)
static void uiBlockPicker(uiBlock *block, float rgba[4], PointerRNA *ptr, PropertyRNA *prop)
{
static short colormode = 0; /* temp? 0=rgb, 1=hsv, 2=hex */
uiBut *bt;
@@ -2070,19 +2070,19 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
/* existence of profile means storage is in linear color space, with display correction */
if (block->color_profile == BLI_PR_NONE) {
BLI_strncpy(tip, "Value in Display Color Space", sizeof(tip));
copy_v3_v3(rgb_gamma, rgb);
copy_v3_v3(rgb_gamma, rgba);
}
else {
BLI_strncpy(tip, "Value in Linear RGB Color Space", sizeof(tip));
/* make an sRGB version, for Hex code */
linearrgb_to_srgb_v3_v3(rgb_gamma, rgb);
linearrgb_to_srgb_v3_v3(rgb_gamma, rgba);
}
/* sneaky way to check for alpha */
rgb[3] = FLT_MAX;
rgba[3] = FLT_MAX;
RNA_property_float_ui_range(ptr, prop, &min, &max, &step, &precision);
RNA_property_float_get_array(ptr, prop, rgb);
RNA_property_float_get_array(ptr, prop, rgba);
switch (U.color_picker_type) {
case USER_CP_CIRCLE:
@@ -2134,12 +2134,12 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv);
uiBlockEndAlign(block);
if (rgb[3] != FLT_MAX) {
if (rgba[3] != FLT_MAX) {
bt = uiDefButR_prop(block, NUMSLI, 0, "A ", 0, -120, butwidth, UI_UNIT_Y, ptr, prop, 3, 0.0, 0.0, 0, 0, "Alpha");
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
}
else {
rgb[3] = 1.0f;
rgba[3] = 1.0f;
}
BLI_snprintf(hexcol, sizeof(hexcol), "%02X%02X%02X", FTOCHAR(rgb_gamma[0]), FTOCHAR(rgb_gamma[1]), FTOCHAR(rgb_gamma[2]));
@@ -2148,7 +2148,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
uiButSetFunc(bt, do_hex_rna_cb, bt, hexcol);
uiDefBut(block, LABEL, 0, "(Gamma Corrected)", 0, -80, butwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2);
rgb_to_hsv(rgba[0], rgba[1], rgba[2], hsv, hsv + 1, hsv + 2);
picker_new_hide_reveal(block, colormode);
}
@@ -2166,6 +2166,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
else if (itemptr->type == &RNA_ShapeKey) {
Object *ob = (Object *)activeptr->data;
Key *key = (Key *)itemptr->id.data;
KeyBlock *kb = (KeyBlock *)itemptr->data;
split = uiLayoutSplit(sub, 0.66f, 0);
@@ -2177,8 +2178,8 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
else uiItemR(row, itemptr, "value", 0, "", ICON_NONE);
uiItemR(row, itemptr, "mute", 0, "", 0);
if ( (key->flag & KEYBLOCK_MUTE) ||
(ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)) )
if ((kb->flag & KEYBLOCK_MUTE) ||
(ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)))
{
uiLayoutSetActive(row, 0);
}
@@ -934,7 +934,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
}
if (ui_but_draw_menu_icon(but)) {
xs = rect->xmax - 17;
xs = rect->xmax - UI_DPI_ICON_SIZE - 1;
ys = (rect->ymin + rect->ymax - height) / 2;
UI_icon_draw_aspect(xs, ys, ICON_RIGHTARROW_THIN, aspect, alpha);
+7 -1
View File
@@ -1189,6 +1189,7 @@ void MESH_OT_vert_connect(wmOperatorType *ot)
/* identifiers */
ot->name = "Vertex Connect";
ot->idname = "MESH_OT_vert_connect";
ot->description = "Connect 2 vertices in a face with by an edge, splitting the face in half";
/* api callbacks */
ot->exec = edbm_vert_connect;
@@ -2464,6 +2465,7 @@ void MESH_OT_rip(wmOperatorType *ot)
/* identifiers */
ot->name = "Rip";
ot->idname = "MESH_OT_rip";
ot->description = "Disconnect vertex or edges from connected geometry";
/* api callbacks */
ot->invoke = edbm_rip_invoke;
@@ -3335,6 +3337,7 @@ void MESH_OT_fill(wmOperatorType *ot)
/* identifiers */
ot->name = "Fill";
ot->idname = "MESH_OT_fill";
ot->description = "Fill a selected edge loop with faces";
/* api callbacks */
ot->exec = edbm_fill_exec;
@@ -3390,8 +3393,9 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Quads to Tris";
ot->name = "Triangulate Faces";
ot->idname = "MESH_OT_quads_convert_to_tris";
ot->description = "Triangulate selected faces";
/* api callbacks */
ot->exec = edbm_quads_convert_to_tris_exec;
@@ -3434,6 +3438,7 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
/* identifiers */
ot->name = "Tris to Quads";
ot->idname = "MESH_OT_tris_convert_to_quads";
ot->description = "Join triangles into quads";
/* api callbacks */
ot->exec = edbm_tris_convert_to_quads_exec;
@@ -3562,6 +3567,7 @@ void MESH_OT_split(wmOperatorType *ot)
/* identifiers */
ot->name = "Split";
ot->idname = "MESH_OT_split";
ot->description = "Split off selected geometry from connected unselected geometry";
/* api callbacks */
ot->exec = edbm_split_exec;
@@ -214,6 +214,7 @@ void OBJECT_OT_vertex_group_move(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_add(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_remove(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_clear(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_retime(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_mirror(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_move(struct wmOperatorType *ot);
@@ -194,6 +194,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_shape_key_add);
WM_operatortype_append(OBJECT_OT_shape_key_remove);
WM_operatortype_append(OBJECT_OT_shape_key_clear);
WM_operatortype_append(OBJECT_OT_shape_key_retime);
WM_operatortype_append(OBJECT_OT_shape_key_mirror);
WM_operatortype_append(OBJECT_OT_shape_key_move);
@@ -76,9 +76,11 @@
static void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob, int from_mix)
{
if (object_insert_shape_key(scene, ob, NULL, from_mix)) {
KeyBlock *kb;
if ((kb = object_insert_shape_key(scene, ob, NULL, from_mix))) {
Key *key= ob_get_key(ob);
ob->shapenr= BLI_countlist(&key->block);
/* for absolute shape keys, new keys may not be added last */
ob->shapenr = BLI_findindex(&key->block, kb) + 1;
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -369,6 +371,41 @@ void OBJECT_OT_shape_key_clear(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* starting point and step size could be optional */
static int shape_key_retime_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_context(C);
Key *key = ob_get_key(ob);
KeyBlock *kb = ob_get_keyblock(ob);
float cfra = 0.0f;
if (!key || !kb)
return OPERATOR_CANCELLED;
for (kb=key->block.first; kb; kb=kb->next)
kb->pos = (cfra += 0.1f);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
}
void OBJECT_OT_shape_key_retime(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Re-Time Shape Keys";
ot->description = "Resets the timing for absolute shape keys";
ot->idname = "OBJECT_OT_shape_key_retime";
/* api callbacks */
ot->poll = shape_key_poll;
ot->exec = shape_key_retime_exec;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int shape_key_mirror_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
@@ -434,6 +471,8 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
BLI_insertlinkafter(&key->block, kb_other, kb);
ob->shapenr++;
}
SWAP(float, kb_other->pos, kb->pos) /* for absolute shape keys */
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -2079,7 +2079,7 @@ static int vertex_group_poll(bContext *C)
return (ob && !ob->id.lib && OB_TYPE_SUPPORT_VGROUP(ob->type) && data && !data->lib);
}
static int vertex_group_poll_edit(bContext *C)
static int UNUSED_FUNCTION(vertex_group_poll_edit)(bContext *C)
{
Object *ob= ED_object_context(C);
ID *data= (ob)? ob->data: NULL;
@@ -2572,6 +2572,9 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
if (!psmd->dm)
return;
/* NOTE: this is not nice to use tessfaces but hard to avoid since pa->num uses tessfaces */
BKE_mesh_tessface_ensure(me);
mirrorfaces= mesh_get_x_mirror_faces(ob, NULL);
if (!edit->mirror_cache)
+1 -1
View File
@@ -1035,7 +1035,7 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemL(layout, "Location:", ICON_NONE);
row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, "location", 0, "", ICON_NONE);
uiItemR(row, ptr, "translation", 0, "", ICON_NONE);
uiItemL(layout, "Rotation:", ICON_NONE);
row= uiLayoutRow(layout, 1);
@@ -202,8 +202,7 @@ static void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* dull unselected faces so as not to get in the way of seeing color */
glColor4ub(96, 96, 96, 64);
dm->drawMappedFacesTex(dm, draw_mesh_face_select__drawFaceOptsInv, NULL, (void *)me);
dm->drawMappedFaces(dm, draw_mesh_face_select__drawFaceOptsInv, NULL, NULL, (void *)me, 0);
glDisable(GL_BLEND);
}
@@ -2083,9 +2083,10 @@ void node_tex_environment(vec3 co, sampler2D ima, out vec4 color)
color = texture2D(ima, vec2(u, v));
}
void node_tex_image(vec3 co, sampler2D ima, out vec4 color)
void node_tex_image(vec3 co, sampler2D ima, out vec4 color, out float alpha)
{
color = texture2D(ima, co.xy);
alpha = color.a;
}
void node_tex_magic(vec3 p, float scale, float distortion, out vec4 color, out float fac)
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -74,9 +74,10 @@ typedef struct Key {
short type, totkey;
short slurph, flag;
float ctime;
/*can never be 0, this is used for detecting old data*/
int uidgen, pad; /*current free uid for keyblocks*/
int uidgen; /*current free uid for keyblocks*/
} Key;
/* **************** KEY ********************* */
+10 -1
View File
@@ -33,6 +33,7 @@
#include "rna_internal.h"
#include "DNA_ID.h"
#include "DNA_scene_types.h"
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
@@ -620,7 +621,15 @@ static void rna_def_key(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", KEY_RELATIVE);
RNA_def_property_ui_text(prop, "Relative", "Make shape keys relative");
RNA_def_property_ui_text(prop, "Relative",
"Make shape keys relative, "
"otherwise play through shapes as a sequence using the evaluation time");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ctime");
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Evaluation Time", "Evaluation time for absolute shape keys");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop = RNA_def_property(srna, "slurph", PROP_INT, PROP_UNSIGNED);
@@ -101,7 +101,7 @@
if (data) { \
CustomDataLayer *layer; \
int layer_index = CustomData_get_layer_index(data, layer_type); \
for (layer = data->layers, a = 0; layer_index + a < data->totlayer; layer++, a++) { \
for (layer = data->layers + layer_index, a = 0; layer_index + a < data->totlayer; layer++, a++) { \
if (value.data == layer) { \
CustomData_set_layer_##active_type(data, layer_type, a); \
\
+12 -7
View File
@@ -685,14 +685,14 @@ static void rna_NodeTree_node_clear(bNodeTree *ntree)
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, bNodeSocket *in, bNodeSocket *out)
static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, bNodeSocket *fromsock, bNodeSocket *tosock)
{
bNodeLink *ret;
bNode *fromnode = NULL, *tonode = NULL;
int from_in_out, to_in_out;
nodeFindNode(ntree, in, &fromnode, NULL, &from_in_out);
nodeFindNode(ntree, out, &tonode, NULL, &to_in_out);
nodeFindNode(ntree, fromsock, &fromnode, NULL, &from_in_out);
nodeFindNode(ntree, tosock, &tonode, NULL, &to_in_out);
if (&from_in_out == &to_in_out) {
BKE_reportf(reports, RPT_ERROR, "Same input/output direction of sockets");
@@ -700,9 +700,12 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, b
}
/* unlink node input socket */
nodeRemSocketLinks(ntree, out);
if (to_in_out == SOCK_IN)
nodeRemSocketLinks(ntree, tosock);
else
nodeRemSocketLinks(ntree, fromsock);
ret = nodeAddLink(ntree, fromnode, in, tonode, out);
ret = nodeAddLink(ntree, fromnode, fromsock, tonode, tosock);
if (ret) {
nodeUpdate(ntree, tonode);
@@ -711,6 +714,7 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, b
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
return ret;
}
@@ -1173,7 +1177,7 @@ static void def_sh_mapping(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "TexMapping", "storage");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
@@ -1671,7 +1675,8 @@ static void def_cmp_vector_blur(StructRNA *srna)
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_range(prop, 0.0, 20.0);
RNA_def_property_ui_range(prop, 0.0, 2.0, 1.0, 2);
RNA_def_property_ui_text(prop, "Blur Factor",
"Scaling factor for motion vectors (actually, 'shutter speed', in frames)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
@@ -230,6 +230,7 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr)
case OB_MESH:
EDBM_mesh_load(ob);
EDBM_mesh_make(scene->toolsettings, scene, ob);
EDBM_mesh_normals_update(((Mesh*)ob->data)->edit_btmesh);
BMEdit_RecalcTessellation(((Mesh*)ob->data)->edit_btmesh);
break;
case OB_CURVE:
+1 -1
View File
@@ -468,7 +468,7 @@ static void rna_def_texmapping(BlenderRNA *brna)
srna = RNA_def_struct(brna, "TexMapping", NULL);
RNA_def_struct_ui_text(srna, "Texture Mapping", "Texture coordinate mapping settings");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
+7 -6
View File
@@ -2865,7 +2865,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
/* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
/* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
/* Note: As this list is in alphabetical order, and not defined order,
* here is the highest define currently in use: 29 (kyrgyz). */
* here is the highest define currently in use: 30 (turkish). */
static EnumPropertyItem language_items[] = {
{ 0, "", 0, "Nearly done", ""},
{ 0, "DEFAULT", 0, "Default (Default)", ""},
@@ -2879,28 +2879,29 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{ 0, "", 0, "In progress", ""},
/* using the utf8 flipped form of Arabic (العربية) */
{21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"},
{12, "BRAZILIAN_PORTUGUESE", 0, "Portuguese (Português)", "pt"},
{22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"},
{10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},
{16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
{11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
{ 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},
/* { 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},*/ /* XXX No po's yet. */
{ 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
{ 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
{ 2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
{29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ki_KG"},
{24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},
/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},*/ /* XXX No po's yet. */
{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
/* using the utf8 flipped form of Persian (فارسی) */
{26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_IR"},
{19, "POLISH", 0, "Polish (Polski)", "pl_PL"},
{20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"},
{12, "BRAZILIAN_PORTUGUESE", 0, "Portuguese (Português)", "pt"},
/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"},*/ /* XXX No po's yet. */
{17, "SERBIAN", 0, "Serbian (Српски)", "sr_RS"},
{28, "SERBIAN_LATIN", 0, "Serbian latin (Srpski latinica)", "sr_RS@latin"},
{ 7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"},
{18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},
{30, "TURKISH", 0, "Turkish (Türkçe)", "tr_TR"},
/* {18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},*/ /* XXX No po's yet. */
{ 0, NULL, 0, NULL, NULL}};
#ifdef WITH_CYCLES
+13 -5
View File
@@ -443,23 +443,31 @@ static PyObject *bpy_bm_utils_face_split(PyObject *UNUSED(self), PyObject *args)
PyDoc_STRVAR(bpy_bm_utils_face_join_doc,
".. method:: face_join(faces)\n"
".. method:: face_join(faces, remove=True)\n"
"\n"
" Joins a sequence of faces.\n"
"\n"
" :arg faces: Sequence of faces.\n"
" :type faces: :class:`bmesh.types.BMFace`\n"
" :arg remove: Remove the edges and vertices between the faces.\n"
" :type remove: boolean\n"
" :return: The newly created face or None on failure.\n"
" :rtype: :class:`bmesh.types.BMFace`\n"
);
static PyObject *bpy_bm_utils_face_join(PyObject *UNUSED(self), PyObject *value)
static PyObject *bpy_bm_utils_face_join(PyObject *UNUSED(self), PyObject *args)
{
BMesh *bm = NULL;
PyObject *py_face_array;
BMFace **face_array;
Py_ssize_t face_seq_len = 0;
BMFace *f_new;
int do_remove = TRUE;
face_array = BPy_BMElem_PySeq_As_Array(&bm, value, 2, PY_SSIZE_T_MAX,
if (!PyArg_ParseTuple(args, "O|i:face_join", &py_face_array, &do_remove)) {
return NULL;
}
face_array = BPy_BMElem_PySeq_As_Array(&bm, py_face_array, 2, PY_SSIZE_T_MAX,
&face_seq_len, BM_FACE,
TRUE, TRUE, "face_join(...)");
@@ -469,7 +477,7 @@ static PyObject *bpy_bm_utils_face_join(PyObject *UNUSED(self), PyObject *value)
/* Go ahead and join the face!
* --------------------------- */
f_new = BM_faces_join(bm, face_array, (int)face_seq_len);
f_new = BM_faces_join(bm, face_array, (int)face_seq_len, do_remove);
PyMem_FREE(face_array);
@@ -615,7 +623,7 @@ static struct PyMethodDef BPy_BM_utils_methods[] = {
{"edge_split", (PyCFunction)bpy_bm_utils_edge_split, METH_VARARGS, bpy_bm_utils_edge_split_doc},
{"edge_rotate", (PyCFunction)bpy_bm_utils_edge_rotate, METH_VARARGS, bpy_bm_utils_edge_rotate_doc},
{"face_split", (PyCFunction)bpy_bm_utils_face_split, METH_VARARGS, bpy_bm_utils_face_split_doc},
{"face_join", (PyCFunction)bpy_bm_utils_face_join, METH_O, bpy_bm_utils_face_join_doc},
{"face_join", (PyCFunction)bpy_bm_utils_face_join, METH_VARARGS, bpy_bm_utils_face_join_doc},
{"face_vert_separate", (PyCFunction)bpy_bm_utils_face_vert_separate, METH_VARARGS, bpy_bm_utils_face_vert_separate_doc},
{"face_flip", (PyCFunction)bpy_bm_utils_face_flip, METH_O, bpy_bm_utils_face_flip_doc},
{"loop_separate", (PyCFunction)bpy_bm_utils_loop_separate, METH_O, bpy_bm_utils_loop_separate_doc},
@@ -1302,7 +1302,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemL(col, "Links", ICON_NONE);
uiItemStringO(col, IFACE_("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
uiItemStringO(col, IFACE_("Credits"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-262");
uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-263");
uiItemStringO(col, IFACE_("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
uiItemStringO(col, IFACE_("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
uiItemStringO(col, IFACE_("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
@@ -121,6 +121,7 @@ struct wmWindowManager;
void EDBM_selectmode_set(struct BMEditMesh *em) {}
void EDBM_mesh_load(struct Object *ob) {}
void EDBM_mesh_make(struct ToolSettings *ts, struct Scene *scene, struct Object *ob) {}
void EDBM_mesh_normals_update(struct BMEditMesh *em) {}
void *g_system;
struct Heap* BLI_heap_new (void){return NULL;}
@@ -192,7 +192,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
bool mouse_state = startscene->gm.flag & GAME_SHOW_MOUSE;
bool restrictAnimFPS = startscene->gm.flag & GAME_RESTRICT_ANIM_UPDATES;
if (animation_record) usefixed= true; /* override since you's always want fixed time for sim recording */
if (animation_record) usefixed= false; /* override since you don't want to run full-speed for sim recording */
// create the canvas, rasterizer and rendertools
RAS_ICanvas* canvas = new KX_BlenderCanvas(win, area_rect, ar);
+3 -3
View File
@@ -1342,7 +1342,7 @@ void KX_Dome::FlattenPanorama(MT_Vector3 verts[3])
{
// it creates a full spherical panoramic (360deg)
int i;
double phi;
double phi, theta;
bool edge=false;
for (i=0;i<3;i++) {
@@ -1355,8 +1355,8 @@ void KX_Dome::FlattenPanorama(MT_Vector3 verts[3])
verts[i][0] = phi / MT_PI;
verts[i][1] = 0;
verts[i][2] = atan2(verts[i][2], 1.0);
verts[i][2] /= MT_PI / 2;
theta = asin(verts[i][2]);
verts[i][2] = theta / MT_PI;
}
if (edge) {
bool right=false;
+2 -2
View File
@@ -1772,8 +1772,8 @@ void KX_KetsjiEngine::SetAnimRecordMode(bool animation_record, int startFrame)
m_animation_record = animation_record;
if (animation_record)
{
//when recording physics keyframes, always run at a fixed framerate
m_bFixedTime = true;
//when recording physics keyframes, run at a variable (capped) frame rate (fixed time == full speed)
m_bFixedTime = false;
}
m_currentFrame = startFrame;
}
@@ -39,8 +39,8 @@ http://www.gnu.org/copyleft/lesser.txt.
#include <string>
#include "Exception.h"
#include "VideoFFmpeg.h"
#include "Exception.h"
// default framerate
+2 -2
View File
@@ -33,7 +33,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include <inttypes.h>
#endif
extern "C" {
#undef __cplusplus
// #undef __cplusplus // was done for mingw4.4, see r23608
#include <pthread.h>
#include "ffmpeg_compat.h"
@@ -41,7 +41,7 @@ extern "C" {
#include "DNA_listBase.h"
#include "BLI_threads.h"
#include "BLI_blenlib.h"
#define __cplusplus
// #define __cplusplus
}
#if LIBAVFORMAT_VERSION_INT < (49 << 16)