Merge with trunk r39750
[blender.git] / source / blender / makesrna / intern / rna_object_force.c
index 490d9c38840fc501832c9670fccf388d2aab36ab..39c08e0385a1af0cd620a126ad500ef984a41149 100644 (file)
@@ -644,6 +644,22 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
                        if (smd->domain->effector_weights == ew)
                                return BLI_sprintfN("modifiers[\"%s\"].settings.effector_weights", md->name);
                }
+
+               /* check dynamic paint modifier */
+               md = (ModifierData *)modifiers_findByType(ob, eModifierType_DynamicPaint);
+               if (md) {
+                       DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
+
+                       if (pmd->canvas) {
+                               DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
+
+                               for(; surface; surface=surface->next) {
+                                       if (surface->effector_weights == ew)
+                                               return BLI_sprintfN("modifiers[\"%s\"].canvas_settings.canvas_surfaces[\"%s\"].effector_weights",
+                                                       md->name, surface->name);
+                               }
+                       }
+               }
        }
        return NULL;
 }