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:
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py16
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c10
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c16
5 files changed, 27 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 806256dd502..d93645d0c5c 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -132,6 +132,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, bpy.types.Panel):
layout.separator()
if (surface.surface_type == "PAINT"):
+ layout.label(text="Wetmap drying:")
split = layout.split(percentage=0.8)
split.prop(surface, "dry_speed", text="Dry Time")
split.prop(surface, "use_dry_log", text="Slow")
@@ -206,16 +207,23 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, bpy.types.Panel):
col.label(text="UV layer:")
col.prop_search(surface, "uv_layer", ob.data, "uv_textures", text="")
+ col.separator()
col = layout.column()
col.prop(surface, "image_output_path", text="Output directory")
- col.prop(surface, "image_fileformat", text="Image Format:")
+ col.prop(surface, "image_fileformat", text="Image Format")
+ col.separator()
if (surface.surface_type == "PAINT"):
+ split = col.split()
+ col = split.column()
col.prop(surface, "do_output1", text="Output Paintmaps:")
- sub = col.column()
+ sub = split.column()
+ sub.prop(surface, "premultiply", text="Premultiply alpha")
+ sub.active = surface.do_output1
+ sub = layout.column()
sub.active = surface.do_output1
sub.prop(surface, "output_name", text="Filename: ")
- sub.prop(surface, "premultiply", text="Premultiply alpha")
+ col = layout.column()
col.prop(surface, "do_output2", text="Output Wetmaps:")
sub = col.column()
sub.active = surface.do_output2
@@ -241,7 +249,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, bpy.types.Panel):
if ((not md) or (md.dynamicpaint_type != 'CANVAS')):
return False;
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
- return surface and (surface.surface_format != "PTEX")
+ return surface and (surface.surface_type == "PAINT")
def draw(self, context):
layout = self.layout
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.");
/*