[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30436] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/ blender -r30429:30435
Campbell Barton
ideasman42 at gmail.com
Sat Jul 17 15:45:25 CEST 2010
Revision: 30436
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30436
Author: campbellbarton
Date: 2010-07-17 15:45:25 +0200 (Sat, 17 Jul 2010)
Log Message:
-----------
Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30429:30435
Modified Paths:
--------------
branches/render25/release/scripts/ui/properties_render.py
branches/render25/source/blender/blenkernel/BKE_sound.h
branches/render25/source/blender/blenkernel/intern/image.c
branches/render25/source/blender/blenkernel/intern/sound.c
branches/render25/source/blender/editors/armature/poseobject.c
branches/render25/source/blender/editors/sculpt_paint/sculpt.c
branches/render25/source/blender/editors/space_sequencer/sequencer_draw.c
branches/render25/source/blender/imbuf/intern/png.c
branches/render25/source/blender/makesrna/intern/rna_scene.c
Modified: branches/render25/release/scripts/ui/properties_render.py
===================================================================
--- branches/render25/release/scripts/ui/properties_render.py 2010-07-17 13:41:22 UTC (rev 30435)
+++ branches/render25/release/scripts/ui/properties_render.py 2010-07-17 13:45:25 UTC (rev 30436)
@@ -305,6 +305,7 @@
layout = self.layout
rd = context.scene.render
+ file_format = rd.file_format
wide_ui = context.region.width > narrowui
layout.prop(rd, "output_path", text="")
@@ -320,11 +321,15 @@
col.prop(rd, "use_overwrite")
col.prop(rd, "use_placeholder")
- if rd.file_format in ('AVI_JPEG', 'JPEG'):
+ if file_format in ('AVI_JPEG', 'JPEG'):
split = layout.split()
split.prop(rd, "file_quality", slider=True)
+
+ if file_format == 'PNG':
+ split = layout.split()
+ split.prop(rd, "file_quality", slider=True, text="Compression")
- elif rd.file_format == 'MULTILAYER':
+ elif file_format == 'MULTILAYER':
split = layout.split()
col = split.column()
@@ -333,7 +338,7 @@
if wide_ui:
col = split.column()
- elif rd.file_format == 'OPEN_EXR':
+ elif file_format == 'OPEN_EXR':
split = layout.split()
col = split.column()
@@ -350,7 +355,7 @@
col = subsplit.column()
col.prop(rd, "exr_preview")
- elif rd.file_format == 'JPEG2000':
+ elif file_format == 'JPEG2000':
split = layout.split()
col = split.column()
col.label(text="Depth:")
@@ -361,7 +366,7 @@
col.prop(rd, "jpeg2k_preset", text="")
col.prop(rd, "jpeg2k_ycc")
- elif rd.file_format in ('CINEON', 'DPX'):
+ elif file_format in ('CINEON', 'DPX'):
split = layout.split()
col = split.column()
col.prop(rd, "cineon_log", text="Convert to Log")
@@ -373,15 +378,15 @@
col.prop(rd, "cineon_white", text="White")
col.prop(rd, "cineon_gamma", text="Gamma")
- elif rd.file_format == 'TIFF':
+ elif file_format == 'TIFF':
split = layout.split()
split.prop(rd, "tiff_bit")
- elif rd.file_format == 'QUICKTIME_CARBON':
+ elif file_format == 'QUICKTIME_CARBON':
split = layout.split()
split.operator("scene.render_data_set_quicktime_codec")
- elif rd.file_format == 'QUICKTIME_QTKIT':
+ elif file_format == 'QUICKTIME_QTKIT':
split = layout.split()
col = split.column()
col.prop(rd, "quicktime_codec_type", text="Video Codec")
Modified: branches/render25/source/blender/blenkernel/BKE_sound.h
===================================================================
--- branches/render25/source/blender/blenkernel/BKE_sound.h 2010-07-17 13:41:22 UTC (rev 30435)
+++ branches/render25/source/blender/blenkernel/BKE_sound.h 2010-07-17 13:45:25 UTC (rev 30436)
@@ -94,6 +94,6 @@
int sound_scene_playing(struct Scene *scene);
-int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length);
+int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end);
#endif
Modified: branches/render25/source/blender/blenkernel/intern/image.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/image.c 2010-07-17 13:41:22 UTC (rev 30435)
+++ branches/render25/source/blender/blenkernel/intern/image.c 2010-07-17 13:45:25 UTC (rev 30436)
@@ -1180,6 +1180,10 @@
}
else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) {
ibuf->ftype= PNG;
+
+ if(imtype==R_PNG)
+ ibuf->ftype |= quality; /* quality is actually compression 0-100 --> 0-9 */
+
}
#ifdef WITH_DDS
else if ((imtype==R_DDS)) {
Modified: branches/render25/source/blender/blenkernel/intern/sound.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/sound.c 2010-07-17 13:41:22 UTC (rev 30435)
+++ branches/render25/source/blender/blenkernel/intern/sound.c 2010-07-17 13:45:25 UTC (rev 30436)
@@ -468,7 +468,9 @@
return -1;
}
-int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length)
+int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end)
{
- return AUD_readSound(sound->cache, buffer, length);
+ AUD_Sound* limiter = AUD_limitSound(sound->cache, start, end);
+ return AUD_readSound(limiter, buffer, length);
+ AUD_unload(limiter);
}
Modified: branches/render25/source/blender/editors/armature/poseobject.c
===================================================================
--- branches/render25/source/blender/editors/armature/poseobject.c 2010-07-17 13:41:22 UTC (rev 30435)
+++ branches/render25/source/blender/editors/armature/poseobject.c 2010-07-17 13:45:25 UTC (rev 30436)
@@ -1046,17 +1046,7 @@
/* Update event for pose and deformation children */
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
-
- if (IS_AUTOKEY_ON(scene)) {
-// XXX remake_action_ipos(ob->action);
- }
- else {
- /* need to trick depgraph, action is not allowed to execute on pose */
- // XXX: this is probably not an issue anymore
- where_is_pose(scene, ob);
- ob->recalc= 0;
- }
-
+
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
Modified: branches/render25/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/render25/source/blender/editors/sculpt_paint/sculpt.c 2010-07-17 13:41:22 UTC (rev 30435)
+++ branches/render25/source/blender/editors/sculpt_paint/sculpt.c 2010-07-17 13:45:25 UTC (rev 30436)
@@ -2956,6 +2956,78 @@
cache->vertex_rotation= 0;
}
+static void sculpt_update_brush_delta(Sculpt *sd, SculptSession *ss, Brush *brush)
+{
+ StrokeCache *cache = ss->cache;
+ int tool = brush->sculpt_tool;
+
+ if(ELEM5(tool,
+ SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE,
+ SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_SNAKE_HOOK,
+ SCULPT_TOOL_THUMB)) {
+ float grab_location[3], imat[4][4], delta[3];
+
+ if(cache->first_time) {
+ copy_v3_v3(cache->orig_grab_location,
+ cache->true_location);
+ }
+ else if(tool == SCULPT_TOOL_SNAKE_HOOK)
+ add_v3_v3(cache->true_location, cache->grab_delta);
+
+ /* compute 3d coordinate at same z from original location + mouse */
+ initgrabz(cache->vc->rv3d,
+ cache->orig_grab_location[0],
+ cache->orig_grab_location[1],
+ cache->orig_grab_location[2]);
+
+ window_to_3d_delta(cache->vc->ar, grab_location,
+ cache->mouse[0], cache->mouse[1]);
+
+ /* compute delta to move verts by */
+ if(!cache->first_time) {
+ switch(tool) {
+ case SCULPT_TOOL_GRAB:
+ case SCULPT_TOOL_THUMB:
+ sub_v3_v3v3(delta, grab_location, cache->old_grab_location);
+ invert_m4_m4(imat, ss->ob->obmat);
+ mul_mat3_m4_v3(imat, delta);
+ add_v3_v3(cache->grab_delta, delta);
+ break;
+ case SCULPT_TOOL_CLAY_TUBES:
+ case SCULPT_TOOL_NUDGE:
+ sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
+ invert_m4_m4(imat, ss->ob->obmat);
+ mul_mat3_m4_v3(imat, cache->grab_delta);
+ break;
+ case SCULPT_TOOL_SNAKE_HOOK:
+ sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
+ invert_m4_m4(imat, ss->ob->obmat);
+ mul_mat3_m4_v3(imat, cache->grab_delta);
+ break;
+ }
+ }
+ else {
+ zero_v3(cache->grab_delta);
+ }
+
+ copy_v3_v3(cache->old_grab_location, grab_location);
+
+ if(tool == SCULPT_TOOL_GRAB)
+ copy_v3_v3(sd->anchored_location, cache->true_location);
+ else if(tool == SCULPT_TOOL_THUMB)
+ copy_v3_v3(sd->anchored_location, cache->orig_grab_location);
+
+ if(ELEM(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB)) {
+ /* location stays the same for finding vertices in brush radius */
+ copy_v3_v3(cache->true_location, cache->orig_grab_location);
+
+ sd->draw_anchored = 1;
+ copy_v3_v3(sd->anchored_initial_mouse, cache->initial_mouse);
+ sd->anchored_size = cache->pixel_radius;
+ }
+ }
+}
+
/* Initialize the stroke cache variants from operator properties */
static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, SculptSession *ss, struct PaintStroke *stroke, PointerRNA *ptr)
{
@@ -3083,125 +3155,9 @@
}
}
- /* Find the grab delta */
- if(brush->sculpt_tool == SCULPT_TOOL_GRAB) {
- float grab_location[3], imat[4][4];
+ sculpt_update_brush_delta(sd, ss, brush);
- if(cache->first_time)
- copy_v3_v3(cache->orig_grab_location, cache->true_location);
-
- /* compute 3d coordinate at same z from original location + mouse */
- initgrabz(cache->vc->rv3d, cache->orig_grab_location[0],
- cache->orig_grab_location[1], cache->orig_grab_location[2]);
- window_to_3d_delta(cache->vc->ar, grab_location, cache->mouse[0], cache->mouse[1]);
-
- /* compute delta to move verts by */
- if(!cache->first_time) {
- float delta[3];
- sub_v3_v3v3(delta, grab_location, cache->old_grab_location);
- invert_m4_m4(imat, ss->ob->obmat);
- mul_mat3_m4_v3(imat, delta);
- add_v3_v3(cache->grab_delta, delta);
- }
- else {
- zero_v3(cache->grab_delta);
- }
-
- copy_v3_v3(cache->old_grab_location, grab_location);
-
- /* location stays the same for finding vertices in brush radius */
- copy_v3_v3(cache->true_location, cache->orig_grab_location);
-
- sd->draw_anchored = 1;
- copy_v3_v3(sd->anchored_location, cache->true_location);
- copy_v3_v3(sd->anchored_initial_mouse, cache->initial_mouse);
- sd->anchored_size = cache->pixel_radius;
- }
- /* Find the nudge/clay tubes delta */
- else if(brush->sculpt_tool == SCULPT_TOOL_NUDGE || brush->sculpt_tool == SCULPT_TOOL_CLAY_TUBES) {
- float grab_location[3], imat[4][4];
-
- if(cache->first_time)
- copy_v3_v3(cache->orig_grab_location, cache->true_location);
-
- /* compute 3d coordinate at same z from original location + mouse */
- initgrabz(cache->vc->rv3d, cache->orig_grab_location[0],
- cache->orig_grab_location[1], cache->orig_grab_location[2]);
- window_to_3d_delta(cache->vc->ar, grab_location, cache->mouse[0], cache->mouse[1]);
-
- /* compute delta to move verts by */
- if (!cache->first_time) {
- sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list