diff options
author | Miika Hamalainen <blender@miikah.org> | 2011-07-03 18:01:57 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2011-07-03 18:01:57 +0400 |
commit | 901f24716b70e961a28fabc5820ced0983b025e0 (patch) | |
tree | df89551a3b687860c9242dc811f5e2af53c17e9c /source | |
parent | fdc59b8a40014c28e033f39cbf144565568d7058 (diff) |
Dynamic Paint:
* Some ui and rna tweaking.
* Effects ui panel is no longer visible for non-paint surfaces.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_dynamicpaint.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 10 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_dynamicpaint.c | 16 |
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index f9b16336de8..5c041cb4a5b 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -69,7 +69,7 @@ void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct Dyn void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface); void dynamicPaint_clearSurface(DynamicPaintSurface *surface); int dynamicPaint_resetSurface(struct DynamicPaintSurface *surface); -int dynamicPaint_surfaceHasPreview(DynamicPaintSurface *surface); +int dynamicPaint_surfaceHasColorPreview(DynamicPaintSurface *surface); void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface); void dynamicPaintSurface_setUniqueName(DynamicPaintSurface *surface, char *basename); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index f0785d1f0fe..e36167fb23f 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -90,7 +90,6 @@ struct Object; struct Scene; struct DerivedMesh; -//struct DynamicPaintModifierData; /* * Init predefined antialias jitter data @@ -217,10 +216,11 @@ static int dynamicPaint_surfaceNumOfPoints(DynamicPaintSurface *surface) } /* checks whether surface's format/type has realtime preview */ -int dynamicPaint_surfaceHasPreview(DynamicPaintSurface *surface) { +int dynamicPaint_surfaceHasColorPreview(DynamicPaintSurface *surface) { if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) return 0; else if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { - if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) return 0; + if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE || + surface->type == MOD_DPAINT_SURFACE_T_WAVE) return 0; else return 1; } else return 1; @@ -247,7 +247,7 @@ static void dynamicPaint_resetPreview(DynamicPaintCanvasSettings *canvas) int done=0; for(; surface; surface=surface->next) { - if (!done && dynamicPaint_surfaceHasPreview(surface)) { + if (!done && dynamicPaint_surfaceHasColorPreview(surface)) { surface->flags |= MOD_DPAINT_PREVIEW; done=1; } @@ -295,7 +295,7 @@ void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface) { } /* update preview */ - if (dynamicPaint_surfaceHasPreview(surface)) + if (dynamicPaint_surfaceHasColorPreview(surface)) dynamicPaint_setPreview(surface); else dynamicPaint_resetPreview(surface->canvas); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index e25af029fe4..c4308798fa7 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2138,7 +2138,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe sprintf(name_final, "%s (%s)",name,enum_name); uiItemL(sub, name_final, icon); - if (dynamicPaint_surfaceHasPreview(surface)) { + if (dynamicPaint_surfaceHasColorPreview(surface)) { uiBlockSetEmboss(block, UI_EMBOSSN); uiDefIconButR(block, OPTION, 0, (surface->flags & MOD_DPAINT_PREVIEW) ? ICON_RESTRICT_VIEW_OFF : ICON_RESTRICT_VIEW_ON, 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "show_preview", 0, 0, 0, 0, 0, NULL); diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index d89df053a30..deff2332b7f 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -434,8 +434,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) prop= RNA_def_property(srna, "spread_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spread_speed"); - RNA_def_property_range(prop, 0.01, 5.0); - RNA_def_property_ui_range(prop, 0.001, 20.0, 1, 2); + RNA_def_property_range(prop, 0.001, 10.0); + RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2); RNA_def_property_ui_text(prop, "Spread Speed", "How fast spread effect moves on the canvas surface."); prop= RNA_def_property(srna, "use_drip", PROP_BOOLEAN, PROP_NONE); @@ -448,8 +448,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) prop= RNA_def_property(srna, "shrink_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shrink_speed"); - RNA_def_property_range(prop, 0.01, 5.0); - RNA_def_property_ui_range(prop, 0.01, 20.0, 1, 2); + RNA_def_property_range(prop, 0.001, 10.0); + RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2); RNA_def_property_ui_text(prop, "Shrink Speed", "How fast shrink effect moves on the canvas surface."); prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); @@ -527,7 +527,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) prop= RNA_def_property(srna, "wave_spring", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "wave_spring"); - RNA_def_property_range(prop, 0.01, 1.0); + RNA_def_property_range(prop, 0.001, 1.0); RNA_def_property_ui_range(prop, 0.01, 1.0, 1, 2); RNA_def_property_ui_text(prop, "Spring", "Spring force that pulls water level back to zero."); @@ -627,7 +627,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "paint_alpha", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "alpha"); RNA_def_property_range(prop, 0.0, 10.0); - RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2); + RNA_def_property_ui_range(prop, 0.0, 10.0, 5, 2); RNA_def_property_ui_text(prop, "Paint Alpha", "Paint alpha."); prop= RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE); @@ -646,7 +646,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "paint_wetness", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "wetness"); RNA_def_property_range(prop, 0.0, 1.0); - RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 3); + RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2); RNA_def_property_ui_text(prop, "Paint Wetness", "Paint Wetness. Visible in wet map. Some effects only affect wet paint."); prop= RNA_def_property(srna, "paint_erase", PROP_BOOLEAN, PROP_NONE); @@ -662,7 +662,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "wave_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "wave_factor"); RNA_def_property_range(prop, -2.0, 2.0); - RNA_def_property_ui_range(prop, -1.0, 1.0, 1, 2); + RNA_def_property_ui_range(prop, -1.0, 1.0, 5, 2); RNA_def_property_ui_text(prop, "Factor", "Multiplier for wave strenght of this brush."); /* |