Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-25 14:39:56 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-25 14:39:56 +0300
commitcbb23d96bb4644bd4fdeadbfd790694e57983c53 (patch)
tree544b5674164199f17f423b94f976cdf12dadc756 /source/blender/editors/sculpt_paint
parentaab5a7a4af19335f07231b30f86df8d2fc7bc9e7 (diff)
Added simplification back for quicker preview renders with less subdivision
levels, child particles, and shadow/SSS/AO quality.. Now also works on what is displayed in the 3d view instead of only rendering, see panel in the scene properties. Most file changes were to make scene available in the isDisabled modifier callback function.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c11
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h1
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 6671fec783e..16c7bffd938 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1460,12 +1460,12 @@ static void sculpt_update_tex(Sculpt *sd, SculptSession *ss)
}
/* Checks whether full update mode (slower) needs to be used to work with modifiers */
-char sculpt_modifiers_active(Object *ob)
+static int sculpt_modifiers_active(Scene *scene, Object *ob)
{
ModifierData *md;
for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
- if(modifier_isEnabled(md, eModifierMode_Realtime))
+ if(modifier_isEnabled(scene, md, eModifierMode_Realtime))
if(!ELEM(md->type, eModifierType_Multires, eModifierType_ShapeKey))
return 1;
}
@@ -1801,7 +1801,9 @@ static void sculpt_update_cache_variants(Sculpt *sd, SculptSession *ss, struct P
static void sculpt_stroke_modifiers_check(bContext *C, SculptSession *ss)
{
- if(sculpt_modifiers_active(ss->ob)) {
+ Scene *scene= CTX_data_scene(C);
+
+ if(sculpt_modifiers_active(scene, ss->ob)) {
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Brush *brush = paint_brush(&sd->paint);
@@ -1979,6 +1981,7 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
static void sculpt_flush_update(bContext *C)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
ARegion *ar = CTX_wm_region(C);
@@ -1988,7 +1991,7 @@ static void sculpt_flush_update(bContext *C)
if(mmd)
multires_mark_as_modified(ob);
- if(sculpt_modifiers_active(ob)) {
+ if(sculpt_modifiers_active(scene, ob)) {
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
ED_region_tag_redraw(ar);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 0e1c0510902..0fd2eee60bd 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -54,7 +54,6 @@ struct MultiresModifierData *sculpt_multires_active(struct Object *ob);
struct Brush *sculptmode_brush(void);
//void do_symmetrical_brush_actions(struct Sculpt *sd, struct wmOperator *wm, struct BrushAction *a, short *, short *);
-char sculpt_modifiers_active(struct Object *ob);
void sculpt(Sculpt *sd);
int sculpt_poll(struct bContext *C);